Skip to content

Commit

Permalink
Merge pull request #325726 from StarGate01/fix-kicad
Browse files Browse the repository at this point in the history
kicad: pin to python 3.11
  • Loading branch information
SuperSandro2000 authored Jul 17, 2024
2 parents 8398257 + 6cec87c commit b75c0dc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions pkgs/applications/science/electronics/kicad/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
, withNgspice ? !stdenv.isDarwin
, libngspice
, withScripting ? true
, python3
, python311
, addons ? [ ]
, debug ? false
, sanitizeAddress ? false
Expand Down Expand Up @@ -122,10 +122,14 @@ let
else versionsImport.${baseName}.libVersion.version;

wxGTK = wxGTK32;
python = python3;
# KiCAD depends on wxWidgets, which uses distutils (removed in Python 3.12)
# See also: https://github.com/wxWidgets/Phoenix/issues/2104
# Eventually, wxWidgets should support Python 3.12: https://github.com/wxWidgets/Phoenix/issues/2553
# Until then, we use Python 3.11 which still includes distutils
python = python311;
wxPython = python.pkgs.wxpython;
addonPath = "addon.zip";
addonsDrvs = map (pkg: pkg.override { inherit addonPath python3; }) addons;
addonsDrvs = map (pkg: pkg.override { inherit addonPath python; }) addons;

addonsJoined =
runCommand "addonsJoined"
Expand Down Expand Up @@ -157,7 +161,7 @@ stdenv.mkDerivation rec {

# Common libraries, referenced during runtime, via the wrapper.
passthru.libraries = callPackages ./libraries.nix { inherit libSrc; };
passthru.callPackage = newScope { inherit addonPath python3; };
passthru.callPackage = newScope { inherit addonPath python; };
base = callPackage ./base.nix {
inherit stable testing baseName;
inherit kicadSrc kicadVersion;
Expand Down
2 changes: 1 addition & 1 deletion pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6545,7 +6545,7 @@ self: super: with self; {
khanaa = callPackage ../development/python-modules/khanaa {};

kicad = toPythonModule (pkgs.kicad.override {
python3 = python;
python311 = python;
}).src;

kinparse = callPackage ../development/python-modules/kinparse { };
Expand Down

0 comments on commit b75c0dc

Please sign in to comment.