dotfiles/nixpkgs.nix

10 lines
378 B
Nix
Raw Normal View History

2023-04-25 19:21:03 +00:00
# A nixpkgs instance that is grabbed from the pinned nixpkgs commit in the lock file
# This is useful to avoid using channels when using legacy nix commands
2023-04-25 20:10:57 +00:00
let
lock = (builtins.fromJSON (builtins.readFile ./flake.lock)).nodes.nixpkgs.locked;
2023-04-25 19:21:03 +00:00
in
2023-04-25 20:10:57 +00:00
import (fetchTarball {
url = "https://github.com/nixos/nixpkgs/archive/${lock.rev}.tar.gz";
sha256 = lock.narHash;
})