2024-09-19 14:19:46 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchurl,
|
|
|
|
imagemagick,
|
|
|
|
desktopToDarwinBundle,
|
|
|
|
motif,
|
|
|
|
ncurses,
|
|
|
|
libX11,
|
|
|
|
libXt,
|
|
|
|
gdb,
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2021-07-21 07:28:18 +00:00
|
|
|
pname = "ddd";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "3.4.0";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchurl {
|
2024-09-19 14:19:46 +00:00
|
|
|
url = "mirror://gnu/ddd/ddd-${finalAttrs.version}.tar.gz";
|
|
|
|
hash = "sha256-XUy8iguwRYVDhm1nkwjFOj7wZuQC/loZGOGWmKPTWA8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace ddd/Ddd.in \
|
|
|
|
--replace-fail 'debuggerCommand:' 'debuggerCommand: ${gdb}/bin/gdb'
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ imagemagick ] ++ lib.optionals stdenv.isDarwin [ desktopToDarwinBundle ];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
motif
|
|
|
|
ncurses
|
|
|
|
libX11
|
|
|
|
libXt
|
2021-08-05 21:33:18 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
# 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;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
postInstall = ''
|
2024-09-19 14:19:46 +00:00
|
|
|
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
|
2021-08-05 21:33:18 +00:00
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = {
|
2024-09-19 14:19:46 +00:00
|
|
|
changelog = "https://www.gnu.org/software/ddd/news.html";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Graphical front-end for command-line debuggers";
|
2024-09-19 14:19:46 +00:00
|
|
|
homepage = "https://www.gnu.org/software/ddd";
|
|
|
|
license = lib.licenses.gpl3Only;
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "ddd";
|
2022-02-20 05:27:41 +00:00
|
|
|
maintainers = with lib.maintainers; [ emilytrau ];
|
2024-09-19 14:19:46 +00:00
|
|
|
platforms = lib.platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2024-09-19 14:19:46 +00:00
|
|
|
})
|