20 # unrar is unfree, as well as 7z with unrar support, not including it (patool doesn't support unar)
21 # it will still use unrar if present in the path
24 compression-utilities = [
39 buildPythonPackage rec {
42 format = "setuptools";
44 #pypi doesn't have test data
45 src = fetchFromGitHub {
48 rev = "upstream/${version}";
49 hash = "sha256-Xv4aCUnLi+b1T29tuKRADTIWwK2dO8iDP/D7UfU5mWw=";
53 # https://github.com/wummel/patool/pull/63
55 name = "apk-sometimes-has-mime-jar.patch";
56 url = "https://github.com/wummel/patool/commit/a9f3ee3d639a1065be024001e89c0b153511b16b.patch";
57 hash = "sha256-a4aWqHHc/cBs5T2QKZ08ky1K1tqKZEgqVmTmV11aTVE=";
59 # https://github.com/wummel/patool/pull/130
61 name = "apk-sometimes-has-mime-android-package.patch";
62 url = "https://github.com/wummel/patool/commit/e8a1eea1d273b278a1b6f5029d2e21cb18bc9ffd.patch";
63 hash = "sha256-AVooVdU4FNIixUfwyrn39N2SDFHNs4CUYzS5Eey+DrU=";
68 substituteInPlace patoolib/util.py \
69 --replace "path = None" 'path = os.environ["PATH"] + ":${lib.makeBinPath compression-utilities}"'
72 nativeCheckInputs = [ pytestCheckHook ] ++ compression-utilities;
82 description = "portable archive file manager";
83 homepage = "https://wummel.github.io/patool/";
84 license = licenses.gpl3;
85 maintainers = with maintainers; [ marius851000 ];