nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 63 lines 1.5 kB view raw
1{ lib 2, stdenv 3, buildPythonPackage 4, pythonOlder 5, pythonAtLeast 6, fetchFromGitHub 7, pillow 8, libX11 9, libXcursor 10, libpng 11, python 12, pytestCheckHook 13}: 14 15buildPythonPackage rec { 16 pname = "clickgen"; 17 version = "1.2.0"; 18 format = "setuptools"; 19 20 disabled = pythonOlder "3.8" || pythonAtLeast "3.10"; 21 22 src = fetchFromGitHub { 23 owner = "ful1e5"; 24 repo = "clickgen"; 25 rev = "v${version}"; 26 sha256 = "sha256-01c8SVy+J004dq5KCUe62w7i/xUTxTfl/IpvUtGQgw0="; 27 }; 28 29 buildInputs = [ libXcursor libX11 libpng ]; 30 31 propagatedBuildInputs = [ pillow ]; 32 33 checkInputs = [ pytestCheckHook ]; 34 35 postBuild = '' 36 # Needs to build xcursorgen.so 37 cd src/xcursorgen 38 make 39 cd ../.. 40 ''; 41 42 postInstall = '' 43 install -m644 src/xcursorgen/xcursorgen.so $out/${python.sitePackages}/clickgen/xcursorgen.so 44 # Copying scripts directory needed by clickgen script at $out/bin/ 45 cp -R src/clickgen/scripts $out/${python.sitePackages}/clickgen/scripts 46 ''; 47 48 pythonImportsCheck = [ "clickgen" ]; 49 50 meta = with lib; { 51 homepage = "https://github.com/ful1e5/clickgen"; 52 description = "The hassle-free cursor building toolbox"; 53 longDescription = '' 54 clickgen is API for building X11 and Windows Cursors from 55 .png files. clickgen is using anicursorgen and xcursorgen under the hood. 56 ''; 57 license = licenses.mit; 58 maintainers = with maintainers; [ AdsonCicilioti ]; 59 # fails with: 60 # ld: unknown option: -zdefs 61 broken = stdenv.isDarwin; 62 }; 63}