Merge pull request #209363 from Artturin/stripnondetupdate

This commit is contained in:
Artturi 2023-01-09 19:46:54 +02:00 committed by GitHub
commit a4a3697305
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,8 +1,17 @@
{ lib, stdenv, file, fetchFromGitLab, buildPerlPackage, ArchiveZip, ArchiveCpio, shortenPerlShebang }:
{ lib
, stdenv
, file
, fetchFromGitLab
, buildPerlPackage
, ArchiveZip
, ArchiveCpio
, SubOverride
, shortenPerlShebang
}:
buildPerlPackage rec {
pname = "strip-nondeterminism";
version = "1.0.0";
version = "1.13.0";
outputs = [ "out" "dev" ]; # no "devdoc"
@ -11,30 +20,42 @@ buildPerlPackage rec {
repo = "strip-nondeterminism";
domain = "salsa.debian.org";
rev = version;
sha256 = "1pwar1fyadqxmvb7x4zyw2iawbi5lsfjcg0ps9n9rdjb6an7vv64";
sha256 = "sha256-KZQeoJYBPJzUvz4wlUZbiGODbpCp7/52dsg5OemKDkI=";
};
# stray test failure
doCheck = false;
strictDeps = true;
nativeBuildInputs = lib.optionals stdenv.isDarwin [ shortenPerlShebang ];
buildInputs = [ ArchiveZip ArchiveCpio ];
propagatedNativeBuildInputs = [ file ];
buildInputs = [
ArchiveZip
ArchiveCpio
];
perlPostHook = ''
checkInputs = [ SubOverride ];
postPatch = ''
substituteInPlace lib/File/StripNondeterminism.pm \
--replace "exec('file'" "exec('${lib.getExe file}'"
'';
postBuild = ''
patchShebangs ./bin
'' + lib.optionalString stdenv.isDarwin ''
shortenPerlShebang bin/strip-nondeterminism
'';
postInstall = ''
# we dont need the debhelper script
rm $out/bin/dh_strip_nondeterminism
rm $out/share/man/man1/dh_strip_nondeterminism.1.gz
rm $out/share/man/man1/dh_strip_nondeterminism.1
'';
postInstall = lib.optionalString stdenv.isDarwin ''
shortenPerlShebang $out/bin/strip-nondeterminism
'';
doCheck = true;
meta = with lib; {
description = "A Perl module for stripping bits of non-deterministic information";
homepage = "https://reproducible-builds.org/";
license = licenses.gpl3Only;
maintainers = with maintainers; [ pSub ];
maintainers = with maintainers; [ pSub artturin ];
};
}