Skip to content

Commit

Permalink
python: allow passing extra arguments for the derivation
Browse files Browse the repository at this point in the history
When using a shell.nix with something as:

,----
| pkgs.mkShell {
|   packages = with pkgs; [
|     ...
|     (zephyr.pythonEnv.override {
|       extraPackages = ps: [ ps.stringcase ];
|     }))
|     ...
|   ];
| };
`----

Signed-off-by: Otavio Salvador <[email protected]>
  • Loading branch information
otavio authored and adisbladis committed Jul 4, 2024
1 parent 6e5b876 commit 6339867
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{ callPackage
, zephyr-src
{ zephyr-src
, pyproject-nix
, lib
, fetchurl
Expand Down
3 changes: 2 additions & 1 deletion python.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
, clang-tools_17
, gitlint
, lib
, extraPackages ? _ps: [ ]
}:

let
Expand Down Expand Up @@ -31,5 +32,5 @@ lib.warnIf
"zephyr-pythonEnv: Found invalid Python constraints for: ${builtins.toJSON (lib.attrNames invalidConstraints)}"
(python.withPackages (project.renderers.withPackages {
inherit python;
extraPackages = ps: [ ps.west ];
extraPackages = ps: [ ps.west ] ++ extraPackages ps;
}))

0 comments on commit 6339867

Please sign in to comment.