summary refs log tree commit diff
path: root/pkgs/tools/archivers/unp/default.nix
diff options
context:
space:
mode:
authortimor <timor.dd@googlemail.com>2018-03-08 14:30:14 +0100
committertimor <timor.dd@googlemail.com>2018-03-08 14:34:42 +0100
commit6d7b419706373f443f2496ad373f33e032dafc15 (patch)
treec5c6ee9f8934c7104abe74f6db78deac0876562d /pkgs/tools/archivers/unp/default.nix
parent300e272e021e1c3cae868dbc0fd1a7f69b7197d9 (diff)
downloadnixpkgs-6d7b419706373f443f2496ad373f33e032dafc15.tar
nixpkgs-6d7b419706373f443f2496ad373f33e032dafc15.tar.gz
nixpkgs-6d7b419706373f443f2496ad373f33e032dafc15.tar.bz2
nixpkgs-6d7b419706373f443f2496ad373f33e032dafc15.tar.lz
nixpkgs-6d7b419706373f443f2496ad373f33e032dafc15.tar.xz
nixpkgs-6d7b419706373f443f2496ad373f33e032dafc15.tar.zst
nixpkgs-6d7b419706373f443f2496ad373f33e032dafc15.zip
unp: init at 2.0-pre7
Diffstat (limited to 'pkgs/tools/archivers/unp/default.nix')
-rw-r--r--pkgs/tools/archivers/unp/default.nix39
1 files changed, 39 insertions, 0 deletions
diff --git a/pkgs/tools/archivers/unp/default.nix b/pkgs/tools/archivers/unp/default.nix
new file mode 100644
index 00000000000..7583663ebf0
--- /dev/null
+++ b/pkgs/tools/archivers/unp/default.nix
@@ -0,0 +1,39 @@
+{ stdenv, pkgs, lib, fetchurl, makeWrapper, perl, unrar, unzip, gzip, file, extraBackends ? [] }:
+
+stdenv.mkDerivation rec {
+  name = "unp-${version}";
+  version = "2.0-pre7";
+
+  runtime_bins =  [ file unrar unzip gzip ] ++ extraBackends;
+  buildInputs = [ perl makeWrapper ] ++ runtime_bins;
+
+  src = fetchurl {
+    # url = "http://http.debian.net/debian/pool/main/u/unp/unp_2.0~pre7+nmu1.tar.bz2";
+    url = "mirror://debian/pool/main/u/unp/unp_2.0~pre7+nmu1.tar.bz2";
+    sha256 = "09w2sy7ivmylxf8blf0ywxicvb4pbl0xhrlbb3i9x9d56ll6ybbw";
+    name = "unp_2.0_pre7+nmu1.tar.bz2";
+  };
+
+  configurePhase = "true";
+  buildPhase = "true";
+  installPhase = ''
+  mkdir -p $out/bin
+  mkdir -p $out/share/man
+  cp unp $out/bin/
+  cp ucat $out/bin/
+  cp debian/unp.1 $out/share/man
+
+  wrapProgram $out/bin/unp \
+    --prefix PATH : ${lib.makeBinPath runtime_bins}
+  wrapProgram $out/bin/ucat \
+    --prefix PATH : ${lib.makeBinPath runtime_bins}
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Command line tool for unpacking archives easily";
+    homepage = https://packages.qa.debian.org/u/unp.html;
+    license = with licenses; [ gpl2 ];
+    maintainers = [ maintainers.timor ];
+    platforms = platforms.all;
+  };
+}