Merge pull request #145130 from marius851000/patoolfix

patool: fix the non-use of hard-coded binary

authored by K900 and committed by GitHub e2e13364 3aa086b0

+4 -5
+4 -5
pkgs/development/python-modules/patool/default.nix
··· 1 { lib, buildPythonPackage, fetchFromGitHub, pytestCheckHook, p7zip, 2 - unzip, cabextract, zip, zopfli, 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 7 let 8 compression-utilities = [ 9 p7zip 10 - unzip 11 gnutar 12 cabextract 13 zip 14 - zopfli 15 lzip 16 zpaq 17 gzip ··· 34 sha256 = "0v4r77sm3yzh7y1whfwxmp01cchd82jbhvbg9zsyd2yb944imzjy"; 35 }; 36 37 - prePatch = '' 38 substituteInPlace patoolib/util.py \ 39 - --replace "path = None" 'path = append_to_path(os.environ["PATH"], "${lib.makeBinPath compression-utilities}")' 40 ''; 41 42 checkInputs = [ pytestCheckHook ] ++ compression-utilities;
··· 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 8 let 9 compression-utilities = [ 10 p7zip 11 gnutar 12 cabextract 13 zip 14 lzip 15 zpaq 16 gzip ··· 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;