mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 17:33:09 +00:00
Merge pull request #116469 from zseri/rpm2targz
rpm2targz: init at 2021.03.16
This commit is contained in:
commit
af6d8c71d5
55
pkgs/tools/archivers/rpm2targz/default.nix
Normal file
55
pkgs/tools/archivers/rpm2targz/default.nix
Normal file
@ -0,0 +1,55 @@
|
||||
{ bzip2
|
||||
, coreutils
|
||||
, cpio
|
||||
, fetchurl
|
||||
, gnutar
|
||||
, gzip
|
||||
, lib
|
||||
, stdenv
|
||||
, xz
|
||||
, zstd
|
||||
}:
|
||||
|
||||
let
|
||||
shdeps = [
|
||||
bzip2
|
||||
coreutils
|
||||
cpio
|
||||
gnutar
|
||||
gzip
|
||||
xz
|
||||
zstd
|
||||
];
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "rpm2targz";
|
||||
version = "2021.03.16";
|
||||
|
||||
# git repo: https://gitweb.gentoo.org/proj/rpm2targz.git/
|
||||
src = fetchurl {
|
||||
url = "https://dev.gentoo.org/~vapier/dist/${pname}-${version}.tar.xz";
|
||||
hash = "sha256-rcV+o9V2wWKznqSW2rA8xgnpQ02kpK4te6mYvLRC5vQ=";
|
||||
};
|
||||
|
||||
buildInputs = shdeps;
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace rpm2targz --replace "=\"rpmoffset\"" "=\"$out/bin/rpmoffset\""
|
||||
# rpm2targz relies on the executable name
|
||||
# to guess what compressor it should use
|
||||
# this is more reliable than wrapProgram
|
||||
sed -i -e '2iexport PATH="${lib.makeBinPath shdeps}"' rpm2targz
|
||||
'';
|
||||
|
||||
preBuild = ''
|
||||
makeFlagsArray+=(prefix=$out)
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Convert a .rpm file to a .tar.gz archive";
|
||||
homepage = "http://slackware.com/config/packages.php";
|
||||
license = licenses.bsd1;
|
||||
maintainers = with maintainers; [ zseri ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
@ -7739,6 +7739,8 @@ in
|
||||
gperf = gperf_3_0;
|
||||
};
|
||||
|
||||
rpm2targz = callPackage ../tools/archivers/rpm2targz { };
|
||||
|
||||
rpmextract = callPackage ../tools/archivers/rpmextract { };
|
||||
|
||||
rrdtool = callPackage ../tools/misc/rrdtool { };
|
||||
|
Loading…
Reference in New Issue
Block a user