kicad: link through /lib and /share from kicad.base#88923
kicad: link through /lib and /share from kicad.base#88923evils wants to merge 2 commits intoNixOS:masterfrom
Conversation
There was a problem hiding this comment.
please keep the toPythonModule only in python-packages.nix.
There was a problem hiding this comment.
this makes it so kicad-small.py works
There was a problem hiding this comment.
Python modules need to be inside python-packages.nix, not outside of it.
There was a problem hiding this comment.
a link to the module exists there
independently defining it there would result in not only duplicating the same snippet at least 4 times
but risk breaking stuff if a pname changes (for example you couldn't do an ad-hoc (kicad.override {pname ="kicad-testing"; change=otherStuff;};).py )
There was a problem hiding this comment.
removing the kicad.py attribute would fix those concerns i suppose
but that would feel like a very scattered implementation?
There was a problem hiding this comment.
can you tell me if there's anything added by toPythonModule?
kicad.base == kicad.src == kicad.py == python3.pkgs.kicad
i think with the bindings exposed directly (by linking /lib (and /share?))
having kicad.py doesn't make much sense
and python.pkgs.kicad makes sense as an end-point for kicad.base to avoid pulling in the kicad libraries if you just want the bindings
There was a problem hiding this comment.
resolved with the new commit? (will be squashed before undrafting)
There was a problem hiding this comment.
lookup the definition of toPythonModule. It adds a passthru that sets relevant attributes for it to be usable by python.buildEnv/python.withPackages.
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
|
Before making further changes I suggest introducing tests for the kicad bindings, so one can see what functions and what does not. |
|
Will linking through /share also fix the missing desktop icons associated with the Kicad applications, or would we also need to add |
pass through a kicad.py and link to it with python.pkgs.kicad to allow access to the bindings without pulling in the 3d models etc linking /lib and /share should allow the same while keep kicad usable it also exposes .desktop files and mime info
|
Would it be possible to make a subset of this PR that links |
|
@eduardosm did you (or anyone else with a desktop environment) manage to try this PR and confirm linking through |
|
I can confirm that this PR fixes #106295 |
|
I marked this as stale due to inactivity. → More info |
Motivation for this change
https://discourse.nixos.org/t/7317
and #40835
Things done
add a
kicad.pyattribute which istoPythonModule kicad.base(this yields the same askicad.base, does it add context?)python.pkgs.kicadto point to that, addpython.pkgs.kicad-unstablelink through to
kicad.base's/liblink through to
kicad.base's/share.desktopfiles,MIMEinfobump
kicad-unstableto the latest versionTested using sandboxing (nix.useSandbox on NixOS, or option
sandboxinnix.confon non-NixOS linux)Built on platform(s)
Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
Tested compilation of all pkgs that depend on this change using
nix-shell -p nixpkgs-review --run "nixpkgs-review wip"Tested execution of all binary files (usually in
./result/bin/)Determined the impact on package closure size (by running
nix path-info -Sbefore and after)Ensured that relevant documentation is up to date
Fits CONTRIBUTING.md.