Merge pull request #172436 from WolfangAukang/clickgen-1.2.0

main
Sandro 2 years ago committed by GitHub
commit 6195a9ff0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 28
      pkgs/development/python-modules/clickgen/default.nix

@ -1,5 +1,8 @@
{ lib { lib
, stdenv
, buildPythonPackage , buildPythonPackage
, pythonOlder
, pythonAtLeast
, fetchFromGitHub , fetchFromGitHub
, pillow , pillow
, libX11 , libX11
@ -11,26 +14,38 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "clickgen"; pname = "clickgen";
version = "1.1.9"; version = "1.2.0";
format = "setuptools";
disabled = pythonOlder "3.8" || pythonAtLeast "3.10";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "ful1e5"; owner = "ful1e5";
repo = "clickgen"; repo = "clickgen";
rev = "v${version}"; rev = "v${version}";
sha256 = "108f3sbramd3hhs4d84s3i3lbwllfrkvjakjq4gdmbw6xpilvm0l"; sha256 = "sha256-01c8SVy+J004dq5KCUe62w7i/xUTxTfl/IpvUtGQgw0=";
}; };
buildInputs = [ libXcursor libX11 libpng ]; buildInputs = [ libXcursor libX11 libpng ];
propagatedBuildInputs = [ pillow ]; propagatedBuildInputs = [ pillow ];
pythonImportsCheck = [ "clickgen" ]; checkInputs = [ pytestCheckHook ];
postBuild = ''
# Needs to build xcursorgen.so
cd src/xcursorgen
make
cd ../..
'';
postInstall = '' postInstall = ''
install -m644 clickgen/xcursorgen.so $out/${python.sitePackages}/clickgen/xcursorgen.so install -m644 src/xcursorgen/xcursorgen.so $out/${python.sitePackages}/clickgen/xcursorgen.so
# Copying scripts directory needed by clickgen script at $out/bin/
cp -R src/clickgen/scripts $out/${python.sitePackages}/clickgen/scripts
''; '';
checkInputs = [ pytestCheckHook ]; pythonImportsCheck = [ "clickgen" ];
meta = with lib; { meta = with lib; {
homepage = "https://github.com/ful1e5/clickgen"; homepage = "https://github.com/ful1e5/clickgen";
@ -41,5 +56,8 @@ buildPythonPackage rec {
''; '';
license = licenses.mit; license = licenses.mit;
maintainers = with maintainers; [ AdsonCicilioti ]; maintainers = with maintainers; [ AdsonCicilioti ];
# fails with:
# ld: unknown option: -zdefs
broken = stdenv.isDarwin;
}; };
} }

Loading…
Cancel
Save