rpmextract: add package

This commit is contained in:
Nikolay Amiantov 2014-10-20 03:16:24 +04:00
parent e20e0470bf
commit 4dba792a59
3 changed files with 33 additions and 0 deletions

View file

@ -0,0 +1,23 @@
{ stdenv, fetchurl, rpm, cpio, substituteAll }:
stdenv.mkDerivation rec {
name = "rpmextract";
builder = builtins.toFile "builder.sh" ''
source $stdenv/setup
install -Dm755 $script $out/bin/rpmextract
'';
script = substituteAll {
src = ./rpmextract.sh;
inherit rpm cpio;
};
meta = with stdenv.lib; {
description = "Script to extract RPM archives";
platforms = platforms.all;
license = licenses.gpl2;
maintainers = maintainers.abbradar;
};
}

View file

@ -0,0 +1,8 @@
#!/bin/sh
if [ "$1" = "" ]; then
echo "usage: rpmextract package_name" 1>&2
exit 1
fi
@rpm@/bin/rpm2cpio "$1" | @cpio@/bin/cpio -idv

View file

@ -2162,6 +2162,8 @@ let
rpm = callPackage ../tools/package-management/rpm { };
rpmextract = callPackage ../tools/archivers/rpmextract { };
rrdtool = callPackage ../tools/misc/rrdtool { };
rtorrent = callPackage ../tools/networking/p2p/rtorrent { };