Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / pypillowfight / default.nix
blob1fc4198ebeb6e3c66042eca9ae74ac08ef07e34e
1 { lib, buildPythonPackage, fetchFromGitLab, nose, pillow
2 , isPy3k, isPyPy
3 }:
4 buildPythonPackage rec {
5   pname = "pypillowfight";
6   version = "0.3.0";
8   src = fetchFromGitLab {
9     domain = "gitlab.gnome.org";
10     group = "World";
11     owner = "OpenPaperwork";
12     repo = "libpillowfight";
13     rev = version;
14     sha256 = "096242v425mlqqj5g1giy59p7grxp05g78w6bk37vzph98jrgv3w";
15   };
17   prePatch = ''
18     echo '#define INTERNAL_PILLOWFIGHT_VERSION "${version}"' > src/pillowfight/_version.h
19   '';
21   # Disable tests because they're designed to only work on Debian:
22   # https://github.com/jflesch/libpillowfight/issues/2#issuecomment-268259174
23   doCheck = false;
25   # Python 2.x is not supported, see:
26   # https://github.com/jflesch/libpillowfight/issues/1
27   disabled = !isPy3k && !isPyPy;
29   # This is needed by setup.py regardless of whether tests are enabled.
30   buildInputs = [ nose ];
31   propagatedBuildInputs = [ pillow ];
33   meta = with lib; {
34     description = "Library containing various image processing algorithms";
35     inherit (src.meta) homepage;
36     license = licenses.gpl3Plus;
37   };