Skip to content

Commit 6ba3f47

Browse files
authored
Use updated fetchNixpkgs.nix (#327)
1 parent 78cfa7a commit 6ba3f47

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

default.nix

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ let
44
nixpkgs = fetchNixpkgs {
55
rev = "804060ff9a79ceb0925fe9ef79ddbf564a225d47";
66

7-
sha256 = "01pb6p07xawi60kshsxxq1bzn8a0y4s5jjqvhkwps4f5xjmmwav3";
8-
9-
outputSha256 = "0ga345hgw6v2kzyhvf5kw96hf60mx5pbd9c4qj5q4nan4lr7nkxn";
7+
sha256 = "0ga345hgw6v2kzyhvf5kw96hf60mx5pbd9c4qj5q4nan4lr7nkxn";
108
};
119

1210
readDirectory = import ./nix/readDirectory.nix;

nix/fetchNixpkgs.nix

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{ rev # The Git revision of nixpkgs to fetch
2-
, sha256 # The SHA256 of the downloaded data
3-
, outputSha256 ? null # The SHA256 fixed-output hash
2+
, sha256 # The SHA256 hash of the unpacked archive
43
, system ? builtins.currentSystem # This is overridable if necessary
54
}:
65

@@ -10,15 +9,15 @@ if (0 <= builtins.compareVersions builtins.nixVersion "1.12")
109
then (
1110
builtins.fetchTarball {
1211
url = "https://github.com/NixOS/nixpkgs/archive/${rev}.tar.gz";
13-
sha256 = outputSha256;
12+
inherit sha256;
1413
})
1514

1615
# This hack should at least work for Nix 1.11
1716
else (
1817
(rec {
1918
tarball = import <nix/fetchurl.nix> {
20-
url = "https://github.com/NixOS/nixpkgs/archive/${rev}.tar.gz";
21-
inherit sha256;
19+
url = "https://github.com/NixOS/nixpkgs/archive/${rev}.tar.gz";
20+
sha256 = null;
2221
};
2322

2423
builtin-paths = import <nix/config.nix>;
@@ -41,9 +40,9 @@ else (
4140
tar = builtins.storePath builtin-paths.tar;
4241
gzip = builtins.storePath builtin-paths.gzip;
4342
coreutils = builtins.storePath builtin-paths.coreutils;
44-
} // (if null == outputSha256 then { } else {
43+
} // (if null == sha256 then { } else {
4544
outputHashMode = "recursive";
4645
outputHashAlgo = "sha256";
47-
outputHash = outputSha256;
46+
outputHash = sha256;
4847
}));
4948
}).nixpkgs)

0 commit comments

Comments
 (0)