Merge pull request #145130 from marius851000/patoolfix
patool: fix the non-use of hard-coded binary
This commit is contained in:
commit
e2e13364a8
1 changed files with 4 additions and 5 deletions
|
@ -1,17 +1,16 @@
|
|||
{ lib, buildPythonPackage, fetchFromGitHub, pytestCheckHook, p7zip,
|
||||
unzip, cabextract, zip, zopfli, lzip, zpaq, gnutar, gnugrep, diffutils, file,
|
||||
cabextract, zip, lzip, zpaq, gnutar, gnugrep, diffutils, file,
|
||||
gzip, bzip2, xz}:
|
||||
|
||||
# unrar is unfree, as well as 7z with unrar support, not including it (patool doesn't support unar)
|
||||
# it will still use unrar if present in the path
|
||||
|
||||
let
|
||||
compression-utilities = [
|
||||
p7zip
|
||||
unzip
|
||||
gnutar
|
||||
cabextract
|
||||
zip
|
||||
zopfli
|
||||
lzip
|
||||
zpaq
|
||||
gzip
|
||||
|
@ -34,9 +33,9 @@ buildPythonPackage rec {
|
|||
sha256 = "0v4r77sm3yzh7y1whfwxmp01cchd82jbhvbg9zsyd2yb944imzjy";
|
||||
};
|
||||
|
||||
prePatch = ''
|
||||
postPatch = ''
|
||||
substituteInPlace patoolib/util.py \
|
||||
--replace "path = None" 'path = append_to_path(os.environ["PATH"], "${lib.makeBinPath compression-utilities}")'
|
||||
--replace "path = None" 'path = os.environ["PATH"] + ":${lib.makeBinPath compression-utilities}"'
|
||||
'';
|
||||
|
||||
checkInputs = [ pytestCheckHook ] ++ compression-utilities;
|
||||
|
|
Loading…
Reference in a new issue