diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2019-10-01 13:53:33 +0200 |
---|---|---|
committer | Maximilian Bosch <maximilian@mbosch.me> | 2019-10-01 13:53:33 +0200 |
commit | c7164ea3c49545c689a7b3c869d5a57b4d4d8228 (patch) | |
tree | 5639e3bfbaa01befb4ec1470121624cc67c0328e /pkgs/development/python-modules/pytaglib | |
parent | aa7c91162e9d8de0570d69cd1c6353c5cb6361e0 (diff) | |
download | nixpkgs-c7164ea3c49545c689a7b3c869d5a57b4d4d8228.tar nixpkgs-c7164ea3c49545c689a7b3c869d5a57b4d4d8228.tar.gz nixpkgs-c7164ea3c49545c689a7b3c869d5a57b4d4d8228.tar.bz2 nixpkgs-c7164ea3c49545c689a7b3c869d5a57b4d4d8228.tar.lz nixpkgs-c7164ea3c49545c689a7b3c869d5a57b4d4d8228.tar.xz nixpkgs-c7164ea3c49545c689a7b3c869d5a57b4d4d8228.tar.zst nixpkgs-c7164ea3c49545c689a7b3c869d5a57b4d4d8228.zip |
python3Packages.pytaglib: fix build
Applied several patches to fix the test suite on python 2.7 and to properly install the `pyprinttags` executable. Also switched to the GitHub source for now as the PyPI tarball was wrongly packaged and didn't contain the `pyprinttags.py` script (see the last two patches for further reference). See also https://hydra.nixos.org/build/102493330 ZHF #68361
Diffstat (limited to 'pkgs/development/python-modules/pytaglib')
-rw-r--r-- | pkgs/development/python-modules/pytaglib/default.nix | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/pkgs/development/python-modules/pytaglib/default.nix b/pkgs/development/python-modules/pytaglib/default.nix index 46d4135d6af..6b19a8f0c73 100644 --- a/pkgs/development/python-modules/pytaglib/default.nix +++ b/pkgs/development/python-modules/pytaglib/default.nix @@ -1,21 +1,46 @@ { lib , buildPythonPackage -, fetchPypi +, fetchFromGitHub , taglib , cython , pytest , glibcLocales +, fetchpatch }: buildPythonPackage rec { pname = "pytaglib"; version = "1.4.5"; - src = fetchPypi { - inherit pname version; - sha256 = "8aec64bc146a9f72778a0d2d1f3448f58be6ebea68f64b0ff88ea8e0f4dc5d8f"; + src = fetchFromGitHub { + owner = "supermihi"; + repo = pname; + rev = "v${version}"; + sha256 = "1gvvadlgk8ny8bg76gwvvfcwp1nfgrjphi60h5f9ha7h5ff1g2wb"; }; + patches = [ + # fix tests on python 2.7 + (fetchpatch { + url = https://github.com/supermihi/pytaglib/commit/0c4ae750fcd5b18d2553975c7e3e183e9dca5bf1.patch; + sha256 = "1kv3c68vimx5dc8aacvzphiaq916avmprxddi38wji8p2ql6vngj"; + }) + + # properly install pyprinttags + (fetchpatch { + url = https://github.com/supermihi/pytaglib/commit/ba7a1406ddf35ddc41ed57f1c8d1f2bc2ed2c93a.patch; + sha256 = "0pi0dcq7db5fd3jnbwnfsfsgxvlhnm07z5yhpp93shk0s7ci2bwp"; + }) + (fetchpatch { + url = https://github.com/supermihi/pytaglib/commit/28772f6f94d37f05728071381a0fa04c6a14783a.patch; + sha256 = "0h259vzj1l0gpibdf322yclyd10x5rh1anzhsjj2ghm6rj6q0r0m"; + }) + ]; + + postPatch = '' + substituteInPlace setup.py --replace "'pytest-runner', " "" + ''; + buildInputs = [ taglib cython ]; checkInputs = [ pytest glibcLocales ]; |