2021-01-15 22:18:51 +00:00
|
|
|
|
{ lib, stdenv, file, fetchFromGitLab, buildPerlPackage, ArchiveZip, ArchiveCpio, shortenPerlShebang }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
buildPerlPackage rec {
|
|
|
|
|
pname = "strip-nondeterminism";
|
|
|
|
|
version = "1.0.0";
|
|
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" ]; # no "devdoc"
|
|
|
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
|
owner = "reproducible-builds";
|
|
|
|
|
repo = "strip-nondeterminism";
|
|
|
|
|
domain = "salsa.debian.org";
|
|
|
|
|
rev = version;
|
|
|
|
|
sha256 = "1pwar1fyadqxmvb7x4zyw2iawbi5lsfjcg0ps9n9rdjb6an7vv64";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# stray test failure
|
|
|
|
|
doCheck = false;
|
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
|
nativeBuildInputs = lib.optionals stdenv.isDarwin [ shortenPerlShebang ];
|
2021-07-03 03:11:41 +00:00
|
|
|
|
buildInputs = [ ArchiveZip ArchiveCpio ];
|
|
|
|
|
propagatedNativeBuildInputs = [ file ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
perlPostHook = ''
|
|
|
|
|
# we don’t need the debhelper script
|
|
|
|
|
rm $out/bin/dh_strip_nondeterminism
|
|
|
|
|
rm $out/share/man/man1/dh_strip_nondeterminism.1.gz
|
|
|
|
|
'';
|
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
|
postInstall = lib.optionalString stdenv.isDarwin ''
|
2020-08-20 17:08:02 +00:00
|
|
|
|
shortenPerlShebang $out/bin/strip-nondeterminism
|
|
|
|
|
'';
|
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
|
description = "A Perl module for stripping bits of non-deterministic information";
|
|
|
|
|
homepage = "https://reproducible-builds.org/";
|
2022-09-09 14:08:57 +00:00
|
|
|
|
license = licenses.gpl3Only;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
maintainers = with maintainers; [ pSub ];
|
|
|
|
|
};
|
|
|
|
|
}
|