2020-04-24 23:36:52 +00:00
|
|
|
{stdenv, lib, fetchurl, pythonPackages
|
2020-06-18 07:06:33 +00:00
|
|
|
, gnutar, unzip, lhasa, rpm, binutils, cpio, gzip, p7zip, cabextract, unrar, unshield
|
2020-04-24 23:36:52 +00:00
|
|
|
, bzip2, xz, lzip
|
2020-06-18 07:06:33 +00:00
|
|
|
# unzip is handled by p7zip
|
|
|
|
, unzipSupport ? false
|
2020-04-24 23:36:52 +00:00
|
|
|
, unrarSupport ? false }:
|
|
|
|
|
|
|
|
let
|
2020-06-18 07:06:33 +00:00
|
|
|
archivers = lib.makeBinPath ([ gnutar lhasa rpm binutils cpio gzip p7zip cabextract unshield ]
|
|
|
|
++ lib.optional (unzipSupport) unzip
|
|
|
|
++ lib.optional (unrarSupport) unrar
|
|
|
|
++ [ bzip2 xz lzip ]);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
in pythonPackages.buildPythonApplication rec {
|
|
|
|
pname = "dtrx";
|
|
|
|
version = "7.1";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://brettcsmith.org/2007/dtrx/dtrx-${version}.tar.gz";
|
|
|
|
sha256 = "15yf4n27zbhvv0byfv3i89wl5zn6jc2wbc69lk5a3m6rx54gx6hw";
|
|
|
|
};
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram "$out/bin/dtrx" --prefix PATH : "${archivers}"
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Do The Right Extraction: A tool for taking the hassle out of extracting archives";
|
|
|
|
homepage = "https://brettcsmith.org/2007/dtrx/";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = [ maintainers.spwhitt ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|