12 buildPerlPackage rec {
13 pname = "strip-nondeterminism";
16 outputs = [ "out" "dev" ]; # no "devdoc"
18 src = fetchFromGitLab {
19 owner = "reproducible-builds";
20 repo = "strip-nondeterminism";
21 domain = "salsa.debian.org";
23 sha256 = "czx9UhdgTsQSfDNo1mMOXCM/3/nuNe+cPZeyy2xdnKs=";
27 nativeBuildInputs = lib.optionals stdenv.isDarwin [ shortenPerlShebang ];
35 substituteInPlace lib/File/StripNondeterminism.pm \
36 --replace "exec('file'" "exec('${lib.getExe file}'"
45 # we don’t need the debhelper script
46 rm $out/bin/dh_strip_nondeterminism
47 rm $out/share/man/man1/dh_strip_nondeterminism.1
48 '' + lib.optionalString stdenv.isDarwin ''
49 shortenPerlShebang $out/bin/strip-nondeterminism
52 installCheckPhase = ''
53 runHook preInstallCheck
54 ($out/bin/strip-nondeterminism --help 2>&1 | grep -q "verbose") || (echo "'$out/bin/strip-nondeterminism --help' failed" && exit 1)
55 runHook postInstallCheck
58 # running shortenPerlShebang in postBuild results in non-functioning binary 'exec format error'
59 doCheck = !stdenv.isDarwin;
60 doInstallCheck = true;
63 description = "A Perl module for stripping bits of non-deterministic information";
64 mainProgram = "strip-nondeterminism";
65 homepage = "https://reproducible-builds.org/";
66 license = licenses.gpl3Only;
67 maintainers = with maintainers; [ pSub artturin ];