Files
nixpkgs/pkgs/by-name/dc/dc3dd/package.nix
Sergei Trofimovich 03e96250de dc3dd: fix for gcc-15
Without the chnage the build fails as https://hydra.nixos.org/build/326967790:

```
In file included from argmatch.c:22:
argmatch.c: In function '__argmatch_die':
./config.h:8:22: error: too many arguments to function 'usage'; expected 0, have 1
    8 | #define ARGMATCH_DIE usage (1)
      |                      ^~~~~  ~
```

Work it around by falling back to pre-c23 standard.
2026-05-03 14:36:02 +01:00

47 lines
1.0 KiB
Nix

{
lib,
stdenv,
fetchzip,
perlPackages,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "dc3dd";
version = "7.3.1";
src = fetchzip {
url = "mirror://sourceforge/dc3dd/dc3dd-${finalAttrs.version}.zip";
hash = "sha256-SYDoqGlsROHX1a0jJX11F+yp6CeFK+tZbYOOnScC6Ig=";
};
outputs = [
"out"
"man"
];
preConfigure = ''
chmod +x configure
'';
buildInputs = [ perlPackages.LocaleGettext ];
# Remove once upstream ports to c23: https://sourceforge.net/p/dc3dd/bugs/24/
env.NIX_CFLAGS_COMPILE = "-std=gnu17";
makeFlags = [
"PREFIX=$out"
"CC=${stdenv.cc.targetPrefix}cc"
];
enableParallelBuilding = true;
meta = {
description = "Patched version of dd that includes a number of features useful for computer forensics";
mainProgram = "dc3dd";
homepage = "https://sourceforge.net/projects/dc3dd/";
maintainers = [ ];
platforms = lib.platforms.linux;
license = lib.licenses.gpl3Plus; # Refer to https://sourceforge.net/p/dc3dd/code/HEAD/tree/COPYING
};
})