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
}:
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";

View File

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

View File

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

View File

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