Merge pull request #117348 from zseri/unbuild
This commit is contained in:
commit
d68bffb200
@ -10,18 +10,7 @@
|
||||
, zstd
|
||||
}:
|
||||
|
||||
let
|
||||
shdeps = [
|
||||
bzip2
|
||||
coreutils
|
||||
cpio
|
||||
gnutar
|
||||
gzip
|
||||
xz
|
||||
zstd
|
||||
];
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "rpm2targz";
|
||||
version = "2021.03.16";
|
||||
|
||||
@ -31,9 +20,17 @@ in stdenv.mkDerivation rec {
|
||||
hash = "sha256-rcV+o9V2wWKznqSW2rA8xgnpQ02kpK4te6mYvLRC5vQ=";
|
||||
};
|
||||
|
||||
buildInputs = shdeps;
|
||||
|
||||
postPatch = ''
|
||||
postPatch = let
|
||||
shdeps = [
|
||||
bzip2
|
||||
coreutils
|
||||
cpio
|
||||
gnutar
|
||||
gzip
|
||||
xz
|
||||
zstd
|
||||
];
|
||||
in ''
|
||||
substituteInPlace rpm2targz --replace "=\"rpmoffset\"" "=\"$out/bin/rpmoffset\""
|
||||
# rpm2targz relies on the executable name
|
||||
# to guess what compressor it should use
|
||||
@ -41,9 +38,7 @@ in stdenv.mkDerivation rec {
|
||||
sed -i -e '2iexport PATH="${lib.makeBinPath shdeps}"' rpm2targz
|
||||
'';
|
||||
|
||||
preBuild = ''
|
||||
makeFlagsArray+=(prefix=$out)
|
||||
'';
|
||||
installFlags = [ "prefix=$(out)" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Convert a .rpm file to a .tar.gz archive";
|
||||
|
@ -20,11 +20,11 @@ stdenv.mkDerivation rec {
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [ fping libowlevelzs net-snmp ];
|
||||
buildInputs = [ libowlevelzs net-snmp ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace src/confent.cxx \
|
||||
--replace /usr/sbin/fping "${lib.makeBinPath [fping]}/fping"
|
||||
--replace /usr/sbin/fping "${fping}/bin/fping"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ bash, coreutils, fetchurl, fping, lib, stdenvNoCC }:
|
||||
{ coreutils, fetchurl, fping, lib, stdenvNoCC }:
|
||||
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "zs-wait4host";
|
||||
@ -9,8 +9,6 @@ stdenvNoCC.mkDerivation rec {
|
||||
sha256 = "9F1264BDoGlRR7bWlRXhfyvxWio4ydShKmabUQEIz9I=";
|
||||
};
|
||||
|
||||
buildInputs = [ bash coreutils fping ];
|
||||
|
||||
postPatch = ''
|
||||
for i in zs-wait4host zs-wait4host-inf; do
|
||||
substituteInPlace "$i" \
|
||||
|
@ -1,5 +1,4 @@
|
||||
{ bash
|
||||
, coreutils
|
||||
{ coreutils
|
||||
, fetchurl
|
||||
, gnugrep
|
||||
, lib
|
||||
@ -18,7 +17,6 @@ stdenvNoCC.mkDerivation rec {
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
buildInputs = [ bash coreutils gnugrep moreutils ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
@ -27,8 +25,8 @@ stdenvNoCC.mkDerivation rec {
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/zstxtns-merge --prefix PATH ":" "${lib.makeBinPath [coreutils gnugrep moreutils]}"
|
||||
wrapProgram $out/bin/zstxtns-unmerge --prefix PATH ":" "${lib.makeBinPath [coreutils gnugrep]}"
|
||||
wrapProgram $out/bin/zstxtns-merge --set PATH "${lib.makeBinPath [coreutils gnugrep moreutils]}"
|
||||
wrapProgram $out/bin/zstxtns-unmerge --set PATH "${lib.makeBinPath [coreutils gnugrep]}"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
Loading…
Reference in New Issue
Block a user