Skip to content

Commit

Permalink
Merge pull request NixOS#297360 from emilytrau/ddd-3.4.0
Browse files Browse the repository at this point in the history
ddd: 3.3.12 -> 3.4.0
  • Loading branch information
emilytrau authored Aug 26, 2024
2 parents 4da8cc8 + fbc9fff commit c50e76f
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 27 deletions.
7 changes: 7 additions & 0 deletions pkgs/development/libraries/motif/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ stdenv.mkDerivation rec {
})
];

env = lib.optionalAttrs stdenv.cc.isClang {
NIX_CFLAGS_COMPILE = toString [
"-Wno-error=implicit-function-declaration"
"-Wno-error=incompatible-function-pointer-types"
];
};

enableParallelBuilding = true;

meta = with lib; {
Expand Down
67 changes: 51 additions & 16 deletions pkgs/development/tools/misc/ddd/default.nix
Original file line number Diff line number Diff line change
@@ -1,32 +1,67 @@
{lib, stdenv, fetchurl, motif, ncurses, libX11, libXt}:
{
lib,
stdenv,
fetchurl,
imagemagick,
desktopToDarwinBundle,
motif,
ncurses,
libX11,
libXt,
gdb,
}:

stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "ddd";
version = "3.3.12";
version = "3.4.0";

src = fetchurl {
url = "mirror://gnu/${pname}/${pname}-${version}.tar.gz";
sha256 = "0p5nx387857w3v2jbgvps2p6mlm0chajcdw5sfrddcglsxkwvmis";
url = "mirror://gnu/ddd/ddd-${finalAttrs.version}.tar.gz";
hash = "sha256-XUy8iguwRYVDhm1nkwjFOj7wZuQC/loZGOGWmKPTWA8=";
};
buildInputs = [motif ncurses libX11 libXt];
configureFlags = [ "--with-x" ];

patches = [
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=504868
./gcc44.patch
postPatch = ''
substituteInPlace ddd/Ddd.in \
--replace-fail 'debuggerCommand:' 'debuggerCommand: ${gdb}/bin/gdb'
'';

nativeBuildInputs = [ imagemagick ] ++ lib.optionals stdenv.isDarwin [ desktopToDarwinBundle ];

buildInputs = [
motif
ncurses
libX11
libXt
];

env.NIX_CFLAGS_COMPILE = "-fpermissive";
# ioctl is not found without this flag. fixed in next release
# Upstream issue ref: https://savannah.gnu.org/bugs/index.php?64188
env = lib.optionalAttrs stdenv.isDarwin { NIX_CFLAGS_COMPILE = "-DHAVE_SYS_IOCTL_H"; };

configureFlags = [
"--enable-builtin-manual"
"--enable-builtin-app-defaults"
];

# From MacPorts: make will build the executable "ddd" and the X resource
# file "Ddd" in the same directory, as HFS+ is case-insensitive by default
# this will loosely FAIL
makeFlags = [ "EXEEXT=exe" ];
enableParallelBuilding = true;

postInstall = ''
install -D icons/ddd.xpm $out/share/pixmaps/ddd.xpm
mv $out/bin/dddexe $out/bin/ddd
convert icons/ddd.xbm ddd.png
install -D ddd.png $out/share/icons/hicolor/48x48/apps/ddd.png
'';

meta = {
homepage = "https://www.gnu.org/software/ddd";
changelog = "https://www.gnu.org/software/ddd/news.html";
description = "Graphical front-end for command-line debuggers";
homepage = "https://www.gnu.org/software/ddd";
license = lib.licenses.gpl3Only;
mainProgram = "ddd";
license = lib.licenses.gpl3Plus;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ emilytrau ];
platforms = lib.platforms.unix;
};
}
})
11 changes: 0 additions & 11 deletions pkgs/development/tools/misc/ddd/gcc44.patch

This file was deleted.

0 comments on commit c50e76f

Please sign in to comment.