on iko/ghcjs-patch-master help sign in
Flakify all inputs (#1180)
d5d304dHamish Mackenzie
@@ -35,7 +35,7 @@ in rec {
35 maintainer-scripts = pkgs.dontRecurseIntoAttrs {
35 maintainer-scripts = pkgs.dontRecurseIntoAttrs {
36 update-hackage = import ./scripts/update-hackage.nix {
36 update-hackage = import ./scripts/update-hackage.nix {
37 inherit (pkgs) stdenv lib writeScript coreutils glibc git
37 inherit (pkgs) stdenv lib writeScript coreutils glibc git
38− openssh nix-prefetch-git gawk bash curl findutils;
38+ openssh nixFlakes gawk bash curl findutils;
39 # Update scripts use the internal nix-tools and cabal-install (compiled with a fixed GHC version)
39 # Update scripts use the internal nix-tools and cabal-install (compiled with a fixed GHC version)
40 nix-tools = haskell.internal-nix-tools;
40 nix-tools = haskell.internal-nix-tools;
41 cabal-install = haskell.internal-cabal-install;
41 cabal-install = haskell.internal-cabal-install;
@@ -43,7 +43,7 @@ in rec {
43 };
43 };
44 update-stackage = haskell.callPackage ./scripts/update-stackage.nix {
44 update-stackage = haskell.callPackage ./scripts/update-stackage.nix {
45 inherit (pkgs) stdenv lib writeScript coreutils glibc git
45 inherit (pkgs) stdenv lib writeScript coreutils glibc git
46− openssh nix-prefetch-git gawk bash curl findutils;
46+ openssh nixFlakes gawk bash curl findutils;
47 # Update scripts use the internal nix-tools and cabal-install (compiled with a fixed GHC version)
47 # Update scripts use the internal nix-tools and cabal-install (compiled with a fixed GHC version)
48 nix-tools = haskell.internal-nix-tools;
48 nix-tools = haskell.internal-nix-tools;
49 cabal-install = haskell.internal-cabal-install;
49 cabal-install = haskell.internal-cabal-install;
changelog.md+6
@@ -1,6 +1,12 @@
1This file contains a summary of changes to Haskell.nix and `nix-tools`
1This file contains a summary of changes to Haskell.nix and `nix-tools`
2that will impact users.
2that will impact users.
3
3
4+## Aug 6, 2021
5+* Included dependencies of haskell.nix that were tracked in `nix/sources.json`
6+ as flake inputs (`flake.lock` replaces `nix/sources.json`).
7+* Uses `flake-compat` to continue to provide a compatible interface for non
8+ flake projects.
9+
4## Jul 23, 2021
10## Jul 23, 2021
5* `source-repository-package` references in `cabal.project` files are now
11* `source-repository-package` references in `cabal.project` files are now
6 left as a `source-repository-package` when calculating the the `plan-nix` for
12 left as a `source-repository-package` when calculating the the `plan-nix` for
ci-lib.nix+4−4
@@ -1,8 +1,8 @@
1−let
1+{
2 # Generic nixpkgs, use *only* for lib functions that are stable across versions
2 # Generic nixpkgs, use *only* for lib functions that are stable across versions
3− pkgs = import (import ./nix/sources.nix).nixpkgs {};
3+ pkgs ? (import ./. {}).pkgs,
4− lib = pkgs.lib;
4+ lib ? pkgs.lib
5−in rec {
5+}: rec {
6 inherit (import ./dimension.nix) dimension;
6 inherit (import ./dimension.nix) dimension;
7
7
8 # A filter for removing packages that aren't supported on the current platform
8 # A filter for removing packages that aren't supported on the current platform
ci.nix+4−3
@@ -4,10 +4,11 @@
4, ifdLevel ? 3
4, ifdLevel ? 3
5# Whether or not we are evaluating in restricted mode. This is true in Hydra, but not in Hercules.
5# Whether or not we are evaluating in restricted mode. This is true in Hydra, but not in Hercules.
6, restrictEval ? false
6, restrictEval ? false
7−, checkMaterialization ? false }:
7+, checkMaterialization ? false
8+, pkgs ? (import ./. {}).pkgs }:
8 let
9 let
9− inherit (import ./ci-lib.nix) dimension platformFilterGeneric filterAttrsOnlyRecursive;
10+ inherit (import ./ci-lib.nix { inherit pkgs; }) dimension platformFilterGeneric filterAttrsOnlyRecursive;
10− sources = import ./nix/sources.nix {};
11+ inherit (pkgs.haskell-nix) sources;
11 nixpkgsVersions = {
12 nixpkgsVersions = {
12 "R2009" = "nixpkgs-2009";
13 "R2009" = "nixpkgs-2009";
13 "R2105" = "nixpkgs-2105";
14 "R2105" = "nixpkgs-2105";
default.nix+17−23
@@ -1,23 +1,17 @@
1−{ checkMaterialization ? false # Allows us to easily switch on materialization checking
2−, system ? builtins.currentSystem
3−, sourcesOverride ? {}
4−, ... }@args: rec {
1+{...}@args:
5− sources = (import ./nix/sources.nix { inherit pkgs; }) // sourcesOverride;
2+
6− config = import ./config.nix;
3+let
7− overlays = [ allOverlays.combined ] ++ (
4+ nixpkgsSrc =
8− if checkMaterialization == true
5+ builtins.fetchTarball {
9− then [(
6+ url = "https://github.com/NixOS/nixpkgs/archive/3c6f3f84af60a8ed5b8a79cf3026b7630fcdefb8.tar.gz";
10− final: prev: {
7+ sha256 = "sha256:0jf9l6j60sa8cms7r4a02kr9j9884pwv1prf79b2ysnxmnhimnch";
11− haskell-nix = prev.haskell-nix // {
8+ };
12− checkMaterialization = true;
9+ pkgs = args.pkgs or import nixpkgsSrc {};
13− };
10+ flake-compat =
11+ pkgs.fetchzip {
12+ url = "https://github.com/hamishmack/flake-compat/archive/ce16b21b8a5588aa8b532353d3ceea89a38b8e77.tar.gz";
13+ sha256 = "sha256:054nsfqh3wy6v6bjamw0k91xl8v1rc5x2laic8mphrkrhzvyz5hi";
14− }
14+ };
15− )]
15+ self = import flake-compat { src = ./.; inherit pkgs; };
16− else []
16+in self.defaultNix.internal.compat
17− );
17+({ system = args.pkgs.system or builtins.currentSystem; } // args) // self.defaultNix
18− allOverlays = import ./overlays args;
19− nixpkgsArgs = { inherit config overlays system; };
20− pkgs = import sources.nixpkgs nixpkgsArgs;
21− pkgs-unstable = import sources.nixpkgs-unstable nixpkgsArgs;
22− hix = import ./hix/default.nix;
23−}
flake.locknew file+285
@@ -0,0 +1,285 @@
1+{
2+ "nodes": {
3+ "HTTP": {
4+ "flake": false,
5+ "locked": {
6+ "lastModified": 1451647621,
7+ "narHash": "sha256-oHIyw3x0iKBexEo49YeUDV1k74ZtyYKGR2gNJXXRxts=",
8+ "owner": "phadej",
9+ "repo": "HTTP",
10+ "rev": "9bc0996d412fef1787449d841277ef663ad9a915",
11+ "type": "github"
12+ },
13+ "original": {
14+ "owner": "phadej",
15+ "repo": "HTTP",
16+ "type": "github"
17+ }
18+ },
19+ "cabal-32": {
20+ "flake": false,
21+ "locked": {
22+ "lastModified": 1603716527,
23+ "narHash": "sha256-sDbrmur9Zfp4mPKohCD8IDZfXJ0Tjxpmr2R+kg5PpSY=",
24+ "owner": "haskell",
25+ "repo": "cabal",
26+ "rev": "94aaa8e4720081f9c75497e2735b90f6a819b08e",
27+ "type": "github"
28+ },
29+ "original": {
30+ "owner": "haskell",
31+ "ref": "3.2",
32+ "repo": "cabal",
33+ "type": "github"
34+ }
35+ },
36+ "cabal-34": {
37+ "flake": false,
38+ "locked": {
39+ "lastModified": 1622475795,
40+ "narHash": "sha256-chwTL304Cav+7p38d9mcb+egABWmxo2Aq+xgVBgEb/U=",
41+ "owner": "haskell",
42+ "repo": "cabal",
43+ "rev": "b086c1995cdd616fc8d91f46a21e905cc50a1049",
44+ "type": "github"
45+ },
46+ "original": {
47+ "owner": "haskell",
48+ "ref": "3.4",
49+ "repo": "cabal",
50+ "type": "github"
51+ }
52+ },
53+ "cardano-shell": {
54+ "flake": false,
55+ "locked": {
56+ "lastModified": 1608537748,
57+ "narHash": "sha256-PulY1GfiMgKVnBci3ex4ptk2UNYMXqGjJOxcPy2KYT4=",
58+ "owner": "input-output-hk",
59+ "repo": "cardano-shell",
60+ "rev": "9392c75087cb9a3d453998f4230930dea3a95725",
61+ "type": "github"
62+ },
63+ "original": {
64+ "owner": "input-output-hk",
65+ "repo": "cardano-shell",
66+ "type": "github"
67+ }
68+ },
69+ "flake-utils": {
70+ "locked": {
71+ "lastModified": 1623875721,
72+ "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=",
73+ "owner": "numtide",
74+ "repo": "flake-utils",
75+ "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772",
76+ "type": "github"
77+ },
78+ "original": {
79+ "owner": "numtide",
80+ "repo": "flake-utils",
81+ "type": "github"
82+ }
83+ },
84+ "ghc-8.6.5-iohk": {
85+ "flake": false,
86+ "locked": {
87+ "lastModified": 1600920045,
88+ "narHash": "sha256-DO6kxJz248djebZLpSzTGD6s8WRpNI9BTwUeOf5RwY8=",
89+ "owner": "input-output-hk",
90+ "repo": "ghc",
91+ "rev": "95713a6ecce4551240da7c96b6176f980af75cae",
92+ "type": "github"
93+ },
94+ "original": {
95+ "owner": "input-output-hk",
96+ "ref": "release/8.6.5-iohk",
97+ "repo": "ghc",
98+ "type": "github"
99+ }
100+ },
101+ "hackage": {
102+ "flake": false,
103+ "locked": {
104+ "lastModified": 1628212308,
105+ "narHash": "sha256-UcqeNBgYDRjWN1+VRRKbviPYCRFocamjOe5xTgyqo14=",
106+ "owner": "input-output-hk",
107+ "repo": "hackage.nix",
108+ "rev": "9bdefa51c864bbef48a2758b05b4b568f0ded62b",
109+ "type": "github"
110+ },
111+ "original": {
112+ "owner": "input-output-hk",
113+ "repo": "hackage.nix",
114+ "type": "github"
115+ }
116+ },
117+ "hpc-coveralls": {
118+ "flake": false,
119+ "locked": {
120+ "lastModified": 1607498076,
121+ "narHash": "sha256-8uqsEtivphgZWYeUo5RDUhp6bO9j2vaaProQxHBltQk=",
122+ "owner": "sevanspowell",
123+ "repo": "hpc-coveralls",
124+ "rev": "14df0f7d229f4cd2e79f8eabb1a740097fdfa430",
125+ "type": "github"
126+ },
127+ "original": {
128+ "owner": "sevanspowell",
129+ "repo": "hpc-coveralls",
130+ "type": "github"
131+ }
132+ },
133+ "nix-tools": {
134+ "flake": false,
135+ "locked": {
136+ "lastModified": 1626997434,
137+ "narHash": "sha256-1judQmP298ao6cGUNxcGhcAXHOnA9qSLvWk/ZtoUL7w=",
138+ "owner": "input-output-hk",
139+ "repo": "nix-tools",
140+ "rev": "c8c5e6a6fbb12a73598d1a434984a36e880ce3cf",
141+ "type": "github"
142+ },
143+ "original": {
144+ "owner": "input-output-hk",
145+ "repo": "nix-tools",
146+ "type": "github"
147+ }
148+ },
149+ "nixpkgs": {
150+ "locked": {
151+ "lastModified": 1624291665,
152+ "narHash": "sha256-kNkaoa3dai9WOi7fsPklCCWZ8hRAkXx0ZUhpYKShyUk=",
153+ "owner": "NixOS",
154+ "repo": "nixpkgs",
155+ "rev": "3c6f3f84af60a8ed5b8a79cf3026b7630fcdefb8",
156+ "type": "github"
157+ },
158+ "original": {
159+ "owner": "NixOS",
160+ "ref": "nixpkgs-20.09-darwin",
161+ "repo": "nixpkgs",
162+ "type": "github"
163+ }
164+ },
165+ "nixpkgs-2003": {
166+ "locked": {
167+ "lastModified": 1620055814,
168+ "narHash": "sha256-8LEHoYSJiL901bTMVatq+rf8y7QtWuZhwwpKE2fyaRY=",
169+ "owner": "NixOS",
170+ "repo": "nixpkgs",
171+ "rev": "1db42b7fe3878f3f5f7a4f2dc210772fd080e205",
172+ "type": "github"
173+ },
174+ "original": {
175+ "owner": "NixOS",
176+ "ref": "nixpkgs-20.03-darwin",
177+ "repo": "nixpkgs",
178+ "type": "github"
179+ }
180+ },
181+ "nixpkgs-2009": {
182+ "locked": {
183+ "lastModified": 1624271064,
184+ "narHash": "sha256-qns/uRW7MR2EfVf6VEeLgCsCp7pIOjDeR44JzTF09MA=",
185+ "owner": "NixOS",
186+ "repo": "nixpkgs",
187+ "rev": "46d1c3f28ca991601a53e9a14fdd53fcd3dd8416",
188+ "type": "github"
189+ },
190+ "original": {
191+ "owner": "NixOS",
192+ "ref": "nixpkgs-20.09-darwin",
193+ "repo": "nixpkgs",
194+ "type": "github"
195+ }
196+ },
197+ "nixpkgs-2105": {
198+ "locked": {
199+ "lastModified": 1624291665,
200+ "narHash": "sha256-kNkaoa3dai9WOi7fsPklCCWZ8hRAkXx0ZUhpYKShyUk=",
201+ "owner": "NixOS",
202+ "repo": "nixpkgs",
203+ "rev": "3c6f3f84af60a8ed5b8a79cf3026b7630fcdefb8",
204+ "type": "github"
205+ },
206+ "original": {
207+ "owner": "NixOS",
208+ "ref": "nixpkgs-21.05-darwin",
209+ "repo": "nixpkgs",
210+ "type": "github"
211+ }
212+ },
213+ "nixpkgs-unstable": {
214+ "locked": {
215+ "lastModified": 1623862044,
216+ "narHash": "sha256-mY7nldu9Wl/Yb0qMPihZrWw0bRWXNsk6iyYztw/6F6Y=",
217+ "owner": "NixOS",
218+ "repo": "nixpkgs",
219+ "rev": "0747387223edf1aa5beaedf48983471315d95e16",
220+ "type": "github"
221+ },
222+ "original": {
223+ "owner": "NixOS",
224+ "ref": "nixpkgs-unstable",
225+ "repo": "nixpkgs",
226+ "type": "github"
227+ }
228+ },
229+ "old-ghc-nix": {
230+ "flake": false,
231+ "locked": {
232+ "lastModified": 1621819714,
233+ "narHash": "sha256-EJCnYQSWk7FRLwS0lZgTWIiQ6pcvDX1VuD6LGD4Uwzs=",
234+ "owner": "angerman",
235+ "repo": "old-ghc-nix",
236+ "rev": "f089a6f090cdb35fcf95f865fc6a31ba6b3ac4eb",
237+ "type": "github"
238+ },
239+ "original": {
240+ "owner": "angerman",
241+ "ref": "master2",
242+ "repo": "old-ghc-nix",
243+ "type": "github"
244+ }
245+ },
246+ "root": {
247+ "inputs": {
248+ "HTTP": "HTTP",
249+ "cabal-32": "cabal-32",
250+ "cabal-34": "cabal-34",
251+ "cardano-shell": "cardano-shell",
252+ "flake-utils": "flake-utils",
253+ "ghc-8.6.5-iohk": "ghc-8.6.5-iohk",
254+ "hackage": "hackage",
255+ "hpc-coveralls": "hpc-coveralls",
256+ "nix-tools": "nix-tools",
257+ "nixpkgs": "nixpkgs",
258+ "nixpkgs-2003": "nixpkgs-2003",
259+ "nixpkgs-2009": "nixpkgs-2009",
260+ "nixpkgs-2105": "nixpkgs-2105",
261+ "nixpkgs-unstable": "nixpkgs-unstable",
262+ "old-ghc-nix": "old-ghc-nix",
263+ "stackage": "stackage"
264+ }
265+ },
266+ "stackage": {
267+ "flake": false,
268+ "locked": {
269+ "lastModified": 1628125397,
270+ "narHash": "sha256-XXJwp4LJHZhCtGTIrZWV1mCz/0FtZEqxh9Z1k+9msWI=",
271+ "owner": "input-output-hk",
272+ "repo": "stackage.nix",
273+ "rev": "452e9c671ca172a355dbd2582bdb50ef5133af26",
274+ "type": "github"
275+ },
276+ "original": {
277+ "owner": "input-output-hk",
278+ "repo": "stackage.nix",
279+ "type": "github"
280+ }
281+ }
282+ },
283+ "root": "root",
284+ "version": 7
285+}
flake.nix+115−26
@@ -2,36 +2,125 @@
2 description = "Alternative Haskell Infrastructure for Nixpkgs";
2 description = "Alternative Haskell Infrastructure for Nixpkgs";
3
3
4 inputs = {
4 inputs = {
5− # Note: keep this in sync with sources.json!
5+ nixpkgs = { url = "github:NixOS/nixpkgs/nixpkgs-20.09-darwin"; };
6− nixpkgs.url = github:NixOS/nixpkgs/3c6f3f84af60a8ed5b8a79cf3026b7630fcdefb8;
6+ nixpkgs-2003 = { url = "github:NixOS/nixpkgs/nixpkgs-20.03-darwin"; };
7− nixpkgs-2009.url = github:NixOS/nixpkgs/46d1c3f28ca991601a53e9a14fdd53fcd3dd8416;
7+ nixpkgs-2009 = { url = "github:NixOS/nixpkgs/nixpkgs-20.09-darwin"; };
8− nixpkgs-2105.url = github:NixOS/nixpkgs/3c6f3f84af60a8ed5b8a79cf3026b7630fcdefb8;
8+ nixpkgs-2105 = { url = "github:NixOS/nixpkgs/nixpkgs-21.05-darwin"; };
9− nixpkgs-unstable.url = github:NixOS/nixpkgs/0747387223edf1aa5beaedf48983471315d95e16;
9+ nixpkgs-unstable = { url = "github:NixOS/nixpkgs/nixpkgs-unstable"; };
10+ flake-utils = { url = "github:numtide/flake-utils"; };
11+ hackage = {
12+ url = "github:input-output-hk/hackage.nix";
13+ flake = false;
14+ };
15+ stackage = {
16+ url = "github:input-output-hk/stackage.nix";
17+ flake = false;
18+ };
19+ cabal-32 = {
20+ url = "github:haskell/cabal/3.2";
21+ flake = false;
22+ };
23+ cabal-34 = {
24+ url = "github:haskell/cabal/3.4";
25+ flake = false;
26+ };
27+ cardano-shell = {
28+ url = "github:input-output-hk/cardano-shell";
29+ flake = false;
30+ };
31+ "ghc-8.6.5-iohk" = {
32+ type = "github";
33+ owner = "input-output-hk";
34+ repo = "ghc";
35+ ref = "release/8.6.5-iohk";
36+ flake = false;
37+ };
38+ hpc-coveralls = {
39+ url = "github:sevanspowell/hpc-coveralls";
40+ flake = false;
41+ };
42+ nix-tools = {
43+ url = "github:input-output-hk/nix-tools";
44+ flake = false;
45+ };
46+ old-ghc-nix = {
47+ url = "github:angerman/old-ghc-nix/master2";
48+ flake = false;
49+ };
50+ HTTP = {
51+ url = "github:phadej/HTTP";
52+ flake = false;
53+ };
10 };
54 };
11
55
12− outputs = { self, nixpkgs, ... }:
56+ outputs = { self, nixpkgs, nixpkgs-unstable, flake-utils, ... }@inputs:
57+ let compiler = "ghc884";
13− {
58+ in {
14−
59+ overlay = self.overlays.combined;
60+ overlays = import ./overlays { sources = inputs; };
15− internal = rec {
61+ internal = rec {
16− config = import ./config.nix;
62+ config = import ./config.nix;
63+ nixpkgsArgs = {
64+ inherit config;
65+ overlays = [ self.overlay ];
66+ };
67+
68+ sources = inputs;
17
69
18− nixpkgsArgs = {
70+ overlaysOverrideable = import ./overlays;
71+ # Compatibility with old default.nix
72+ compat = { checkMaterialization ?
73+ false # Allows us to easily switch on materialization checking
74+ , system, sourcesOverride ? { }, ... }@args: rec {
75+ sources = inputs // sourcesOverride;
76+ allOverlays = import ./overlays args;
19− inherit config;
77+ inherit config nixpkgsArgs;
20− overlays = [ self.overlay ];
78+ overlays = [ allOverlays.combined ]
79+ ++ (if checkMaterialization == true then
80+ [
81+ (final: prev: {
82+ haskell-nix = prev.haskell-nix // {
83+ checkMaterialization = true;
84+ };
85+ })
86+ ]
87+ else
88+ [ ]);
89+ pkgs = import nixpkgs
90+ (nixpkgsArgs // { localSystem = { inherit system; }; });
91+ pkgs-unstable = import nixpkgs-unstable
92+ (nixpkgsArgs // { localSystem = { inherit system; }; });
93+ hix = import ./hix/default.nix { inherit pkgs; };
94+ };
21 };
95 };
22− };
23
96
24− overlay = self.overlays.combined;
97+ # Note: `nix flake check` evaluates outputs for all platforms, and haskell.nix
25− overlays = import ./overlays {};
98+ # uses IFD heavily, you have to have the ability to build for all platforms
99+ # supported by haskell.nix, e.g. with remote builders, in order to check this flake.
100+ # If you want to run the tests for just your platform, run `./test/tests.sh` or
101+ # `nix-build -A checks.$PLATFORM`
102+ } // flake-utils.lib.eachSystem [ "x86_64-linux" "x86_64-darwin" ] (system: {
103+ legacyPackages = (self.internal.compat { inherit system; }).pkgs;
26
104
27− legacyPackages = let
105+ # FIXME: Currently `nix flake check` requires `--impure` because coverage-golden
28− genAttrs = lst: f:
106+ # (and maybe other tests) import projects that use builtins.currentSystem
29− builtins.listToAttrs (map (name: {
107+ checks = builtins.listToAttrs (map (pkg: {
30− inherit name;
108+ name = pkg.name;
31− value = f name;
109+ value = pkg;
110+ }) (nixpkgs.lib.collect nixpkgs.lib.isDerivation (import ./test rec {
111+ haskellNix = self.internal.compat { inherit system; };
112+ compiler-nix-name = compiler;
113+ pkgs = haskellNix.pkgs;
32− }) lst);
114+ })));
33− in genAttrs [ "x86_64-linux" "x86_64-darwin" ] (system:
115+
34− import nixpkgs
116+ devShell = with self.legacyPackages.${system};
35− (self.internal.nixpkgsArgs // { localSystem = { inherit system; }; }));
117+ mkShell {
118+ buildInputs = [
119+ nixUnstable
120+ cabal-install
121+ haskell-nix.compiler.${compiler}
122+ haskell-nix.nix-tools.${compiler}
123+ ];
124+ };
36− };
125+ });
37}
126}
hix/default.nix+8−9
@@ -1,26 +1,25 @@
1+{ pkgs }:
1let
2let
2− sources = import (../nix/sources.nix) {};
3− nixpkgs = import sources.nixpkgs-2009 {};
4 args = '' --arg userDefaults "$HOME/.config/hix/hix.conf" --arg src ./.'';
3 args = '' --arg userDefaults "$HOME/.config/hix/hix.conf" --arg src ./.'';
5 # Use HIX_ROOT to override the version of hix used when developing new hix features.
4 # Use HIX_ROOT to override the version of hix used when developing new hix features.
6 # See docs/dev/hix.md for details.
5 # See docs/dev/hix.md for details.
7 hixProject = "\${HIX_ROOT:-${./..}}/hix/project.nix";
6 hixProject = "\${HIX_ROOT:-${./..}}/hix/project.nix";
8−in nixpkgs.symlinkJoin {
7+in pkgs.symlinkJoin {
9 name = "hix";
8 name = "hix";
10 paths = [
9 paths = [
11− (nixpkgs.writeScriptBin "hix-shell" ''
10+ (pkgs.writeScriptBin "hix-shell" ''
12 nix-shell ${hixProject} ${args} -A shell "$@"
11 nix-shell ${hixProject} ${args} -A shell "$@"
13 '')
12 '')
14− (nixpkgs.writeScriptBin "hix-build" ''
13+ (pkgs.writeScriptBin "hix-build" ''
15 nix-build ${hixProject} ${args} "$@"
14 nix-build ${hixProject} ${args} "$@"
16 '')
15 '')
17− (nixpkgs.writeScriptBin "hix-instantiate" ''
16+ (pkgs.writeScriptBin "hix-instantiate" ''
18 nix-instantiate ${hixProject} ${args} "$@"
17 nix-instantiate ${hixProject} ${args} "$@"
19 '')
18 '')
20− (nixpkgs.writeScriptBin "hix-env" ''
19+ (pkgs.writeScriptBin "hix-env" ''
21 nix-env -f ${hixProject} ${args} "$@"
20 nix-env -f ${hixProject} ${args} "$@"
22 '')
21 '')
23− (nixpkgs.writeScriptBin "hix" ''
22+ (pkgs.writeScriptBin "hix" ''
24 cmd=$1
23 cmd=$1
25 shift
24 shift
26 case $cmd in
25 case $cmd in
@@ -41,4 +40,4 @@ in nixpkgs.symlinkJoin {
41 ];
40 ];
42} // {
41} // {
43 project = import ./project.nix;
42 project = import ./project.nix;
44−}
43+}
hix/project.nix+1−1
@@ -20,7 +20,7 @@ let
20 { _module.args.pkgs = {}; }
20 { _module.args.pkgs = {}; }
21 ];
21 ];
22 }).config) name;
22 }).config) name;
23− sources = import ../nix/sources.nix {};
23+ inherit (import ./.. {}) sources;
24 lib = import (sources.nixpkgs-unstable + "/lib");
24 lib = import (sources.nixpkgs-unstable + "/lib");
25 commandArgs' =
25 commandArgs' =
26 builtins.listToAttrs (
26 builtins.listToAttrs (
lib/default.nix+1−1
@@ -198,7 +198,7 @@ in {
198 cleanGit = import ./clean-git.nix {
198 cleanGit = import ./clean-git.nix {
199 inherit lib cleanSourceWith;
199 inherit lib cleanSourceWith;
200 git = gitMinimal;
200 git = gitMinimal;
201− inherit (pkgs) runCommand;
201+ inherit (pkgs.evalPackages.buildPackages) runCommand;
202 };
202 };
203
203
204 # Some times it is handy to temporarily use a relative path between git
204 # Some times it is handy to temporarily use a relative path between git
nix/sources.jsondeleted−171
@@ -1,171 +0,0 @@
1−{
2− "cabal-32": {
3− "branch": "3.2",
4− "builtin": false,
5− "description": "Official upstream development repository for Cabal and cabal-install",
6− "homepage": "https://haskell.org/cabal",
7− "owner": "haskell",
8− "repo": "cabal",
9− "rev": "94aaa8e4720081f9c75497e2735b90f6a819b08e",
10− "sha256": "09m59w794zk4mxk1m3qkkmf5ydi0zhh89a7jk1wglrgxxadfndmh",
11− "type": "tarball",
12− "url": "https://github.com/haskell/cabal/archive/94aaa8e4720081f9c75497e2735b90f6a819b08e.tar.gz",
13− "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
14− },
15− "cabal-34": {
16− "branch": "3.4",
17− "description": "Official upstream development repository for Cabal and cabal-install",
18− "homepage": "https://haskell.org/cabal",
19− "owner": "haskell",
20− "repo": "cabal",
21− "rev": "f39af1b67a65dc1bb1fe70e4f02a3e6635f5ee26",
22− "sha256": "06c7q1y1ggbgczg7f4s5zds16n8bkfkdzg7mr5sw9m6gzbhgcby8",
23− "type": "tarball",
24− "url": "https://github.com/haskell/cabal/archive/f39af1b67a65dc1bb1fe70e4f02a3e6635f5ee26.tar.gz",
25− "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
26− },
27− "cardano-shell": {
28− "branch": "master",
29− "builtin": false,
30− "description": "Node shell, a thin layer for running the node and it's modules.",
31− "homepage": null,
32− "owner": "input-output-hk",
33− "repo": "cardano-shell",
34− "rev": "9392c75087cb9a3d453998f4230930dea3a95725",
35− "sha256": "0gk1i8nkyp7c4jis2phcsr83dnd6g3nds8hpkjah4cp2cza5is9y",
36− "type": "tarball",
37− "url": "https://github.com/input-output-hk/cardano-shell/archive/9392c75087cb9a3d453998f4230930dea3a95725.tar.gz",
38− "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
39− },
40− "ghc-8.6.5-iohk": {
41− "branch": "release/8.6.5-iohk",
42− "deepClone": true,
43− "description": "IOHK's ghc fork. See release/X.Y.Z-iohk branches.",
44− "homepage": "",
45− "owner": "input-output-hk",
46− "ref": "release/8.6.5-iohk",
47− "repo": "https://github.com/input-output-hk/ghc.git",
48− "rev": "95713a6ecce4551240da7c96b6176f980af75cae",
49− "sha256": "0hma1zsijw9z2i622qnxpmhahbjdjgq68hz1l57bbm3v9nzh21bc",
50− "type": "git",
51− "url": "https://github.com/input-output-hk/ghc.git",
52− "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
53− },
54− "hpc-coveralls": {
55− "branch": "master",
56− "builtin": false,
57− "description": "coveralls.io support for haskell code coverage with hpc",
58− "homepage": "http://hackage.haskell.org/package/hpc-coveralls",
59− "owner": "sevanspowell",
60− "repo": "hpc-coveralls",
61− "rev": "14df0f7d229f4cd2e79f8eabb1a740097fdfa430",
62− "sha256": "02dmcmqc845s7sdgdnk3xxn7l6jj8faa7547b4cii9mgv09arspj",
63− "type": "tarball",
64− "url": "https://github.com/sevanspowell/hpc-coveralls/archive/14df0f7d229f4cd2e79f8eabb1a740097fdfa430.tar.gz",
65− "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
66− },
67− "niv": {
68− "branch": "master",
69− "builtin": false,
70− "description": "Easy dependency management for Nix projects",
71− "homepage": "https://github.com/nmattia/niv",
72− "owner": "nmattia",
73− "repo": "niv",
74− "rev": "f73bf8d584148677b01859677a63191c31911eae",
75− "sha256": "0jlmrx633jvqrqlyhlzpvdrnim128gc81q5psz2lpp2af8p8q9qs",
76− "type": "tarball",
77− "url": "https://github.com/nmattia/niv/archive/f73bf8d584148677b01859677a63191c31911eae.tar.gz",
78− "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
79− },
80− "nix-tools": {
81− "branch": "master",
82− "builtin": false,
83− "description": "Translate Cabals Generic Package Description to a Nix expression",
84− "homepage": null,
85− "owner": "input-output-hk",
86− "repo": "nix-tools",
87− "rev": "15d2e4b61cb63ff351f3c490c12c4d89eafd31a1",
88− "sha256": "15p38dhbhk2c0bq8g9jr0gy01livigz0ca34c2mrwipbd4mipqgm",
89− "type": "tarball",
90− "url": "https://github.com/input-output-hk/nix-tools/archive/15d2e4b61cb63ff351f3c490c12c4d89eafd31a1.tar.gz",
91− "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
92− },
93− "nixpkgs": {
94− "branch": "nixpkgs-21.05-darwin",
95− "builtin": true,
96− "description": "Nix Packages collection",
97− "homepage": null,
98− "owner": "NixOS",
99− "repo": "nixpkgs",
100− "rev": "3c6f3f84af60a8ed5b8a79cf3026b7630fcdefb8",
101− "sha256": "0jf9l6j60sa8cms7r4a02kr9j9884pwv1prf79b2ysnxmnhimnch",
102− "type": "tarball",
103− "url": "https://github.com/NixOS/nixpkgs/archive/3c6f3f84af60a8ed5b8a79cf3026b7630fcdefb8.tar.gz",
104− "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
105− },
106− "nixpkgs-2003": {
107− "branch": "nixpkgs-20.03-darwin",
108− "builtin": false,
109− "description": "Nix Packages collection",
110− "homepage": null,
111− "owner": "NixOS",
112− "repo": "nixpkgs",
113− "rev": "1db42b7fe3878f3f5f7a4f2dc210772fd080e205",
114− "sha256": "05k9y9ki6jhaqdhycnidnk5zrdzsdammbk5lsmsbz249hjhhgcgh",
115− "type": "tarball",
116− "url": "https://github.com/NixOS/nixpkgs/archive/1db42b7fe3878f3f5f7a4f2dc210772fd080e205.tar.gz",
117− "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
118− },
119− "nixpkgs-2009": {
120− "branch": "nixpkgs-20.09-darwin",
121− "builtin": false,
122− "description": "Nix Packages collection",
123− "homepage": null,
124− "owner": "NixOS",
125− "repo": "nixpkgs",
126− "rev": "46d1c3f28ca991601a53e9a14fdd53fcd3dd8416",
127− "sha256": "1h7lfhqws2cf8zg30fj8pakh4aw0id3m9yjpgn21scdv2nwkyyxa",
128− "type": "tarball",
129− "url": "https://github.com/NixOS/nixpkgs/archive/46d1c3f28ca991601a53e9a14fdd53fcd3dd8416.tar.gz",
130− "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
131− },
132− "nixpkgs-2105": {
133− "branch": "nixpkgs-21.05-darwin",
134− "builtin": false,
135− "description": "Nix Packages collection",
136− "homepage": null,
137− "owner": "NixOS",
138− "repo": "nixpkgs",
139− "rev": "3c6f3f84af60a8ed5b8a79cf3026b7630fcdefb8",
140− "sha256": "0jf9l6j60sa8cms7r4a02kr9j9884pwv1prf79b2ysnxmnhimnch",
141− "type": "tarball",
142− "url": "https://github.com/NixOS/nixpkgs/archive/3c6f3f84af60a8ed5b8a79cf3026b7630fcdefb8.tar.gz",
143− "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
144− },
145− "nixpkgs-unstable": {
146− "branch": "nixpkgs-unstable",
147− "builtin": false,
148− "description": "Nix Packages collection",
149− "homepage": "",
150− "owner": "NixOS",
151− "repo": "nixpkgs",
152− "rev": "0747387223edf1aa5beaedf48983471315d95e16",
153− "sha256": "19hpz87vfcr6icxcjdlp2mnk8v5db4l3x32adzc5ynmxvfayg3lr",
154− "type": "tarball",
155− "url": "https://github.com/NixOS/nixpkgs/archive/0747387223edf1aa5beaedf48983471315d95e16.tar.gz",
156− "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
157− },
158− "old-ghc-nix": {
159− "branch": "master2",
160− "builtin": false,
161− "description": "Old and New GHC",
162− "homepage": null,
163− "owner": "angerman",
164− "repo": "old-ghc-nix",
165− "rev": "f089a6f090cdb35fcf95f865fc6a31ba6b3ac4eb",
166− "sha256": "0fy32hz1i2ryp1aps39gjzm9122q2fc9bd045x8v34wn0ihsg40h",
167− "type": "tarball",
168− "url": "https://github.com/angerman/old-ghc-nix/archive/f089a6f090cdb35fcf95f865fc6a31ba6b3ac4eb.tar.gz",
169− "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
170− }
171−}
nix/sources.nixdeleted−174
@@ -1,174 +0,0 @@
1−# This file has been generated by Niv.
2−
3−let
4−
5− #
6− # The fetchers. fetch_<type> fetches specs of type <type>.
7− #
8−
9− fetch_file = pkgs: name: spec:
10− let
11− name' = sanitizeName name + "-src";
12− in
13− if spec.builtin or true then
14− builtins_fetchurl { inherit (spec) url sha256; name = name'; }
15− else
16− pkgs.fetchurl { inherit (spec) url sha256; name = name'; };
17−
18− fetch_tarball = pkgs: name: spec:
19− let
20− name' = sanitizeName name + "-src";
21− in
22− if spec.builtin or true then
23− builtins_fetchTarball { name = name'; inherit (spec) url sha256; }
24− else
25− pkgs.fetchzip { name = name'; inherit (spec) url sha256; };
26−
27− fetch_git = name: spec:
28− let
29− ref =
30− if spec ? ref then spec.ref else
31− if spec ? branch then "refs/heads/${spec.branch}" else
32− if spec ? tag then "refs/tags/${spec.tag}" else
33− abort "In git source '${name}': Please specify `ref`, `tag` or `branch`!";
34− in
35− builtins.fetchGit { url = spec.repo; inherit (spec) rev; inherit ref; };
36−
37− fetch_local = spec: spec.path;
38−
39− fetch_builtin-tarball = name: throw
40− ''[${name}] The niv type "builtin-tarball" is deprecated. You should instead use `builtin = true`.
41− $ niv modify ${name} -a type=tarball -a builtin=true'';
42−
43− fetch_builtin-url = name: throw
44− ''[${name}] The niv type "builtin-url" will soon be deprecated. You should instead use `builtin = true`.
45− $ niv modify ${name} -a type=file -a builtin=true'';
46−
47− #
48− # Various helpers
49− #
50−
51− # https://github.com/NixOS/nixpkgs/pull/83241/files#diff-c6f540a4f3bfa4b0e8b6bafd4cd54e8bR695
52− sanitizeName = name:
53− (
54− concatMapStrings (s: if builtins.isList s then "-" else s)
55− (
56− builtins.split "[^[:alnum:]+._?=-]+"
57− ((x: builtins.elemAt (builtins.match "\\.*(.*)" x) 0) name)
58− )
59− );
60−
61− # The set of packages used when specs are fetched using non-builtins.
62− mkPkgs = sources: system:
63− let
64− sourcesNixpkgs =
65− import (builtins_fetchTarball { inherit (sources.nixpkgs) url sha256; }) { inherit system; };
66− hasNixpkgsPath = builtins.any (x: x.prefix == "nixpkgs") builtins.nixPath;
67− hasThisAsNixpkgsPath = <nixpkgs> == ./.;
68− in
69− if builtins.hasAttr "nixpkgs" sources
70− then sourcesNixpkgs
71− else if hasNixpkgsPath && ! hasThisAsNixpkgsPath then
72− import <nixpkgs> {}
73− else
74− abort
75− ''
76− Please specify either <nixpkgs> (through -I or NIX_PATH=nixpkgs=...) or
77− add a package called "nixpkgs" to your sources.json.
78− '';
79−
80− # The actual fetching function.
81− fetch = pkgs: name: spec:
82−
83− if ! builtins.hasAttr "type" spec then
84− abort "ERROR: niv spec ${name} does not have a 'type' attribute"
85− else if spec.type == "file" then fetch_file pkgs name spec
86− else if spec.type == "tarball" then fetch_tarball pkgs name spec
87− else if spec.type == "git" then fetch_git name spec
88− else if spec.type == "local" then fetch_local spec
89− else if spec.type == "builtin-tarball" then fetch_builtin-tarball name
90− else if spec.type == "builtin-url" then fetch_builtin-url name
91− else
92− abort "ERROR: niv spec ${name} has unknown type ${builtins.toJSON spec.type}";
93−
94− # If the environment variable NIV_OVERRIDE_${name} is set, then use
95− # the path directly as opposed to the fetched source.
96− replace = name: drv:
97− let
98− saneName = stringAsChars (c: if isNull (builtins.match "[a-zA-Z0-9]" c) then "_" else c) name;
99− ersatz = builtins.getEnv "NIV_OVERRIDE_${saneName}";
100− in
101− if ersatz == "" then drv else
102− # this turns the string into an actual Nix path (for both absolute and
103− # relative paths)
104− if builtins.substring 0 1 ersatz == "/" then /. + ersatz else /. + builtins.getEnv "PWD" + "/${ersatz}";
105−
106− # Ports of functions for older nix versions
107−
108− # a Nix version of mapAttrs if the built-in doesn't exist
109− mapAttrs = builtins.mapAttrs or (
110− f: set: with builtins;
111− listToAttrs (map (attr: { name = attr; value = f attr set.${attr}; }) (attrNames set))
112− );
113−
114− # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/lists.nix#L295
115− range = first: last: if first > last then [] else builtins.genList (n: first + n) (last - first + 1);
116−
117− # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/strings.nix#L257
118− stringToCharacters = s: map (p: builtins.substring p 1 s) (range 0 (builtins.stringLength s - 1));
119−
120− # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/strings.nix#L269
121− stringAsChars = f: s: concatStrings (map f (stringToCharacters s));
122− concatMapStrings = f: list: concatStrings (map f list);
123− concatStrings = builtins.concatStringsSep "";
124−
125− # https://github.com/NixOS/nixpkgs/blob/8a9f58a375c401b96da862d969f66429def1d118/lib/attrsets.nix#L331
126− optionalAttrs = cond: as: if cond then as else {};
127−
128− # fetchTarball version that is compatible between all the versions of Nix
129− builtins_fetchTarball = { url, name ? null, sha256 }@attrs:
130− let
131− inherit (builtins) lessThan nixVersion fetchTarball;
132− in
133− if lessThan nixVersion "1.12" then
134− fetchTarball ({ inherit url; } // (optionalAttrs (!isNull name) { inherit name; }))
135− else
136− fetchTarball attrs;
137−
138− # fetchurl version that is compatible between all the versions of Nix
139− builtins_fetchurl = { url, name ? null, sha256 }@attrs:
140− let
141− inherit (builtins) lessThan nixVersion fetchurl;
142− in
143− if lessThan nixVersion "1.12" then
144− fetchurl ({ inherit url; } // (optionalAttrs (!isNull name) { inherit name; }))
145− else
146− fetchurl attrs;
147−
148− # Create the final "sources" from the config
149− mkSources = config:
150− mapAttrs (
151− name: spec:
152− if builtins.hasAttr "outPath" spec
153− then abort
154− "The values in sources.json should not have an 'outPath' attribute"
155− else
156− spec // { outPath = replace name (fetch config.pkgs name spec); }
157− ) config.sources;
158−
159− # The "config" used by the fetchers
160− mkConfig =
161− { sourcesFile ? if builtins.pathExists ./sources.json then ./sources.json else null
162− , sources ? if isNull sourcesFile then {} else builtins.fromJSON (builtins.readFile sourcesFile)
163− , system ? builtins.currentSystem
164− , pkgs ? mkPkgs sources system
165− }: rec {
166− # The sources, i.e. the attribute set of spec name to spec
167− inherit sources;
168−
169− # The "pkgs" (evaluated nixpkgs) to use for e.g. non-builtin fetchers
170− inherit pkgs;
171− };
172−
173−in
174−mkSources (mkConfig {}) // { __functor = _: settings: mkSources (mkConfig settings); }
overlays/default.nix+1−1
@@ -1,4 +1,4 @@
1−args:
1+{ sources, ...}@args:
2
2
3let
3let
4 overlays = {
4 overlays = {
overlays/haskell.nix+5−21
@@ -1,5 +1,4 @@
1−{ sourcesOverride ? {}
2−, ... }:
1+{ sources, ... }:
3# The haskell.nix infrastructure
2# The haskell.nix infrastructure
4#
3#
5# for hygienic reasons we'll use haskell-nix as a prefix.
4# for hygienic reasons we'll use haskell-nix as a prefix.
@@ -12,25 +11,10 @@ final: prev: {
12 # overlays.
11 # overlays.
13 defaultModules = [];
12 defaultModules = [];
14
13
15− # Niv based source pins. See https://github.com/nmattia/niv#niv
14+ # Nix Flake based source pins.
16− # for details on how to update this using the niv tool
15+ # To update all inputs, get unstable Nix and then `nix flake update --recreate-lock-file`
17− # or edit nix/sources.json manually if you prefer.
16+ # Or `nix-shell -p nixUnstable --run "nix --experimental-features 'nix-command flakes' flake update --recreate-lock-file"`
18− sources = {
17+ sources = sources;
19− # Hackage and stackage still updated by scripts
20− # that predate our use of niv. We have moved them
21− # here though so that you can still use the
22− # sourcesOverride arg or `niv add` to replace them.
23− hackage = fetchExternal {
24− name = "hackage-exprs-source";
25− specJSON = hackageSourceJSON;
26− override = "hackage";
27− };
28− stackage = fetchExternal {
29− name = "stackage-snapshot-source";
30− specJSON = stackageSourceJSON;
31− override = "stackage";
32− };
33− } // (import ../nix/sources.nix { pkgs = final; }) // sourcesOverride;
34
18
35 # We provide a `callPackage` function to consumers for
19 # We provide a `callPackage` function to consumers for
36 # convenience. We will however refrain from using it
20 # convenience. We will however refrain from using it
release.nix+2−2
@@ -11,8 +11,8 @@ let
11 then __trace (prefix + n) v
11 then __trace (prefix + n) v
12 else traceNames (prefix + n + ".") v
12 else traceNames (prefix + n + ".") v
13 else v);
13 else v);
14− inherit (import ./ci-lib.nix) stripAttrsForHydra filterDerivations;
14+ inherit (import ./ci-lib.nix { pkgs = genericPkgs; }) stripAttrsForHydra filterDerivations;
15− genericPkgs = import (import ./nix/sources.nix).nixpkgs {};
15+ genericPkgs = (import ./. {}).pkgs;
16 lib = genericPkgs.lib;
16 lib = genericPkgs.lib;
17 ci = import ./ci.nix { inherit supportedSystems ifdLevel checkMaterialization; restrictEval = true; };
17 ci = import ./ci.nix { inherit supportedSystems ifdLevel checkMaterialization; restrictEval = true; };
18 allJobs = stripAttrsForHydra (filterDerivations ci);
18 allJobs = stripAttrsForHydra (filterDerivations ci);
scripts/check-hydra.nix+2−2
@@ -1,4 +1,4 @@
1−{ stdenv, lib, writeScript, coreutils, time, gnutar, gzip, hydra-migration, jq }:
1+{ stdenv, lib, writeScript, coreutils, time, gnutar, gzip, hydra-migration, jq, gitMinimal }:
2
2
3with lib;
3with lib;
4
4
@@ -7,7 +7,7 @@ writeScript "check-hydra.sh" ''
7
7
8 set -euo pipefail
8 set -euo pipefail
9
9
10− export PATH="${makeBinPath [ coreutils time gnutar gzip hydra-migration jq ]}"
10+ export PATH="${makeBinPath [ coreutils time gnutar gzip hydra-migration jq gitMinimal ]}"
11
11
12 echo '~~~ Evaluating release.nix with --arg ifdLevel '$1
12 echo '~~~ Evaluating release.nix with --arg ifdLevel '$1
13 command time --format '%e' -o eval-time.txt \
13 command time --format '%e' -o eval-time.txt \
scripts/check-path-support.nix+2−2
@@ -1,4 +1,4 @@
1−{ stdenv, lib, writeScript, coreutils, gnutar, gzip, nix }:
1+{ stdenv, lib, writeScript, coreutils, gnutar, gzip, nix, gitMinimal }:
2
2
3with lib;
3with lib;
4
4
@@ -7,7 +7,7 @@ writeScript "check-path-supprot.sh" ''
7
7
8 set -euo pipefail
8 set -euo pipefail
9
9
10− export PATH="${makeBinPath [ coreutils gnutar gzip nix ]}"
10+ export PATH="${makeBinPath [ coreutils gnutar gzip nix gitMinimal ]}"
11
11
12 nix-build -E '((import ./. {}).pkgs.haskell-nix.cabalProject { compiler-nix-name = "ghc865"; src = ./test/cabal-simple; }).cabal-simple.components.library'
12 nix-build -E '((import ./. {}).pkgs.haskell-nix.cabalProject { compiler-nix-name = "ghc865"; src = ./test/cabal-simple; }).cabal-simple.components.library'
13''
13''
scripts/update-external.nix+3−3
@@ -1,5 +1,5 @@
1{ stdenv, lib, writeScript, glibc, coreutils, git, openssh
1{ stdenv, lib, writeScript, glibc, coreutils, git, openssh
2−, nix-tools, cabal-install, nix-prefetch-git
2+, nix-tools, cabal-install, nixFlakes
3, bash, curl, findutils, gawk }:
3, bash, curl, findutils, gawk }:
4
4
5{ name, script }:
5{ name, script }:
@@ -16,7 +16,7 @@ in
16
16
17 set -euo pipefail
17 set -euo pipefail
18
18
19− export PATH="${makeBinPath ([ coreutils curl findutils gawk bash git openssh nix-tools cabal-install nix-prefetch-git ] ++ optional stdenv.isLinux glibc)}"
19+ export PATH="${makeBinPath ([ coreutils curl findutils gawk bash git openssh nix-tools cabal-install nixFlakes ] ++ optional stdenv.isLinux glibc)}"
20
20
21 ${script}
21 ${script}
22
22
@@ -35,5 +35,5 @@ in
35
35
36 cd ..
36 cd ..
37
37
38− nix-prefetch-git ${repoHTTPS} --rev "$rev" | tee ${name}-src.json
38+ nix --experimental-features 'nix-command flakes' flake lock --update-input ${name}
39 ''
39 ''
scripts/update-hackage.nix+1−1
@@ -1,5 +1,5 @@
1{ stdenv, lib, writeScript, coreutils, glibc, git, openssh
1{ stdenv, lib, writeScript, coreutils, glibc, git, openssh
2−, nix-tools, cabal-install, nix-prefetch-git
2+, nix-tools, cabal-install, nixFlakes
3, gawk, bash, curl, findutils
3, gawk, bash, curl, findutils
4, update-index-state-hashes }@args:
4, update-index-state-hashes }@args:
5
5
scripts/update-stackage.nix+1−1
@@ -1,5 +1,5 @@
1{ stdenv, lib, writeScript, coreutils, glibc, git, openssh
1{ stdenv, lib, writeScript, coreutils, glibc, git, openssh
2−, nix-tools, cabal-install, nix-prefetch-git
2+, nix-tools, cabal-install, nixFlakes
3, gawk, bash, curl, findutils }@args:
3, gawk, bash, curl, findutils }@args:
4
4
5import ./update-external.nix args {
5import ./update-external.nix args {
shell.nix+1−12
@@ -1,12 +1 @@
1−let
1+(import ./default.nix {}).devShell.${builtins.currentSystem}
2− inherit (import ./default.nix {}) sources nixpkgsArgs;
3− pkgs = import sources.nixpkgs nixpkgsArgs;
4−in pkgs.stdenv.mkDerivation rec {
5− name = "env";
6− env = pkgs.buildEnv { name = name; paths = buildInputs; };
7− buildInputs = [
8− pkgs.cabal-install
9− pkgs.haskell-nix.ghc
10− pkgs.haskell-nix.nix-tools
11− ];
12−}
test/default.nix+2−2
@@ -1,4 +1,4 @@
1−{ haskellNix ? import ../default.nix { inherit checkMaterialization; }
1+{ haskellNix ? import ../default.nix { }
2, pkgs ? import nixpkgs nixpkgsArgs
2, pkgs ? import nixpkgs nixpkgsArgs
3, nixpkgs ? haskellNix.sources.nixpkgs-unstable
3, nixpkgs ? haskellNix.sources.nixpkgs-unstable
4, nixpkgsArgs ? haskellNix.nixpkgsArgs
4, nixpkgsArgs ? haskellNix.nixpkgsArgs
@@ -10,7 +10,7 @@
10with pkgs;
10with pkgs;
11
11
12let
12let
13− inherit (import ../ci-lib.nix) dimension platformFilterGeneric filterAttrsOnlyRecursive;
13+ inherit (import ../ci-lib.nix { inherit pkgs; }) dimension platformFilterGeneric filterAttrsOnlyRecursive;
14 isDisabled = d: d.meta.disabled or false;
14 isDisabled = d: d.meta.disabled or false;
15
15
16 # Set recurseForDerivations for both children and grand-children values in
16 # Set recurseForDerivations for both children and grand-children values in
test/fully-static/cross.nix+1−1
@@ -1,5 +1,5 @@
1{ pkgs ? import nixpkgs { }
1{ pkgs ? import nixpkgs { }
2−, nixpkgs ? import (../../nix/sources.nix).nixpkgs
2+, nixpkgs ? (import ../.. { }).sources.nixpkgs
3}:
3}:
4
4
5let
5let