-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathshell.nix
More file actions
20 lines (20 loc) · 712 Bytes
/
shell.nix
File metadata and controls
20 lines (20 loc) · 712 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Shell for bootstrapping flake-enabled nix
{
pkgs ? let
# If pkgs is not defined, instanciate nixpkgs from locked commit
lock = (builtins.fromJSON (builtins.readFile ./flake.lock)).nodes.nixpkgs.locked;
nixpkgs = fetchTarball {
url = "https://github.com/nixos/nixpkgs/archive/${lock.rev}.tar.gz";
sha256 = lock.narHash;
};
system = builtins.currentSystem;
overlays = []; # Explicit blank overlay to avoid interference
in
import nixpkgs {inherit system overlays;},
...
}:
pkgs.mkShell {
# Enable experimental features without having to specify the argument
NIX_CONFIG = "experimental-features = nix-command flakes";
nativeBuildInputs = with pkgs; [nix git];
}