1{
2 lib,
3 stdenv,
4 buildPythonPackage,
5 fetchFromGitLab,
6 pillow,
7 pytestCheckHook,
8 setuptools,
9}:
10buildPythonPackage rec {
11 pname = "pypillowfight";
12 version = "0.3.1";
13 pyproject = true;
14
15 src = fetchFromGitLab {
16 domain = "gitlab.gnome.org";
17 group = "World";
18 owner = "OpenPaperwork";
19 repo = "libpillowfight";
20 tag = version;
21 hash = "sha256-ZH1Eg8GLe3LZ7elohQCYCToEvx8bGaRSrcsT+qSY9s4=";
22 };
23
24 postPatch = ''
25 echo '#define INTERNAL_PILLOWFIGHT_VERSION "${version}"' > src/pillowfight/_version.h
26 '';
27
28 build-system = [ setuptools ];
29
30 dependencies = [ pillow ];
31
32 nativeCheckInputs = [ pytestCheckHook ];
33
34 meta = {
35 # Package has non-portable behavior that makes it not work on Darwin
36 # https://github.com/NixOS/nixpkgs/pull/433141#issuecomment-3180885173
37 broken = stdenv.hostPlatform.isDarwin;
38 description = "Library containing various image processing algorithms";
39 inherit (src.meta) homepage;
40 license = lib.licenses.gpl3Plus;
41 maintainers = with lib.maintainers; [ pyrox0 ];
42 };
43}