2021-03-25 11:35:28 +00:00
|
|
|
{ lib, fetchurl, python2Packages
|
2020-06-11 13:39:48 +01:00
|
|
|
, gnutar, unzip, lhasa, rpm, binutils, cpio, gzip, p7zip, cabextract, unrar, unshield
|
2016-11-10 14:41:20 +00:00
|
|
|
, bzip2, xz, lzip
|
2020-06-11 13:39:48 +01:00
|
|
|
# unzip is handled by p7zip
|
|
|
|
, unzipSupport ? false
|
2016-11-10 14:41:20 +00:00
|
|
|
, unrarSupport ? false }:
|
2015-01-06 19:33:53 +00:00
|
|
|
|
2016-11-10 14:41:20 +00:00
|
|
|
let
|
2020-06-11 13:39:48 +01:00
|
|
|
archivers = lib.makeBinPath ([ gnutar lhasa rpm binutils cpio gzip p7zip cabextract unshield ]
|
|
|
|
++ lib.optional (unzipSupport) unzip
|
|
|
|
++ lib.optional (unrarSupport) unrar
|
|
|
|
++ [ bzip2 xz lzip ]);
|
2016-11-10 14:41:20 +00:00
|
|
|
|
2021-03-25 11:35:28 +00:00
|
|
|
in python2Packages.buildPythonApplication rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "dtrx";
|
2015-01-06 19:33:53 +00:00
|
|
|
version = "7.1";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2018-06-28 19:43:35 +01:00
|
|
|
url = "https://brettcsmith.org/2007/dtrx/dtrx-${version}.tar.gz";
|
2017-02-24 23:30:03 +00:00
|
|
|
sha256 = "15yf4n27zbhvv0byfv3i89wl5zn6jc2wbc69lk5a3m6rx54gx6hw";
|
2015-01-06 19:33:53 +00:00
|
|
|
};
|
|
|
|
|
2016-11-10 14:41:20 +00:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram "$out/bin/dtrx" --prefix PATH : "${archivers}"
|
|
|
|
'';
|
|
|
|
|
2021-03-25 11:35:28 +00:00
|
|
|
checkPhase = ''
|
|
|
|
python2 tests/compare.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkInputs = with python2Packages; [
|
|
|
|
pyyaml
|
|
|
|
];
|
|
|
|
|
|
|
|
# custom test suite fails
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2015-04-28 09:54:58 +01:00
|
|
|
description = "Do The Right Extraction: A tool for taking the hassle out of extracting archives";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://brettcsmith.org/2007/dtrx/";
|
2015-01-06 19:33:53 +00:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = [ maintainers.spwhitt ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|