2018-09-10 17:29:08 +02:00
|
|
|
{ stdenv, buildPythonPackage, fetchFromGitLab, nose, pillow
|
|
|
|
, isPy3k, isPyPy
|
|
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "pypillowfight";
|
2018-09-10 17:29:08 +02:00
|
|
|
version = "0.2.4";
|
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "gitlab.gnome.org";
|
|
|
|
group = "World";
|
|
|
|
owner = "OpenPaperwork";
|
|
|
|
repo = "libpillowfight";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "0wbzfhbzim61fmkm7p7f2rwslacla1x00a6xp50haawjh9zfwc4y";
|
|
|
|
};
|
|
|
|
|
|
|
|
prePatch = ''
|
|
|
|
echo '#define INTERNAL_PILLOWFIGHT_VERSION "${version}"' > src/pillowfight/_version.h
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Disable tests because they're designed to only work on Debian:
|
|
|
|
# https://github.com/jflesch/libpillowfight/issues/2#issuecomment-268259174
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
# Python 2.x is not supported, see:
|
|
|
|
# https://github.com/jflesch/libpillowfight/issues/1
|
|
|
|
disabled = !isPy3k && !isPyPy;
|
|
|
|
|
|
|
|
# This is needed by setup.py regardless of whether tests are enabled.
|
|
|
|
buildInputs = [ nose ];
|
|
|
|
propagatedBuildInputs = [ pillow ];
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Library containing various image processing algorithms";
|
2018-09-10 17:57:27 +02:00
|
|
|
inherit (src.meta) homepage;
|
2018-09-10 17:29:08 +02:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
};
|
|
|
|
}
|