2023-01-06 19:39:28 +00:00
|
|
|
|
{ lib
|
|
|
|
|
, stdenv
|
|
|
|
|
, file
|
|
|
|
|
, fetchFromGitLab
|
|
|
|
|
, buildPerlPackage
|
|
|
|
|
, ArchiveZip
|
|
|
|
|
, ArchiveCpio
|
|
|
|
|
, SubOverride
|
|
|
|
|
, shortenPerlShebang
|
|
|
|
|
}:
|
2019-10-21 19:59:52 +00:00
|
|
|
|
|
|
|
|
|
buildPerlPackage rec {
|
|
|
|
|
pname = "strip-nondeterminism";
|
2023-02-09 10:33:43 +00:00
|
|
|
|
version = "1.13.1";
|
2019-10-21 19:59:52 +00:00
|
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" ]; # no "devdoc"
|
|
|
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
|
owner = "reproducible-builds";
|
|
|
|
|
repo = "strip-nondeterminism";
|
|
|
|
|
domain = "salsa.debian.org";
|
|
|
|
|
rev = version;
|
2023-02-09 10:33:43 +00:00
|
|
|
|
sha256 = "czx9UhdgTsQSfDNo1mMOXCM/3/nuNe+cPZeyy2xdnKs=";
|
2019-10-21 19:59:52 +00:00
|
|
|
|
};
|
|
|
|
|
|
2023-01-06 19:39:28 +00:00
|
|
|
|
strictDeps = true;
|
2021-01-17 18:11:59 +00:00
|
|
|
|
nativeBuildInputs = lib.optionals stdenv.isDarwin [ shortenPerlShebang ];
|
2023-01-06 19:39:28 +00:00
|
|
|
|
buildInputs = [
|
|
|
|
|
ArchiveZip
|
|
|
|
|
ArchiveCpio
|
|
|
|
|
];
|
|
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
|
nativeCheckInputs = [ SubOverride ];
|
2023-01-06 19:39:28 +00:00
|
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
|
substituteInPlace lib/File/StripNondeterminism.pm \
|
|
|
|
|
--replace "exec('file'" "exec('${lib.getExe file}'"
|
|
|
|
|
'';
|
2019-10-21 19:59:52 +00:00
|
|
|
|
|
2023-01-06 19:39:28 +00:00
|
|
|
|
|
|
|
|
|
postBuild = ''
|
|
|
|
|
patchShebangs ./bin
|
|
|
|
|
'' + lib.optionalString stdenv.isDarwin ''
|
|
|
|
|
shortenPerlShebang bin/strip-nondeterminism
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
postInstall = ''
|
2019-10-21 19:59:52 +00:00
|
|
|
|
# we don’t need the debhelper script
|
|
|
|
|
rm $out/bin/dh_strip_nondeterminism
|
2023-01-06 19:39:28 +00:00
|
|
|
|
rm $out/share/man/man1/dh_strip_nondeterminism.1
|
2019-10-21 19:59:52 +00:00
|
|
|
|
'';
|
|
|
|
|
|
2023-01-06 19:39:28 +00:00
|
|
|
|
doCheck = true;
|
2020-07-18 12:30:00 +00:00
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
|
meta = with lib; {
|
2019-10-21 19:59:52 +00:00
|
|
|
|
description = "A Perl module for stripping bits of non-deterministic information";
|
2019-12-08 16:50:31 +00:00
|
|
|
|
homepage = "https://reproducible-builds.org/";
|
2022-08-21 13:36:55 +00:00
|
|
|
|
license = licenses.gpl3Only;
|
2023-01-06 19:39:28 +00:00
|
|
|
|
maintainers = with maintainers; [ pSub artturin ];
|
2019-10-21 19:59:52 +00:00
|
|
|
|
};
|
|
|
|
|
}
|