30 lines
682 B
Nix
30 lines
682 B
Nix
# Shell for bootstrapping flake-enabled nix and other tooling
|
|
{
|
|
pkgs ?
|
|
# If pkgs is not defined, instantiate nixpkgs from locked commit
|
|
let
|
|
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;
|
|
};
|
|
in
|
|
import nixpkgs { overlays = [ ]; },
|
|
...
|
|
}:
|
|
{
|
|
default = pkgs.mkShell {
|
|
nativeBuildInputs = builtins.attrValues {
|
|
inherit (pkgs)
|
|
|
|
nix
|
|
home-manager
|
|
nh
|
|
git
|
|
fish
|
|
dconf2nix
|
|
bats # for bash testing
|
|
;
|
|
};
|
|
};
|
|
}
|