Skip to content

Commit 8b938d0

Browse files
authored
Merge pull request #66 from MatthewCroughan/mc/default-lib-flake-inputs
Use flake.inputs.nixpkgs.lib if available, before defaulting to NIX_PATH
2 parents 55de7d4 + 3e3dd03 commit 8b938d0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

share/nixos-shell.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
, flakeAttr ? null
77
}:
88
let
9-
lib = (import nixpkgs { }).lib;
9+
lib = flake.inputs.nixpkgs.lib or (import nixpkgs { }).lib;
1010

1111
nixos-shell = import ./modules/nixos-shell.nix;
1212
nixos-shell-config = import ./modules/nixos-shell-config.nix;
@@ -15,7 +15,7 @@ let
1515

1616
getFlakeOutput = path: lib.attrByPath path null flake.outputs;
1717

18-
mkShellSystem = config: import "${toString nixpkgs}/nixos/lib/eval-config.nix" {
18+
mkShellSystem = config: import "${toString flake.inputs.nixpkgs or nixpkgs}/nixos/lib/eval-config.nix" {
1919
inherit system;
2020
modules = [
2121
config

0 commit comments

Comments
 (0)