summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/dc/dc3dd/package.nix
blob: 9acef0cd3d39a1f242b984bd7096e6195404786c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{
  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
  };
})