1{ lib
2, stdenv
3, buildPythonPackage
4, pythonOlder
5, fetchFromGitHub
6, pillow
7, toml
8, numpy
9, pyyaml
10, python
11, pytestCheckHook
12}:
13
14buildPythonPackage rec {
15 pname = "clickgen";
16 version = "2.1.9";
17 format = "setuptools";
18
19 disabled = pythonOlder "3.8";
20
21 src = fetchFromGitHub {
22 owner = "ful1e5";
23 repo = "clickgen";
24 rev = "refs/tags/v${version}";
25 hash = "sha256-mSaltlX2eNRLJ09zN5Tim8mW8mnjPi10W4QIEpiBQvI=";
26 };
27
28 propagatedBuildInputs = [ pillow toml numpy pyyaml ];
29
30 nativeCheckInputs = [ pytestCheckHook ];
31
32 postInstall = ''
33 # Copying scripts directory needed by clickgen script at $out/bin/
34 cp -R src/clickgen/scripts $out/${python.sitePackages}/clickgen/scripts
35 '';
36
37 pythonImportsCheck = [ "clickgen" ];
38
39 meta = with lib; {
40 homepage = "https://github.com/ful1e5/clickgen";
41 description = "The hassle-free cursor building toolbox";
42 longDescription = ''
43 clickgen is API for building X11 and Windows Cursors from
44 .png files. clickgen is using anicursorgen and xcursorgen under the hood.
45 '';
46 license = licenses.mit;
47 maintainers = with maintainers; [ AdsonCicilioti ];
48 # fails with:
49 # ld: unknown option: -zdefs
50 broken = stdenv.isDarwin;
51 };
52}