diff options
author | Nikolay Amiantov <ab@fmap.me> | 2014-10-20 03:16:24 +0400 |
---|---|---|
committer | Nikolay Amiantov <ab@fmap.me> | 2014-10-20 03:16:24 +0400 |
commit | 4dba792a595bdff9efed1d67b9564d3f9fc196c3 (patch) | |
tree | 31ec64f3a55d1877d41574d63f1afcee03a285d1 /pkgs | |
parent | e20e0470bf1de706fe6cc6e1743537a7737f83fa (diff) |
rpmextract: add package
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/tools/archivers/rpmextract/default.nix | 23 | ||||
-rw-r--r-- | pkgs/tools/archivers/rpmextract/rpmextract.sh | 8 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
3 files changed, 33 insertions, 0 deletions
diff --git a/pkgs/tools/archivers/rpmextract/default.nix b/pkgs/tools/archivers/rpmextract/default.nix new file mode 100644 index 000000000000..bee5a71333a7 --- /dev/null +++ b/pkgs/tools/archivers/rpmextract/default.nix @@ -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; + }; +} diff --git a/pkgs/tools/archivers/rpmextract/rpmextract.sh b/pkgs/tools/archivers/rpmextract/rpmextract.sh new file mode 100644 index 000000000000..b910a9926063 --- /dev/null +++ b/pkgs/tools/archivers/rpmextract/rpmextract.sh @@ -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 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bc70e291bdea..3ce81635e8b7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 { }; |