at 23.05-pre 1.3 kB view raw
1{ lib, buildPythonPackage, fetchFromGitHub, pytestCheckHook, p7zip, 2 cabextract, zip, lzip, zpaq, gnutar, gnugrep, diffutils, file, 3 gzip, bzip2, xz}: 4 5# unrar is unfree, as well as 7z with unrar support, not including it (patool doesn't support unar) 6# it will still use unrar if present in the path 7 8let 9 compression-utilities = [ 10 p7zip 11 gnutar 12 cabextract 13 zip 14 lzip 15 zpaq 16 gzip 17 gnugrep 18 diffutils 19 bzip2 20 file 21 xz 22 ]; 23in 24buildPythonPackage rec { 25 pname = "patool"; 26 version = "1.12"; 27 28 #pypi doesn't have test data 29 src = fetchFromGitHub { 30 owner = "wummel"; 31 repo = pname; 32 rev = "upstream/${version}"; 33 sha256 = "0v4r77sm3yzh7y1whfwxmp01cchd82jbhvbg9zsyd2yb944imzjy"; 34 }; 35 36 postPatch = '' 37 substituteInPlace patoolib/util.py \ 38 --replace "path = None" 'path = os.environ["PATH"] + ":${lib.makeBinPath compression-utilities}"' 39 ''; 40 41 checkInputs = [ pytestCheckHook ] ++ compression-utilities; 42 43 disabledTests = [ 44 "test_unzip" 45 "test_unzip_file" 46 "test_zip" 47 "test_zip_file" 48 ]; 49 50 meta = with lib; { 51 description = "portable archive file manager"; 52 homepage = "https://wummel.github.io/patool/"; 53 license = licenses.gpl3; 54 maintainers = with maintainers; [ marius851000 ]; 55 }; 56}