nix/lib/nixpkgs.nix
2023-09-19 20:52:23 +09:00

7 lines
No EOL
385 B
Nix

# A nixpkgs instance that is grabbed from the pinned nixpkgs commit in the lock file
# Useful to avoid using channels when using legacy nix commands
let nixpkgs-lock = (builtins.fromJSON (builtins.readFile ../flake.lock)).nodes.nixpkgs.locked;
in import (fetchTarball {
url = "https://github.com/nixos/nixpkgs/archive/${nixpkgs-lock.rev}.tar.gz";
sha256 = nixpkgs-lock.narHash;
})