Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitLab,
5 pillow,
6 pytestCheckHook,
7 setuptools,
8}:
9buildPythonPackage rec {
10 pname = "pypillowfight";
11 version = "0.3.0-unstable-2024-07-07";
12 pyproject = true;
13
14 src = fetchFromGitLab {
15 domain = "gitlab.gnome.org";
16 group = "World";
17 owner = "OpenPaperwork";
18 repo = "libpillowfight";
19 # Currently no tagged release past 0.3.0 and we need these patches to fix Python 3.12 compat
20 rev = "4d5f739b725530cd61e709071d31e9f707c64bd6";
21 hash = "sha256-o5FzUSDq0lwkXGXRMsS5NB/Mp4Ie833wkxKPziR23f4=";
22 };
23
24 prePatch = ''
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 description = "Library containing various image processing algorithms";
36 inherit (src.meta) homepage;
37 license = lib.licenses.gpl3Plus;
38 maintainers = with lib.maintainers; [ pyrox0 ];
39 };
40}