2016-11-10 15:41:20 +01:00
|
|
|
{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 }:
|
2015-01-06 20:33:53 +01:00
|
|
|
|
2016-11-10 15:41:20 +01:00
|
|
|
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 {
|
2015-01-06 20:33:53 +01:00
|
|
|
name = "dtrx-${version}";
|
|
|
|
version = "7.1";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2018-06-28 20:43:35 +02:00
|
|
|
url = "https://brettcsmith.org/2007/dtrx/dtrx-${version}.tar.gz";
|
2017-02-25 00:30:03 +01:00
|
|
|
sha256 = "15yf4n27zbhvv0byfv3i89wl5zn6jc2wbc69lk5a3m6rx54gx6hw";
|
2015-01-06 20:33:53 +01:00
|
|
|
};
|
|
|
|
|
2016-11-10 15:41:20 +01:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram "$out/bin/dtrx" --prefix PATH : "${archivers}"
|
|
|
|
'';
|
|
|
|
|
2015-01-06 20:33:53 +01:00
|
|
|
meta = with stdenv.lib; {
|
2015-04-28 10:54:58 +02:00
|
|
|
description = "Do The Right Extraction: A tool for taking the hassle out of extracting archives";
|
2017-08-02 23:50:51 +02:00
|
|
|
homepage = https://brettcsmith.org/2007/dtrx/;
|
2015-01-06 20:33:53 +01:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = [ maintainers.spwhitt ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|