git.iko.soy/typeable/nixpkgs
on master help sign in
rpm2targz: don't put runtime deps into buildInputs
commit75499c628bf055c903db7fdde43718587272fa7c authorzseri <zseri.devel@ytrizja.de> dateTue 23 Mar 2021, 13:07 (6 years ago) parenteebfc25
1 file changed+13−18
pkgs/tools/archivers/rpm2targz/default.nix+13−18
pkgs/tools/archivers/rpm2targz/default.nix+13−18
@@ -10,18 +10,7 @@
1010, zstd
1111}:
1212
13−let
14− shdeps = [
15− bzip2
16− coreutils
17− cpio
18− gnutar
19− gzip
20− xz
21− zstd
22− ];
23−
24−in stdenv.mkDerivation rec {
13+stdenv.mkDerivation rec {
2514 pname = "rpm2targz";
2615 version = "2021.03.16";
2716
@@ -31,9 +20,17 @@ in stdenv.mkDerivation rec {
3120 hash = "sha256-rcV+o9V2wWKznqSW2rA8xgnpQ02kpK4te6mYvLRC5vQ=";
3221 };
3322
34− buildInputs = shdeps;
35−
36− postPatch = ''
23+ postPatch = let
24+ shdeps = [
25+ bzip2
26+ coreutils
27+ cpio
28+ gnutar
29+ gzip
30+ xz
31+ zstd
32+ ];
33+ in ''
3734 substituteInPlace rpm2targz --replace "=\"rpmoffset\"" "=\"$out/bin/rpmoffset\""
3835 # rpm2targz relies on the executable name
3936 # to guess what compressor it should use
@@ -41,9 +38,7 @@ in stdenv.mkDerivation rec {
4138 sed -i -e '2iexport PATH="${lib.makeBinPath shdeps}"' rpm2targz
4239 '';
4340
44− preBuild = ''
45− makeFlagsArray+=(prefix=$out)
46− '';
41+ installFlags = [ "prefix=$(out)" ];
4742
4843 meta = with lib; {
4944 description = "Convert a .rpm file to a .tar.gz archive";