diff --git a/pkgs/by-name/kikit/package.nix b/pkgs/by-name/kikit/package.nix index 3456079ad..b0de3c8bd 100644 --- a/pkgs/by-name/kikit/package.nix +++ b/pkgs/by-name/kikit/package.nix @@ -1,8 +1,8 @@ { lib, - pcbnew-transition, pybars3, python3, + openscad, fetchFromGitHub, bats, callPackage, @@ -15,12 +15,11 @@ properCaseName = "KiKit"; - shapely = callPackage ./shapely {}; solidpython = callPackage ./solidpython {}; in python3.pkgs.buildPythonPackage rec { pname = toLower properCaseName; - version = "1.3.0"; + version = "1.5.1"; format = "setuptools"; disabled = python3.pythonOlder "3.7"; @@ -29,7 +28,7 @@ in owner = "yaqwsx"; repo = properCaseName; rev = "v${version}"; - hash = "sha256-kDTPk/R3eZtm4DjoUV4tSQzjGQ9k8MKQedX4oUXYzeo="; + hash = "sha256-iehA6FthNTJq+lDTL4eSUIIlYDJj86LMOyv/L2/ybyc="; }; propagatedBuildInputs = with python3.pkgs; @@ -41,13 +40,14 @@ in commentjson # https://github.com/yaqwsx/KiKit/issues/575 wxPython_4_2 + shapely + pcbnew-transition ] ++ [ - pcbnew-transition - shapely pybars3 # https://github.com/yaqwsx/KiKit/issues/576 solidpython + openscad ]; nativeBuildInputs = with python3.pkgs; [ diff --git a/pkgs/by-name/kikit/shapely/default.nix b/pkgs/by-name/kikit/shapely/default.nix deleted file mode 100644 index 3e9c93223..000000000 --- a/pkgs/by-name/kikit/shapely/default.nix +++ /dev/null @@ -1,78 +0,0 @@ -{ - pkgs, - lib, - stdenv, - fetchPypi, - substituteAll, - python3, -}: let - inherit - (lib) - optionals - licenses - maintainers - optionalString - ; -in - python3.pkgs.buildPythonPackage rec { - pname = "Shapely"; - version = "1.8.4"; - disabled = python3.pkgs.pythonOlder "3.6"; - - src = fetchPypi { - inherit pname version; - sha256 = "sha256-oZXlHKr6IYKR8suqP+9p/TNTyT7EtlsqRyLEz0DDGYw="; - }; - - nativeBuildInputs = with pkgs; [ - pkgs.geos # for geos-config - python3.pkgs.cython - ]; - - propagatedBuildInputs = with python3.pkgs; [ - numpy - ]; - - checkInputs = with python3.pkgs; [ - pytestCheckHook - ]; - - # Environment variable used in shapely/_buildcfg.py - GEOS_LIBRARY_PATH = "${pkgs.geos}/lib/libgeos_c${stdenv.hostPlatform.extensions.sharedLibrary}"; - - patches = [ - # Patch to search form GOES .so/.dylib files in a Nix-aware way - (substituteAll { - src = ./library-paths.patch; - libgeos_c = GEOS_LIBRARY_PATH; - libc = optionalString (!stdenv.isDarwin) "${stdenv.cc.libc}/lib/libc${stdenv.hostPlatform.extensions.sharedLibrary}.6"; - }) - ]; - - preCheck = '' - rm -r shapely # prevent import of local shapely - ''; - - disabledTests = optionals (stdenv.isDarwin && stdenv.isAarch64) [ - # FIXME(lf-): these logging tests are broken, which is definitely our - # fault. I've tried figuring out the cause and failed. - # - # It is apparently some sandbox or no-sandbox related thing on macOS only - # though. - "test_error_handler_exception" - "test_error_handler" - "test_info_handler" - ]; - - pythonImportsCheck = ["shapely"]; - - # There seems to be a regression on shapely's tests. However, kikit's tests keep passing! - doCheck = false; - - meta = { - description = "Geometric objects, predicates, and operations"; - homepage = "https://pypi.python.org/pypi/Shapely/"; - license = with licenses; [bsd3]; - maintainers = with maintainers; [knedlsepp]; - }; - } diff --git a/pkgs/by-name/kikit/shapely/library-paths.patch b/pkgs/by-name/kikit/shapely/library-paths.patch deleted file mode 100644 index d095eada9..000000000 --- a/pkgs/by-name/kikit/shapely/library-paths.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/shapely/geos.py b/shapely/geos.py -index 88c5f53..1ccd6e4 100644 ---- a/shapely/geos.py -+++ b/shapely/geos.py -@@ -96,6 +96,7 @@ if sys.platform.startswith('linux'): - alt_paths = [ - 'libgeos_c.so.1', - 'libgeos_c.so', -+ '@libgeos_c@', - ] - _lgeos = load_dll('geos_c', fallbacks=alt_paths) - -@@ -160,6 +161,7 @@ elif sys.platform == 'darwin': - "/usr/local/lib/libgeos_c.dylib", - # homebrew Apple Silicon - "/opt/homebrew/lib/libgeos_c.dylib", -+ "@libgeos_c@", - ] - _lgeos = load_dll('geos_c', fallbacks=alt_paths) - -diff --git a/tests/test_dlls.py b/tests/test_dlls.py -index c71da8e..c36262c 100644 ---- a/tests/test_dlls.py -+++ b/tests/test_dlls.py -@@ -18,4 +18,5 @@ class LoadingTestCase(unittest.TestCase): - '/opt/homebrew/lib/libgeos_c.dylib', # homebrew (macOS) - os.path.join(sys.prefix, "lib", "libgeos_c.so"), # anaconda (Linux) - 'libgeos_c.so.1', -- 'libgeos_c.so']) -+ 'libgeos_c.so', -+ '@libgeos_c@']) diff --git a/pkgs/by-name/pcbnew-transition/package.nix b/pkgs/by-name/pcbnew-transition/package.nix deleted file mode 100644 index 5273adb61..000000000 --- a/pkgs/by-name/pcbnew-transition/package.nix +++ /dev/null @@ -1,48 +0,0 @@ -{ - python3, - fetchPypi, - lib, -}: let - inherit - (lib) - licenses - ; - - inherit - (python3.pkgs) - buildPythonPackage - ; - - properCaseName = "pcbnewTransition"; -in - buildPythonPackage rec { - pname = properCaseName; - version = "0.3.4"; - format = "setuptools"; - - disabled = python3.pythonOlder "3.7"; - - src = fetchPypi { - inherit pname version; - hash = "sha256-3CJUG1kd63Lg0r9HpJRIvttHS5s2EuZRoxeXrqsJ/kQ="; - }; - - propagatedBuildInputs = with python3.pkgs; [ - kicad - ]; - - nativeBuildInputs = with python3.pkgs; [ - versioneer - ]; - - pythonImportsCheck = [ - properCaseName - ]; - - meta = { - description = "Library that allows you to support both, KiCAD 5 and KiCAD 6 in your plugins"; - homepage = "https://github.com/yaqwsx/pcbnewTransition"; - changelog = "https://github.com/yaqwsx/pcbnewTransition/releases/tag/v${version}"; - license = licenses.mit; - }; - }