on iko/ghcjs-patch-master help sign in
Flake (#589 and #567)

Allows haskell.nix to be used as a nix flake. Authored-by: Alexander Bantyev <balsoft@balsoft.ru>

commita2d97bd9ad8fa48be8dfce0640e4d4f4f4468bb7 authorHamish Mackenzie <Hamish.Mackenzie@iohk.io> dateThu 7 May 2020, 11:16 (6 years ago) parentda0473a
17 files changed+322−271
default.nix+3−2 flake.nix+25 lib/stack-cache-generator.nix−1 overlays/armv6l-linux.nix+5−5 overlays/bootstrap.nix+75−75 overlays/darwin.nix+1−1 overlays/default.nix+42−16 overlays/ghc-packages.nix+22−22 overlays/ghc.nix+6−6 overlays/ghcjs-asterius-triple.nix+6−6 overlays/hackage-quirks.nix+6−6 overlays/haskell.nix+94−94 overlays/musl.nix+3−3 overlays/python.nix+4−4 overlays/tools.nix+15−15 overlays/windows.nix+11−11 overlays/wine.nix+4−4
default.nix+3−2
@@ -4,8 +4,9 @@ let haskellNix = rec {
44 };
55
66 config = import ./config.nix;
7− overlays = import ./overlays;
8− nixpkgsArgs = { inherit overlays config; };
7+ overlays = [ allOverlays.combined ];
8+ allOverlays = import ./overlays;
9+ nixpkgsArgs = { inherit config overlays; };
910 };
1011
1112 haskellNixV1 = haskellNix.nixpkgsArgs;
flake.nixnew file+25
@@ -0,0 +1,25 @@
1+{
2+ description = "Alternative Haskell Infrastructure for Nixpkgs";
3+
4+ edition = 201909;
5+
6+ outputs = { self }: {
7+ overlay = self.overlays.combined;
8+ overlays = import ./overlays;
9+ config = import ./config.nix;
10+ sources = import ./nixpkgs;
11+ nixpkgsArgs = {
12+ inherit (self) config;
13+ overlays = [ self.overlay ];
14+ };
15+ legacyPackages = let
16+ genAttrs = lst: f:
17+ builtins.listToAttrs (map (name: {
18+ inherit name;
19+ value = f name;
20+ }) lst);
21+ in genAttrs [ "x86_64-linux" "x86_64-darwin" ] (system:
22+ import self.sources.nixpkgs-default
23+ (self.nixpkgsArgs // { localSystem = { inherit system; }; }));
24+ };
25+}
lib/stack-cache-generator.nix−1
@@ -69,7 +69,6 @@ concatMap (dep:
6969 }
7070 else builtins.fetchGit {
7171 inherit (dep) url rev;
72− ref = "*";
7372 };
7473 in map (subdir: {
7574 name = cabalName "${pkgsrc}/${subdir}";
overlays/armv6l-linux.nix+5−5
@@ -1,7 +1,7 @@
1−self: super:
1+final: prev:
22{
3− haskell-nix = super.haskell-nix // ({
4− defaultModules = super.haskell-nix.defaultModules ++ [
3+ haskell-nix = prev.haskell-nix // ({
4+ defaultModules = prev.haskell-nix.defaultModules ++ [
55 ({ pkgs, buildModules, config, lib, ... }:
66 let
77 withTH = import ./linux-cross.nix {
@@ -15,10 +15,10 @@ self: super:
1515 inherit (pkgs) gmp;
1616 # iserv-proxy needs to come from the buildPackages, as it needs to run on the
1717 # build host.
18− inherit (self.buildPackages.ghc-extra-packages."${config.compiler.nix-name}".iserv-proxy.components.exes) iserv-proxy;
18+ inherit (final.buildPackages.ghc-extra-packages."${config.compiler.nix-name}".iserv-proxy.components.exes) iserv-proxy;
1919 # remote-iserv however needs to come from the regular packages as it has to
2020 # run on the target host.
21− inherit (self.ghc-extra-packages."${config.compiler.nix-name}".remote-iserv.components.exes) remote-iserv;
21+ inherit (final.ghc-extra-packages."${config.compiler.nix-name}".remote-iserv.components.exes) remote-iserv;
2222 # we need to use openssl.bin here, because the .dll's are in the .bin expression.
2323 extra-test-libs = [
2424 # pkgs.rocksdb
overlays/bootstrap.nix+75−75
@@ -1,4 +1,4 @@
1−self: super:
1+final: prev:
22let
33 installDeps = targetPrefix: ''
44 for P in $($out/bin/${targetPrefix}ghc-pkg list --simple-output | sed 's/-[0-9][0-9.]*//g'); do
@@ -29,26 +29,26 @@ let
2929 done
3030 '';
3131in {
32− haskell-nix = super.haskell-nix // {
32+ haskell-nix = prev.haskell-nix // {
3333 # Use this to disable the existing haskell infra structure for testing purposes
3434 compiler =
35− let bootPkgs = with self.buildPackages; {
35+ let bootPkgs = with final.buildPackages; {
3636 ghc = buildPackages.haskell-nix.bootstrap.compiler.ghc844;
37− inherit (self.haskell-nix.bootstrap.packages) alex happy hscolour;
37+ inherit (final.haskell-nix.bootstrap.packages) alex happy hscolour;
3838 };
39− sphinx = with self.buildPackages; (python3Packages.sphinx_1_7_9 or python3Packages.sphinx);
40− hsc2hs-align-conditionals-patch = self.fetchpatch {
39+ sphinx = with final.buildPackages; (python3Packages.sphinx_1_7_9 or python3Packages.sphinx);
40+ hsc2hs-align-conditionals-patch = final.fetchpatch {
4141 url = "https://git.haskell.org/hsc2hs.git/patch/738f3666c878ee9e79c3d5e819ef8b3460288edf";
4242 sha256 = "0plzsbfaq6vb1023lsarrjglwgr9chld4q3m99rcfzx0yx5mibp3";
4343 extraPrefix = "utils/hsc2hs/";
4444 stripLen = 1;
4545 };
46− D5123-patch = self.fetchpatch rec { # https://phabricator.haskell.org/D5123
46+ D5123-patch = final.fetchpatch rec { # https://phabricator.haskell.org/D5123
4747 url = "http://tarballs.nixos.org/sha256/${sha256}";
4848 name = "D5123.diff";
4949 sha256 = "0nhqwdamf2y4gbwqxcgjxs0kqx23w9gv5kj0zv6450dq19rji82n";
5050 };
51− haddock-900-patch = self.fetchpatch rec { # https://github.com/haskell/haddock/issues/900
51+ haddock-900-patch = final.fetchpatch rec { # https://github.com/haskell/haddock/issues/900
5252 url = "https://patch-diff.githubusercontent.com/raw/haskell/haddock/pull/983.diff";
5353 name = "loadpluginsinmodules.diff";
5454 sha256 = "0bvvv0zsfq2581zsir97zfkggc1kkircbbajc2fz3b169ycpbha1";
@@ -60,10 +60,10 @@ in {
6060 versionLessThan = ver: builtins.compareVersions ver version == 1;
6161 # Returns true iff this derivation's verion is greater than or equal to ver.
6262 versionAtLeast = ver: !versionLessThan ver;
63− from = start: self.lib.optional (versionAtLeast start);
64− fromUntil = start: end: self.lib.optional (versionAtLeast start && versionLessThan end);
65− until = end: self.lib.optional (versionLessThan end);
66− always = self.lib.optional true;
63+ from = start: final.lib.optional (versionAtLeast start);
64+ fromUntil = start: end: final.lib.optional (versionAtLeast start && versionLessThan end);
65+ until = end: final.lib.optional (versionLessThan end);
66+ always = final.lib.optional true;
6767 # Try to avoid reordering the patches unless a patch is added or changed that
6868 # will be applied to most versions of the GHC anyway (reordering the patches
6969 # results in rebuilds of GHC and reduces sharing in /nix/store).
@@ -101,25 +101,25 @@ in {
101101 ++ fromUntil "8.6.4" "8.8" ./patches/ghc/global-offset-table.patch
102102 ++ fromUntil "8.6.4" "8.8" ./patches/ghc/global-offset-table-2.patch
103103
104− ++ self.lib.optional (version == "8.6.3") ./patches/ghc/T16057--ghci-doa-on-windows.patch
105− ++ self.lib.optional (version == "8.6.3") ./patches/ghc/ghc-8.6.3-reinstallable-lib-ghc.patch
106− ++ self.lib.optional (version == "8.6.4") ./patches/ghc/ghc-8.6.4-reinstallable-lib-ghc.patch
107− ++ self.lib.optional (version == "8.6.5") ./patches/ghc/ghc-8.6.5-reinstallable-lib-ghc.patch
108− ++ self.lib.optional (version == "8.6.5") ./patches/ghc/ghc-8.6.5-atomic-arm-arch.patch
109− ++ self.lib.optional (version == "8.8.1") ./patches/ghc/ghc-8.8.1-reinstallable-lib-ghc.patch
104+ ++ final.lib.optional (version == "8.6.3") ./patches/ghc/T16057--ghci-doa-on-windows.patch
105+ ++ final.lib.optional (version == "8.6.3") ./patches/ghc/ghc-8.6.3-reinstallable-lib-ghc.patch
106+ ++ final.lib.optional (version == "8.6.4") ./patches/ghc/ghc-8.6.4-reinstallable-lib-ghc.patch
107+ ++ final.lib.optional (version == "8.6.5") ./patches/ghc/ghc-8.6.5-reinstallable-lib-ghc.patch
108+ ++ final.lib.optional (version == "8.6.5") ./patches/ghc/ghc-8.6.5-atomic-arm-arch.patch
109+ ++ final.lib.optional (version == "8.8.1") ./patches/ghc/ghc-8.8.1-reinstallable-lib-ghc.patch
110110 ++ fromUntil "8.8.2" "8.9" ./patches/ghc/ghc-8.8.2-reinstallable-lib-ghc.patch
111− ++ self.lib.optional (version == "8.6.4") ./patches/ghc/ghc-8.6.4-better-plusSimplCountErrors.patch
112− ++ self.lib.optional (versionAtLeast "8.6.4" && self.stdenv.isDarwin) ./patches/ghc/ghc-macOS-loadArchive-fix.patch
113− ++ self.lib.optional (versionAtLeast "8.4.4" && self.stdenv.isDarwin) ./patches/ghc/ghc-darwin-gcc-version-fix.patch
111+ ++ final.lib.optional (version == "8.6.4") ./patches/ghc/ghc-8.6.4-better-plusSimplCountErrors.patch
112+ ++ final.lib.optional (versionAtLeast "8.6.4" && final.stdenv.isDarwin) ./patches/ghc/ghc-macOS-loadArchive-fix.patch
113+ ++ final.lib.optional (versionAtLeast "8.4.4" && final.stdenv.isDarwin) ./patches/ghc/ghc-darwin-gcc-version-fix.patch
114114 ;
115115 in ({
116− ghc844 = self.callPackage ../compiler/ghc {
117− extra-passthru = { buildGHC = self.buildPackages.haskell-nix.compiler.ghc844; };
116+ ghc844 = final.callPackage ../compiler/ghc {
117+ extra-passthru = { buildGHC = final.buildPackages.haskell-nix.compiler.ghc844; };
118118
119119 inherit bootPkgs sphinx installDeps;
120120
121− buildLlvmPackages = self.buildPackages.llvmPackages_5;
122− llvmPackages = self.llvmPackages_5;
121+ buildLlvmPackages = final.buildPackages.llvmPackages_5;
122+ llvmPackages = final.llvmPackages_5;
123123
124124 src-spec = rec {
125125 version = "8.4.4";
@@ -129,15 +129,15 @@ in {
129129
130130 ghc-patches = ghc-patches "8.4.4"
131131 ++ [ hsc2hs-align-conditionals-patch D5123-patch ]
132− ++ self.lib.optional self.stdenv.isDarwin ./patches/ghc/ghc-8.4.4-backport-dylib-command-size-limit.patch;
132+ ++ final.lib.optional final.stdenv.isDarwin ./patches/ghc/ghc-8.4.4-backport-dylib-command-size-limit.patch;
133133 };
134− ghc861 = self.callPackage ../compiler/ghc {
135− extra-passthru = { buildGHC = self.buildPackages.haskell-nix.compiler.ghc861; };
134+ ghc861 = final.callPackage ../compiler/ghc {
135+ extra-passthru = { buildGHC = final.buildPackages.haskell-nix.compiler.ghc861; };
136136
137137 inherit bootPkgs sphinx installDeps;
138138
139− buildLlvmPackages = self.buildPackages.llvmPackages_6;
140− llvmPackages = self.llvmPackages_6;
139+ buildLlvmPackages = final.buildPackages.llvmPackages_6;
140+ llvmPackages = final.llvmPackages_6;
141141
142142 src-spec = rec {
143143 version = "8.6.1";
@@ -147,13 +147,13 @@ in {
147147
148148 ghc-patches = [ D5123-patch ];
149149 };
150− ghc862 = self.callPackage ../compiler/ghc {
151− extra-passthru = { buildGHC = self.buildPackages.haskell-nix.compiler.ghc862; };
150+ ghc862 = final.callPackage ../compiler/ghc {
151+ extra-passthru = { buildGHC = final.buildPackages.haskell-nix.compiler.ghc862; };
152152
153153 inherit bootPkgs sphinx installDeps;
154154
155− buildLlvmPackages = self.buildPackages.llvmPackages_6;
156− llvmPackages = self.llvmPackages_6;
155+ buildLlvmPackages = final.buildPackages.llvmPackages_6;
156+ llvmPackages = final.llvmPackages_6;
157157
158158 src-spec = rec {
159159 version = "8.6.2";
@@ -164,13 +164,13 @@ in {
164164 ghc-patches = ghc-patches "8.6.2"
165165 ++ [ D5123-patch ];
166166 };
167− ghc863 = self.callPackage ../compiler/ghc {
168− extra-passthru = { buildGHC = self.buildPackages.haskell-nix.compiler.ghc863; };
167+ ghc863 = final.callPackage ../compiler/ghc {
168+ extra-passthru = { buildGHC = final.buildPackages.haskell-nix.compiler.ghc863; };
169169
170170 inherit bootPkgs sphinx installDeps;
171171
172− buildLlvmPackages = self.buildPackages.llvmPackages_6;
173− llvmPackages = self.llvmPackages_6;
172+ buildLlvmPackages = final.buildPackages.llvmPackages_6;
173+ llvmPackages = final.llvmPackages_6;
174174
175175 src-spec = rec {
176176 version = "8.6.3";
@@ -181,13 +181,13 @@ in {
181181 ghc-patches = ghc-patches "8.6.3"
182182 ++ [ D5123-patch ];
183183 };
184− ghc864 = self.callPackage ../compiler/ghc {
185− extra-passthru = { buildGHC = self.buildPackages.haskell-nix.compiler.ghc864; };
184+ ghc864 = final.callPackage ../compiler/ghc {
185+ extra-passthru = { buildGHC = final.buildPackages.haskell-nix.compiler.ghc864; };
186186
187187 inherit bootPkgs sphinx installDeps;
188188
189− buildLlvmPackages = self.buildPackages.llvmPackages_6;
190− llvmPackages = self.llvmPackages_6;
189+ buildLlvmPackages = final.buildPackages.llvmPackages_6;
190+ llvmPackages = final.llvmPackages_6;
191191
192192 src-spec = rec {
193193 version = "8.6.4";
@@ -198,13 +198,13 @@ in {
198198 ghc-patches = ghc-patches "8.6.4"
199199 ++ [ D5123-patch ];
200200 };
201− ghc865 = self.callPackage ../compiler/ghc {
202− extra-passthru = { buildGHC = self.buildPackages.haskell-nix.compiler.ghc865; };
201+ ghc865 = final.callPackage ../compiler/ghc {
202+ extra-passthru = { buildGHC = final.buildPackages.haskell-nix.compiler.ghc865; };
203203
204204 inherit bootPkgs sphinx installDeps;
205205
206− buildLlvmPackages = self.buildPackages.llvmPackages_6;
207− llvmPackages = self.llvmPackages_6;
206+ buildLlvmPackages = final.buildPackages.llvmPackages_6;
207+ llvmPackages = final.llvmPackages_6;
208208
209209 src-spec = rec {
210210 version = "8.6.5";
@@ -215,13 +215,13 @@ in {
215215 ghc-patches = ghc-patches "8.6.5"
216216 ++ [ D5123-patch haddock-900-patch ];
217217 };
218− ghc881 = self.callPackage ../compiler/ghc {
219− extra-passthru = { buildGHC = self.buildPackages.haskell-nix.compiler.ghc881; };
218+ ghc881 = final.callPackage ../compiler/ghc {
219+ extra-passthru = { buildGHC = final.buildPackages.haskell-nix.compiler.ghc881; };
220220
221221 inherit bootPkgs sphinx installDeps;
222222
223− buildLlvmPackages = self.buildPackages.llvmPackages_7;
224− llvmPackages = self.llvmPackages_7;
223+ buildLlvmPackages = final.buildPackages.llvmPackages_7;
224+ llvmPackages = final.llvmPackages_7;
225225
226226 src-spec = rec {
227227 version = "8.8.1";
@@ -231,13 +231,13 @@ in {
231231
232232 ghc-patches = ghc-patches "8.8.1";
233233 };
234− ghc882 = self.callPackage ../compiler/ghc {
235− extra-passthru = { buildGHC = self.buildPackages.haskell-nix.compiler.ghc882; };
234+ ghc882 = final.callPackage ../compiler/ghc {
235+ extra-passthru = { buildGHC = final.buildPackages.haskell-nix.compiler.ghc882; };
236236
237237 inherit bootPkgs sphinx installDeps;
238238
239− buildLlvmPackages = self.buildPackages.llvmPackages_7;
240− llvmPackages = self.llvmPackages_7;
239+ buildLlvmPackages = final.buildPackages.llvmPackages_7;
240+ llvmPackages = final.llvmPackages_7;
241241
242242 src-spec = rec {
243243 version = "8.8.2";
@@ -247,13 +247,13 @@ in {
247247
248248 ghc-patches = ghc-patches "8.8.2";
249249 };
250− ghc883 = self.callPackage ../compiler/ghc {
251− extra-passthru = { buildGHC = self.buildPackages.haskell-nix.compiler.ghc883; };
250+ ghc883 = final.callPackage ../compiler/ghc {
251+ extra-passthru = { buildGHC = final.buildPackages.haskell-nix.compiler.ghc883; };
252252
253253 inherit bootPkgs sphinx installDeps;
254254
255− buildLlvmPackages = self.buildPackages.llvmPackages_7;
256− llvmPackages = self.llvmPackages_7;
255+ buildLlvmPackages = final.buildPackages.llvmPackages_7;
256+ llvmPackages = final.llvmPackages_7;
257257
258258 src-spec = rec {
259259 version = "8.8.3";
@@ -263,7 +263,7 @@ in {
263263
264264 ghc-patches = ghc-patches "8.8.3";
265265 };
266− } // self.lib.optionalAttrs (self.targetPlatform.isGhcjs or false)
266+ } // final.lib.optionalAttrs (final.targetPlatform.isGhcjs or false)
267267 # This will inject `exactDeps` and `envDeps` into the ghcjs
268268 # compiler defined below. This is crucial to build packages
269269 # with the current use of env and exact Deps.
@@ -272,16 +272,16 @@ in {
272272 isHaskellNixBootCompiler = true;
273273 })
274274 ({
275− ghc865 = let buildGHC = self.buildPackages.haskell-nix.compiler.ghc865;
276− in let ghcjs865 = self.callPackage ../compiler/ghcjs/ghcjs.nix {
275+ ghc865 = let buildGHC = final.buildPackages.haskell-nix.compiler.ghc865;
276+ in let ghcjs865 = final.callPackage ../compiler/ghcjs/ghcjs.nix {
277277 ghcjsSrcJson = ../compiler/ghcjs/ghcjs-src.json;
278278 ghcjsVersion = "8.6.0.1";
279279 ghc = buildGHC;
280− cabal-install = self.buildPackages.haskell-nix.cabal-install;
280+ cabal-install = final.buildPackages.haskell-nix.cabal-install;
281281 # The alex from the bootstrap packages is apparently broken, and will fail with something like:
282282 # > alex: /nix/store/f7b78rg9pmqgvxvsqfzh1przp7pxii5a-alex-3.2.4-exe-alex/share/x86_64-osx-ghc-8.4.4/alex-3.2.4-1pf5faR9dBuJ8mryql0DoA-alex/AlexTemplate-ghc-nopred: openFile: does not exist (No such file or directory)
283− # inherit (self.buildPackages.haskell-nix.bootstrap.packages) alex happy;
284− }; in let targetPrefix = "js-unknown-ghcjs-"; in self.runCommand "${targetPrefix}ghc-8.6.5" {
283+ # inherit (final.buildPackages.haskell-nix.bootstrap.packages) alex happy;
284+ }; in let targetPrefix = "js-unknown-ghcjs-"; in final.runCommand "${targetPrefix}ghc-8.6.5" {
285285 passthru = {
286286 inherit targetPrefix;
287287 version = "8.6.5";
@@ -293,7 +293,7 @@ in {
293293 "--with-ghcjs=${targetPrefix}ghc" "--with-ghcjs-pkg=${targetPrefix}ghc-pkg"
294294 # setting gcc is stupid. non-emscripten ghcjs has no cc.
295295 # however cabal insists on compiling the c sources. m(
296− "--with-gcc=${self.buildPackages.stdenv.cc}/bin/cc"
296+ "--with-gcc=${final.buildPackages.stdenv.cc}/bin/cc"
297297 ];
298298 };
299299 # note: we'll use the buildGHCs `hsc2hs`, ghcjss wrapper just horribly breaks in this nix setup.
@@ -310,8 +310,8 @@ in {
310310 '' + installDeps targetPrefix);
311311 })));
312312
313− ghc = self.haskell-nix.compiler.ghc865;
314− inherit (self.buildPackages.haskell-nix.bootstrap.packages) cabal-install alex happy;
313+ ghc = final.haskell-nix.compiler.ghc865;
314+ inherit (final.buildPackages.haskell-nix.bootstrap.packages) cabal-install alex happy;
315315
316316 # WARN: The `import ../. {}` will prevent
317317 # any cross to work, as we will loose
@@ -320,7 +320,7 @@ in {
320320 # haskellPackages = with import ../. {}; {
321321 # hpack = null;
322322 # hello = (hackage-package {
323− # inherit (self) cabal-install;
323+ # inherit (final) cabal-install;
324324 # name = "hello"; version = "1.0.0.2";
325325 # }).components.exes.hello;
326326 # };
@@ -339,7 +339,7 @@ in {
339339
340340
341341 # the bootstrap infra structure (pre-compiled ghc; bootstrapped cabal-install, ...)
342− bootstrap = with self.haskell-nix; let ghc = self.buildPackages.haskell-nix.bootstrap.compiler.ghc844; in {
342+ bootstrap = with final.haskell-nix; let ghc = final.buildPackages.haskell-nix.bootstrap.compiler.ghc844; in {
343343 # XXX: import ../. will throw away all other overlays, config values, ...
344344 # this is not ideal!
345345 # get binary compilers for bootstrapping. We'll put the eventual proper
@@ -353,14 +353,14 @@ in {
353353 isHaskellNixBootCompiler = true;
354354 }
355355 )
356− (import ../compiler/old-ghc-nix { pkgs = self; });
356+ (import ../compiler/old-ghc-nix { pkgs = final; });
357357
358358 packages = {
359359 # cabal has it's own bootstrap script which we'll use.
360360 cabal-install = import ../compiler/bootstrap/cabal-install.nix {
361− inherit (self) fetchurl stdenv zlib;
361+ inherit (final) fetchurl stdenv zlib;
362362 inherit hackage ghc;
363− src = self.fetchurl {
363+ src = final.fetchurl {
364364 url = "https://github.com/haskell/cabal/archive/Cabal-v3.0.0.0-rc3.tar.gz";
365365 sha256 = "1zl2mgg8307ykq3v8nmafc6zdhhj1cw7w8ffpap16dsm65lbnx33";
366366 };
@@ -385,7 +385,7 @@ in {
385385 ghc = ghc // { isHaskellNixCompiler = ghc.isHaskellNixBootCompiler; };
386386 inherit (bootstrap.packages) cabal-install nix-tools hpack;
387387 name = "alex"; version = "3.2.4";
388− index-state = self.haskell-nix.internalHackageIndexState;
388+ index-state = final.haskell-nix.internalHackageIndexState;
389389 materialized = ../materialized/alex;
390390 };
391391 alex = bootstrap.packages.alex-project.hsPkgs.alex.components.exes.alex;
@@ -394,7 +394,7 @@ in {
394394 ghc = ghc // { isHaskellNixCompiler = ghc.isHaskellNixBootCompiler; };
395395 inherit (bootstrap.packages) cabal-install nix-tools hpack;
396396 name = "happy"; version = "1.19.11";
397− index-state = self.haskell-nix.internalHackageIndexState;
397+ index-state = final.haskell-nix.internalHackageIndexState;
398398 materialized = ../materialized/happy;
399399 };
400400 happy = bootstrap.packages.happy-project.hsPkgs.happy.components.exes.happy;
@@ -403,7 +403,7 @@ in {
403403 ghc = ghc // { isHaskellNixCompiler = ghc.isHaskellNixBootCompiler; };
404404 inherit (bootstrap.packages) cabal-install nix-tools hpack;
405405 name = "hscolour"; version = "1.24.4";
406− index-state = self.haskell-nix.internalHackageIndexState;
406+ index-state = final.haskell-nix.internalHackageIndexState;
407407 materialized = ../materialized/hscolour;
408408 };
409409 hscolour = bootstrap.packages.hscolour-project.hsPkgs.hscolour.components.exes.HsColour;
overlays/darwin.nix+1−1
@@ -1,3 +1,3 @@
1−self: super: {
1+final: prev: {
22
33}
overlays/default.nix+42−16
@@ -1,19 +1,45 @@
1−[
1+let
2+ overlays = {
3+ wine = import ./wine.nix;
4+ #ghcjs = import ./ghcjs-asterius-triple.nix;
5+ #python = import ./python.nix;
6+ haskell = import ./haskell.nix;
7+ hackage-quirks = import ./hackage-quirks.nix;
8+ bootstrap = import ./bootstrap.nix;
9+ ghc = import ./ghc.nix;
10+ ghc-packages = import ./ghc-packages.nix;
11+ windows = import ./windows.nix;
12+ armv6l-linux = import ./armv6l-linux.nix;
13+ musl = import ./musl.nix;
14+ tools = import ./tools.nix;
15+ };
16+
17+ composeExtensions = f: g: final: prev:
18+ let
19+ fApplied = f final prev;
20+ prev' = prev // fApplied;
21+ in fApplied // g final prev';
22+
23+ ordered = with overlays; [
224 # Hide nixpkgs haskell and haskellPackages from the haskell-nix overlays.
325 # This should prevent us inadvertantly depending on them.
4− (_: super: { haskell = {}; haskellPackages = {}; haskell-nix-super = super; })
5− (import ./wine.nix)
6− #(import ./ghcjs-asterius-triple.nix)
7− #(import ./python.nix)
8− (import ./haskell.nix)
9− (import ./hackage-quirks.nix)
10− (import ./bootstrap.nix)
11− (import ./ghc.nix)
12− (import ./ghc-packages.nix)
13− (import ./windows.nix)
14− (import ./armv6l-linux.nix)
15− (import ./musl.nix)
16− (import ./tools.nix)
26+ (_: prev: {
27+ haskell = { };
28+ haskellPackages = { };
29+ haskell-nix-prev = prev;
30+ })
31+ wine
32+ haskell
33+ hackage-quirks
34+ bootstrap
35+ ghc
36+ ghc-packages
37+ windows
38+ armv6l-linux
39+ musl
40+ tools
1741 # Restore nixpkgs haskell and haskellPackages
18− (_: super: { inherit (super.haskell-nix-super) haskell haskellPackages; })
19−]
42+ (_: prev: { inherit (prev.haskell-nix-prev) haskell haskellPackages; })
43+ ];
44+ combined = builtins.foldl' composeExtensions (_: _: { }) ordered;
45+in overlays // { inherit combined; }
overlays/ghc-packages.nix+22−22
@@ -1,12 +1,12 @@
1−self: super:
1+final: prev:
22let
3− emptyDotCabal = self.runCommand "empty-dot-cabal" {} ''
3+ emptyDotCabal = final.runCommand "empty-dot-cabal" {} ''
44 mkdir -p $out/.cabal
55 cat <<EOF > $out/.cabal/config
66 EOF
77 '';
8− callCabalSdist = name: src: self.runCommand "${name}-sdist.tar.gz" {
9− nativeBuildInputs = [ self.haskell-nix.cabal-install ];
8+ callCabalSdist = name: src: final.runCommand "${name}-sdist.tar.gz" {
9+ nativeBuildInputs = [ final.haskell-nix.cabal-install ];
1010 } ''
1111 tmp=$(mktemp -d)
1212 cp -r ${src}/* $tmp
@@ -15,13 +15,13 @@ let
1515 HOME=${emptyDotCabal} cabal new-sdist -o $tmp2
1616 cp $tmp2/*.tar.gz $out
1717 '';
18− callCabal2Nix = name: src: self.stdenv.mkDerivation {
18+ callCabal2Nix = name: src: final.stdenv.mkDerivation {
1919 name = "${name}-package.nix";
2020 inherit src;
21− nativeBuildInputs = [ self.haskell-nix.nix-tools ];
21+ nativeBuildInputs = [ final.haskell-nix.nix-tools ];
2222 phases = [ "unpackPhase" "buildPhase" ];
2323
24− LOCALE_ARCHIVE = self.lib.optionalString (self.stdenv.hostPlatform.libc == "glibc") "${self.glibcLocales}/lib/locale/locale-archive";
24+ LOCALE_ARCHIVE = final.lib.optionalString (final.stdenv.hostPlatform.libc == "glibc") "${final.glibcLocales}/lib/locale/locale-archive";
2525 LANG = "en_US.UTF-8";
2626 LC_ALL = "en_US.UTF-8";
2727
@@ -32,8 +32,8 @@ let
3232
3333 # Combines multiple derivations into one to make them
3434 # easier to materialize.
35− combineFiles = name: ext: files: self.linkFarm name
36− (self.lib.mapAttrsToList (name: path: {
35+ combineFiles = name: ext: files: final.linkFarm name
36+ (final.lib.mapAttrsToList (name: path: {
3737 name = name + ext;
3838 inherit path;
3939 }) files);
@@ -57,10 +57,10 @@ let
5757 # processed yet by `nix-tools`, so we are not materializing the
5858 # ones that currently fail.
5959 # (we need to upgrade `nix-tools` to Cabal 3 for them to work)
60− skipBroken = self.lib.filterAttrs (pkgName: _:
60+ skipBroken = final.lib.filterAttrs (pkgName: _:
6161 ghcName == "ghc865" || (pkgName != "base" && pkgName != "ghc-heap"));
6262 materializedPath = ../materialized/ghc-boot-packages-nix + "/${ghcName}";
63− in (self.haskell-nix.materialize ({
63+ in (final.haskell-nix.materialize ({
6464 materialized = if __pathExists materializedPath
6565 then materializedPath
6666 else null;
@@ -88,9 +88,9 @@ let
8888 # The nix produced by `cabalProject` differs slightly depending on
8989 # what the platforms are. There are currently 3 possible outputs.
9090 ghc-extra-projects-type =
91− if self.stdenv.hostPlatform.isWindows
91+ if final.stdenv.hostPlatform.isWindows
9292 then "windows"
93− else if self.stdenv.buildPlatform != self.stdenv.hostPlatform
93+ else if final.stdenv.buildPlatform != final.stdenv.hostPlatform
9494 then "cross"
9595 else "default";
9696
@@ -113,7 +113,7 @@ in rec {
113113 ghc-boot-packages-sdist-and-nix = builtins.mapAttrs
114114 (ghcName: value: builtins.mapAttrs
115115 (pkgName: dir: cabalToSdistAndNix ghcName pkgName "${value.passthru.configured-src}/${dir}") ghc-extra-pkgs)
116− self.buildPackages.haskell-nix.compiler;
116+ final.buildPackages.haskell-nix.compiler;
117117
118118 # All the ghc boot package nix files for each ghc.
119119 ghc-boot-packages-nix = builtins.mapAttrs
@@ -134,14 +134,14 @@ in rec {
134134 let package-locs =
135135 # TODO ghc-heap.cabal requires cabal 3. We should update the cabalProject' call
136136 # in `ghc-extra-projects` below to work with this.
137− (self.lib.filterAttrs (n: _: n != "base" && n != "ghc-heap") ghc-extra-pkgs);
138− in self.stdenv.mkDerivation {
137+ (final.lib.filterAttrs (n: _: n != "base" && n != "ghc-heap") ghc-extra-pkgs);
138+ in final.stdenv.mkDerivation {
139139 name = "ghc-extra-pkgs-cabal-project-${name}";
140140 phases = [ "buildPhase" ];
141141 # Copy each cabal file from the configured ghc source and
142142 # add a suitable cabal.project file.
143143 buildPhase = ''
144− ${self.lib.concatStrings (self.lib.mapAttrsToList (_: dir: ''
144+ ${final.lib.concatStrings (final.lib.mapAttrsToList (_: dir: ''
145145 mkdir -p $out/${dir}
146146 cp ${value.passthru.configured-src}/${dir}/*.cabal $out/${dir}
147147 # Remove references to libffi as the are not cross platform
@@ -149,7 +149,7 @@ in rec {
149149 sed -i 's|/nix/store/.*-libffi.*/include||' $out/${dir}/*.cabal
150150 '') package-locs)}
151151 cat >$out/cabal.project <<EOF
152− packages: ${self.lib.concatStringsSep " " (self.lib.attrValues package-locs)}
152+ packages: ${final.lib.concatStringsSep " " (final.lib.attrValues package-locs)}
153153 -- need this for libiserve as it doesn't build against 3.0 yet.
154154 constraints: network < 3.0,
155155 ghc +ghci,
@@ -157,22 +157,22 @@ in rec {
157157 libiserv +network
158158 EOF
159159 '';
160− }) self.buildPackages.haskell-nix.compiler;
160+ }) final.buildPackages.haskell-nix.compiler;
161161
162162 # A `cabalProject'` project for each ghc
163163 ghc-extra-projects = builtins.mapAttrs (ghcName: proj:
164164 # Where to look for materialization files
165165 let materializedPath = ../materialized/ghc-extra-projects
166166 + "/${ghc-extra-projects-type}/${ghcName}";
167− in self.haskell-nix.cabalProject' {
167+ in final.haskell-nix.cabalProject' {
168168 name = "ghc-extra-projects-${ghc-extra-projects-type}-${ghcName}";
169169 src = proj;
170− index-state = self.haskell-nix.internalHackageIndexState;
170+ index-state = final.haskell-nix.internalHackageIndexState;
171171 materialized =
172172 if __pathExists materializedPath
173173 then materializedPath
174174 else null;
175− ghc = self.buildPackages.haskell-nix.compiler.${ghcName};
175+ ghc = final.buildPackages.haskell-nix.compiler.${ghcName};
176176 configureArgs = "--disable-tests"; # avoid failures satisfying bytestring package tests dependencies
177177 })
178178 ghc-extra-pkgs-cabal-projects;
overlays/ghc.nix+6−6
@@ -1,13 +1,13 @@
1−self: super: with super;
1+final: prev: with prev;
22 # sadly we need to patch GHC a bit.
33 let
44 ghcPkgOverrides = {
55 enableIntegerSimple = false;
6− } // lib.optionalAttrs self.stdenv.hostPlatform.isAarch32 {
6+ } // lib.optionalAttrs final.stdenv.hostPlatform.isAarch32 {
77 enableRelocatableStaticLibs = false;
88 };
99 ghcDrvOverrides = drv: {
10− hardeningDisable = (drv.hardeningDisable or []) ++ [ "stackprotector" "format" ] ++ lib.optionals super.stdenv.hostPlatform.isAarch32 [ "pic" "pie" ];
10+ hardeningDisable = (drv.hardeningDisable or []) ++ [ "stackprotector" "format" ] ++ lib.optionals prev.stdenv.hostPlatform.isAarch32 [ "pic" "pie" ];
1111 };
1212 in {
1313 haskell-nix = let
@@ -17,7 +17,7 @@ self: super: with super;
1717 # we want to apply this only to non-ghcjs ones.
1818 # As we do some ghc <- ghcjs mapping for ghcjs.
1919 needsPatches = name:
20− !(super.stdenv.targetPlatform.isGhcjs or false)
20+ !(prev.stdenv.targetPlatform.isGhcjs or false)
2121 && lib.hasPrefix "ghc" name
2222 && !lib.hasPrefix "ghc82" name
2323 && !lib.hasPrefix "ghcjs" name
@@ -25,8 +25,8 @@ self: super: with super;
2525 overrideCompiler = compiler:
2626 (compiler.override ghcPkgOverrides).overrideAttrs ghcDrvOverrides;
2727 in
28− lib.recursiveUpdate super.haskell-nix {
28+ lib.recursiveUpdate prev.haskell-nix {
2929 compiler = lib.mapAttrs (_name: overrideCompiler)
30− (lib.filterAttrs (name: _value: needsPatches name) super.haskell-nix.compiler);
30+ (lib.filterAttrs (name: _value: needsPatches name) prev.haskell-nix.compiler);
3131 };
3232 }
overlays/ghcjs-asterius-triple.nix+6−6
@@ -1,6 +1,6 @@
11# This overlay does *not* work as expected.
22# See https://github.com/NixOS/nixpkgs/issues/65589
3−self: super: super.lib.recursiveUpdate super {
3+final: prev: prev.lib.recursiveUpdate prev {
44 lib.systems.examples = {
55 # Ghcjs
66 ghcjs = {
@@ -17,15 +17,15 @@ self: super: super.lib.recursiveUpdate super {
1717 platform = {};
1818 };
1919 };
20− # gcc = if self.targetPlatform.isGhcjs then null else super.gcc;
21− lib.systems.parse = with self.lib.systems.parse; {
20+ # gcc = if final.targetPlatform.isGhcjs then null else prev.gcc;
21+ lib.systems.parse = with final.lib.systems.parse; {
2222 cpuTypes.js = cpuTypes.wasm32 // { name = "js"; family = "js"; };
2323 kernels.ghcjs = kernels.none // { name = "ghcjs"; };
2424 kernels.asterius = kernels.none // { name = "asterius"; };
25− mkSkeletonFromList = l: builtins.trace l (super.lib.systems.parse.mkSkeletonFromList l);
26− mkSystemFromString = s: builtins.trace s (super.lib.systems.parse.mkSystemFromString s);
25+ mkSkeletonFromList = l: builtins.trace l (prev.lib.systems.parse.mkSkeletonFromList l);
26+ mkSystemFromString = s: builtins.trace s (prev.lib.systems.parse.mkSystemFromString s);
2727 };
28− lib.systems.inspect.patterns = with self.lib.systems.parse; {
28+ lib.systems.inspect.patterns = with final.lib.systems.parse; {
2929 isJavaScript = { cpu = cpuTypes.js; };
3030 isWasm32 = { cpu = cpuTypes.wasm32; };
3131 isWasm64 = { cpu = cpuTypes.wasm64; };
overlays/hackage-quirks.nix+6−6
@@ -2,11 +2,11 @@
22# arguments for `haskell-nix.hackage-project` and the functions
33# that use it (like `hackage-package`)
44#
5−self: super:
5+final: prev:
66let
7− inherit (self) lib;
7+ inherit (final) lib;
88
9−in { haskell-nix = super.haskell-nix // {
9+in { haskell-nix = prev.haskell-nix // {
1010
1111 hackageQuirks = { name, version }: {
1212 # FIXME: this is required to build cabal-install 3.2 with ghc 8.6,
@@ -38,16 +38,16 @@ in { haskell-nix = super.haskell-nix // {
3838 # Windows characters confuse cross compilation
3939 # See https://github.com/snoyberg/file-embed/pull/33
4040 (lib.optionalAttrs (version == "2.9.2.1") {
41− packages.file-embed.src = self.fetchgit {
41+ packages.file-embed.src = final.fetchgit {
4242 url = "https://github.com/hamishmack/file-embed.git";
4343 rev = "12b33b8b710517308954c1facff3dc679c2dc5e3";
4444 sha256 = "0jcpja4s4cylmg9rddyakb1p1fb4l41ffwmy0njpb1dxc5z3v618";
4545 };
4646 })
4747 # Musl needs static zlib
48− (lib.optionalAttrs self.stdenv.hostPlatform.isMusl {
48+ (lib.optionalAttrs final.stdenv.hostPlatform.isMusl {
4949 packages.pandoc.components.exes.pandoc.configureFlags = [
50− "--ghc-option=-optl=-L${self.zlib.static}/lib"
50+ "--ghc-option=-optl=-L${final.zlib.static}/lib"
5151 ];
5252 })
5353 ];
overlays/haskell.nix+94−94
@@ -2,8 +2,8 @@
22#
33# for hygenic reasons we'll use haskell-nix as a prefix.
44# Using haskell.nix in nix is awkward as I needs to be quoted.
5−self: super: {
6− haskell-nix = with self.haskell-nix; {
5+final: prev: {
6+ haskell-nix = with final.haskell-nix; {
77
88 # Default modules, these will always be included.
99 # They are here to be overridden/added to by other
@@ -13,7 +13,7 @@ self: super: {
1313 # We provide a `callPackage` function to consumers for
1414 # convenience. We will however refrain from using it
1515 # here and be explicit about imports and dependencies.
16− callPackage = super.lib.callPackageWith (self // self.haskell-nix);
16+ callPackage = prev.lib.callPackageWith (final // final.haskell-nix);
1717
1818 # You can provide different pins for hackage.nix and stackage.nix if required.
1919 # It's also possible to override these sources with NIX_PATH.
@@ -32,7 +32,7 @@ self: super: {
3232 fetchExternal = import ../lib/fetch-external.nix;
3333
3434 # Functions for cleaning Haskell source directories.
35− inherit (import ../lib/clean-source-haskell.nix { inherit (self) lib; })
35+ inherit (import ../lib/clean-source-haskell.nix { inherit (final) lib; })
3636 haskellSourceFilter
3737 cleanSourceHaskell;
3838
@@ -59,8 +59,8 @@ self: super: {
5959
6060 # Utility functions for working with the component builder.
6161 haskellLib = let hl = import ../lib {
62− inherit (self) stdenv lib runCommand recurseIntoAttrs srcOnly;
63− inherit (self.buildPackages) git;
62+ inherit (final) stdenv lib runCommand recurseIntoAttrs srcOnly;
63+ inherit (final.buildPackages) git;
6464 haskellLib = hl;
6565 }; in hl;
6666
@@ -80,7 +80,7 @@ self: super: {
8080 import ../package-set.nix {
8181 inherit (args) pkg-def pkg-def-extras;
8282 modules = defaultModules ++ modules;
83− pkgs = self;
83+ pkgs = final;
8484 hackage = hackageAll;
8585 };
8686
@@ -89,10 +89,10 @@ self: super: {
8989 # info. Instead we can add ghc-boot-packages to `pkg-def-extras`.
9090 excludeBootPackages = pkg-def: hackage:
9191 let original = pkg-def hackage;
92− bootPkgNames = self.lib.attrNames
93− self.ghc-boot-packages.${(pkg-def hackage).compiler.nix-name};
92+ bootPkgNames = final.lib.attrNames
93+ final.ghc-boot-packages.${(pkg-def hackage).compiler.nix-name};
9494 in original // {
95− packages = self.lib.filterAttrs (n: _: self.lib.all (b: n != b) bootPkgNames)
95+ packages = final.lib.filterAttrs (n: _: final.lib.all (b: n != b) bootPkgNames)
9696 original.packages;
9797 };
9898
@@ -119,7 +119,7 @@ self: super: {
119119 in mkPkgSet {
120120 pkg-def = excludeBootPackages pkg-def;
121121 pkg-def-extras = [ stack-pkgs.extras
122− self.ghc-boot-packages.${compiler.nix-name}
122+ final.ghc-boot-packages.${compiler.nix-name}
123123 ]
124124 ++ pkg-def-extras;
125125 # set doExactConfig = true. The stackage set should be consistent
@@ -145,7 +145,7 @@ self: super: {
145145 in mkPkgSet {
146146 inherit pkg-def;
147147 pkg-def-extras = [ plan-pkgs.extras
148− self.ghc-boot-packages.${compiler.nix-name}
148+ final.ghc-boot-packages.${compiler.nix-name}
149149 ]
150150 ++ pkg-def-extras;
151151 # set doExactConfig = true, as we trust cabals resolution for
@@ -157,7 +157,7 @@ self: super: {
157157 };
158158
159159 # Package sets for all stackage snapshots.
160− snapshots = import ../snapshots.nix { inherit (self) lib ghc-boot-packages; inherit mkPkgSet stackage excludeBootPackages; };
160+ snapshots = import ../snapshots.nix { inherit (final) lib ghc-boot-packages; inherit mkPkgSet stackage excludeBootPackages; };
161161 # Pick a recent LTS snapshot to be our "default" package set.
162162 haskellPackages = snapshots."lts-14.13";
163163
@@ -165,26 +165,26 @@ self: super: {
165165 # files. This version of nix-tools may be cross compiled.
166166 # We probably never want to actually cross compile nix-tools on
167167 # it's own.
168− nix-tools-cross-compiled = self.lib.makeOverridable (import ../nix-tools) {
169− inherit (self) pkgs lib symlinkJoin makeWrapper
168+ nix-tools-cross-compiled = final.lib.makeOverridable (import ../nix-tools) {
169+ inherit (final) pkgs lib symlinkJoin makeWrapper
170170 git nix nix-prefetch-git;
171− inherit (self.haskell-nix) fetchExternal cleanSourceHaskell mkCabalProjectPkgSet;
171+ inherit (final.haskell-nix) fetchExternal cleanSourceHaskell mkCabalProjectPkgSet;
172172 hpack = null; # nix-tools does not use hpack project files
173173 };
174174 # While `nix-tools-cross-compiled` may be cross compiled,
175175 # getting it from `buildPackages` we should get
176176 # nix-tools suitable for running on the build system.
177− nix-tools = self.buildPackages.haskell-nix.nix-tools-cross-compiled;
177+ nix-tools = final.buildPackages.haskell-nix.nix-tools-cross-compiled;
178178 # TODO perhaps there is a cleaner way to get a suitable nix-tools.
179179
180180 # Produce a fixed output derivation from a moving target (hackage index tarball)
181181 # Takes desired index-state and sha256 and produces a set { name, index }, where
182182 # index points to "01-index.tar.gz" file downloaded from hackage.haskell.org.
183− hackageTarball = { index-state, sha256, nix-tools ? self.haskell-nix.nix-tools, ... }:
183+ hackageTarball = { index-state, sha256, nix-tools ? final.haskell-nix.nix-tools, ... }:
184184 assert sha256 != null;
185185 let at = builtins.replaceStrings [":"] [""] index-state; in
186186 { name = "hackage.haskell.org-at-${at}";
187− index = self.fetchurl {
187+ index = final.fetchurl {
188188 name = "01-index.tar.gz-at-${at}";
189189 url = "https://hackage.haskell.org/01-index.tar.gz";
190190 downloadToTemp = true;
@@ -196,20 +196,20 @@ self: super: {
196196 };
197197
198198 # Creates Cabal local repository from { name, index } set.
199− mkLocalHackageRepo = import ../mk-local-hackage-repo self;
199+ mkLocalHackageRepo = import ../mk-local-hackage-repo final;
200200
201201 dotCabal = { index-state, sha256, cabal-install, extra-hackage-tarballs ? [], ... }@args:
202202 let
203203 allTarballs = [ (hackageTarball args) ] ++ extra-hackage-tarballs;
204− allNames = self.lib.concatMapStringsSep "-" (tarball: tarball.name) allTarballs;
204+ allNames = final.lib.concatMapStringsSep "-" (tarball: tarball.name) allTarballs;
205205 # Main Hackage index-state is embedded in its name and thus will propagate to
206206 # dotCabalName anyway.
207207 dotCabalName = "dot-cabal-" + allNames;
208208 in
209− self.runCommand dotCabalName { nativeBuildInputs = [ cabal-install ]; } ''
209+ final.runCommand dotCabalName { nativeBuildInputs = [ cabal-install ]; } ''
210210 mkdir -p $out/.cabal
211211 cat <<EOF > $out/.cabal/config
212− ${self.lib.concatStrings (
212+ ${final.lib.concatStrings (
213213 map (tarball:
214214 ''
215215 repository ${tarball.name}
@@ -224,11 +224,11 @@ self: super: {
224224
225225 # All repositories must be mkdir'ed before calling new-update on any repo,
226226 # otherwise it fails.
227− ${self.lib.concatStrings (map ({ name, ... }: ''
227+ ${final.lib.concatStrings (map ({ name, ... }: ''
228228 mkdir -p $out/.cabal/packages/${name}
229229 '') allTarballs)}
230230
231− ${self.lib.concatStrings (map ({ name, ... }: ''
231+ ${final.lib.concatStrings (map ({ name, ... }: ''
232232 HOME=$out cabal new-update ${name}
233233 '') allTarballs)}
234234 '';
@@ -245,31 +245,31 @@ self: super: {
245245
246246 # Helps materialize the output of derivations
247247 materialize = import ../lib/materialize.nix {
248− inherit (self.buildPackages) nix;
249− inherit (self.haskell-nix) checkMaterialization;
250− pkgs = self.buildPackages.pkgs;
251− inherit (self.buildPackages.pkgs) runCommand;
248+ inherit (final.buildPackages) nix;
249+ inherit (final.haskell-nix) checkMaterialization;
250+ pkgs = final.buildPackages.pkgs;
251+ inherit (final.buildPackages.pkgs) runCommand;
252252 };
253253
254254 update-index-state-hashes = import ../scripts/update-index-state-hashes.nix {
255− inherit (self.haskell-nix) indexStateHashesPath nix-tools;
256− inherit (self) coreutils nix writeShellScriptBin stdenv curl;
255+ inherit (final.haskell-nix) indexStateHashesPath nix-tools;
256+ inherit (final) coreutils nix writeShellScriptBin stdenv curl;
257257 };
258258
259259 # Function to call stackToNix
260260 callStackToNix = import ../lib/call-stack-to-nix.nix {
261− pkgs = self.buildPackages.pkgs;
262− inherit (self.buildPackages.pkgs) runCommand;
263− inherit (self.buildPackages.haskell-nix) nix-tools mkCacheFile materialize;
261+ pkgs = final.buildPackages.pkgs;
262+ inherit (final.buildPackages.pkgs) runCommand;
263+ inherit (final.buildPackages.haskell-nix) nix-tools mkCacheFile materialize;
264264 };
265265
266266 # given a source location call `cabal-to-nix` (from nix-tools) on it
267267 # to produce the nix representation of it.
268268 callCabalToNix = { name, src, cabal-file ? "${name}.cabal" }:
269− self.buildPackages.pkgs.runCommand "${name}.nix" {
270− nativeBuildInputs = [ self.buildPackages.haskell-nix.nix-tools ];
269+ final.buildPackages.pkgs.runCommand "${name}.nix" {
270+ nativeBuildInputs = [ final.buildPackages.haskell-nix.nix-tools ];
271271
272− LOCALE_ARCHIVE = self.lib.optionalString (self.stdenv.buildPlatform.libc == "glibc") "${self.buildPackages.glibcLocales}/lib/locale/locale-archive";
272+ LOCALE_ARCHIVE = final.lib.optionalString (final.stdenv.buildPlatform.libc == "glibc") "${final.buildPackages.glibcLocales}/lib/locale/locale-archive";
273273 LANG = "en_US.UTF-8";
274274 LC_ALL = "en_US.UTF-8";
275275 } ''
@@ -297,7 +297,7 @@ self: super: {
297297 assert isNull sha256;
298298 builtins.fetchGit
299299 ({ inherit url rev; } //
300− self.buildPackages.lib.optionalAttrs (ref != null) { inherit ref; }
300+ final.buildPackages.lib.optionalAttrs (ref != null) { inherit ref; }
301301 )
302302 else
303303 # Non-private repos must have sha256 set.
@@ -305,7 +305,7 @@ self: super: {
305305 # pkgs.fetchgit doesn't have any way of fetching from a given
306306 # ref.
307307 assert isNull ref;
308− self.buildPackages.pkgs.fetchgit {
308+ final.buildPackages.pkgs.fetchgit {
309309 url = url;
310310 rev = rev;
311311 sha256 = sha256;
@@ -318,20 +318,20 @@ self: super: {
318318 nix-expr =
319319 if type == "cabal"
320320 then
321− self.buildPackages.haskell-nix.callCabalToNix {
321+ final.buildPackages.haskell-nix.callCabalToNix {
322322 src = repoWithSubdir;
323323 inherit name cabal-file;
324324 }
325325 else if type == "stack"
326326 then
327− (self.buildPackages.haskell-nix.callStackToNix {
327+ (final.buildPackages.haskell-nix.callStackToNix {
328328 src = repoWithSubdir;
329329 inherit name subdir;
330330 }).projectNix
331331 else
332332 throw "Unknown type '${type}` for a cache entry";
333333
334− sha256String = if isNull sha256 then self.buildPackages.lib.fakeSha256 else sha256;
334+ sha256String = if isNull sha256 then final.buildPackages.lib.fakeSha256 else sha256;
335335
336336 in {
337337 line = "${url} ${rev} ${subdir} ${sha256String} ${name}";
@@ -347,24 +347,24 @@ self: super: {
347347 # the results of `stack-to-nix` can be imported in restrected eval
348348 # mode.
349349 mkCacheFile = repos:
350− self.buildPackages.pkgs.runCommand "cache-file" {} ''
350+ final.buildPackages.pkgs.runCommand "cache-file" {} ''
351351 mkdir -p $out
352352 touch $out/.stack-to-nix.cache
353− ${self.lib.concatStrings (
354− self.lib.lists.zipListsWith (n: repo:
353+ ${final.lib.concatStrings (
354+ final.lib.lists.zipListsWith (n: repo:
355355 let l = mkCacheLine repo;
356356 in ''
357357 cp ${l.nix-expr} $out/.stack-to-nix.cache.${toString n}
358358 echo ${l.line} .stack-to-nix.cache.${toString n} >> $out/.stack-to-nix.cache
359359 '')
360− (self.lib.lists.range 0 ((builtins.length repos) - 1))
360+ (final.lib.lists.range 0 ((builtins.length repos) - 1))
361361 repos)
362362 }
363363 '';
364364
365365 genStackCache = import ../lib/stack-cache-generator.nix {
366− inherit (self.buildPackages) pkgs;
367− inherit (self.buildPackages.haskell-nix) haskellLib nix-tools;
366+ inherit (final.buildPackages) pkgs;
367+ inherit (final.buildPackages.haskell-nix) haskellLib nix-tools;
368368 };
369369
370370 mkCacheModule = cache:
@@ -391,11 +391,11 @@ self: super: {
391391 then
392392 builtins.fetchGit
393393 ({ inherit url rev; } //
394− self.buildPackages.lib.optionalAttrs (ref != null) { inherit ref; }
394+ final.buildPackages.lib.optionalAttrs (ref != null) { inherit ref; }
395395 )
396396 else
397− self.buildPackages.pkgs.fetchgit { inherit url rev sha256; };
398− } // self.buildPackages.lib.optionalAttrs (subdir != null) { postUnpack = "sourceRoot+=/${subdir}; echo source root reset to $sourceRoot"; };
397+ final.buildPackages.pkgs.fetchgit { inherit url rev sha256; };
398+ } // final.buildPackages.lib.optionalAttrs (subdir != null) { postUnpack = "sourceRoot+=/${subdir}; echo source root reset to $sourceRoot"; };
399399 };
400400
401401 cacheMap = builtins.map repoToAttr cache;
@@ -408,23 +408,23 @@ self: super: {
408408 # Resulting nix files are added to nix-plan subdirectory.
409409 callCabalProjectToNix = import ../lib/call-cabal-project-to-nix.nix {
410410 index-state-hashes = import indexStateHashesPath;
411− inherit (self.buildPackages.haskell-nix) dotCabal nix-tools haskellLib materialize;
412− pkgs = self.buildPackages.pkgs;
413− inherit (self.buildPackages.haskell-nix.haskellPackages.hpack.components.exes) hpack;
414− inherit (self.buildPackages.haskell-nix) cabal-install ghc;
415− inherit (self.buildPackages.pkgs) runCommand symlinkJoin cacert;
411+ inherit (final.buildPackages.haskell-nix) dotCabal nix-tools haskellLib materialize;
412+ pkgs = final.buildPackages.pkgs;
413+ inherit (final.buildPackages.haskell-nix.haskellPackages.hpack.components.exes) hpack;
414+ inherit (final.buildPackages.haskell-nix) cabal-install ghc;
415+ inherit (final.buildPackages.pkgs) runCommand symlinkJoin cacert;
416416 };
417417
418418 # Loads a plan and filters the package directories using cleanSourceWith
419419 importAndFilterProject = import ../lib/import-and-filter-project.nix {
420− inherit (self.buildPackages.haskell-nix) haskellLib;
421− pkgs = self.buildPackages.pkgs;
420+ inherit (final.buildPackages.haskell-nix) haskellLib;
421+ pkgs = final.buildPackages.pkgs;
422422 };
423423
424424 # References to the unpacked sources, for caching in a Hydra jobset.
425425 source-pins = import ../lib/make-source-pins.nix {
426− inherit (self) lib writeTextFile;
427− sources = [ hackageSrc stackageSrc self.path ];
426+ inherit (final) lib writeTextFile;
427+ sources = [ hackageSrc stackageSrc final.path ];
428428 };
429429
430430 # -- IFDs --
@@ -440,17 +440,17 @@ self: super: {
440440 { name
441441 , version
442442 , ... }@args:
443− let tarball = self.pkgs.fetchurl {
443+ let tarball = final.pkgs.fetchurl {
444444 url = "mirror://hackage/${name}-${version}.tar.gz";
445445 inherit (hackage.${name}.${version}) sha256; };
446− in let src = self.buildPackages.pkgs.runCommand "${name}-${version}-src" { } ''
446+ in let src = final.buildPackages.pkgs.runCommand "${name}-${version}-src" { } ''
447447 tmp=$(mktemp -d)
448448 cd $tmp
449449 tar xzf ${tarball}
450450 mv "${name}-${version}" $out
451451 '';
452452 in cabalProject' (
453− (self.haskell-nix.hackageQuirks { inherit name version; }) //
453+ (final.haskell-nix.hackageQuirks { inherit name version; }) //
454454 builtins.removeAttrs args [ "version" ] // { inherit src; });
455455
456456 # This function is like `cabalProject` but it makes the plan-nix available
@@ -463,7 +463,7 @@ self: super: {
463463 { plan-pkgs = plan.pkgs;
464464 pkg-def-extras = args.pkg-def-extras or [];
465465 modules = (args.modules or [])
466− ++ self.lib.optional (args ? ghc) { ghc.package = args.ghc; };
466+ ++ final.lib.optional (args ? ghc) { ghc.package = args.ghc; };
467467 extra-hackages = args.extra-hackages or [];
468468 };
469469 in { inherit (pkg-set.config) hsPkgs; inherit pkg-set; plan-nix = plan.nix; };
@@ -487,9 +487,9 @@ self: super: {
487487 in let pkg-set = mkStackPkgSet
488488 { stack-pkgs = stack.pkgs;
489489 pkg-def-extras = (args.pkg-def-extras or []);
490− modules = self.lib.singleton (mkCacheModule cache)
490+ modules = final.lib.singleton (mkCacheModule cache)
491491 ++ (args.modules or [])
492− ++ self.lib.optional (args ? ghc) { ghc.package = args.ghc; };
492+ ++ final.lib.optional (args ? ghc) { ghc.package = args.ghc; };
493493 };
494494 in { inherit (pkg-set.config) hsPkgs; inherit pkg-set; stack-nix = stack.nix; };
495495
@@ -504,7 +504,7 @@ self: super: {
504504 # Like `cabalProject'`, but for building the GHCJS compiler.
505505 # This is exposed to allow GHCJS developers to work on the GHCJS
506506 # code in a nix-shell with `shellFor`.
507− ghcjsProject = import ../lib/ghcjs-project.nix { pkgs = self; };
507+ ghcjsProject = import ../lib/ghcjs-project.nix { pkgs = final; };
508508
509509 # The functions that return a plan-nix often have a lot of dependencies
510510 # that could be GCed and also will not make it into hydra cache.
@@ -513,47 +513,47 @@ self: super: {
513513 # project = cabalProject' {...};
514514 # In your tests module add something that is effectively
515515 # testProjectPlan = withInputs project.plan-nix;
516− withInputs = self.recurseIntoAttrs;
516+ withInputs = final.recurseIntoAttrs;
517517
518518 # Add this to your tests to make all the dependencies of haskell.nix
519519 # are tested and cached.
520− haskellNixRoots = self.recurseIntoAttrs {
520+ haskellNixRoots = final.recurseIntoAttrs {
521521 Level0 = haskellNixRoots' 0;
522522 Level1 = haskellNixRoots' 1;
523523 };
524524
525525 haskellNixRoots' = ifdLevel:
526− let filterSupportedGhc = self.lib.filterAttrs (n: _: n == "ghc865" || n == "ghc883");
527− in self.recurseIntoAttrs ({
526+ let filterSupportedGhc = final.lib.filterAttrs (n: _: n == "ghc865" || n == "ghc883");
527+ in final.recurseIntoAttrs ({
528528 # Things that require no IFD to build
529− inherit (self.buildPackages.haskell-nix) nix-tools source-pins;
530− bootstap-nix-tools = self.buildPackages.haskell-nix.bootstrap.packages.nix-tools;
531− alex-plan-nix = withInputs self.buildPackages.haskell-nix.bootstrap.packages.alex-project.plan-nix;
532− happy-plan-nix = withInputs self.buildPackages.haskell-nix.bootstrap.packages.happy-project.plan-nix;
533− hscolour-plan-nix = withInputs self.buildPackages.haskell-nix.bootstrap.packages.hscolour-project.plan-nix;
534− } // self.lib.optionalAttrs (ifdLevel > 0) {
529+ inherit (final.buildPackages.haskell-nix) nix-tools source-pins;
530+ bootstap-nix-tools = final.buildPackages.haskell-nix.bootstrap.packages.nix-tools;
531+ alex-plan-nix = withInputs final.buildPackages.haskell-nix.bootstrap.packages.alex-project.plan-nix;
532+ happy-plan-nix = withInputs final.buildPackages.haskell-nix.bootstrap.packages.happy-project.plan-nix;
533+ hscolour-plan-nix = withInputs final.buildPackages.haskell-nix.bootstrap.packages.hscolour-project.plan-nix;
534+ } // final.lib.optionalAttrs (ifdLevel > 0) {
535535 # Things that require one IFD to build (the inputs should be in level 0)
536− alex = self.buildPackages.haskell-nix.bootstrap.packages.alex;
537− happy = self.buildPackages.haskell-nix.bootstrap.packages.happy;
538− hscolour = self.buildPackages.haskell-nix.bootstrap.packages.hscolour;
539− ghc865 = self.buildPackages.haskell-nix.compiler.ghc865;
540− ghc883 = self.buildPackages.haskell-nix.compiler.ghc883;
541− ghc-boot-packages-nix = self.recurseIntoAttrs
542− (builtins.mapAttrs (_: self.recurseIntoAttrs)
543− (filterSupportedGhc self.ghc-boot-packages-nix));
544− ghc-extra-projects = self.recurseIntoAttrs (builtins.mapAttrs (_: proj: withInputs proj.plan-nix)
545− (filterSupportedGhc self.ghc-extra-projects));
546− } // self.lib.optionalAttrs (ifdLevel > 1) {
536+ alex = final.buildPackages.haskell-nix.bootstrap.packages.alex;
537+ happy = final.buildPackages.haskell-nix.bootstrap.packages.happy;
538+ hscolour = final.buildPackages.haskell-nix.bootstrap.packages.hscolour;
539+ ghc865 = final.buildPackages.haskell-nix.compiler.ghc865;
540+ ghc883 = final.buildPackages.haskell-nix.compiler.ghc883;
541+ ghc-boot-packages-nix = final.recurseIntoAttrs
542+ (builtins.mapAttrs (_: final.recurseIntoAttrs)
543+ (filterSupportedGhc final.ghc-boot-packages-nix));
544+ ghc-extra-projects = final.recurseIntoAttrs (builtins.mapAttrs (_: proj: withInputs proj.plan-nix)
545+ (filterSupportedGhc final.ghc-extra-projects));
546+ } // final.lib.optionalAttrs (ifdLevel > 1) {
547547 # Things that require two levels of IFD to build (inputs should be in level 1)
548− inherit (self.haskell-nix) nix-tools;
548+ inherit (final.haskell-nix) nix-tools;
549549 # These seem to be the only things we use from `ghc-extra-packages`
550− # in haskell.nix itself.
551− iserv-proxy = self.recurseIntoAttrs
550+ # in haskell.nix itfinal.
551+ iserv-proxy = final.recurseIntoAttrs
552552 (builtins.mapAttrs (_: pkgs: pkgs.iserv-proxy.components.exes.iserv-proxy)
553− (filterSupportedGhc self.ghc-extra-packages));
554− remote-iserv = self.recurseIntoAttrs
553+ (filterSupportedGhc final.ghc-extra-packages));
554+ remote-iserv = final.recurseIntoAttrs
555555 (builtins.mapAttrs (_: pkgs: pkgs.remote-iserv.components.exes.remote-iserv)
556− (filterSupportedGhc self.ghc-extra-packages));
556+ (filterSupportedGhc final.ghc-extra-packages));
557557 });
558558 };
559559}
overlays/musl.nix+3−3
@@ -1,10 +1,10 @@
1−self: super: super.lib.optionalAttrs super.stdenv.hostPlatform.isMusl {
1+final: prev: prev.lib.optionalAttrs prev.stdenv.hostPlatform.isMusl {
22 # On nixpkgs 19.09 openssl is configured as `linux-generic64` instead
33 # of `linux-x86_64` and as a result the `asm` parts of of openssl
44 # are not built. Because the `no_asm` configure flag is also not passed
55 # the c versions of the functions are also not included.
6− openssl = super.openssl.overrideAttrs (attrs:
7− super.lib.optionalAttrs super.stdenv.hostPlatform.isx86_64 {
6+ openssl = prev.openssl.overrideAttrs (attrs:
7+ prev.lib.optionalAttrs prev.stdenv.hostPlatform.isx86_64 {
88 configureScript = "./Configure linux-x86_64";
99 });
1010}
overlays/python.nix+4−4
@@ -1,8 +1,8 @@
1−(self: super: {
1+(final: prev: {
22 # See nixpkgs#51135
3− python37 = super.python37.override {
4− packageOverrides = python-self: python-super: {
5− docutils = python-super.docutils.overrideAttrs (oldAttrs: {
3+ python37 = prev.python37.override {
4+ packageOverrides = python-final: python-prev: {
5+ docutils = python-prev.docutils.overrideAttrs (oldAttrs: {
66 LC_CTYPE = "en_US.UTF-8";
77 LANG = "en_US.UTF-8";
88 });
overlays/tools.nix+15−15
@@ -31,11 +31,11 @@
3131# ghc = haskell-nix.compiler.ghc883;
3232# }
3333#
34−self: super:
34+final: prev:
3535let
36− inherit (self) lib;
36+ inherit (final) lib;
3737
38−in { haskell-nix = super.haskell-nix // {
38+in { haskell-nix = prev.haskell-nix // {
3939
4040 # Some times the package name in hackage is not the same as tool name.
4141 toolPackageName = {
@@ -43,37 +43,37 @@ in { haskell-nix = super.haskell-nix // {
4343 };
4444
4545 hackage-tool = { name, ... }@args:
46− (self.haskell-nix.hackage-package
47− (args // { name = self.haskell-nix.toolPackageName."${name}" or name; }))
46+ (final.haskell-nix.hackage-package
47+ (args // { name = final.haskell-nix.toolPackageName."${name}" or name; }))
4848 .components.exes."${name}";
4949
5050 tool = name: versionOrArgs:
5151 let
52− args = self.haskell-nix.haskellLib.versionOrArgsToArgs versionOrArgs;
52+ args = final.haskell-nix.haskellLib.versionOrArgsToArgs versionOrArgs;
5353 in
54− (if self.haskell-nix.custom-tools ? "${name}"
55− && self.haskell-nix.custom-tools."${name}" ? "${args.version}"
56− then self.haskell-nix.custom-tools."${name}"."${args.version}"
57− else self.haskell-nix.hackage-tool) (args // { inherit name; });
54+ (if final.haskell-nix.custom-tools ? "${name}"
55+ && final.haskell-nix.custom-tools."${name}" ? "${args.version}"
56+ then final.haskell-nix.custom-tools."${name}"."${args.version}"
57+ else final.haskell-nix.hackage-tool) (args // { inherit name; });
5858
59− tools = lib.mapAttrs self.haskell-nix.tool;
59+ tools = lib.mapAttrs final.haskell-nix.tool;
6060
6161 # Like `tools` but allows default ghc to be specified
6262 toolsForGhc = ghc: toolSet:
63− self.haskell-nix.tools (
63+ final.haskell-nix.tools (
6464 lib.mapAttrs (name: versionOrArgs:
6565 # Add default ghc if not specified in the args
6666 { inherit ghc; }
67− // self.haskell-nix.haskellLib.versionOrArgsToArgs versionOrArgs
67+ // final.haskell-nix.haskellLib.versionOrArgsToArgs versionOrArgs
6868 ) toolSet
6969 );
7070
7171 # Tools not in hackage yet
7272 custom-tools = {
7373 ghcide.object-code = args:
74− (self.haskell-nix.cabalProject (args // {
74+ (final.haskell-nix.cabalProject (args // {
7575 name = "ghcide";
76− src = self.fetchFromGitHub {
76+ src = final.fetchFromGitHub {
7777 owner = "mpickering";
7878 repo = "ghcide";
7979 rev = "706c59c97c25c66798815c1dc3ee6885a298918a";
overlays/windows.nix+11−11
@@ -2,30 +2,30 @@
22# conditionals need to be in the leafs! If we attach the conditional to the root
33# node (e.g. the whole customization here), they will be evaluated at the wrong time
44# and not end up with the expected changes we want.
5−self: super:
5+final: prev:
66{
77 # on windows we have this habit of putting libraries
88 # into `bin`, wheras on unix it's usually `lib`. For
99 # this confuses nix easily. So we'll just move the
1010 # .dll's from `bin` into `$out/lib`. Such that they
1111 # are trivially found.
12− # openssl = super.openssl.overrideAttrs (drv: {
13− # # postInstall = with super.stdenv; drv.postInstall + lib.optionalString hostPlatform.isWindows ''
12+ # openssl = prev.openssl.overrideAttrs (drv: {
13+ # # postInstall = with prev.stdenv; drv.postInstall + lib.optionalString hostPlatform.isWindows ''
1414 # # cp $bin/bin/*.dll $out/lib/
1515 # # '';
1616 # postFixup = "";
1717 # });
1818
19− mfpr = super.mfpr.overrideAttrs (drv: {
20− configureFlags = (drv.configureFlags or []) ++ super.stdenv.lib.optional super.stdenv.hostPlatform.isWindows "--enable-static --disable-shared" ;
19+ mfpr = prev.mfpr.overrideAttrs (drv: {
20+ configureFlags = (drv.configureFlags or []) ++ prev.stdenv.lib.optional prev.stdenv.hostPlatform.isWindows "--enable-static --disable-shared" ;
2121 });
2222
23− libmpc = super.libmpc.overrideAttrs (drv: {
24− configureFlags = (drv.configureFlags or []) ++ super.stdenv.lib.optional super.stdenv.hostPlatform.isWindows "--enable-static --disable-shared" ;
23+ libmpc = prev.libmpc.overrideAttrs (drv: {
24+ configureFlags = (drv.configureFlags or []) ++ prev.stdenv.lib.optional prev.stdenv.hostPlatform.isWindows "--enable-static --disable-shared" ;
2525 });
2626
27− haskell-nix = super.haskell-nix // ({
28− defaultModules = super.haskell-nix.defaultModules ++ [
27+ haskell-nix = prev.haskell-nix // ({
28+ defaultModules = prev.haskell-nix.defaultModules ++ [
2929 ({ pkgs, buildModules, config, lib, ... }:
3030 let
3131 withTH = import ./mingw_w64.nix {
@@ -37,10 +37,10 @@ self: super:
3737 inherit (pkgs.buildPackages) symlinkJoin;
3838 # iserv-proxy needs to come from the buildPackages, as it needs to run on the
3939 # build host.
40− inherit (self.buildPackages.ghc-extra-packages."${config.compiler.nix-name}".iserv-proxy.components.exes) iserv-proxy;
40+ inherit (final.buildPackages.ghc-extra-packages."${config.compiler.nix-name}".iserv-proxy.components.exes) iserv-proxy;
4141 # remote-iserv however needs to come from the regular packages as it has to
4242 # run on the target host.
43− inherit (self.ghc-extra-packages."${config.compiler.nix-name}".remote-iserv.components.exes) remote-iserv;
43+ inherit (final.ghc-extra-packages."${config.compiler.nix-name}".remote-iserv.components.exes) remote-iserv;
4444 # we need to use openssl.bin here, because the .dll's are in the .bin expression.
4545 # extra-test-libs = [ pkgs.rocksdb pkgs.openssl.bin pkgs.libffi pkgs.gmp ];
4646 } // {
overlays/wine.nix+4−4
@@ -1,13 +1,13 @@
11# fix wine at 3.0.2; the 4.x branch breaks windows cross compilation.
22# this will inevitably replace *any* wine version. Thus this might not
33# really be what we ultimately want.
4−self: super:
4+final: prev:
55{
6− winePackages = super.winePackages // {
7− minimal = super.winePackages.minimal.overrideAttrs (oldAttrs: {
6+ winePackages = prev.winePackages // {
7+ minimal = prev.winePackages.minimal.overrideAttrs (oldAttrs: {
88 name = "wine-3.21";
99 version = "3.21";
10− src = super.fetchurl {
10+ src = prev.fetchurl {
1111 url = "https://dl.winehq.org/wine/source/3.x/wine-3.21.tar.xz";
1212 sha256 = "1h70wb7kysbzv36i3fblyiihvalwhy6sj4s2a8nf21nz2mhc0k58"; };
1313 });