at 18.09-beta 34 lines 1.1 kB view raw
1{stdenv, lib, fetchurl, pythonPackages 2, gnutar, unzip, lhasa, rpm, binutils, cpio, gzip, p7zip, cabextract, unrar, unshield 3, bzip2, xz, lzip 4# unzip is handled by p7zip 5, unzipSupport ? false 6, unrarSupport ? false }: 7 8let 9 archivers = lib.makeBinPath ([ gnutar lhasa rpm binutils cpio gzip p7zip cabextract unshield ] 10 ++ lib.optional (unzipSupport) unzip 11 ++ lib.optional (unrarSupport) unrar 12 ++ [ bzip2 xz lzip ]); 13 14in pythonPackages.buildPythonApplication rec { 15 name = "dtrx-${version}"; 16 version = "7.1"; 17 18 src = fetchurl { 19 url = "https://brettcsmith.org/2007/dtrx/dtrx-${version}.tar.gz"; 20 sha256 = "15yf4n27zbhvv0byfv3i89wl5zn6jc2wbc69lk5a3m6rx54gx6hw"; 21 }; 22 23 postInstall = '' 24 wrapProgram "$out/bin/dtrx" --prefix PATH : "${archivers}" 25 ''; 26 27 meta = with stdenv.lib; { 28 description = "Do The Right Extraction: A tool for taking the hassle out of extracting archives"; 29 homepage = https://brettcsmith.org/2007/dtrx/; 30 license = licenses.gpl3Plus; 31 maintainers = [ maintainers.spwhitt ]; 32 platforms = platforms.all; 33 }; 34}