Merge pull request #117348 from zseri/unbuild

This commit is contained in:
Sandro 2021-03-24 19:47:35 +01:00 committed by GitHub
commit d68bffb200
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 28 deletions

View File

@ -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";

View File

@ -20,11 +20,11 @@ stdenv.mkDerivation rec {
}; };
nativeBuildInputs = [ cmake ]; nativeBuildInputs = [ cmake ];
buildInputs = [ fping libowlevelzs net-snmp ]; buildInputs = [ libowlevelzs net-snmp ];
postPatch = '' postPatch = ''
substituteInPlace src/confent.cxx \ substituteInPlace src/confent.cxx \
--replace /usr/sbin/fping "${lib.makeBinPath [fping]}/fping" --replace /usr/sbin/fping "${fping}/bin/fping"
''; '';
meta = with lib; { meta = with lib; {

View File

@ -1,4 +1,4 @@
{ bash, coreutils, fetchurl, fping, lib, stdenvNoCC }: { coreutils, fetchurl, fping, lib, stdenvNoCC }:
stdenvNoCC.mkDerivation rec { stdenvNoCC.mkDerivation rec {
pname = "zs-wait4host"; pname = "zs-wait4host";
@ -9,8 +9,6 @@ stdenvNoCC.mkDerivation rec {
sha256 = "9F1264BDoGlRR7bWlRXhfyvxWio4ydShKmabUQEIz9I="; sha256 = "9F1264BDoGlRR7bWlRXhfyvxWio4ydShKmabUQEIz9I=";
}; };
buildInputs = [ bash coreutils fping ];
postPatch = '' postPatch = ''
for i in zs-wait4host zs-wait4host-inf; do for i in zs-wait4host zs-wait4host-inf; do
substituteInPlace "$i" \ substituteInPlace "$i" \

View File

@ -1,5 +1,4 @@
{ bash { coreutils
, coreutils
, fetchurl , fetchurl
, gnugrep , gnugrep
, lib , lib
@ -18,7 +17,6 @@ stdenvNoCC.mkDerivation rec {
}; };
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeWrapper ];
buildInputs = [ bash coreutils gnugrep moreutils ];
installPhase = '' installPhase = ''
runHook preInstall runHook preInstall
@ -27,8 +25,8 @@ stdenvNoCC.mkDerivation rec {
''; '';
postInstall = '' postInstall = ''
wrapProgram $out/bin/zstxtns-merge --prefix PATH ":" "${lib.makeBinPath [coreutils gnugrep moreutils]}" wrapProgram $out/bin/zstxtns-merge --set PATH "${lib.makeBinPath [coreutils gnugrep moreutils]}"
wrapProgram $out/bin/zstxtns-unmerge --prefix PATH ":" "${lib.makeBinPath [coreutils gnugrep]}" wrapProgram $out/bin/zstxtns-unmerge --set PATH "${lib.makeBinPath [coreutils gnugrep]}"
''; '';
meta = with lib; { meta = with lib; {