From 2fb4326ff6276502cc47c320abf475a62245214b Mon Sep 17 00:00:00 2001 From: "P. R. d. O" Date: Wed, 11 May 2022 15:49:57 -0600 Subject: [PATCH 1/2] python39Packages.clickgen: 1.1.9 -> 1.2.0, mark as broken on darwin --- .../python-modules/clickgen/default.nix | 26 +++++++++++++++---- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/clickgen/default.nix b/pkgs/development/python-modules/clickgen/default.nix index a85cee778b0..adb441f6aa8 100644 --- a/pkgs/development/python-modules/clickgen/default.nix +++ b/pkgs/development/python-modules/clickgen/default.nix @@ -1,5 +1,8 @@ { lib +, stdenv , buildPythonPackage +, pythonOlder +, pythonAtLeast , fetchFromGitHub , pillow , libX11 @@ -11,26 +14,38 @@ buildPythonPackage rec { pname = "clickgen"; - version = "1.1.9"; + version = "1.2.0"; + format = "setuptools"; + + disabled = pythonOlder "3.8" || pythonAtLeast "3.10"; src = fetchFromGitHub { owner = "ful1e5"; repo = "clickgen"; rev = "v${version}"; - sha256 = "108f3sbramd3hhs4d84s3i3lbwllfrkvjakjq4gdmbw6xpilvm0l"; + sha256 = "sha256-01c8SVy+J004dq5KCUe62w7i/xUTxTfl/IpvUtGQgw0="; }; buildInputs = [ libXcursor libX11 libpng ]; propagatedBuildInputs = [ pillow ]; - pythonImportsCheck = [ "clickgen" ]; + checkInputs = [ pytestCheckHook ]; + + postBuild = '' + # Needs to build xcursorgen.so + cd src/xcursorgen + make + cd ../.. + ''; 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; { homepage = "https://github.com/ful1e5/clickgen"; @@ -41,5 +56,6 @@ buildPythonPackage rec { ''; license = licenses.mit; maintainers = with maintainers; [ AdsonCicilioti ]; + broken = stdenv.isDarwin; }; } From 8878fa39bed66c31eb8bea99659f489147a30659 Mon Sep 17 00:00:00 2001 From: "P. R. d. O" Date: Wed, 11 May 2022 17:45:32 -0600 Subject: [PATCH 2/2] python39Packages.clickgen: 1.1.9 -> 1.2.0, mark as broken on darwin --- pkgs/development/python-modules/clickgen/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/python-modules/clickgen/default.nix b/pkgs/development/python-modules/clickgen/default.nix index adb441f6aa8..b74827d1971 100644 --- a/pkgs/development/python-modules/clickgen/default.nix +++ b/pkgs/development/python-modules/clickgen/default.nix @@ -56,6 +56,8 @@ buildPythonPackage rec { ''; license = licenses.mit; maintainers = with maintainers; [ AdsonCicilioti ]; + # fails with: + # ld: unknown option: -zdefs broken = stdenv.isDarwin; }; }