about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorPascal Wittmann <PascalWittmann@gmx.net>2016-11-11 17:25:38 +0100
committerGitHub <noreply@github.com>2016-11-11 17:25:38 +0100
commit50bb53238b9941c2c86a74316cc3bb426f5b2e0c (patch)
treece596ef3af32a343bade67ca846b6038e30784ca /pkgs
parent7edd5ab54f08d73d4e1b632f5ac88ba2b500b7e1 (diff)
parentec99fb434f97ca52d285d02ca63d833766fabcab (diff)
Merge pull request #20312 from gnidorah/master2
dtrx: add archivers to dependencies
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/tools/compression/dtrx/default.nix19
1 files changed, 17 insertions, 2 deletions
diff --git a/pkgs/tools/compression/dtrx/default.nix b/pkgs/tools/compression/dtrx/default.nix
index d412a4e433efb..4e3f7d3d0dbd0 100644
--- a/pkgs/tools/compression/dtrx/default.nix
+++ b/pkgs/tools/compression/dtrx/default.nix
@@ -1,6 +1,17 @@
-{stdenv, fetchurl, pythonPackages}:
+{stdenv, lib, fetchurl, pythonPackages
+, gnutar, unzip, lhasa, rpm, binutils, cpio, gzip, p7zip, cabextract, unrar, unshield
+, bzip2, xz, lzip
+# unzip is handled by p7zip
+, unzipSupport ? false
+, unrarSupport ? false }:
 
-pythonPackages.buildPythonApplication rec {
+let
+  archivers = lib.makeBinPath ([ gnutar lhasa rpm binutils cpio gzip p7zip cabextract unshield ]
+  ++ lib.optional (unzipSupport) unzip
+  ++ lib.optional (unrarSupport) unrar
+  ++ [ bzip2 xz lzip ]);
+
+in pythonPackages.buildPythonApplication rec {
   name = "dtrx-${version}";
   version = "7.1";
 
@@ -9,6 +20,10 @@ pythonPackages.buildPythonApplication rec {
     sha1 = "05cfe705a04a8b84571b0a5647cd2648720791a4";
   };
 
+  postInstall = ''
+    wrapProgram "$out/bin/dtrx" --prefix PATH : "${archivers}"
+  '';
+
   meta = with stdenv.lib; {
     description = "Do The Right Extraction: A tool for taking the hassle out of extracting archives";
     homepage = "http://brettcsmith.org/2007/dtrx/";