diff --git a/pkgs/development/libraries/motif/default.nix b/pkgs/development/libraries/motif/default.nix index 8551510b476c..d59c5894836d 100644 --- a/pkgs/development/libraries/motif/default.nix +++ b/pkgs/development/libraries/motif/default.nix @@ -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; { diff --git a/pkgs/development/tools/misc/ddd/default.nix b/pkgs/development/tools/misc/ddd/default.nix index 10f3fa161f73..0321b24de321 100644 --- a/pkgs/development/tools/misc/ddd/default.nix +++ b/pkgs/development/tools/misc/ddd/default.nix @@ -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"; - src = fetchurl { - url = "mirror://gnu/${pname}/${pname}-${version}.tar.gz"; - sha256 = "0p5nx387857w3v2jbgvps2p6mlm0chajcdw5sfrddcglsxkwvmis"; - }; - buildInputs = [motif ncurses libX11 libXt]; - configureFlags = [ "--with-x" ]; + version = "3.4.0"; - patches = [ - # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=504868 - ./gcc44.patch + src = fetchurl { + url = "mirror://gnu/ddd/ddd-${finalAttrs.version}.tar.gz"; + hash = "sha256-XUy8iguwRYVDhm1nkwjFOj7wZuQC/loZGOGWmKPTWA8="; + }; + + 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; }; -} +}) diff --git a/pkgs/development/tools/misc/ddd/gcc44.patch b/pkgs/development/tools/misc/ddd/gcc44.patch deleted file mode 100644 index c4e4004b12e0..000000000000 --- a/pkgs/development/tools/misc/ddd/gcc44.patch +++ /dev/null @@ -1,11 +0,0 @@ -http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=504868 ---- a/ddd/strclass.C~ 2008-11-07 17:57:13.000000000 +0000 -+++ b/ddd/strclass.C 2008-11-07 17:57:27.000000000 +0000 -@@ -39,6 +39,7 @@ - #include - #include - #include -+#include - #include - - void string::error(const char* msg) const