diff options
author | Jan Tojnar <jtojnar@gmail.com> | 2021-03-18 19:24:39 +0100 |
---|---|---|
committer | Jan Tojnar <jtojnar@gmail.com> | 2021-03-18 19:24:39 +0100 |
commit | 2445e9a681c8450736514e331d99bfefe4648e0f (patch) | |
tree | 78460963e17e78acef9d302ddcce3994460026e7 /pkgs/tools/archivers | |
parent | 0136206b12cdcee87d34ccdfd1864c0bb6541aec (diff) | |
parent | 94bcca22ff7ac36df47b591fa8398eeb71d04b3d (diff) |
Merge branch 'master' into staging-next
Diffstat (limited to 'pkgs/tools/archivers')
-rw-r--r-- | pkgs/tools/archivers/rpm2targz/default.nix | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/pkgs/tools/archivers/rpm2targz/default.nix b/pkgs/tools/archivers/rpm2targz/default.nix new file mode 100644 index 0000000000000..ac5b132d7ab43 --- /dev/null +++ b/pkgs/tools/archivers/rpm2targz/default.nix @@ -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; + }; +} |