Skip to content

Commit

Permalink
Merge pull request #307 from deemp/fix-packagesFrom
Browse files Browse the repository at this point in the history
Fix packagesFrom
  • Loading branch information
zimbatm committed Apr 19, 2024
2 parents 2c8e04e + 6dee0dd commit 12e9147
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
9 changes: 5 additions & 4 deletions modules/devshell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,11 @@ let

# Returns a list of all the input derivation ... for a derivation.
inputsOf = drv:
(drv.buildInputs or [ ]) ++
(drv.nativeBuildInputs or [ ]) ++
(drv.propagatedBuildInputs or [ ]) ++
(drv.propagatedNativeBuildInputs or [ ])
filter lib.isDerivation
((drv.buildInputs or [ ]) ++
(drv.nativeBuildInputs or [ ]) ++
(drv.propagatedBuildInputs or [ ]) ++
(drv.propagatedNativeBuildInputs or [ ]))
;

in
Expand Down
6 changes: 6 additions & 0 deletions tests/core/devshell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
shell = devshell.mkShell {
devshell.name = "devshell-1";
devshell.packages = [ pkgs.git ];
devshell.packagesFrom = [
(pkgs.hello.overrideAttrs { buildInputs = [ null pkgs.cowsay ]; })
];
};
in
runTest "devshell-1" { } ''
Expand All @@ -20,6 +23,9 @@
# Adds packages to the PATH
type -p git
# Adds packages from packagesFrom to the PATH
type -p cowsay
'';

# Only load profiles
Expand Down

0 comments on commit 12e9147

Please sign in to comment.