rpm2targz: don't put runtime deps into buildInputs
This commit is contained in:
parent
eebfc250dd
commit
75499c628b
@ -10,18 +10,7 @@
|
|||||||
, zstd
|
, zstd
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
stdenv.mkDerivation rec {
|
||||||
shdeps = [
|
|
||||||
bzip2
|
|
||||||
coreutils
|
|
||||||
cpio
|
|
||||||
gnutar
|
|
||||||
gzip
|
|
||||||
xz
|
|
||||||
zstd
|
|
||||||
];
|
|
||||||
|
|
||||||
in stdenv.mkDerivation rec {
|
|
||||||
pname = "rpm2targz";
|
pname = "rpm2targz";
|
||||||
version = "2021.03.16";
|
version = "2021.03.16";
|
||||||
|
|
||||||
@ -31,9 +20,17 @@ in stdenv.mkDerivation rec {
|
|||||||
hash = "sha256-rcV+o9V2wWKznqSW2rA8xgnpQ02kpK4te6mYvLRC5vQ=";
|
hash = "sha256-rcV+o9V2wWKznqSW2rA8xgnpQ02kpK4te6mYvLRC5vQ=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = shdeps;
|
postPatch = let
|
||||||
|
shdeps = [
|
||||||
postPatch = ''
|
bzip2
|
||||||
|
coreutils
|
||||||
|
cpio
|
||||||
|
gnutar
|
||||||
|
gzip
|
||||||
|
xz
|
||||||
|
zstd
|
||||||
|
];
|
||||||
|
in ''
|
||||||
substituteInPlace rpm2targz --replace "=\"rpmoffset\"" "=\"$out/bin/rpmoffset\""
|
substituteInPlace rpm2targz --replace "=\"rpmoffset\"" "=\"$out/bin/rpmoffset\""
|
||||||
# rpm2targz relies on the executable name
|
# rpm2targz relies on the executable name
|
||||||
# to guess what compressor it should use
|
# to guess what compressor it should use
|
||||||
@ -41,9 +38,7 @@ in stdenv.mkDerivation rec {
|
|||||||
sed -i -e '2iexport PATH="${lib.makeBinPath shdeps}"' rpm2targz
|
sed -i -e '2iexport PATH="${lib.makeBinPath shdeps}"' rpm2targz
|
||||||
'';
|
'';
|
||||||
|
|
||||||
preBuild = ''
|
installFlags = [ "prefix=$(out)" ];
|
||||||
makeFlagsArray+=(prefix=$out)
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Convert a .rpm file to a .tar.gz archive";
|
description = "Convert a .rpm file to a .tar.gz archive";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user