on iko/ghcjs-patch-master help sign in
Spelling, typo and whitespace fixes (#833)

* Spelling and typo fixes in doc and code comments * Trailing whitespace or whitespace only truncation * readTheDocs formatting corrections

commit09526c85558417de609ced98460392460b025b98 authorJohn A. Lotoski <39752197+johnalotoski@users.noreply.github.com> dateSun 30 Aug 2020, 19:08 (6 years ago) parentb35e9c7
67 files changed+189−184
builder/comp-builder.nix+3−3 builder/default.nix+2−2 builder/haddock-builder.nix+1−1 builder/make-config-files.nix+7−7 changelog.md+2−2 ci.nix+2−2 compiler/ghc/configured-src.nix+2−2 compiler/ghc/default.nix+8−8 compiler/ghcjs/ghcjs.nix+2−2 docs/adding-new-ghc.md+2−2 docs/architecture.md+1−1 docs/dev/dev-architecture.md+1−1 docs/dev/installing-nix-tools.md+2 docs/dev/manually-generating-nix-expressions.md+1−1 docs/motivation.md+2−2 docs/troubleshooting.md+2−2 docs/tutorials/building-package-from-stackage-hackage.md+2−2 docs/tutorials/clean-git.md+2−2 docs/tutorials/development.md+5−3 docs/tutorials/hackage-stackage.md+2−2 docs/tutorials/materialization.md+5−5 docs/tutorials/pkg-map.md+3−2 docs/tutorials/source-repository-hashes.md+1−1 lib/cabal-project-parser.nix+1−1 lib/call-cabal-project-to-nix.nix+5−5 lib/clean-cabal-component.nix+2−2 lib/clean-source-haskell.nix+1−1 lib/clean-source-with.nix+3−3 lib/default.nix+1−1 lib/fetch-resolver.nix+1−1 lib/import-and-filter-project.nix+1−1 lib/stack-cache-generator.nix+2−2 lib/system-nixpkgs-map.nix+2−2 mk-local-hackage-repo/default.nix+2−2 modules/cabal.nix+1−1 modules/component-driver.nix+2−2 modules/configuration-nix.nix+1−1 modules/hackage.nix+1−1 modules/package.nix+1−1 modules/plan.nix+3−3 nix-tools/regenerate.nix+2−2 overlays/armv6l-linux.nix+4−4 overlays/bootstrap.nix+4−4 overlays/default.nix+1−1 overlays/emscripten/default.nix+1−1 overlays/hackage-quirks.nix+3−3 overlays/haskell.nix+7−7 overlays/linux-cross.nix+1−1 overlays/musl.nix+1−1 overlays/windows.nix+5−5 package-set.nix+2−2 release.nix+2−2 scripts/check-closure-size.nix+1−1 scripts/options-doc.nix+1−1 scripts/update-index-state-hashes.nix+6−6 test/buildable/default.nix+1−1 test/builder-haddock/.plan.nix/test-haddock.nix+7−7 test/builder-haddock/test-haddock.nix+6−6 test/extra-hackage/default.nix+4−4 test/extra-hackage/hackage/hackage/external-package-demo-0.1.0.0-r0-3230db0813f2b468afb3ff7d8bbfcf570019a7faa4a0f59b2ea96743932105e7.nix+7−7 test/lookup-sha256/default.nix+1−1 test/regen.nix+2−2 test/shell-for-setup-deps/default.nix+2−2 test/shell-for/.plan.nix/pkga.nix+7−7 test/shell-for/.plan.nix/pkgb.nix+7−7 test/stack-simple/stack-simple.nix+7−7 test/with-packages/.plan.nix/test-with-packages.nix+7−7
builder/comp-builder.nix+3−3
@@ -246,7 +246,7 @@ let
246246 # Not sure why pkgconfig needs to be propagatedBuildInputs but
247247 # for gi-gtk-hs it seems to help.
248248 ++ builtins.concatLists pkgconfig;
249−
249+
250250 buildInputs = component.libs
251251 ++ map (d: d.components.library or d) component.depends;
252252
@@ -284,7 +284,7 @@ let
284284 # Note: Cabal does *not* copy test executables during the `install` phase.
285285 #
286286 # Note 2: if a package contains multiple libs (lib + sublibs) SETUP register will generate a
287− # folder isntead of a file for the configuration. Therfore if the result is a folder,
287+ # folder instead of a file for the configuration. Therefore if the result is a folder,
288288 # we need to register each and every element of that folder.
289289 #
290290 # Note 3: if a package has no libs SETUP will not generate anything. This can
@@ -342,7 +342,7 @@ let
342342 ''}
343343 fi
344344 '')
345− # In case `setup copy` did not creat this
345+ # In case `setup copy` did not create this
346346 + (lib.optionalString enableSeparateDataOutput "mkdir -p $data")
347347 + (lib.optionalString (stdenv.hostPlatform.isWindows && (haskellLib.mayHaveExecutable componentId)) ''
348348 echo "Symlink libffi and gmp .dlls ..."
builder/default.nix+2−2
@@ -14,8 +14,8 @@ let
1414 ghc = (ghc.passthru.buildGHC or ghc);
1515 hsPkgs = hsPkgs.buildPackages;
1616 # We need to use the buildPackages stdenv to build the setup-builder.
17− # in the native case, it would be the same in the corss case however
18− # re *really* want to build the Setup.hs on the build machine and not
17+ # in the native case, it would be the same in the cross case however
18+ # we *really* want to build the Setup.hs on the build machine and not
1919 # have the stdenv confuse it with the target/host env.
2020 inherit (buildPackages) stdenv;
2121 inherit buildPackages pkgconfig;
builder/haddock-builder.nix+1−1
@@ -74,7 +74,7 @@ let
7474 ++ lib.optional doHaddock' "doc";
7575
7676 propagatedBuildInputs = builtins.concatLists pkgconfig;
77−
77+
7878 buildInputs = component.libs
7979 ++ map (d: d.components.library.haddock or d) component.depends;
8080
builder/make-config-files.nix+7−7
@@ -10,18 +10,18 @@ let
1010
1111 target-pkg = "${ghc.targetPrefix}ghc-pkg";
1212
13− # This is a bit of a hack. So we'll have a slightly longer explaination here:
13+ # This is a bit of a hack. So we'll have a slightly longer explanation here:
1414
1515 # Every library component built with `comp-builder.nix` includes an `exactDep`
1616 # and `envDep` directory with precomputed values used here.
1717 # GHC derivations include `exactDep` and `envDep` directories that have
1818 # the same information for each of the built in packages.
1919
20− # exactDep will pass --exact-configuration to the `SETUP_HS confiugre` command.
20+ # exactDep will pass --exact-configuration to the `SETUP_HS configure` command.
2121 # This requires us to pass --dependency={dep name}={pkg id}. The dependency
2222 # name will usually be the name of the package `p`, which we can locate in the
2323 # package-db, passed in via `pdbArg`. Thus querying the package-db for the
24− # id field for package `p`, will unsually provide is with the right value. Sublibs
24+ # id field for package `p`, will usually provide us with the right value. Sublibs
2525 # need a bit of special handling:
2626 #
2727 # - Sublibs: if the dependency is a sublibrary of a package, we need to use
@@ -136,15 +136,15 @@ in
136136 cat $ghc/exactDeps/$p/configure-flags >> $out/configure-flags
137137 cat $ghc/exactDeps/$p/cabal.config >> $out/cabal.config
138138 fi
139− done
139+ done
140140 ''
141141 # This code originates in the `generic-builder.nix` from nixpkgs. However GHC has been fixed
142− # to drop unused libraries referneced from libraries; and this patch is usually included in the
143− # nixpkgs's GHC builds. This doesn't sadly make this stupid hack unnecessary. It resurfes in
142+ # to drop unused libraries referenced from libraries; and this patch is usually included in the
143+ # nixpkgs's GHC builds. This doesn't sadly make this stupid hack unnecessary. It resurfaces in
144144 # the form of Cabal trying to be smart. Cabal when linking a library figures out that you likely
145145 # need those `rpath` entries, and passes `-optl-Wl,-rpath,...` for each dynamic library path to
146146 # GHC, thus subverting the linker and forcing it to insert all those RPATHs weather or not they
147− # are needed. We therfore reuse the linker hack here to move all al dynamic lirbaries into a
147+ # are needed. We therefore reuse the linker hack here to move all dynamic libraries into a
148148 # common folder (as links) and thus prevent Cabal from going nuts.
149149 #
150150 # TODO: Fix Cabal.
changelog.md+2−2
@@ -4,7 +4,7 @@ that will impact users.
44## July 21, 2020
55* Removed `components.all`, use `symlinkJoin` on components.exes or
66 `shellFor` if you need a shell.
7−* Added `components` arguemnt to `shellFor`.
7+* Added `components` argument to `shellFor`.
88
99## July 21, 2020
1010* Added GHC 8.8.4 and replaced 8.8.3 in tests and as the ghc
@@ -31,7 +31,7 @@ that will impact users.
3131 `p.tool "alex" "3.2.5"` or `shellFor { tools = { alex = "3.2.5"; } }`.
3232* `haskell-nix.nix-tools` -> `haskell-nix.nix-tools.ghc883` (it includes
3333 the hpack exe now).
34−* `haskell-nix.cabal-install` ->
34+* `haskell-nix.cabal-install` ->
3535 `p.tool "cabal" "3.2.0.0"` or `shellFor { tools = { cabal = "3.2.0.0"; } }`
3636* `haskell-nix.haskellNixRoots` -> `haskell-nix.roots ghc883` or `p.roots`
3737
ci.nix+2−2
@@ -1,5 +1,5 @@
1−# 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluting
2−# on a machine with e.g. no way to build the Darwin IFDs you need!
1+# 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluating
2+# on a machine with e.g. no way to build the Darwin IFDs you need!
33{ supportedSystems ? [ "x86_64-linux" "x86_64-darwin" ]
44, ifdLevel ? 3
55# Whether or not we are evaluating in restricted mode. This is true in Hydra, but not in Hercules.
compiler/ghc/configured-src.nix+2−2
@@ -19,7 +19,7 @@ stdenv.mkDerivation (rec {
1919 patches = ghc-patches;
2020 name = "${targetPrefix}ghc-${ghc-version}-configured-src";
2121
22− # Make sure we never relax`$PATH` and hooks support for compatability.
22+ # Make sure we never relax`$PATH` and hooks support for compatibility.
2323 strictDeps = true;
2424
2525 nativeBuildInputs = [
@@ -111,4 +111,4 @@ stdenv.mkDerivation (rec {
111111 ++ stdenv.lib.optional (ghc-patches != []) "autoreconfPhase"
112112 ++ [ "configurePhase" "installPhase" ];
113113 installPhase = "cp -r . $out";
114−})
114+})
compiler/ghc/default.nix+8−8
@@ -19,7 +19,7 @@
1919 libffi ? null
2020
2121, useLLVM ? !stdenv.targetPlatform.isx86
22−, # LLVM is conceptually a run-time-only depedendency, but for
22+, # LLVM is conceptually a run-time-only dependency, but for
2323 # non-x86, we need LLVM to bootstrap later stages, so it becomes a
2424 # build-time dependency too.
2525 buildLlvmPackages, llvmPackages
@@ -37,7 +37,7 @@
3737
3838, enableLibraryProfiling ? true
3939
40−, # Whetherto build terminfo. Musl fails to build terminfo as ncurses seems to be linked to glibc
40+, # Whether to build terminfo. Musl fails to build terminfo as ncurses seems to be linked to glibc
4141 enableTerminfo ? !stdenv.targetPlatform.isWindows && !stdenv.targetPlatform.isMusl
4242
4343, # What flavour to build. An empty string indicates no
@@ -68,7 +68,7 @@ let
6868
6969 inherit (bootPkgs) ghc;
7070
71− # TODO check if this posible fix for segfaults works or not.
71+ # TODO check if this possible fix for segfaults works or not.
7272 targetLibffi =
7373 # on native platforms targetPlatform.{libffi, gmp} do not exist; thus fall back
7474 # to the non-targetPlatform version in those cases.
@@ -174,8 +174,8 @@ stdenv.mkDerivation (rec {
174174 "distPhase"
175175 ];
176176
177− # ghc hardcodes the TOP dir durcing config, this breaks when
178− # splitting the configured src from the the build process.
177+ # ghc hardcodes the TOP dir during config, this breaks when
178+ # splitting the configured src from the build process.
179179 postUnpack = ''
180180 (cd $sourceRoot
181181 TOP=$(cat mk/config.mk|grep ^TOP|awk -F\ '{ print $3 }')
@@ -202,7 +202,7 @@ stdenv.mkDerivation (rec {
202202
203203 outputs = [ "out" "doc" "generated" ];
204204
205− # Make sure we never relax`$PATH` and hooks support for compatability.
205+ # Make sure we never relax`$PATH` and hooks support for compatibility.
206206 strictDeps = true;
207207
208208 # Don’t add -liconv to LDFLAGS automatically so that GHC will add it itself.
@@ -311,7 +311,7 @@ stdenv.mkDerivation (rec {
311311
312312 configured-src = configured-src;
313313
314− # Used to detect non haskell-nix compilers (accedental use of nixpkgs compilers can lead to unexpected errors)
314+ # Used to detect non haskell-nix compilers (accidental use of nixpkgs compilers can lead to unexpected errors)
315315 isHaskellNixCompiler = true;
316316 } // extra-passthru;
317317
@@ -326,4 +326,4 @@ stdenv.mkDerivation (rec {
326326 dontStrip = true;
327327 dontPatchELF = true;
328328 noAuditTmpdir = true;
329−})
329+})
compiler/ghcjs/ghcjs.nix+2−2
@@ -40,7 +40,7 @@ let
4040 passthru = {
4141 inherit all-ghcjs;
4242 inherit (project) configured-src;
43− # Used to detect non haskell-nix compilers (accedental use of nixpkgs compilers can lead to unexpected errors)
43+ # Used to detect non haskell-nix compilers (accidental use of nixpkgs compilers can lead to unexpected errors)
4444 isHaskellNixCompiler = true;
4545 } // ghcjs.components.exes;
4646 dontConfigure = true;
@@ -65,4 +65,4 @@ let
6565 # https://github.com/ghcjs/ghcjs/issues/654
6666 # enableParallelBuilding = true;
6767 };
68−in booted-ghcjs
68+in booted-ghcjs
docs/adding-new-ghc.md+2−2
@@ -2,7 +2,7 @@
22
33## Update `overlays/bootstrap.nix`
44
5−Each ghc version is defined in this file. Duplicate one of the exising
5+Each ghc version is defined in this file. Duplicate one of the existing
66ghc version definitions and replace the version numbers. Make sure
77you update the `spec.sha256` or the other versions source will be used.
88Check the LLVM version that should be used in the
@@ -27,7 +27,7 @@ The `nix-build` command will fail with something like:
2727Materialized nix used for dummy-data-x86_64-unknown-linux-musl-ghc-8.10.1 incorrect. To fix run: /nix/store/wnwpyrhv4nxgyljz3f20gdpspjxvm7h4-updateMaterialized
2828```
2929
30−Run the `updateMaterialized` script and repat the `nix-build` until it no longer fails.
30+Run the `updateMaterialized` script and repeat the `nix-build` until it no longer fails.
3131If the failure is not a problem with materialization and no `updateMaterialized` script
3232is provided then you may need to fix the failure another way or (if it only relates to
3333one of the cross compilers) modify `scripts/check-compiler-materialization/default.nix`
docs/architecture.md+1−1
@@ -61,7 +61,7 @@ of packages available on hackage.
6161[stackage.nix][] is similar to hackage.nix but provides all stackage
6262snapshots (lts, and nightly) as nix expressions. It naturally depends
6363on hackage.nix to resolve package names, versions and revisions to the
64−repsective packages from hackage.nix.
64+respective packages from hackage.nix.
6565
6666[haskell.nix]: https://github.com/input-output-hk/haskell.nix
6767[hackage.nix]: https://github.com/input-output-hk/hackage.nix
docs/dev/dev-architecture.md+1−1
@@ -77,7 +77,7 @@ nixpkgs (*This has undergone substantially less testing*).
7777
7878### Component builder
7979
80−To prevent depending on mutliple instances of the same libraries, the
80+To prevent depending on multiple instances of the same libraries, the
8181component builder will try to build every package from scratch and
8282rely as little as possible on packages that are shipped with the GHC
8383distribution. The exceptions are packages that are known to not be
docs/dev/installing-nix-tools.md+2
@@ -24,3 +24,5 @@ git clone https://github.com/input-output-hk/haskell.nix
2424cd haskell.nix
2525nix build -f . pkgs.haskell-nix.nix-tools.ghc884 --arg sourcesOverride '{ nix-tools = ../nix-tools; }' --out-link nt
2626```
27+
28+[haskell.nix]: https://github.com/input-output-hk/haskell.nix
docs/dev/manually-generating-nix-expressions.md+1−1
@@ -1,7 +1,7 @@
11# Manually generating Nix expressions
22
33We believe that imports from derivations (IFDs) provide tremendous
4−value in nix and the aversion towards them stems mostly from
4+value in nix and the aversion towards them stems mostly from
55poor tooling and ci support for them. We do not believe
66that poor tooling or ci support should cripple nix capability
77of abstraction. Hence haskell.nix makes excessive use of
docs/motivation.md+2−2
@@ -1,9 +1,9 @@
11# Motivation
22
3−Why do we need another Haskell infrastructure for Nix?
3+Why do we need another Haskell infrastructure for Nix?
44
55Doesn't nixpkgs
6−provide a sufficiently good Haskell infrastructure already?
6+provide a sufficiently good Haskell infrastructure already?
77
88Problems with
99the nixpkgs haskell infrastructure are covered in the following sections:
docs/troubleshooting.md+2−2
@@ -29,7 +29,7 @@ Make sure you are using the same compiler for the cabal build as for the `haskel
2929
3030(Cabal users only. For stack users, package versions come from the snapshot, so stack and `haskell.nix` will agree.)
3131
32−Cabal has the concept of the Hackage "index state".
32+Cabal has the concept of the Hackage "index state".
3333This is a timestamp, and it tells Cabal to behave "as if" it was seeing Hackage at that point in time.
3434Pinning it is generally good for reproducibility regardless of whether you use `haskell.nix` (you can do so in `cabal.project`).
3535
@@ -67,6 +67,6 @@ So this is expected, unfortunately.
6767### How do I prevent the evaluation-time dependencies of my project from being garbage-collected?
6868
6969The `haskell-nix.roots "ghc884"` should include all the evaluation-time dependencies
70−and the main build time dependecies of a project using ghc 8.8.3.
70+and the main build time dependencies of a project using ghc 8.8.4.
7171So you can add that to the relevant GC root.
7272In practice, if you're using a CI system like Hydra/Hercules, this means adding it to a job in `release.nix`/`ci.nix`.
docs/tutorials/building-package-from-stackage-hackage.md+2−2
@@ -20,7 +20,7 @@ you could run:
2020nix build '(with import <nixpkgs> (import (builtins.fetchTarball "https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz")).nixpkgsArgs; (haskell-nix.hackage-package { name = "lens"; version = "4.17.1"; })).components.library'
2121```
2222This would build the (public) library component of the [lens-4.17.1][] package
23−from hackage.
23+from hackage.
2424
2525### Pinning hackage index
2626
@@ -32,7 +32,7 @@ nix build '(with import <nixpkgs> (import (builtins.fetchTarball "https://github
3232```
3333This would use the hackage index as of `2019-07-14T00:00:00Z` to produce a
3434build plan for the [lens-4.17.1][] package.
35−
35+
3636[Stackage]: https://stackage.org
3737[Hackage]: https://hackage.haskell.org
3838[hackage.nix]: https://github.com/input-output-hk/hackage.nix
docs/tutorials/clean-git.md+2−2
@@ -29,7 +29,7 @@ in a change to the `.cabal` file the test will still be built the same).
2929```
3030components.tests.test.extraSrcFiles = [ "subdir-needed-by-test" ];
3131```
32−Or alternatively, override the source with a suitable filter function.
32+Or alternatively, override the source with a suitable filter function.
3333```
3434components.tests.test.src = haskell-nix.haskellLib.cleanSourceWith {
3535 inherit src;
@@ -64,7 +64,7 @@ sub directories containing git repos.
6464
6565For example if `repoA` and `repoB` are two git repos with
6666cabal packages and want to use the `repoB` package when building
67−`repoA. First we can add `../repoB` to `repoA/cabal.project`:
67+`repoA`. First we can add `../repoB` to `repoA/cabal.project`:
6868
6969```
7070packages:
docs/tutorials/development.md+5−3
@@ -146,7 +146,7 @@ get a shell with some packages.
146146Once you have a development shell, then you can begin configuring
147147Emacs to use it. The way I do it is:
148148
149−1. Run [lorri watch](https://github.com/target/lorri) to continously
149+1. Run [lorri watch](https://github.com/target/lorri) to continuously
150150 build the shell environment and maintain GC roots.
151151
1521522. Use [emacs‑direnv](https://github.com/wbolster/emacs-direnv) to
@@ -168,7 +168,7 @@ Emacs to use it. The way I do it is:
168168## Using `nix repl`
169169
170170It's sometimes useful to load [Haskell.nix][] in the REPL to explore
171−attrsets and try examples.
171+attrsets and try examples.
172172
173173```
174174# example.nix
@@ -194,8 +194,10 @@ Added 2 variables.
194194nix-repl> lib.take 5 pkgNames
195195[ "ALUT" "ANum" "Allure" "Boolean" "BoundedChan" ]
196196
197−nix-repl>
197+nix-repl>
198198```
199199
200200Now that you have `nix-tools` and are able to import [Haskell.nix][],
201201you can continue to the next chapter.
202+
203+[haskell.nix]: https://github.com/input-output-hk/haskell.nix
docs/tutorials/hackage-stackage.md+2−2
@@ -6,14 +6,14 @@ If your project depends on a Hackage package, then the `hackage.nix` revision us
66
77## Updating and pinning `hackage.nix` and `stackage.nix`
88
9−`haskell.nix` pins particular revisions of these repositories internally, both for our own usage in testing, and so that users have a sensible default when getting started.
9+`haskell.nix` pins particular revisions of these repositories internally, both for our own usage in testing, and so that users have a sensible default when getting started.
1010These revisions are updated nightly, so you can get newer revisions of `hackage.nix` and `stackage.nix` by updating your revision of `haskell.nix` itself.
1111
1212However, this exposes you to changes in `haskell.nix` which you may not want, such as changes that force compiler rebuilds, or the occasional bug.
1313Instead, you can pin `hackage.nix` and `stackage.nix` independently. For example:
1414
1515```nix
16−let
16+let
1717 # You can use a tool like `niv` to manage this boilerplate
1818 hackageSrc = builtins.fetchTarball https://github.com/input-output-hk/hackage.nix/archive/master.tar.gz;
1919 stackageSrc = builtins.fetchTarball https://github.com/input-output-hk/stackage.nix/archive/master.tar.gz;
docs/tutorials/materialization.md+5−5
@@ -4,7 +4,7 @@
44
55Capturing and storing the nix files for a project so that they do
66not need to be built (or checked). This allows us to cache the input
7−of an IFD (import from derviation).
7+of an IFD (import from derivation).
88
99## Why use materialization?
1010
@@ -32,7 +32,7 @@ dependencies of nix-tools for instance).
3232 nix files automatically.
3333* You are certain that the IFD you materialize is not `system`-dependent. If it was you'd
3434 obtain different nix expressions depending on which `system` the IFD was evaluated.
35−
35+
3636## How can we materialize the nix files?
3737
3838Lets say we want to build `hlint`. We might start with an `hlint`
@@ -150,7 +150,7 @@ store will be read only.
150150## How can we check `sha256` and `materialized` are up to date?
151151
152152Let's pretend we had to go back to `hlint` version `2.2.10`.
153−We can tell haskell.nix to check the materialiazation either by:
153+We can tell haskell.nix to check the materialization either by:
154154
155155* Removing the materialization files with `rm -rf hlint.materialized`
156156* Temporarily adding `checkMaterialization = true;`
@@ -231,13 +231,13 @@ Yes and it gives us the same speed improvement, however:
231231* It does not help at all in `restricted-eval` mode (Hydra).
232232
233233* Users will still wind up building or downloading the dependencies
234− needed to build the nix fileds (if they do not have them).
234+ needed to build the nix files (if they do not have them).
235235
236236For those reasons it might be best to make a copy instead
237237of using the `/nix/store/...` path directly.
238238
239239If you really want to use the `/nix/store/...` path directly
240−you should gaurd against the path not existing as passing in
240+you should guard against the path not existing as passing in
241241a non-existing path is now an error:
242242
243243```nix
docs/tutorials/pkg-map.md+3−2
@@ -2,8 +2,9 @@
22
33Cabal files may contain dependencies to external non-Haskell
44dependencies via:
5−* [`build-tool-depends`](https://cabal.readthedocs.io/en/latest/developing-packages.html#pkg-field-build-tool-depends)
6−* [`pkgconfig-depends`](https://cabal.readthedocs.io/en/latest/developing-packages.html#pkg-field-pkgconfig-depends).
5+
6+* [`build-tool-depends`](https://cabal.readthedocs.io/en/latest/developing-packages.html#pkg-field-build-tool-depends)
7+* [`pkgconfig-depends`](https://cabal.readthedocs.io/en/latest/developing-packages.html#pkg-field-pkgconfig-depends)
78* [`frameworks`](https://cabal.readthedocs.io/en/latest/developing-packages.html#pkg-field-frameworks)
89* [`extra-libraries`](https://cabal.readthedocs.io/en/latest/developing-packages.html#pkg-field-extra-libraries)
910
docs/tutorials/source-repository-hashes.md+1−1
@@ -5,7 +5,7 @@ to git repositories containing the version of a particular package
55that we wish to use. This is mostly handled automatically by
66`nix-tools` and `haskell.nix` however when we want to use a nix
77system that is configured to use restricted mode (typically hydra)
8−it will need an aditionaly hash.
8+it will need additional hashes for the referenced repositories.
99
1010When using `project`, `cabalProject` or `stackProject` functions
1111you can include the hash needed in a comment.
lib/cabal-project-parser.nix+1−1
@@ -65,7 +65,7 @@ let
6565 nextState (builtins.head pair) (builtins.elemAt pair 1)
6666 else
6767 if name != null
68− then nextState name s # Append another line to the current attirbute
68+ then nextState name s # Append another line to the current attribute
6969 else __trace "Expected attribute but found `${s}`" { inherit name attrs; }
7070 ) { name = null; attrs = {}; } (stripComments (unindent blockLines))).attrs;
7171
lib/call-cabal-project-to-nix.nix+5−5
@@ -18,7 +18,7 @@ in
1818, cabalProject ? readIfExists src cabalProjectFileName
1919, cabalProjectLocal ? readIfExists src "${cabalProjectFileName}.local"
2020, cabalProjectFreeze ? readIfExists src "${cabalProjectFileName}.freeze"
21−, caller ? "callCabalProjectToNix" # Name of the calling funcion for better warning messages
21+, caller ? "callCabalProjectToNix" # Name of the calling function for better warning messages
2222, ghc ? null # Deprecated in favour of `compiler-nix-name`
2323, ghcOverride ? null # Used when we need to set ghc explicitly during bootstrapping
2424, nix-tools ? evalPackages.haskell-nix.nix-tools-unchecked.${compiler-nix-name} # When building cabal projects we use the nix-tools
@@ -26,7 +26,7 @@ in
2626, configureArgs ? "" # Extra arguments to pass to `cabal v2-configure`.
2727 # `--enable-tests --enable-benchmarks` are included by default.
2828 # If the tests and benchmarks are not needed and they
29− # causes the wrong plan to be choosen, then we can use
29+ # cause the wrong plan to be chosen, then we can use
3030 # `configureArgs = "--disable-tests --disable-benchmarks";`
3131, sha256map ? null
3232 # An alternative to adding `--sha256` comments into the
@@ -153,7 +153,7 @@ let
153153 # Deal with source-repository-packages in a way that will work in
154154 # restricted-eval mode (as long as a sha256 is included).
155155 # Replace source-repository-package blocks that have a sha256 with
156− # packages: block containing nix sotre paths of the fetched repos.
156+ # packages: block containing nix store paths of the fetched repos.
157157 replaceSoureRepos = projectFile:
158158 let
159159 blocks = pkgs.lib.splitString "\nsource-repository-package\n" ("\n" + projectFile);
@@ -194,7 +194,7 @@ let
194194 }
195195 else replaceSoureRepos rawCabalProject;
196196
197− # The use of a the actual GHC can cause significant problems:
197+ # The use of the actual GHC can cause significant problems:
198198 # * For hydra to assemble a list of jobs from `components.tests` it must
199199 # first have GHC that will be used. If a patch has been applied to the
200200 # GHC to be used it must be rebuilt before the list of jobs can be assembled.
@@ -377,7 +377,7 @@ let
377377 # This creates `.cabal` directory that is as it would have
378378 # been at the time `cached-index-state`. We may include
379379 # some packages that will be excluded by `index-state-found`
380− # which is used by cabal (cached-index-state >= index-state-found).
380+ # which is used by cabal (cached-index-state >= index-state-found).
381381 dotCabal {
382382 inherit cabal-install nix-tools extra-hackage-tarballs;
383383 index-state = cached-index-state;
lib/clean-cabal-component.nix+2−2
@@ -6,7 +6,7 @@ let
66 # Transform
77 # "." -> ""
88 # "./." -> ""
9− # "./xyz" -> "xyz"
9+ # "./xyz" -> "xyz"
1010 normalizeRelativePath = rel:
1111 if rel == "." || rel == "./."
1212 then ""
@@ -86,4 +86,4 @@ in
8686 || traceReason "extra source file" (extraSrcMatch rPath)
8787 || traceReason "extra doc file" (extraDocMatch rPath)
8888 || traceReason "other source file" (lib.any (f: f == rPath) otherSourceFiles);
89− }
89+ }
lib/clean-source-haskell.nix+1−1
@@ -1,7 +1,7 @@
11# This is a source filter function which cleans common build products
22# and files not needed to do a haskell build from a source directory.
33#
4−# This can avoid unecessary builds when these files change.
4+# This can avoid unnecessary builds when these files change.
55#
66# It should be used with "pkgs.lib.cleanSourceWith". Alternatively,
77# use the convenience function "cleanSourceHaskell".
lib/clean-source-with.nix+3−3
@@ -40,7 +40,7 @@
4040 # relative references to those siblings will work.
4141 #
4242 # name: Optional name to use as part of the store path.
43− # If you do not provide a `name` it wil be derived
43+ # If you do not provide a `name` it will be derived
4444 # from the `subDir`. You should provide `name` or
4545 # `subDir`. If you do not a warning will be displayed
4646 # and the name used will be `source`.
@@ -80,7 +80,7 @@
8080 else
8181 if subDirName != ""
8282 then if src ? name
83− then src.name + "-" + subDirName
83+ then src.name + "-" + subDirName
8484 else "source-" + subDirName
8585 else if src ? name
8686 then src.name
@@ -120,4 +120,4 @@
120120 src ? _isLibCleanSourceWithEx
121121 || src ? _isLibCleanSourceWith
122122 || !(pathHasContext (toString src));
123−}
123+}
lib/default.nix+1−1
@@ -248,7 +248,7 @@ in {
248248 && stdenv.hostPlatform == stdenv.targetPlatform;
249249
250250 # Takes a version number or attr set of arguments (for cabalProject)
251− # and conversios it to an attr set of argments. This allows
251+ # and converts it to an attr set of arguments. This allows
252252 # the use of "1.0.0.0" or { version = "1.0.0.0"; ... }
253253 versionOrArgsToArgs = versionOrArgs:
254254 if lib.isAttrs versionOrArgs
lib/fetch-resolver.nix+1−1
@@ -21,7 +21,7 @@ let
2121 in
2222 pkgs.lib.lists.head (rs ++ [ null ]);
2323
24− # If we found a resolver andwe have a resolverSha256 then we should download it.
24+ # If we found a resolver and we have a resolverSha256 then we should download it.
2525 fetchedResolver =
2626 if resolver != null && resolverSha256 != null
2727 then pkgs.fetchurl {
lib/import-and-filter-project.nix+1−1
@@ -4,7 +4,7 @@
44{ pkgs, haskellLib }:
55{ projectNix, sourceRepos, src }:
66let
7− # Full source including possible relartive paths form the
7+ # Full source including possible relative paths form the
88 # project directory.
99 srcRoot =
1010 if haskellLib.canCleanSource src
lib/stack-cache-generator.nix+2−2
@@ -26,7 +26,7 @@ let
2626 inherit src stackYaml resolverSha256;
2727 }) resolver fetchedResolver;
2828
29− # Filter just the stack yaml file and any reolver yaml file it points to.
29+ # Filter just the stack yaml file and any resolver yaml file it points to.
3030 maybeCleanedSource =
3131 if haskellLib.canCleanSource src
3232 then haskellLib.cleanSourceWith {
@@ -39,7 +39,7 @@ let
3939
4040 # All repos served via ssh or git protocols are usually private
4141 private = url: pkgs.lib.substring 0 4 url != "http";
42−
42+
4343 repos = builtins.fromJSON (builtins.readFile (pkgs.runCommand "stack-repos" {
4444 buildInputs = [ nix-tools ];
4545 } ''
lib/system-nixpkgs-map.nix+2−2
@@ -1,4 +1,4 @@
1−# Maps of system pkg refenreces from
1+# Maps of system pkg references from
22# cabal file to nixpkgs pkgs.
33# See ../docs/dev/pkg-map.md
44pkgs:
@@ -94,5 +94,5 @@ pkgs:
9494 Crypt32 = null;
9595 }
9696# -- os x
97−# NB: these map almost 1:1 to the famework names
97+# NB: these map almost 1:1 to the framework names
9898// pkgs.darwin.apple_sdk.frameworks
mk-local-hackage-repo/default.nix+2−2
@@ -1,4 +1,4 @@
1−# Create a local hackare repo, we can use as a repository in a cabal config
1+# Create a local hackage repo, we can use as a repository in a cabal config
22#
33# This will include:
44# - 01-index.tar.gz (the index file)
@@ -12,7 +12,7 @@
1212#
1313# We will create a completely unsigned bare repository. Using signing keys within
1414# nix would be pointless as we'd have to hardcode them to produce the same output
15−# reproducably.
15+# reproducibly.
1616#
1717pkgs:
1818{ name, index }:
modules/cabal.nix+1−1
@@ -2,7 +2,7 @@
22
33let
44 # it also crucially depends on system, and compiler, both of which need to be resolved to the
5− # current system being targetted.
5+ # current system being targeted.
66 hostMap = import ../lib/host-map.nix pkgs.stdenv;
77 cabal = import ../lib/cabal-os-arch-comp.nix;
88
modules/component-driver.nix+2−2
@@ -9,9 +9,9 @@ let
99in
1010
1111{
12− # this has a slightly modified option type. we will *overwrite* any previous
12+ # This has a slightly modified option type. We will *overwrite* any previous
1313 # setting of nonRelocatablePkgs, instead of merging them. Otherwise you
14− # have no chance of removing packages retroacively. We might improvie this
14+ # have no chance of removing packages retroactively. We might improve this
1515 # by implementing a logic that would allow +xxx to be added, -xxx to be removed
1616 # and if it's not a list of -/+ prefixed strings, be assumed to be overwriting.
1717 # This seems ugly.
modules/configuration-nix.nix+1−1
@@ -1,6 +1,6 @@
11# This file is for configuration that should be required by every
22# package set. Hopefully we can keep configuration for particular
3−# pacakge sets out of this repo. Ideally, this file is only used for
3+# package sets out of this repo. Ideally, this file is only used for
44# fixing things that are broken due to the Nix infrastructure.
55
66{ pkgs, ... }: {
modules/hackage.nix+1−1
@@ -67,7 +67,7 @@ in {
6767 # in the nixpkgs setup, and properly override the
6868 # complier as needed.
6969 default = pkgs.buildPackages.haskell-nix.compiler.${config.compiler.nix-name} or (throw ''
70− This version of Nixpkgs does not contain GHC ${config.compiler.version}
70+ This version of Nixpkgs does not contain GHC ${config.compiler.version}
7171 (or it is not present at attribute '${config.compiler.nix-name})').
7272 Either switch to a version of Nixpkgs which does have this version, or use a version
7373 of GHC which the current version of Nixpkgs contains.
modules/package.nix+1−1
@@ -226,7 +226,7 @@ in {
226226 doExactConfig = false;
227227 # We have to set hsSourceDirs or cleanCabalComponent will
228228 # include everything (and as a result all the components of
229− # the package will depend on eveything in the package).
229+ # the package will depend on everything in the package).
230230 # TODO find a better way
231231 hsSourceDirs = ["setup-src"];
232232 includeDirs = [];
modules/plan.nix+3−3
@@ -1,5 +1,5 @@
11# The plan (that is, a package set description like an LTS set or a
2−# plan.nix (derived from plan.json)) will producde a structure that
2+# plan.nix (derived from plan.json)) will produce a structure that
33# looks like, which is stored in config.plan.pkg-def:
44#
55# { packages = { "package" = { revision = hackageConfigs.$package.$version.revisions.default;
@@ -16,9 +16,9 @@ with lib;
1616with types;
1717
1818let
19− # dealing with str is a bit annoying espectially with `nullOr str` as that apparently defaults to ""
19+ # dealing with str is a bit annoying especially with `nullOr str` as that apparently defaults to ""
2020 # instead of null :shrug:. This then messes with our option inheritance logic.
21− # Hence we have a uniqueStr type that ensures multiple identially defined options are collapsed
21+ # Hence we have a uniqueStr type that ensures multiple identically defined options are collapsed
2222 # without raising an error. And a way to fetch default options that will retain `null` if the
2323 # option is not defined or "".
2424 getDefaultOrNull = def: key: if def ? ${key} && def.${key} != "" then def.${key} else null;
nix-tools/regenerate.nix+2−2
@@ -1,6 +1,6 @@
11# Update script to update nix-tools.
22#
3−# This scipt might still come in handy, but it should now be possible to update
3+# This script might still come in handy, but it should now be possible to update
44# the nix-tools materialization without it.
55#
66# Without this script:
@@ -8,7 +8,7 @@
88# 2. run `nix-build -E '(import ./. { checkMaterialization = true; }).pkgs.haskell-nix.nix-tools'`
99# 3. If it fails apply the fixes from the log (there should be rm, cp and chmod commands)
1010#
11−# To bootstap materialization files for a new compiler (e.g. for ghc 8.8.3)
11+# To bootstrap materialization files for a new compiler (e.g. for ghc 8.8.3)
1212#
1313# nix-build -E 'let h = (import ./. {}).pkgs.haskell-nix; in h.cabal-install-tool { compiler-nix-name = "ghc884"; checkMaterialization = true; inherit (h) cabal-install nix-tools; }'
1414# nix-build -E 'let h = (import ./. {}).pkgs.haskell-nix; in h.nix-tools-set { compiler-nix-name = "ghc884"; checkMaterialization = true; inherit (h) cabal-install nix-tools; }'
overlays/armv6l-linux.nix+4−4
@@ -28,14 +28,14 @@ final: prev:
2828 ];
2929 } // {
3030 # we can perform testing of cross compiled test-suites by using wine.
31− # Therfore let's enable doCrossCheck here!
31+ # Therefore let's enable doCrossCheck here!
3232 doCrossCheck = pkgs.stdenv.hostPlatform.isWindows;
3333 };
3434 in {
3535 packages = {
36− # clock 0.7.2 needs to be patche to support cross compilation.
36+ # clock 0.7.2 needs to be patched to support cross compilation.
3737 clock.patches = pkgs.stdenv.lib.optionals pkgs.stdenv.hostPlatform.isAarch32 [ ({ version, revision }: (if version == "0.7.2" then ./patches/clock-0.7.2.patch else null)) ];
38− # nix calles this package crypto
38+ # nix calls this package crypto
3939 # cryptonite-openssl.patches = pkgs.stdenv.lib.optionals pkgs.stdenv.hostPlatform.isWindows [ ({ version, revision }: if version == "0.7" then ./patches/cryptonite-openssl-0.7.patch else null) ];
4040
4141 # http-client.patches = pkgs.stdenv.lib.optionals pkgs.stdenv.hostPlatform.isWindows [ ({ version, revision }: if version == "0.5.14" then ./patches/http-client-0.5.14.patch else null) ];
@@ -70,4 +70,4 @@ final: prev:
7070 )
7171 ];
7272 });
73−}
73+}
overlays/bootstrap.nix+4−4
@@ -69,7 +69,7 @@ in {
6969 ghc-patches = version: let
7070 # Returns true iff this derivation's version is strictly older than ver.
7171 versionLessThan = ver: builtins.compareVersions ver version == 1;
72− # Returns true iff this derivation's verion is greater than or equal to ver.
72+ # Returns true iff this derivation's version is greater than or equal to ver.
7373 versionAtLeast = ver: !versionLessThan ver;
7474 from = start: final.lib.optional (versionAtLeast start);
7575 fromUntil = start: end: final.lib.optional (versionAtLeast start && versionLessThan end);
@@ -494,7 +494,7 @@ in {
494494 # haskell-nix.cabal-install-unchecked.ghcXXX
495495 # haskell-nix.nix-tools.ghcXXX
496496 # haskell-nix.nix-tools-unchecked.ghcXXX
497− # Using these avoids unecessary calls to mkDerivation.
497+ # Using these avoids unnecessary calls to mkDerivation.
498498 # For cabal projects we match the versions used to the compiler
499499 # selected for the project to avoid the chance of a dependency
500500 # another GHC version (particularly useful on macOS where
@@ -541,7 +541,7 @@ in {
541541 # WARN: The `import ../. {}` will prevent
542542 # any cross to work, as we will loose
543543 # the `config` value.
544− # As such the folloing sadly won't work :(
544+ # As such the following sadly won't work :(
545545 # haskellPackages = with import ../. {}; {
546546 # hpack = null;
547547 # hello = (hackage-package {
@@ -601,7 +601,7 @@ in {
601601 # can turn off materialization checks when
602602 # building ghc itself (since GHC is a dependency
603603 # of the materialization check it would cause
604− # infinite recusion).
604+ # infinite recursion).
605605 alex-tool = args: tool buildBootstrapper.compilerNixName "alex" ({
606606 version = "3.2.4";
607607 inherit ghcOverride nix-tools cabal-install index-state;
overlays/default.nix+1−1
@@ -29,7 +29,7 @@ let
2929
3030 ordered = with overlays; [
3131 # Hide nixpkgs haskell and haskellPackages from the haskell-nix overlays.
32− # This should prevent us inadvertantly depending on them.
32+ # This should prevent us inadvertently depending on them.
3333 (_: prev: {
3434 haskell = { };
3535 haskellPackages = { };
overlays/emscripten/default.nix+1−1
@@ -56,7 +56,7 @@ stdenv.mkDerivation {
5656 cp $out/${appdir}/config $HOME/.emscripten
5757 export PATH=$PATH:$out/bin
5858
59− #export EMCC_DEBUG=2
59+ #export EMCC_DEBUG=2
6060 ${python}/bin/python $src/tests/runner.py test_hello_world
6161 echo "--------------- /running test -----------------"
6262 '';
overlays/hackage-quirks.nix+3−3
@@ -17,13 +17,13 @@ in { haskell-nix = prev.haskell-nix // {
1717 packages: .
1818 allow-newer: cabal-install:base
1919 '';
20− modules = [
20+ modules = [
2121 { reinstallableLibGhc = true; }
22− # Version of of cabal-install in hacakge is borken for GHC 8.10.1
22+ # Version of of cabal-install in hackage is broken for GHC 8.10.1
2323 (lib.optionalAttrs (version == "3.2.0.0") {
2424 packages.cabal-install.src = final.haskell-nix.sources.cabal-32 + "/cabal-install";
2525 })
26− ];
26+ ];
2727 };
2828
2929 hpack = {
overlays/haskell.nix+7−7
@@ -2,7 +2,7 @@
22, ... }:
33# The haskell.nix infrastructure
44#
5−# for hygenic reasons we'll use haskell-nix as a prefix.
5+# for hygienic reasons we'll use haskell-nix as a prefix.
66# Using haskell.nix in nix is awkward as I needs to be quoted.
77final: prev: {
88 haskell-nix = with final.haskell-nix; {
@@ -234,7 +234,7 @@ final: prev: {
234234 '';
235235
236236 # Some of features of haskell.nix rely on using a hackage index
237− # to calculate a build plan. To maintain stabity for caching and
237+ # to calculate a build plan. To maintain stability for caching and
238238 # to allow the outputs to be materialized we pin this value here.
239239 # If you want to update this value it important to check the
240240 # materializations. Turn `checkMaterialization` on below and
@@ -348,7 +348,7 @@ final: prev: {
348348 # stack-to-nix or plan-to-nix to prevent them
349349 # from needing network access.
350350 # The cache contains only local paths to nix files so that it can
351− # the results of `stack-to-nix` can be imported in restrected eval
351+ # the results of `stack-to-nix` can be imported in restricted eval
352352 # mode.
353353 mkCacheFile = repos:
354354 final.buildPackages.pkgs.runCommand "cache-file" {} ''
@@ -436,8 +436,8 @@ final: prev: {
436436 # from hackage. This is useful if you want to build an executable from
437437 # a given package.
438438 # NB: If no explicit index-state is provided the most recent one from
439− # the index-state-hashes is used. This guarantees reproducability wrt
440− # to the haskell.nix revision. If reproducability beyond haskell.nix
439+ # the index-state-hashes is used. This guarantees reproducibility wrt
440+ # to the haskell.nix revision. If reproducibility beyond haskell.nix
441441 # is required, a specific index-state should be provided!
442442 hackage-package =
443443 { name, compiler-nix-name, ... }@args':
@@ -567,9 +567,9 @@ final: prev: {
567567 # `projectFileName = "cabal.project";`
568568 # to let it know which to choose (or pick another name). If the
569569 # selected file ends in a `.yaml` it is assumed to be for `stackProject`.
570− # If niether `stack.yaml` nor `cabal.project` exist `cabalProject` is
570+ # If neither `stack.yaml` nor `cabal.project` exist `cabalProject` is
571571 # used (as it will use a default `cabal.project`).
572− project' = { src, projectFileName ? null, ... }@args':
572+ project' = { src, projectFileName ? null, ... }@args':
573573 let
574574 args = { caller = "project'"; } // args';
575575 dir = __readDir (src.origSrcSubDir or src);
overlays/linux-cross.nix+1−1
@@ -1,6 +1,6 @@
11let
22 # Here we try to figure out which qemu to use based on the host platform.
3− # This guess can be overriden by passing qemuSuffix
3+ # This guess can be overridden by passing qemuSuffix
44 qemuByHostPlatform = hostPlatform:
55 # I'd prefer this was a dictionary lookup, with a fall through into abort,
66 # that would make this more readable I guess. I think there is some similar
overlays/musl.nix+1−1
@@ -12,7 +12,7 @@ final: prev: prev.lib.optionalAttrs prev.stdenv.hostPlatform.isMusl ({
1212 busybox-sandbox-shell = prev.busybox-sandbox-shell.override { inherit (final) busybox; };
1313
1414 # we don't want the static output to be split. That just
15− # messes with the z -> libz mapping. We can't have a conditonal
15+ # messes with the z -> libz mapping. We can't have a conditional
1616 # z -> libz / z -> libz.static mapping without threading the
1717 # package configuration in. That seems a bit overkill.
1818 zlib = prev.zlib.override { splitStaticOutput = false; };
overlays/windows.nix+5−5
@@ -5,7 +5,7 @@
55final: prev:
66{
77 # on windows we have this habit of putting libraries
8− # into `bin`, wheras on unix it's usually `lib`. For
8+ # into `bin`, whereas 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.
@@ -45,7 +45,7 @@ final: prev:
4545 # extra-test-libs = [ pkgs.rocksdb pkgs.openssl.bin pkgs.libffi pkgs.gmp ];
4646 } // {
4747 # we can perform testing of cross compiled test-suites by using wine.
48− # Therfore let's enable doCrossCheck here!
48+ # Therefore let's enable doCrossCheck here!
4949 doCrossCheck = pkgs.stdenv.hostPlatform.isWindows;
5050 };
5151 in {
@@ -79,9 +79,9 @@ final: prev:
7979 # }
8080 # else null)) ];
8181
82− # clock 0.7.2 needs to be patche to support cross compilation.
82+ # clock 0.7.2 needs to be patched to support cross compilation.
8383 clock.patches = pkgs.stdenv.lib.optionals pkgs.stdenv.hostPlatform.isWindows [ ({ version, revision }: (if version == "0.7.2" then ./patches/clock-0.7.2.patch else null)) ];
84− # nix calles this package crypto
84+ # nix calls this package crypto
8585 cryptonite-openssl.patches = pkgs.stdenv.lib.optionals pkgs.stdenv.hostPlatform.isWindows [ ({ version, revision }: if version == "0.7" then ./patches/cryptonite-openssl-0.7.patch else null) ];
8686
8787 # this patch seems to be rather flaky and highly dependent on
@@ -126,4 +126,4 @@ final: prev:
126126 )
127127 ];
128128 });
129−}
129+}
package-set.nix+2−2
@@ -40,7 +40,7 @@ in pkgs.lib.evalModules {
4040 in let pkg-def' = strip-pkg-def pkg-def;
4141 # The desugar reason.
4242 #
43− # it is quite combersome to write
43+ # it is quite cumbersome to write
4444 # (hackage: { packages.x.revision = hackage...;
4545 # packages.y.revision = import ./foo.nix; })
4646 # where we'd rather write:
@@ -85,7 +85,7 @@ in pkgs.lib.evalModules {
8585
8686 # Error handlers
8787 ./modules/error-handler.nix
88−
88+
8989 # Supplies metadata
9090 ./modules/cabal.nix
9191
release.nix+2−2
@@ -1,5 +1,5 @@
1−# 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluting
2−# on a machine with e.g. no way to build the Darwin IFDs you need!
1+# 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluating
2+# on a machine with e.g. no way to build the Darwin IFDs you need!
33{ supportedSystems ? [ "x86_64-linux" "x86_64-darwin" ]
44, ifdLevel ? 3
55, checkMaterialization ? false }:
scripts/check-closure-size.nix+1−1
@@ -21,7 +21,7 @@ writeScript "check-closure-size.sh" ''
2121 echo "$nt"
2222
2323 total=$(awk '$2 == "total" { print $1; }' <<< "$nt")
24−
24+
2525 if [ $total -gt ${toString limitMB} ]; then
2626 echo "Closure size exceeds limit of ${toString limitMB}MB!"
2727 exit 1
scripts/options-doc.nix+1−1
@@ -39,7 +39,7 @@ let
3939 ${ if lib.hasAttr "example" value
4040 then ''
4141 **Example**:
42−
42+
4343 ${builtins.toJSON value.example}
4444 ''
4545 else "**No Example**"
scripts/update-index-state-hashes.nix+6−6
@@ -3,24 +3,24 @@ with builtins;
33with stdenv.lib;
44writeShellScriptBin "update-index-state-hashes" ''
55 export PATH="${makeBinPath [ coreutils nix-tools nix curl ]}"
6−
6+
77 # We'll take the last element from the indexStatesHashes file via nix and get the name.
88 # This is the last timestamp recorded in the file (implicit assumption: the file is
99 # ordered, and nix preserved that order when parsing it into a attributeset).
1010 start=${let ls = attrNames (import indexStateHashesPath); in elemAt ls (length ls - 1)}
11−
11+
1212 # The indexStatesHashesPath looks like
1313 # {
1414 # ...
1515 # }
1616 # Idea: take everything but drop the last line, and can then just append each new
1717 # entry and finally close the file with "}". We'll do this by echoing to STDOUT!
18−
18+
1919 # Old file without the closing curly brace.
2020 cat ${indexStateHashesPath} | head -n -1
21−
21+
2222 # Parse the $start date, and now into seconds with the date command. Then walk
23− # them by 86400 (24*60*60) days. We need to format the output with '%.f' as we
23+ # them by 86400 (24*60*60) days. We need to format the output with '%.f' as we
2424 # don't want fractional values.
2525 for d in $(seq -f '%.f' $(date -u +%s -d $start) 86400 $(date -u +%s)) ; do
2626 # turn the step date $d into a YYYY-MM-DD string, and generate the truncated
@@ -35,7 +35,7 @@ writeShellScriptBin "update-index-state-hashes" ''
3535 echo " \"''${dt}T00:00:00Z\" = \"''${sha256}\";"
3636 fi
3737 done
38−
38+
3939 # emit the final closing brace.
4040 echo '}'
4141 ''
test/buildable/default.nix+1−1
@@ -18,7 +18,7 @@ in recurseIntoAttrs {
1818 run = stdenv.mkDerivation {
1919 name = "buildable-test";
2020
21− buildCommand =
21+ buildCommand =
2222 (concatStrings (mapAttrsToList (name: value: ''
2323 printf "checking whether executable runs... " >& 2
2424 cat ${haskellLib.check value}
test/builder-haddock/.plan.nix/test-haddock.nix+7−7
@@ -2,19 +2,19 @@ let
22 buildDepError = pkg:
33 builtins.throw ''
44 The Haskell package set does not contain the package: ${pkg} (build dependency).
5−
5+
66 If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
77 '';
88 sysDepError = pkg:
99 builtins.throw ''
1010 The Nixpkgs package set does not contain the package: ${pkg} (system dependency).
11−
11+
1212 You may need to augment the system package mapping in haskell.nix so that it can be found.
1313 '';
1414 pkgConfDepError = pkg:
1515 builtins.throw ''
1616 The pkg-conf packages does not contain the package: ${pkg} (pkg-conf dependency).
17−
17+
1818 You may need to augment the pkg-conf package mapping in haskell.nix so that it can be found.
1919 '';
2020 exeDepError = pkg:
@@ -24,16 +24,16 @@ let
2424 legacyExeDepError = pkg:
2525 builtins.throw ''
2626 The Haskell package set does not contain the package: ${pkg} (executable dependency).
27−
27+
2828 If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
2929 '';
3030 buildToolDepError = pkg:
3131 builtins.throw ''
3232 Neither the Haskell package set or the Nixpkgs package set contain the package: ${pkg} (build tool dependency).
33−
33+
3434 If this is a system dependency:
3535 You may need to augment the system package mapping in haskell.nix so that it can be found.
36−
36+
3737 If this is a Haskell dependency:
3838 If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
3939 '';
@@ -63,4 +63,4 @@ in { system, compiler, flags, pkgs, hsPkgs, pkgconfPkgs, ... }:
6363 buildable = true;
6464 };
6565 };
66− } // rec { src = (pkgs.lib).mkDefault ../.; }
66+ } // rec { src = (pkgs.lib).mkDefault ../.; }
test/builder-haddock/test-haddock.nix+6−6
@@ -2,19 +2,19 @@ let
22 buildDepError = pkg:
33 builtins.throw ''
44 The Haskell package set does not contain the package: ${pkg} (build dependency).
5−
5+
66 If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
77 '';
88 sysDepError = pkg:
99 builtins.throw ''
1010 The Nixpkgs package set does not contain the package: ${pkg} (system dependency).
11−
11+
1212 You may need to augment the system package mapping in haskell.nix so that it can be found.
1313 '';
1414 pkgConfDepError = pkg:
1515 builtins.throw ''
1616 The pkg-conf packages does not contain the package: ${pkg} (pkg-conf dependency).
17−
17+
1818 You may need to augment the pkg-conf package mapping in haskell.nix so that it can be found.
1919 '';
2020 exeDepError = pkg:
@@ -24,16 +24,16 @@ let
2424 legacyExeDepError = pkg:
2525 builtins.throw ''
2626 The Haskell package set does not contain the package: ${pkg} (executable dependency).
27−
27+
2828 If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
2929 '';
3030 buildToolDepError = pkg:
3131 builtins.throw ''
3232 Neither the Haskell package set or the Nixpkgs package set contain the package: ${pkg} (build tool dependency).
33−
33+
3434 If this is a system dependency:
3535 You may need to augment the system package mapping in haskell.nix so that it can be found.
36−
36+
3737 If this is a Haskell dependency:
3838 If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
3939 '';
test/extra-hackage/default.nix+4−4
@@ -2,8 +2,8 @@
22
33with stdenv.lib;
44
5−let
6−
5+let
6+
77 hackage = import ./hackage;
88
99 tarball = {
@@ -57,10 +57,10 @@ in recurseIntoAttrs {
5757 otool -L $exe |grep .dylib
5858 '')) + ''
5959 touch $out
60− '';
60+ '';
6161 meta.platforms = platforms.all;
6262 passthru = {
6363 inherit project;
64− };
64+ };
6565 };
6666}
test/extra-hackage/hackage/hackage/external-package-demo-0.1.0.0-r0-3230db0813f2b468afb3ff7d8bbfcf570019a7faa4a0f59b2ea96743932105e7.nix+7−7
@@ -2,19 +2,19 @@ let
22 buildDepError = pkg:
33 builtins.throw ''
44 The Haskell package set does not contain the package: ${pkg} (build dependency).
5−
5+
66 If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
77 '';
88 sysDepError = pkg:
99 builtins.throw ''
1010 The Nixpkgs package set does not contain the package: ${pkg} (system dependency).
11−
11+
1212 You may need to augment the system package mapping in haskell.nix so that it can be found.
1313 '';
1414 pkgConfDepError = pkg:
1515 builtins.throw ''
1616 The pkg-conf packages does not contain the package: ${pkg} (pkg-conf dependency).
17−
17+
1818 You may need to augment the pkg-conf package mapping in haskell.nix so that it can be found.
1919 '';
2020 exeDepError = pkg:
@@ -24,16 +24,16 @@ let
2424 legacyExeDepError = pkg:
2525 builtins.throw ''
2626 The Haskell package set does not contain the package: ${pkg} (executable dependency).
27−
27+
2828 If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
2929 '';
3030 buildToolDepError = pkg:
3131 builtins.throw ''
3232 Neither the Haskell package set or the Nixpkgs package set contain the package: ${pkg} (build tool dependency).
33−
33+
3434 If this is a system dependency:
3535 You may need to augment the system package mapping in haskell.nix so that it can be found.
36−
36+
3737 If this is a Haskell dependency:
3838 If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
3939 '';
@@ -73,4 +73,4 @@ in { system, compiler, flags, pkgs, hsPkgs, pkgconfPkgs, config, ... }:
7373 url = "http://not-there//package/external-package-demo-0.1.0.0/external-package-demo-0.1.0.0.tar.gz";
7474 sha256 = config.sha256;
7575 });
76− }
76+ }
test/lookup-sha256/default.nix+1−1
@@ -3,7 +3,7 @@
33 inherit compiler-nix-name;
44 name = "pandoc";
55 version = "2.9.2.1";
6− index-state = "2020-05-25T00:00:00Z";
6+ index-state = "2020-05-25T00:00:00Z";
77 # Function that returns a sha256 string by looking up the location
88 # and tag in a nested attrset
99 lookupSha256 = { location, tag, ... }:
test/regen.nix+2−2
@@ -47,11 +47,11 @@ writeScript "regen-tests.sh" ''
4747
4848 cd cabal-simple
4949 regen cabal-simple
50− cd ..
50+ cd ..
5151
5252 cd cabal-sublib
5353 regen cabal-sublib
54− cd ..
54+ cd ..
5555
5656 cd with-packages
5757 regen test-with-packages
test/shell-for-setup-deps/default.nix+2−2
@@ -15,10 +15,10 @@ let
1515
1616 env = project.hsPkgs.shellFor {};
1717
18−# Making this work for cross compilers will be dificult as setup-deps are
18+# Making this work for cross compilers will be difficult as setup-deps are
1919# built for the build platform and the shell will be for the host platform.
2020# We probably need a shell that provides both build and host ghc
21−# and corrisponding package DBs and a way to use them.
21+# and corresponding package DBs and a way to use them.
2222# This problem affects musl as well as the build libraries are linked to glibc.
2323in recurseIntoAttrs (if stdenv.buildPlatform != stdenv.hostPlatform
2424 then
test/shell-for/.plan.nix/pkga.nix+7−7
@@ -2,19 +2,19 @@ let
22 buildDepError = pkg:
33 builtins.throw ''
44 The Haskell package set does not contain the package: ${pkg} (build dependency).
5−
5+
66 If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
77 '';
88 sysDepError = pkg:
99 builtins.throw ''
1010 The Nixpkgs package set does not contain the package: ${pkg} (system dependency).
11−
11+
1212 You may need to augment the system package mapping in haskell.nix so that it can be found.
1313 '';
1414 pkgConfDepError = pkg:
1515 builtins.throw ''
1616 The pkg-conf packages does not contain the package: ${pkg} (pkg-conf dependency).
17−
17+
1818 You may need to augment the pkg-conf package mapping in haskell.nix so that it can be found.
1919 '';
2020 exeDepError = pkg:
@@ -24,16 +24,16 @@ let
2424 legacyExeDepError = pkg:
2525 builtins.throw ''
2626 The Haskell package set does not contain the package: ${pkg} (executable dependency).
27−
27+
2828 If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
2929 '';
3030 buildToolDepError = pkg:
3131 builtins.throw ''
3232 Neither the Haskell package set or the Nixpkgs package set contain the package: ${pkg} (build tool dependency).
33−
33+
3434 If this is a system dependency:
3535 You may need to augment the system package mapping in haskell.nix so that it can be found.
36−
36+
3737 If this is a Haskell dependency:
3838 If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
3939 '';
@@ -70,4 +70,4 @@ in { system, compiler, flags, pkgs, hsPkgs, pkgconfPkgs, ... }:
7070 };
7171 };
7272 };
73− } // rec { src = (pkgs.lib).mkDefault ../pkga; }
73+ } // rec { src = (pkgs.lib).mkDefault ../pkga; }
test/shell-for/.plan.nix/pkgb.nix+7−7
@@ -2,19 +2,19 @@ let
22 buildDepError = pkg:
33 builtins.throw ''
44 The Haskell package set does not contain the package: ${pkg} (build dependency).
5−
5+
66 If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
77 '';
88 sysDepError = pkg:
99 builtins.throw ''
1010 The Nixpkgs package set does not contain the package: ${pkg} (system dependency).
11−
11+
1212 You may need to augment the system package mapping in haskell.nix so that it can be found.
1313 '';
1414 pkgConfDepError = pkg:
1515 builtins.throw ''
1616 The pkg-conf packages does not contain the package: ${pkg} (pkg-conf dependency).
17−
17+
1818 You may need to augment the pkg-conf package mapping in haskell.nix so that it can be found.
1919 '';
2020 exeDepError = pkg:
@@ -24,16 +24,16 @@ let
2424 legacyExeDepError = pkg:
2525 builtins.throw ''
2626 The Haskell package set does not contain the package: ${pkg} (executable dependency).
27−
27+
2828 If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
2929 '';
3030 buildToolDepError = pkg:
3131 builtins.throw ''
3232 Neither the Haskell package set or the Nixpkgs package set contain the package: ${pkg} (build tool dependency).
33−
33+
3434 If this is a system dependency:
3535 You may need to augment the system package mapping in haskell.nix so that it can be found.
36−
36+
3737 If this is a Haskell dependency:
3838 If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
3939 '';
@@ -91,4 +91,4 @@ in { system, compiler, flags, pkgs, hsPkgs, pkgconfPkgs, ... }:
9191 };
9292 };
9393 };
94− } // rec { src = (pkgs.lib).mkDefault ../pkgb; }
94+ } // rec { src = (pkgs.lib).mkDefault ../pkgb; }
test/stack-simple/stack-simple.nix+7−7
@@ -2,19 +2,19 @@ let
22 buildDepError = pkg:
33 builtins.throw ''
44 The Haskell package set does not contain the package: ${pkg} (build dependency).
5−
5+
66 If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
77 '';
88 sysDepError = pkg:
99 builtins.throw ''
1010 The Nixpkgs package set does not contain the package: ${pkg} (system dependency).
11−
11+
1212 You may need to augment the system package mapping in haskell.nix so that it can be found.
1313 '';
1414 pkgConfDepError = pkg:
1515 builtins.throw ''
1616 The pkg-conf packages does not contain the package: ${pkg} (pkg-conf dependency).
17−
17+
1818 You may need to augment the pkg-conf package mapping in haskell.nix so that it can be found.
1919 '';
2020 exeDepError = pkg:
@@ -24,16 +24,16 @@ let
2424 legacyExeDepError = pkg:
2525 builtins.throw ''
2626 The Haskell package set does not contain the package: ${pkg} (executable dependency).
27−
27+
2828 If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
2929 '';
3030 buildToolDepError = pkg:
3131 builtins.throw ''
3232 Neither the Haskell package set or the Nixpkgs package set contain the package: ${pkg} (build tool dependency).
33−
33+
3434 If this is a system dependency:
3535 You may need to augment the system package mapping in haskell.nix so that it can be found.
36−
36+
3737 If this is a Haskell dependency:
3838 If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
3939 '';
@@ -80,4 +80,4 @@ in { system, compiler, flags, pkgs, hsPkgs, pkgconfPkgs, ... }:
8080 };
8181 } // rec { src = (pkgs.lib).mkDefault ./.; }) // {
8282 cabal-generator = "hpack";
83− }
83+ }
test/with-packages/.plan.nix/test-with-packages.nix+7−7
@@ -2,19 +2,19 @@ let
22 buildDepError = pkg:
33 builtins.throw ''
44 The Haskell package set does not contain the package: ${pkg} (build dependency).
5−
5+
66 If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
77 '';
88 sysDepError = pkg:
99 builtins.throw ''
1010 The Nixpkgs package set does not contain the package: ${pkg} (system dependency).
11−
11+
1212 You may need to augment the system package mapping in haskell.nix so that it can be found.
1313 '';
1414 pkgConfDepError = pkg:
1515 builtins.throw ''
1616 The pkg-conf packages does not contain the package: ${pkg} (pkg-conf dependency).
17−
17+
1818 You may need to augment the pkg-conf package mapping in haskell.nix so that it can be found.
1919 '';
2020 exeDepError = pkg:
@@ -24,16 +24,16 @@ let
2424 legacyExeDepError = pkg:
2525 builtins.throw ''
2626 The Haskell package set does not contain the package: ${pkg} (executable dependency).
27−
27+
2828 If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
2929 '';
3030 buildToolDepError = pkg:
3131 builtins.throw ''
3232 Neither the Haskell package set or the Nixpkgs package set contain the package: ${pkg} (build tool dependency).
33−
33+
3434 If this is a system dependency:
3535 You may need to augment the system package mapping in haskell.nix so that it can be found.
36−
36+
3737 If this is a Haskell dependency:
3838 If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
3939 '';
@@ -63,4 +63,4 @@ in { system, compiler, flags, pkgs, hsPkgs, pkgconfPkgs, ... }:
6363 buildable = true;
6464 };
6565 };
66− } // rec { src = (pkgs.lib).mkDefault ../.; }
66+ } // rec { src = (pkgs.lib).mkDefault ../.; }