@@ -2,8 +2,8 @@
3# for hygenic reasons we'll use haskell-nix as a prefix.
3# for hygenic reasons we'll use haskell-nix as a prefix.
4# Using haskell.nix in nix is awkward as I needs to be quoted.
4# Using haskell.nix in nix is awkward as I needs to be quoted.
5−self: super: {
5+final: prev: {
6− haskell-nix = with self.haskell-nix; {
6+ haskell-nix = with final.haskell-nix; {
8 # Default modules, these will always be included.
8 # Default modules, these will always be included.
9 # They are here to be overridden/added to by other
9 # They are here to be overridden/added to by other
@@ -13,7 +13,7 @@ self: super: {
13 # We provide a `callPackage` function to consumers for
13 # We provide a `callPackage` function to consumers for
14 # convenience. We will however refrain from using it
14 # convenience. We will however refrain from using it
15 # here and be explicit about imports and dependencies.
15 # 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);
18 # You can provide different pins for hackage.nix and stackage.nix if required.
18 # You can provide different pins for hackage.nix and stackage.nix if required.
19 # It's also possible to override these sources with NIX_PATH.
19 # It's also possible to override these sources with NIX_PATH.
@@ -32,7 +32,7 @@ self: super: {
32 fetchExternal = import ../lib/fetch-external.nix;
32 fetchExternal = import ../lib/fetch-external.nix;
34 # Functions for cleaning Haskell source directories.
34 # 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; })
36 haskellSourceFilter
36 haskellSourceFilter
37 cleanSourceHaskell;
37 cleanSourceHaskell;
@@ -59,8 +59,8 @@ self: super: {
60 # Utility functions for working with the component builder.
60 # Utility functions for working with the component builder.
61 haskellLib = let hl = import ../lib {
61 haskellLib = let hl = import ../lib {
62− inherit (self) stdenv lib runCommand recurseIntoAttrs srcOnly;
62+ inherit (final) stdenv lib runCommand recurseIntoAttrs srcOnly;
63− inherit (self.buildPackages) git;
63+ inherit (final.buildPackages) git;
64 haskellLib = hl;
64 haskellLib = hl;
@@ -80,7 +80,7 @@ self: super: {
80 import ../package-set.nix {
80 import ../package-set.nix {
81 inherit (args) pkg-def pkg-def-extras;
81 inherit (args) pkg-def pkg-def-extras;
82 modules = defaultModules ++ modules;
82 modules = defaultModules ++ modules;
83− pkgs = self;
83+ pkgs = final;
84 hackage = hackageAll;
84 hackage = hackageAll;
@@ -89,10 +89,10 @@ self: super: {
89 # info. Instead we can add ghc-boot-packages to `pkg-def-extras`.
89 # info. Instead we can add ghc-boot-packages to `pkg-def-extras`.
90 excludeBootPackages = pkg-def: hackage:
90 excludeBootPackages = pkg-def: hackage:
91 let original = pkg-def hackage;
91 let original = pkg-def hackage;
92− bootPkgNames = self.lib.attrNames
92+ bootPkgNames = final.lib.attrNames
93− self.ghc-boot-packages.${(pkg-def hackage).compiler.nix-name};
93+ final.ghc-boot-packages.${(pkg-def hackage).compiler.nix-name};
94 in original // {
94 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)
96 original.packages;
96 original.packages;
@@ -119,7 +119,7 @@ self: super: {
119 in mkPkgSet {
119 in mkPkgSet {
120 pkg-def = excludeBootPackages pkg-def;
120 pkg-def = excludeBootPackages pkg-def;
121 pkg-def-extras = [ stack-pkgs.extras
121 pkg-def-extras = [ stack-pkgs.extras
122− self.ghc-boot-packages.${compiler.nix-name}
122+ final.ghc-boot-packages.${compiler.nix-name}
124 ++ pkg-def-extras;
124 ++ pkg-def-extras;
125 # set doExactConfig = true. The stackage set should be consistent
125 # set doExactConfig = true. The stackage set should be consistent
@@ -145,7 +145,7 @@ self: super: {
145 in mkPkgSet {
145 in mkPkgSet {
146 inherit pkg-def;
146 inherit pkg-def;
147 pkg-def-extras = [ plan-pkgs.extras
147 pkg-def-extras = [ plan-pkgs.extras
148− self.ghc-boot-packages.${compiler.nix-name}
148+ final.ghc-boot-packages.${compiler.nix-name}
150 ++ pkg-def-extras;
150 ++ pkg-def-extras;
151 # set doExactConfig = true, as we trust cabals resolution for
151 # set doExactConfig = true, as we trust cabals resolution for
@@ -157,7 +157,7 @@ self: super: {
159 # Package sets for all stackage snapshots.
159 # 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; };
161 # Pick a recent LTS snapshot to be our "default" package set.
161 # Pick a recent LTS snapshot to be our "default" package set.
162 haskellPackages = snapshots."lts-14.13";
162 haskellPackages = snapshots."lts-14.13";
@@ -165,26 +165,26 @@ self: super: {
165 # files. This version of nix-tools may be cross compiled.
165 # files. This version of nix-tools may be cross compiled.
166 # We probably never want to actually cross compile nix-tools on
166 # We probably never want to actually cross compile nix-tools on
167 # it's own.
167 # it's own.
168− nix-tools-cross-compiled = self.lib.makeOverridable (import ../nix-tools) {
168+ nix-tools-cross-compiled = final.lib.makeOverridable (import ../nix-tools) {
169− inherit (self) pkgs lib symlinkJoin makeWrapper
169+ inherit (final) pkgs lib symlinkJoin makeWrapper
170 git nix nix-prefetch-git;
170 git nix nix-prefetch-git;
171− inherit (self.haskell-nix) fetchExternal cleanSourceHaskell mkCabalProjectPkgSet;
171+ inherit (final.haskell-nix) fetchExternal cleanSourceHaskell mkCabalProjectPkgSet;
172 hpack = null; # nix-tools does not use hpack project files
172 hpack = null; # nix-tools does not use hpack project files
174 # While `nix-tools-cross-compiled` may be cross compiled,
174 # While `nix-tools-cross-compiled` may be cross compiled,
175 # getting it from `buildPackages` we should get
175 # getting it from `buildPackages` we should get
176 # nix-tools suitable for running on the build system.
176 # 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;
178 # TODO perhaps there is a cleaner way to get a suitable nix-tools.
178 # TODO perhaps there is a cleaner way to get a suitable nix-tools.
180 # Produce a fixed output derivation from a moving target (hackage index tarball)
180 # Produce a fixed output derivation from a moving target (hackage index tarball)
181 # Takes desired index-state and sha256 and produces a set { name, index }, where
181 # Takes desired index-state and sha256 and produces a set { name, index }, where
182 # index points to "01-index.tar.gz" file downloaded from hackage.haskell.org.
182 # 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, ... }:
184 assert sha256 != null;
184 assert sha256 != null;
185 let at = builtins.replaceStrings [":"] [""] index-state; in
185 let at = builtins.replaceStrings [":"] [""] index-state; in
186 { name = "hackage.haskell.org-at-${at}";
186 { name = "hackage.haskell.org-at-${at}";
187− index = self.fetchurl {
187+ index = final.fetchurl {
188 name = "01-index.tar.gz-at-${at}";
188 name = "01-index.tar.gz-at-${at}";
189 url = "https://hackage.haskell.org/01-index.tar.gz";
189 url = "https://hackage.haskell.org/01-index.tar.gz";
190 downloadToTemp = true;
190 downloadToTemp = true;
@@ -196,20 +196,20 @@ self: super: {
198 # Creates Cabal local repository from { name, index } set.
198 # Creates Cabal local repository from { name, index } set.
199− mkLocalHackageRepo = import ../mk-local-hackage-repo self;
199+ mkLocalHackageRepo = import ../mk-local-hackage-repo final;
201 dotCabal = { index-state, sha256, cabal-install, extra-hackage-tarballs ? [], ... }@args:
201 dotCabal = { index-state, sha256, cabal-install, extra-hackage-tarballs ? [], ... }@args:
203 allTarballs = [ (hackageTarball args) ] ++ extra-hackage-tarballs;
203 allTarballs = [ (hackageTarball args) ] ++ extra-hackage-tarballs;
204− allNames = self.lib.concatMapStringsSep "-" (tarball: tarball.name) allTarballs;
204+ allNames = final.lib.concatMapStringsSep "-" (tarball: tarball.name) allTarballs;
205 # Main Hackage index-state is embedded in its name and thus will propagate to
205 # Main Hackage index-state is embedded in its name and thus will propagate to
206 # dotCabalName anyway.
206 # dotCabalName anyway.
207 dotCabalName = "dot-cabal-" + allNames;
207 dotCabalName = "dot-cabal-" + allNames;
209− self.runCommand dotCabalName { nativeBuildInputs = [ cabal-install ]; } ''
209+ final.runCommand dotCabalName { nativeBuildInputs = [ cabal-install ]; } ''
210 mkdir -p $out/.cabal
210 mkdir -p $out/.cabal
211 cat <<EOF > $out/.cabal/config
211 cat <<EOF > $out/.cabal/config
212− ${self.lib.concatStrings (
212+ ${final.lib.concatStrings (
213 map (tarball:
213 map (tarball:
215 repository ${tarball.name}
215 repository ${tarball.name}
@@ -224,11 +224,11 @@ self: super: {
225 # All repositories must be mkdir'ed before calling new-update on any repo,
225 # All repositories must be mkdir'ed before calling new-update on any repo,
226 # otherwise it fails.
226 # otherwise it fails.
227− ${self.lib.concatStrings (map ({ name, ... }: ''
227+ ${final.lib.concatStrings (map ({ name, ... }: ''
228 mkdir -p $out/.cabal/packages/${name}
228 mkdir -p $out/.cabal/packages/${name}
229 '') allTarballs)}
229 '') allTarballs)}
231− ${self.lib.concatStrings (map ({ name, ... }: ''
231+ ${final.lib.concatStrings (map ({ name, ... }: ''
232 HOME=$out cabal new-update ${name}
232 HOME=$out cabal new-update ${name}
233 '') allTarballs)}
233 '') allTarballs)}
@@ -245,31 +245,31 @@ self: super: {
246 # Helps materialize the output of derivations
246 # Helps materialize the output of derivations
247 materialize = import ../lib/materialize.nix {
247 materialize = import ../lib/materialize.nix {
248− inherit (self.buildPackages) nix;
248+ inherit (final.buildPackages) nix;
249− inherit (self.haskell-nix) checkMaterialization;
249+ inherit (final.haskell-nix) checkMaterialization;
250− pkgs = self.buildPackages.pkgs;
250+ pkgs = final.buildPackages.pkgs;
251− inherit (self.buildPackages.pkgs) runCommand;
251+ inherit (final.buildPackages.pkgs) runCommand;
254 update-index-state-hashes = import ../scripts/update-index-state-hashes.nix {
254 update-index-state-hashes = import ../scripts/update-index-state-hashes.nix {
255− inherit (self.haskell-nix) indexStateHashesPath nix-tools;
255+ inherit (final.haskell-nix) indexStateHashesPath nix-tools;
256− inherit (self) coreutils nix writeShellScriptBin stdenv curl;
256+ inherit (final) coreutils nix writeShellScriptBin stdenv curl;
259 # Function to call stackToNix
259 # Function to call stackToNix
260 callStackToNix = import ../lib/call-stack-to-nix.nix {
260 callStackToNix = import ../lib/call-stack-to-nix.nix {
261− pkgs = self.buildPackages.pkgs;
261+ pkgs = final.buildPackages.pkgs;
262− inherit (self.buildPackages.pkgs) runCommand;
262+ inherit (final.buildPackages.pkgs) runCommand;
263− inherit (self.buildPackages.haskell-nix) nix-tools mkCacheFile materialize;
263+ inherit (final.buildPackages.haskell-nix) nix-tools mkCacheFile materialize;
266 # given a source location call `cabal-to-nix` (from nix-tools) on it
266 # given a source location call `cabal-to-nix` (from nix-tools) on it
267 # to produce the nix representation of it.
267 # to produce the nix representation of it.
268 callCabalToNix = { name, src, cabal-file ? "${name}.cabal" }:
268 callCabalToNix = { name, src, cabal-file ? "${name}.cabal" }:
269− self.buildPackages.pkgs.runCommand "${name}.nix" {
269+ final.buildPackages.pkgs.runCommand "${name}.nix" {
270− nativeBuildInputs = [ self.buildPackages.haskell-nix.nix-tools ];
270+ nativeBuildInputs = [ final.buildPackages.haskell-nix.nix-tools ];
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";
273 LANG = "en_US.UTF-8";
273 LANG = "en_US.UTF-8";
274 LC_ALL = "en_US.UTF-8";
274 LC_ALL = "en_US.UTF-8";
@@ -297,7 +297,7 @@ self: super: {
297 assert isNull sha256;
297 assert isNull sha256;
298 builtins.fetchGit
298 builtins.fetchGit
299 ({ inherit url rev; } //
299 ({ inherit url rev; } //
300− self.buildPackages.lib.optionalAttrs (ref != null) { inherit ref; }
300+ final.buildPackages.lib.optionalAttrs (ref != null) { inherit ref; }
303 # Non-private repos must have sha256 set.
303 # Non-private repos must have sha256 set.
@@ -305,7 +305,7 @@ self: super: {
305 # pkgs.fetchgit doesn't have any way of fetching from a given
305 # pkgs.fetchgit doesn't have any way of fetching from a given
307 assert isNull ref;
307 assert isNull ref;
308− self.buildPackages.pkgs.fetchgit {
308+ final.buildPackages.pkgs.fetchgit {
309 url = url;
309 url = url;
310 rev = rev;
310 rev = rev;
311 sha256 = sha256;
311 sha256 = sha256;
@@ -318,20 +318,20 @@ self: super: {
318 nix-expr =
318 nix-expr =
319 if type == "cabal"
319 if type == "cabal"
321− self.buildPackages.haskell-nix.callCabalToNix {
321+ final.buildPackages.haskell-nix.callCabalToNix {
322 src = repoWithSubdir;
322 src = repoWithSubdir;
323 inherit name cabal-file;
323 inherit name cabal-file;
325 else if type == "stack"
325 else if type == "stack"
327− (self.buildPackages.haskell-nix.callStackToNix {
327+ (final.buildPackages.haskell-nix.callStackToNix {
328 src = repoWithSubdir;
328 src = repoWithSubdir;
329 inherit name subdir;
329 inherit name subdir;
330 }).projectNix
330 }).projectNix
332 throw "Unknown type '${type}` for a cache entry";
332 throw "Unknown type '${type}` for a cache entry";
334− sha256String = if isNull sha256 then self.buildPackages.lib.fakeSha256 else sha256;
334+ sha256String = if isNull sha256 then final.buildPackages.lib.fakeSha256 else sha256;
337 line = "${url} ${rev} ${subdir} ${sha256String} ${name}";
337 line = "${url} ${rev} ${subdir} ${sha256String} ${name}";
@@ -347,24 +347,24 @@ self: super: {
347 # the results of `stack-to-nix` can be imported in restrected eval
347 # the results of `stack-to-nix` can be imported in restrected eval
349 mkCacheFile = repos:
349 mkCacheFile = repos:
350− self.buildPackages.pkgs.runCommand "cache-file" {} ''
350+ final.buildPackages.pkgs.runCommand "cache-file" {} ''
351 mkdir -p $out
351 mkdir -p $out
352 touch $out/.stack-to-nix.cache
352 touch $out/.stack-to-nix.cache
353− ${self.lib.concatStrings (
353+ ${final.lib.concatStrings (
354− self.lib.lists.zipListsWith (n: repo:
354+ final.lib.lists.zipListsWith (n: repo:
355 let l = mkCacheLine repo;
355 let l = mkCacheLine repo;
357 cp ${l.nix-expr} $out/.stack-to-nix.cache.${toString n}
357 cp ${l.nix-expr} $out/.stack-to-nix.cache.${toString n}
358 echo ${l.line} .stack-to-nix.cache.${toString n} >> $out/.stack-to-nix.cache
358 echo ${l.line} .stack-to-nix.cache.${toString n} >> $out/.stack-to-nix.cache
360− (self.lib.lists.range 0 ((builtins.length repos) - 1))
360+ (final.lib.lists.range 0 ((builtins.length repos) - 1))
365 genStackCache = import ../lib/stack-cache-generator.nix {
365 genStackCache = import ../lib/stack-cache-generator.nix {
366− inherit (self.buildPackages) pkgs;
366+ inherit (final.buildPackages) pkgs;
367− inherit (self.buildPackages.haskell-nix) haskellLib nix-tools;
367+ inherit (final.buildPackages.haskell-nix) haskellLib nix-tools;
370 mkCacheModule = cache:
370 mkCacheModule = cache:
@@ -391,11 +391,11 @@ self: super: {
392 builtins.fetchGit
392 builtins.fetchGit
393 ({ inherit url rev; } //
393 ({ inherit url rev; } //
394− self.buildPackages.lib.optionalAttrs (ref != null) { inherit ref; }
394+ final.buildPackages.lib.optionalAttrs (ref != null) { inherit ref; }
397− self.buildPackages.pkgs.fetchgit { inherit url rev sha256; };
397+ final.buildPackages.pkgs.fetchgit { inherit url rev sha256; };
398− } // self.buildPackages.lib.optionalAttrs (subdir != null) { postUnpack = "sourceRoot+=/${subdir}; echo source root reset to $sourceRoot"; };
398+ } // final.buildPackages.lib.optionalAttrs (subdir != null) { postUnpack = "sourceRoot+=/${subdir}; echo source root reset to $sourceRoot"; };
401 cacheMap = builtins.map repoToAttr cache;
401 cacheMap = builtins.map repoToAttr cache;
@@ -408,23 +408,23 @@ self: super: {
408 # Resulting nix files are added to nix-plan subdirectory.
408 # Resulting nix files are added to nix-plan subdirectory.
409 callCabalProjectToNix = import ../lib/call-cabal-project-to-nix.nix {
409 callCabalProjectToNix = import ../lib/call-cabal-project-to-nix.nix {
410 index-state-hashes = import indexStateHashesPath;
410 index-state-hashes = import indexStateHashesPath;
411− inherit (self.buildPackages.haskell-nix) dotCabal nix-tools haskellLib materialize;
411+ inherit (final.buildPackages.haskell-nix) dotCabal nix-tools haskellLib materialize;
412− pkgs = self.buildPackages.pkgs;
412+ pkgs = final.buildPackages.pkgs;
413− inherit (self.buildPackages.haskell-nix.haskellPackages.hpack.components.exes) hpack;
413+ inherit (final.buildPackages.haskell-nix.haskellPackages.hpack.components.exes) hpack;
414− inherit (self.buildPackages.haskell-nix) cabal-install ghc;
414+ inherit (final.buildPackages.haskell-nix) cabal-install ghc;
415− inherit (self.buildPackages.pkgs) runCommand symlinkJoin cacert;
415+ inherit (final.buildPackages.pkgs) runCommand symlinkJoin cacert;
418 # Loads a plan and filters the package directories using cleanSourceWith
418 # Loads a plan and filters the package directories using cleanSourceWith
419 importAndFilterProject = import ../lib/import-and-filter-project.nix {
419 importAndFilterProject = import ../lib/import-and-filter-project.nix {
420− inherit (self.buildPackages.haskell-nix) haskellLib;
420+ inherit (final.buildPackages.haskell-nix) haskellLib;
421− pkgs = self.buildPackages.pkgs;
421+ pkgs = final.buildPackages.pkgs;
424 # References to the unpacked sources, for caching in a Hydra jobset.
424 # References to the unpacked sources, for caching in a Hydra jobset.
425 source-pins = import ../lib/make-source-pins.nix {
425 source-pins = import ../lib/make-source-pins.nix {
426− inherit (self) lib writeTextFile;
426+ inherit (final) lib writeTextFile;
427− sources = [ hackageSrc stackageSrc self.path ];
427+ sources = [ hackageSrc stackageSrc final.path ];
430 # -- IFDs --
430 # -- IFDs --
@@ -440,17 +440,17 @@ self: super: {
441 , version
441 , version
442 , ... }@args:
442 , ... }@args:
443− let tarball = self.pkgs.fetchurl {
443+ let tarball = final.pkgs.fetchurl {
444 url = "mirror://hackage/${name}-${version}.tar.gz";
444 url = "mirror://hackage/${name}-${version}.tar.gz";
445 inherit (hackage.${name}.${version}) sha256; };
445 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" { } ''
447 tmp=$(mktemp -d)
447 tmp=$(mktemp -d)
449 tar xzf ${tarball}
449 tar xzf ${tarball}
450 mv "${name}-${version}" $out
450 mv "${name}-${version}" $out
452 in cabalProject' (
452 in cabalProject' (
453− (self.haskell-nix.hackageQuirks { inherit name version; }) //
453+ (final.haskell-nix.hackageQuirks { inherit name version; }) //
454 builtins.removeAttrs args [ "version" ] // { inherit src; });
454 builtins.removeAttrs args [ "version" ] // { inherit src; });
456 # This function is like `cabalProject` but it makes the plan-nix available
456 # This function is like `cabalProject` but it makes the plan-nix available
@@ -463,7 +463,7 @@ self: super: {
463 { plan-pkgs = plan.pkgs;
463 { plan-pkgs = plan.pkgs;
464 pkg-def-extras = args.pkg-def-extras or [];
464 pkg-def-extras = args.pkg-def-extras or [];
465 modules = (args.modules or [])
465 modules = (args.modules or [])
466− ++ self.lib.optional (args ? ghc) { ghc.package = args.ghc; };
466+ ++ final.lib.optional (args ? ghc) { ghc.package = args.ghc; };
467 extra-hackages = args.extra-hackages or [];
467 extra-hackages = args.extra-hackages or [];
469 in { inherit (pkg-set.config) hsPkgs; inherit pkg-set; plan-nix = plan.nix; };
469 in { inherit (pkg-set.config) hsPkgs; inherit pkg-set; plan-nix = plan.nix; };
@@ -487,9 +487,9 @@ self: super: {
487 in let pkg-set = mkStackPkgSet
487 in let pkg-set = mkStackPkgSet
488 { stack-pkgs = stack.pkgs;
488 { stack-pkgs = stack.pkgs;
489 pkg-def-extras = (args.pkg-def-extras or []);
489 pkg-def-extras = (args.pkg-def-extras or []);
490− modules = self.lib.singleton (mkCacheModule cache)
490+ modules = final.lib.singleton (mkCacheModule cache)
491 ++ (args.modules or [])
491 ++ (args.modules or [])
492− ++ self.lib.optional (args ? ghc) { ghc.package = args.ghc; };
492+ ++ final.lib.optional (args ? ghc) { ghc.package = args.ghc; };
494 in { inherit (pkg-set.config) hsPkgs; inherit pkg-set; stack-nix = stack.nix; };
494 in { inherit (pkg-set.config) hsPkgs; inherit pkg-set; stack-nix = stack.nix; };
@@ -504,7 +504,7 @@ self: super: {
504 # Like `cabalProject'`, but for building the GHCJS compiler.
504 # Like `cabalProject'`, but for building the GHCJS compiler.
505 # This is exposed to allow GHCJS developers to work on the GHCJS
505 # This is exposed to allow GHCJS developers to work on the GHCJS
506 # code in a nix-shell with `shellFor`.
506 # 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; };
509 # The functions that return a plan-nix often have a lot of dependencies
509 # The functions that return a plan-nix often have a lot of dependencies
510 # that could be GCed and also will not make it into hydra cache.
510 # that could be GCed and also will not make it into hydra cache.
@@ -513,47 +513,47 @@ self: super: {
513 # project = cabalProject' {...};
513 # project = cabalProject' {...};
514 # In your tests module add something that is effectively
514 # In your tests module add something that is effectively
515 # testProjectPlan = withInputs project.plan-nix;
515 # testProjectPlan = withInputs project.plan-nix;
516− withInputs = self.recurseIntoAttrs;
516+ withInputs = final.recurseIntoAttrs;
518 # Add this to your tests to make all the dependencies of haskell.nix
518 # Add this to your tests to make all the dependencies of haskell.nix
519 # are tested and cached.
519 # are tested and cached.
520− haskellNixRoots = self.recurseIntoAttrs {
520+ haskellNixRoots = final.recurseIntoAttrs {
521 Level0 = haskellNixRoots' 0;
521 Level0 = haskellNixRoots' 0;
522 Level1 = haskellNixRoots' 1;
522 Level1 = haskellNixRoots' 1;
525 haskellNixRoots' = ifdLevel:
525 haskellNixRoots' = ifdLevel:
526− let filterSupportedGhc = self.lib.filterAttrs (n: _: n == "ghc865" || n == "ghc883");
526+ let filterSupportedGhc = final.lib.filterAttrs (n: _: n == "ghc865" || n == "ghc883");
527− in self.recurseIntoAttrs ({
527+ in final.recurseIntoAttrs ({
528 # Things that require no IFD to build
528 # Things that require no IFD to build
529− inherit (self.buildPackages.haskell-nix) nix-tools source-pins;
529+ inherit (final.buildPackages.haskell-nix) nix-tools source-pins;
530− bootstap-nix-tools = self.buildPackages.haskell-nix.bootstrap.packages.nix-tools;
530+ bootstap-nix-tools = final.buildPackages.haskell-nix.bootstrap.packages.nix-tools;
531− alex-plan-nix = withInputs self.buildPackages.haskell-nix.bootstrap.packages.alex-project.plan-nix;
531+ alex-plan-nix = withInputs final.buildPackages.haskell-nix.bootstrap.packages.alex-project.plan-nix;
532− happy-plan-nix = withInputs self.buildPackages.haskell-nix.bootstrap.packages.happy-project.plan-nix;
532+ happy-plan-nix = withInputs final.buildPackages.haskell-nix.bootstrap.packages.happy-project.plan-nix;
533− hscolour-plan-nix = withInputs self.buildPackages.haskell-nix.bootstrap.packages.hscolour-project.plan-nix;
533+ hscolour-plan-nix = withInputs final.buildPackages.haskell-nix.bootstrap.packages.hscolour-project.plan-nix;
534− } // self.lib.optionalAttrs (ifdLevel > 0) {
534+ } // final.lib.optionalAttrs (ifdLevel > 0) {
535 # Things that require one IFD to build (the inputs should be in level 0)
535 # Things that require one IFD to build (the inputs should be in level 0)
536− alex = self.buildPackages.haskell-nix.bootstrap.packages.alex;
536+ alex = final.buildPackages.haskell-nix.bootstrap.packages.alex;
537− happy = self.buildPackages.haskell-nix.bootstrap.packages.happy;
537+ happy = final.buildPackages.haskell-nix.bootstrap.packages.happy;
538− hscolour = self.buildPackages.haskell-nix.bootstrap.packages.hscolour;
538+ hscolour = final.buildPackages.haskell-nix.bootstrap.packages.hscolour;
539− ghc865 = self.buildPackages.haskell-nix.compiler.ghc865;
539+ ghc865 = final.buildPackages.haskell-nix.compiler.ghc865;
540− ghc883 = self.buildPackages.haskell-nix.compiler.ghc883;
540+ ghc883 = final.buildPackages.haskell-nix.compiler.ghc883;
541− ghc-boot-packages-nix = self.recurseIntoAttrs
541+ ghc-boot-packages-nix = final.recurseIntoAttrs
542− (builtins.mapAttrs (_: self.recurseIntoAttrs)
542+ (builtins.mapAttrs (_: final.recurseIntoAttrs)
543− (filterSupportedGhc self.ghc-boot-packages-nix));
543+ (filterSupportedGhc final.ghc-boot-packages-nix));
544− ghc-extra-projects = self.recurseIntoAttrs (builtins.mapAttrs (_: proj: withInputs proj.plan-nix)
544+ ghc-extra-projects = final.recurseIntoAttrs (builtins.mapAttrs (_: proj: withInputs proj.plan-nix)
545− (filterSupportedGhc self.ghc-extra-projects));
545+ (filterSupportedGhc final.ghc-extra-projects));
546− } // self.lib.optionalAttrs (ifdLevel > 1) {
546+ } // final.lib.optionalAttrs (ifdLevel > 1) {
547 # Things that require two levels of IFD to build (inputs should be in level 1)
547 # 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;
549 # These seem to be the only things we use from `ghc-extra-packages`
549 # These seem to be the only things we use from `ghc-extra-packages`
550− # in haskell.nix itself.
550+ # in haskell.nix itfinal.
551− iserv-proxy = self.recurseIntoAttrs
551+ iserv-proxy = final.recurseIntoAttrs
552 (builtins.mapAttrs (_: pkgs: pkgs.iserv-proxy.components.exes.iserv-proxy)
552 (builtins.mapAttrs (_: pkgs: pkgs.iserv-proxy.components.exes.iserv-proxy)
553− (filterSupportedGhc self.ghc-extra-packages));
553+ (filterSupportedGhc final.ghc-extra-packages));
554− remote-iserv = self.recurseIntoAttrs
554+ remote-iserv = final.recurseIntoAttrs
555 (builtins.mapAttrs (_: pkgs: pkgs.remote-iserv.components.exes.remote-iserv)
555 (builtins.mapAttrs (_: pkgs: pkgs.remote-iserv.components.exes.remote-iserv)
556− (filterSupportedGhc self.ghc-extra-packages));
556+ (filterSupportedGhc final.ghc-extra-packages));