Skip to content

Commit bc3ad02

Browse files
committed
Use flake.lock
1 parent 8329fc6 commit bc3ad02

File tree

3 files changed

+26
-5
lines changed

3 files changed

+26
-5
lines changed

default.nix

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
{...}@args:
22

33
let
4-
pin = (__fromJSON (__readFile ./flake.lock)).nodes.nixpkgs-2205.locked;
4+
pins = (__fromJSON (__readFile ./flake.lock)).nodes;
5+
nixpkgsPin = pins.nixpkgs-2205.locked;
6+
flakeCompatPin = pins.flake-compat.locked;
57
nixpkgsSrc =
68
builtins.fetchTarball {
7-
url = "https://github.com/NixOS/nixpkgs/archive/${pin.rev}.tar.gz";
8-
sha256 = pin.narHash;
9+
url = "https://github.com/NixOS/nixpkgs/archive/${nixpkgsPin.rev}.tar.gz";
10+
sha256 = nixpkgsPin.narHash;
911
};
1012
pkgs = args.pkgs or (import nixpkgsSrc {});
1113
flake-compat =
1214
pkgs.fetchzip {
13-
url = "https://github.com/edolstra/flake-compat/archive/5523c47f13259b981c49b26e28499724a5125fd8.tar.gz";
14-
sha256 = "sha256-7IySNHriQjzOZ88DDk6VDPf1GoUaOrOeUdukY62o52o=";
15+
url = "https://github.com/edolstra/flake-compat/archive/{flakeCompatPin.rev}.tar.gz";
16+
sha256 = flakeCompatPin.narHash;
1517
};
1618
self = import flake-compat {
1719
# We bypass flake-compat's rootSrc cleaning by evading its detection of this as a git

flake.lock

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
nixpkgs-2111 = { url = "github:NixOS/nixpkgs/nixpkgs-21.11-darwin"; };
99
nixpkgs-2205 = { url = "github:NixOS/nixpkgs/nixpkgs-22.05-darwin"; };
1010
nixpkgs-unstable = { url = "github:NixOS/nixpkgs/nixpkgs-unstable"; };
11+
flake-compat = { url = "github:hamishmack/flake-compat/hkm/pkgs-fetch"; flake = false; };
1112
flake-utils = { url = "github:numtide/flake-utils"; };
1213
hydra.url = "hydra";
1314
hackage = {

0 commit comments

Comments
 (0)