Skip to content

Commit f213cda

Browse files
committed
refactor: use nixpkgs from flake
1 parent 83cb93d commit f213cda

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

nix/nixpkgs.nix

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
{ system ? builtins.currentSystem }:
12
let
2-
# nixpkgs is only used for development. Don't add it to the flake.lock.
3-
gitRev = "2c2a09678ce2ce4125591ac4fe2f7dfaec7a609c";
3+
lock = builtins.fromJSON (builtins.readFile ../flake.lock);
4+
nixpkgs =
5+
fetchTarball {
6+
url = "https://github.com/NixOS/nixpkgs/archive/${lock.nodes.nixpkgs.locked.rev}.tar.gz";
7+
sha256 = lock.nodes.nixpkgs.locked.narHash;
8+
};
49
in
5-
builtins.fetchTarball {
6-
url = "https://github.com/NixOS/nixpkgs/archive/${gitRev}.tar.gz";
7-
sha256 = "1pkz5bq8f5p9kxkq3142lrrq1592d7zdi75fqzrf02cl1xy2cwvn";
8-
}
10+
import nixpkgs { inherit system; }

0 commit comments

Comments
 (0)