mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-12 03:56:17 +03:00
ab001e250a
The original developer has abandoned this package but some Ubuntu developers have forked it and maintain it. This means the tests now work and the package supports Python 3.
53 lines
1.1 KiB
Nix
53 lines
1.1 KiB
Nix
{ lib
|
|
, fetchFromGitHub
|
|
, python3Packages
|
|
, gnutar
|
|
, unzip
|
|
, lhasa
|
|
, rpm
|
|
, binutils
|
|
, cpio
|
|
, gzip
|
|
, p7zip
|
|
, cabextract
|
|
, unrar
|
|
, unshield
|
|
, bzip2
|
|
, xz
|
|
, lzip
|
|
, unzipSupport ? false
|
|
, unrarSupport ? false
|
|
}:
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
pname = "dtrx";
|
|
version = "8.2.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "dtrx-py";
|
|
repo = "dtrx";
|
|
rev = version;
|
|
sha256 = "sha256-ayQ52teXWpw3ZvPhfqxFHxMZatQK9NKv/97ovANFZcE=";
|
|
};
|
|
|
|
postInstall =
|
|
let
|
|
archivers = lib.makeBinPath (
|
|
[ gnutar lhasa rpm binutils cpio gzip p7zip cabextract unshield bzip2 xz lzip ]
|
|
++ lib.optional (unzipSupport) unzip
|
|
++ lib.optional (unrarSupport) unrar
|
|
);
|
|
in ''
|
|
wrapProgram "$out/bin/dtrx" --prefix PATH : "${archivers}"
|
|
'';
|
|
|
|
buildInputs = [ python3Packages.twine ];
|
|
|
|
meta = with lib; {
|
|
description = "Do The Right Extraction: A tool for taking the hassle out of extracting archives";
|
|
homepage = "https://github.com/dtrx-py/dtrx";
|
|
license = licenses.gpl3Plus;
|
|
maintainers = [ maintainers.spwhitt ];
|
|
};
|
|
}
|