Spelling, typo and whitespace fixes (#833)

* Spelling and typo fixes in doc and code comments
* Trailing whitespace or whitespace only truncation
* readTheDocs formatting corrections
This commit is contained in:
John A. Lotoski 2020-08-30 19:08:25 -04:00 committed by GitHub
parent b35e9c7a35
commit 09526c8555
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
67 changed files with 189 additions and 184 deletions

View File

@ -284,7 +284,7 @@ let
# Note: Cabal does *not* copy test executables during the `install` phase.
#
# Note 2: if a package contains multiple libs (lib + sublibs) SETUP register will generate a
# folder isntead of a file for the configuration. Therfore if the result is a folder,
# folder instead of a file for the configuration. Therefore if the result is a folder,
# we need to register each and every element of that folder.
#
# Note 3: if a package has no libs SETUP will not generate anything. This can
@ -342,7 +342,7 @@ let
''}
fi
'')
# In case `setup copy` did not creat this
# In case `setup copy` did not create this
+ (lib.optionalString enableSeparateDataOutput "mkdir -p $data")
+ (lib.optionalString (stdenv.hostPlatform.isWindows && (haskellLib.mayHaveExecutable componentId)) ''
echo "Symlink libffi and gmp .dlls ..."

View File

@ -14,8 +14,8 @@ let
ghc = (ghc.passthru.buildGHC or ghc);
hsPkgs = hsPkgs.buildPackages;
# We need to use the buildPackages stdenv to build the setup-builder.
# in the native case, it would be the same in the corss case however
# re *really* want to build the Setup.hs on the build machine and not
# in the native case, it would be the same in the cross case however
# we *really* want to build the Setup.hs on the build machine and not
# have the stdenv confuse it with the target/host env.
inherit (buildPackages) stdenv;
inherit buildPackages pkgconfig;

View File

@ -10,18 +10,18 @@ let
target-pkg = "${ghc.targetPrefix}ghc-pkg";
# This is a bit of a hack. So we'll have a slightly longer explaination here:
# This is a bit of a hack. So we'll have a slightly longer explanation here:
# Every library component built with `comp-builder.nix` includes an `exactDep`
# and `envDep` directory with precomputed values used here.
# GHC derivations include `exactDep` and `envDep` directories that have
# the same information for each of the built in packages.
# exactDep will pass --exact-configuration to the `SETUP_HS confiugre` command.
# exactDep will pass --exact-configuration to the `SETUP_HS configure` command.
# This requires us to pass --dependency={dep name}={pkg id}. The dependency
# name will usually be the name of the package `p`, which we can locate in the
# package-db, passed in via `pdbArg`. Thus querying the package-db for the
# id field for package `p`, will unsually provide is with the right value. Sublibs
# id field for package `p`, will usually provide us with the right value. Sublibs
# need a bit of special handling:
#
# - Sublibs: if the dependency is a sublibrary of a package, we need to use
@ -139,12 +139,12 @@ in
done
''
# This code originates in the `generic-builder.nix` from nixpkgs. However GHC has been fixed
# to drop unused libraries referneced from libraries; and this patch is usually included in the
# nixpkgs's GHC builds. This doesn't sadly make this stupid hack unnecessary. It resurfes in
# to drop unused libraries referenced from libraries; and this patch is usually included in the
# nixpkgs's GHC builds. This doesn't sadly make this stupid hack unnecessary. It resurfaces in
# the form of Cabal trying to be smart. Cabal when linking a library figures out that you likely
# need those `rpath` entries, and passes `-optl-Wl,-rpath,...` for each dynamic library path to
# GHC, thus subverting the linker and forcing it to insert all those RPATHs weather or not they
# are needed. We therfore reuse the linker hack here to move all al dynamic lirbaries into a
# are needed. We therefore reuse the linker hack here to move all dynamic libraries into a
# common folder (as links) and thus prevent Cabal from going nuts.
#
# TODO: Fix Cabal.

View File

@ -4,7 +4,7 @@ that will impact users.
## July 21, 2020
* Removed `components.all`, use `symlinkJoin` on components.exes or
`shellFor` if you need a shell.
* Added `components` arguemnt to `shellFor`.
* Added `components` argument to `shellFor`.
## July 21, 2020
* Added GHC 8.8.4 and replaced 8.8.3 in tests and as the ghc

2
ci.nix
View File

@ -1,4 +1,4 @@
# 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluting
# 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluating
# on a machine with e.g. no way to build the Darwin IFDs you need!
{ supportedSystems ? [ "x86_64-linux" "x86_64-darwin" ]
, ifdLevel ? 3

View File

@ -19,7 +19,7 @@ stdenv.mkDerivation (rec {
patches = ghc-patches;
name = "${targetPrefix}ghc-${ghc-version}-configured-src";
# Make sure we never relax`$PATH` and hooks support for compatability.
# Make sure we never relax`$PATH` and hooks support for compatibility.
strictDeps = true;
nativeBuildInputs = [

View File

@ -19,7 +19,7 @@
libffi ? null
, useLLVM ? !stdenv.targetPlatform.isx86
, # LLVM is conceptually a run-time-only depedendency, but for
, # LLVM is conceptually a run-time-only dependency, but for
# non-x86, we need LLVM to bootstrap later stages, so it becomes a
# build-time dependency too.
buildLlvmPackages, llvmPackages
@ -68,7 +68,7 @@ let
inherit (bootPkgs) ghc;
# TODO check if this posible fix for segfaults works or not.
# TODO check if this possible fix for segfaults works or not.
targetLibffi =
# on native platforms targetPlatform.{libffi, gmp} do not exist; thus fall back
# to the non-targetPlatform version in those cases.
@ -174,8 +174,8 @@ stdenv.mkDerivation (rec {
"distPhase"
];
# ghc hardcodes the TOP dir durcing config, this breaks when
# splitting the configured src from the the build process.
# ghc hardcodes the TOP dir during config, this breaks when
# splitting the configured src from the build process.
postUnpack = ''
(cd $sourceRoot
TOP=$(cat mk/config.mk|grep ^TOP|awk -F\ '{ print $3 }')
@ -202,7 +202,7 @@ stdenv.mkDerivation (rec {
outputs = [ "out" "doc" "generated" ];
# Make sure we never relax`$PATH` and hooks support for compatability.
# Make sure we never relax`$PATH` and hooks support for compatibility.
strictDeps = true;
# Dont add -liconv to LDFLAGS automatically so that GHC will add it itself.
@ -311,7 +311,7 @@ stdenv.mkDerivation (rec {
configured-src = configured-src;
# Used to detect non haskell-nix compilers (accedental use of nixpkgs compilers can lead to unexpected errors)
# Used to detect non haskell-nix compilers (accidental use of nixpkgs compilers can lead to unexpected errors)
isHaskellNixCompiler = true;
} // extra-passthru;

View File

@ -40,7 +40,7 @@ let
passthru = {
inherit all-ghcjs;
inherit (project) configured-src;
# Used to detect non haskell-nix compilers (accedental use of nixpkgs compilers can lead to unexpected errors)
# Used to detect non haskell-nix compilers (accidental use of nixpkgs compilers can lead to unexpected errors)
isHaskellNixCompiler = true;
} // ghcjs.components.exes;
dontConfigure = true;

View File

@ -2,7 +2,7 @@
## Update `overlays/bootstrap.nix`
Each ghc version is defined in this file. Duplicate one of the exising
Each ghc version is defined in this file. Duplicate one of the existing
ghc version definitions and replace the version numbers. Make sure
you update the `spec.sha256` or the other versions source will be used.
Check the LLVM version that should be used in the
@ -27,7 +27,7 @@ The `nix-build` command will fail with something like:
Materialized nix used for dummy-data-x86_64-unknown-linux-musl-ghc-8.10.1 incorrect. To fix run: /nix/store/wnwpyrhv4nxgyljz3f20gdpspjxvm7h4-updateMaterialized
```
Run the `updateMaterialized` script and repat the `nix-build` until it no longer fails.
Run the `updateMaterialized` script and repeat the `nix-build` until it no longer fails.
If the failure is not a problem with materialization and no `updateMaterialized` script
is provided then you may need to fix the failure another way or (if it only relates to
one of the cross compilers) modify `scripts/check-compiler-materialization/default.nix`

View File

@ -61,7 +61,7 @@ of packages available on hackage.
[stackage.nix][] is similar to hackage.nix but provides all stackage
snapshots (lts, and nightly) as nix expressions. It naturally depends
on hackage.nix to resolve package names, versions and revisions to the
repsective packages from hackage.nix.
respective packages from hackage.nix.
[haskell.nix]: https://github.com/input-output-hk/haskell.nix
[hackage.nix]: https://github.com/input-output-hk/hackage.nix

View File

@ -77,7 +77,7 @@ nixpkgs (*This has undergone substantially less testing*).
### Component builder
To prevent depending on mutliple instances of the same libraries, the
To prevent depending on multiple instances of the same libraries, the
component builder will try to build every package from scratch and
rely as little as possible on packages that are shipped with the GHC
distribution. The exceptions are packages that are known to not be

View File

@ -24,3 +24,5 @@ git clone https://github.com/input-output-hk/haskell.nix
cd haskell.nix
nix build -f . pkgs.haskell-nix.nix-tools.ghc884 --arg sourcesOverride '{ nix-tools = ../nix-tools; }' --out-link nt
```
[haskell.nix]: https://github.com/input-output-hk/haskell.nix

View File

@ -67,6 +67,6 @@ So this is expected, unfortunately.
### How do I prevent the evaluation-time dependencies of my project from being garbage-collected?
The `haskell-nix.roots "ghc884"` should include all the evaluation-time dependencies
and the main build time dependecies of a project using ghc 8.8.3.
and the main build time dependencies of a project using ghc 8.8.4.
So you can add that to the relevant GC root.
In practice, if you're using a CI system like Hydra/Hercules, this means adding it to a job in `release.nix`/`ci.nix`.

View File

@ -64,7 +64,7 @@ sub directories containing git repos.
For example if `repoA` and `repoB` are two git repos with
cabal packages and want to use the `repoB` package when building
`repoA. First we can add `../repoB` to `repoA/cabal.project`:
`repoA`. First we can add `../repoB` to `repoA/cabal.project`:
```
packages:

View File

@ -146,7 +146,7 @@ get a shell with some packages.
Once you have a development shell, then you can begin configuring
Emacs to use it. The way I do it is:
1. Run [lorri watch](https://github.com/target/lorri) to continously
1. Run [lorri watch](https://github.com/target/lorri) to continuously
build the shell environment and maintain GC roots.
2. Use [emacsdirenv](https://github.com/wbolster/emacs-direnv) to
@ -199,3 +199,5 @@ nix-repl>
Now that you have `nix-tools` and are able to import [Haskell.nix][],
you can continue to the next chapter.
[haskell.nix]: https://github.com/input-output-hk/haskell.nix

View File

@ -4,7 +4,7 @@
Capturing and storing the nix files for a project so that they do
not need to be built (or checked). This allows us to cache the input
of an IFD (import from derviation).
of an IFD (import from derivation).
## Why use materialization?
@ -150,7 +150,7 @@ store will be read only.
## How can we check `sha256` and `materialized` are up to date?
Let's pretend we had to go back to `hlint` version `2.2.10`.
We can tell haskell.nix to check the materialiazation either by:
We can tell haskell.nix to check the materialization either by:
* Removing the materialization files with `rm -rf hlint.materialized`
* Temporarily adding `checkMaterialization = true;`
@ -231,13 +231,13 @@ Yes and it gives us the same speed improvement, however:
* It does not help at all in `restricted-eval` mode (Hydra).
* Users will still wind up building or downloading the dependencies
needed to build the nix fileds (if they do not have them).
needed to build the nix files (if they do not have them).
For those reasons it might be best to make a copy instead
of using the `/nix/store/...` path directly.
If you really want to use the `/nix/store/...` path directly
you should gaurd against the path not existing as passing in
you should guard against the path not existing as passing in
a non-existing path is now an error:
```nix

View File

@ -2,8 +2,9 @@
Cabal files may contain dependencies to external non-Haskell
dependencies via:
* [`build-tool-depends`](https://cabal.readthedocs.io/en/latest/developing-packages.html#pkg-field-build-tool-depends)
* [`pkgconfig-depends`](https://cabal.readthedocs.io/en/latest/developing-packages.html#pkg-field-pkgconfig-depends).
* [`pkgconfig-depends`](https://cabal.readthedocs.io/en/latest/developing-packages.html#pkg-field-pkgconfig-depends)
* [`frameworks`](https://cabal.readthedocs.io/en/latest/developing-packages.html#pkg-field-frameworks)
* [`extra-libraries`](https://cabal.readthedocs.io/en/latest/developing-packages.html#pkg-field-extra-libraries)

View File

@ -5,7 +5,7 @@ to git repositories containing the version of a particular package
that we wish to use. This is mostly handled automatically by
`nix-tools` and `haskell.nix` however when we want to use a nix
system that is configured to use restricted mode (typically hydra)
it will need an aditionaly hash.
it will need additional hashes for the referenced repositories.
When using `project`, `cabalProject` or `stackProject` functions
you can include the hash needed in a comment.

View File

@ -65,7 +65,7 @@ let
nextState (builtins.head pair) (builtins.elemAt pair 1)
else
if name != null
then nextState name s # Append another line to the current attirbute
then nextState name s # Append another line to the current attribute
else __trace "Expected attribute but found `${s}`" { inherit name attrs; }
) { name = null; attrs = {}; } (stripComments (unindent blockLines))).attrs;

View File

@ -18,7 +18,7 @@ in
, cabalProject ? readIfExists src cabalProjectFileName
, cabalProjectLocal ? readIfExists src "${cabalProjectFileName}.local"
, cabalProjectFreeze ? readIfExists src "${cabalProjectFileName}.freeze"
, caller ? "callCabalProjectToNix" # Name of the calling funcion for better warning messages
, caller ? "callCabalProjectToNix" # Name of the calling function for better warning messages
, ghc ? null # Deprecated in favour of `compiler-nix-name`
, ghcOverride ? null # Used when we need to set ghc explicitly during bootstrapping
, 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
, configureArgs ? "" # Extra arguments to pass to `cabal v2-configure`.
# `--enable-tests --enable-benchmarks` are included by default.
# If the tests and benchmarks are not needed and they
# causes the wrong plan to be choosen, then we can use
# cause the wrong plan to be chosen, then we can use
# `configureArgs = "--disable-tests --disable-benchmarks";`
, sha256map ? null
# An alternative to adding `--sha256` comments into the
@ -153,7 +153,7 @@ let
# Deal with source-repository-packages in a way that will work in
# restricted-eval mode (as long as a sha256 is included).
# Replace source-repository-package blocks that have a sha256 with
# packages: block containing nix sotre paths of the fetched repos.
# packages: block containing nix store paths of the fetched repos.
replaceSoureRepos = projectFile:
let
blocks = pkgs.lib.splitString "\nsource-repository-package\n" ("\n" + projectFile);
@ -194,7 +194,7 @@ let
}
else replaceSoureRepos rawCabalProject;
# The use of a the actual GHC can cause significant problems:
# The use of the actual GHC can cause significant problems:
# * For hydra to assemble a list of jobs from `components.tests` it must
# first have GHC that will be used. If a patch has been applied to the
# GHC to be used it must be rebuilt before the list of jobs can be assembled.

View File

@ -1,7 +1,7 @@
# This is a source filter function which cleans common build products
# and files not needed to do a haskell build from a source directory.
#
# This can avoid unecessary builds when these files change.
# This can avoid unnecessary builds when these files change.
#
# It should be used with "pkgs.lib.cleanSourceWith". Alternatively,
# use the convenience function "cleanSourceHaskell".

View File

@ -40,7 +40,7 @@
# relative references to those siblings will work.
#
# name: Optional name to use as part of the store path.
# If you do not provide a `name` it wil be derived
# If you do not provide a `name` it will be derived
# from the `subDir`. You should provide `name` or
# `subDir`. If you do not a warning will be displayed
# and the name used will be `source`.

View File

@ -248,7 +248,7 @@ in {
&& stdenv.hostPlatform == stdenv.targetPlatform;
# Takes a version number or attr set of arguments (for cabalProject)
# and conversios it to an attr set of argments. This allows
# and converts it to an attr set of arguments. This allows
# the use of "1.0.0.0" or { version = "1.0.0.0"; ... }
versionOrArgsToArgs = versionOrArgs:
if lib.isAttrs versionOrArgs

View File

@ -4,7 +4,7 @@
{ pkgs, haskellLib }:
{ projectNix, sourceRepos, src }:
let
# Full source including possible relartive paths form the
# Full source including possible relative paths form the
# project directory.
srcRoot =
if haskellLib.canCleanSource src

View File

@ -26,7 +26,7 @@ let
inherit src stackYaml resolverSha256;
}) resolver fetchedResolver;
# Filter just the stack yaml file and any reolver yaml file it points to.
# Filter just the stack yaml file and any resolver yaml file it points to.
maybeCleanedSource =
if haskellLib.canCleanSource src
then haskellLib.cleanSourceWith {

View File

@ -1,4 +1,4 @@
# Maps of system pkg refenreces from
# Maps of system pkg references from
# cabal file to nixpkgs pkgs.
# See ../docs/dev/pkg-map.md
pkgs:
@ -94,5 +94,5 @@ pkgs:
Crypt32 = null;
}
# -- os x
# NB: these map almost 1:1 to the famework names
# NB: these map almost 1:1 to the framework names
// pkgs.darwin.apple_sdk.frameworks

View File

@ -1,4 +1,4 @@
# Create a local hackare repo, we can use as a repository in a cabal config
# Create a local hackage repo, we can use as a repository in a cabal config
#
# This will include:
# - 01-index.tar.gz (the index file)
@ -12,7 +12,7 @@
#
# We will create a completely unsigned bare repository. Using signing keys within
# nix would be pointless as we'd have to hardcode them to produce the same output
# reproducably.
# reproducibly.
#
pkgs:
{ name, index }:

View File

@ -2,7 +2,7 @@
let
# it also crucially depends on system, and compiler, both of which need to be resolved to the
# current system being targetted.
# current system being targeted.
hostMap = import ../lib/host-map.nix pkgs.stdenv;
cabal = import ../lib/cabal-os-arch-comp.nix;

View File

@ -9,9 +9,9 @@ let
in
{
# this has a slightly modified option type. we will *overwrite* any previous
# This has a slightly modified option type. We will *overwrite* any previous
# setting of nonRelocatablePkgs, instead of merging them. Otherwise you
# have no chance of removing packages retroacively. We might improvie this
# have no chance of removing packages retroactively. We might improve this
# by implementing a logic that would allow +xxx to be added, -xxx to be removed
# and if it's not a list of -/+ prefixed strings, be assumed to be overwriting.
# This seems ugly.

View File

@ -1,6 +1,6 @@
# This file is for configuration that should be required by every
# package set. Hopefully we can keep configuration for particular
# pacakge sets out of this repo. Ideally, this file is only used for
# package sets out of this repo. Ideally, this file is only used for
# fixing things that are broken due to the Nix infrastructure.
{ pkgs, ... }: {

View File

@ -226,7 +226,7 @@ in {
doExactConfig = false;
# We have to set hsSourceDirs or cleanCabalComponent will
# include everything (and as a result all the components of
# the package will depend on eveything in the package).
# the package will depend on everything in the package).
# TODO find a better way
hsSourceDirs = ["setup-src"];
includeDirs = [];

View File

@ -1,5 +1,5 @@
# The plan (that is, a package set description like an LTS set or a
# plan.nix (derived from plan.json)) will producde a structure that
# plan.nix (derived from plan.json)) will produce a structure that
# looks like, which is stored in config.plan.pkg-def:
#
# { packages = { "package" = { revision = hackageConfigs.$package.$version.revisions.default;
@ -16,9 +16,9 @@ with lib;
with types;
let
# dealing with str is a bit annoying espectially with `nullOr str` as that apparently defaults to ""
# dealing with str is a bit annoying especially with `nullOr str` as that apparently defaults to ""
# instead of null :shrug:. This then messes with our option inheritance logic.
# Hence we have a uniqueStr type that ensures multiple identially defined options are collapsed
# Hence we have a uniqueStr type that ensures multiple identically defined options are collapsed
# without raising an error. And a way to fetch default options that will retain `null` if the
# option is not defined or "".
getDefaultOrNull = def: key: if def ? ${key} && def.${key} != "" then def.${key} else null;

View File

@ -1,6 +1,6 @@
# Update script to update nix-tools.
#
# This scipt might still come in handy, but it should now be possible to update
# This script might still come in handy, but it should now be possible to update
# the nix-tools materialization without it.
#
# Without this script:
@ -8,7 +8,7 @@
# 2. run `nix-build -E '(import ./. { checkMaterialization = true; }).pkgs.haskell-nix.nix-tools'`
# 3. If it fails apply the fixes from the log (there should be rm, cp and chmod commands)
#
# To bootstap materialization files for a new compiler (e.g. for ghc 8.8.3)
# To bootstrap materialization files for a new compiler (e.g. for ghc 8.8.3)
#
# 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; }'
# 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; }'

View File

@ -28,14 +28,14 @@ final: prev:
];
} // {
# we can perform testing of cross compiled test-suites by using wine.
# Therfore let's enable doCrossCheck here!
# Therefore let's enable doCrossCheck here!
doCrossCheck = pkgs.stdenv.hostPlatform.isWindows;
};
in {
packages = {
# clock 0.7.2 needs to be patche to support cross compilation.
# clock 0.7.2 needs to be patched to support cross compilation.
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)) ];
# nix calles this package crypto
# nix calls this package crypto
# 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) ];
# 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) ];

View File

@ -69,7 +69,7 @@ in {
ghc-patches = version: let
# Returns true iff this derivation's version is strictly older than ver.
versionLessThan = ver: builtins.compareVersions ver version == 1;
# Returns true iff this derivation's verion is greater than or equal to ver.
# Returns true iff this derivation's version is greater than or equal to ver.
versionAtLeast = ver: !versionLessThan ver;
from = start: final.lib.optional (versionAtLeast start);
fromUntil = start: end: final.lib.optional (versionAtLeast start && versionLessThan end);
@ -494,7 +494,7 @@ in {
# haskell-nix.cabal-install-unchecked.ghcXXX
# haskell-nix.nix-tools.ghcXXX
# haskell-nix.nix-tools-unchecked.ghcXXX
# Using these avoids unecessary calls to mkDerivation.
# Using these avoids unnecessary calls to mkDerivation.
# For cabal projects we match the versions used to the compiler
# selected for the project to avoid the chance of a dependency
# another GHC version (particularly useful on macOS where
@ -541,7 +541,7 @@ in {
# WARN: The `import ../. {}` will prevent
# any cross to work, as we will loose
# the `config` value.
# As such the folloing sadly won't work :(
# As such the following sadly won't work :(
# haskellPackages = with import ../. {}; {
# hpack = null;
# hello = (hackage-package {
@ -601,7 +601,7 @@ in {
# can turn off materialization checks when
# building ghc itself (since GHC is a dependency
# of the materialization check it would cause
# infinite recusion).
# infinite recursion).
alex-tool = args: tool buildBootstrapper.compilerNixName "alex" ({
version = "3.2.4";
inherit ghcOverride nix-tools cabal-install index-state;

View File

@ -29,7 +29,7 @@ let
ordered = with overlays; [
# Hide nixpkgs haskell and haskellPackages from the haskell-nix overlays.
# This should prevent us inadvertantly depending on them.
# This should prevent us inadvertently depending on them.
(_: prev: {
haskell = { };
haskellPackages = { };

View File

@ -19,7 +19,7 @@ in { haskell-nix = prev.haskell-nix // {
'';
modules = [
{ reinstallableLibGhc = true; }
# Version of of cabal-install in hacakge is borken for GHC 8.10.1
# Version of of cabal-install in hackage is broken for GHC 8.10.1
(lib.optionalAttrs (version == "3.2.0.0") {
packages.cabal-install.src = final.haskell-nix.sources.cabal-32 + "/cabal-install";
})

View File

@ -2,7 +2,7 @@
, ... }:
# The haskell.nix infrastructure
#
# for hygenic reasons we'll use haskell-nix as a prefix.
# for hygienic reasons we'll use haskell-nix as a prefix.
# Using haskell.nix in nix is awkward as I needs to be quoted.
final: prev: {
haskell-nix = with final.haskell-nix; {
@ -234,7 +234,7 @@ final: prev: {
'';
# Some of features of haskell.nix rely on using a hackage index
# to calculate a build plan. To maintain stabity for caching and
# to calculate a build plan. To maintain stability for caching and
# to allow the outputs to be materialized we pin this value here.
# If you want to update this value it important to check the
# materializations. Turn `checkMaterialization` on below and
@ -348,7 +348,7 @@ final: prev: {
# stack-to-nix or plan-to-nix to prevent them
# from needing network access.
# The cache contains only local paths to nix files so that it can
# the results of `stack-to-nix` can be imported in restrected eval
# the results of `stack-to-nix` can be imported in restricted eval
# mode.
mkCacheFile = repos:
final.buildPackages.pkgs.runCommand "cache-file" {} ''
@ -436,8 +436,8 @@ final: prev: {
# from hackage. This is useful if you want to build an executable from
# a given package.
# NB: If no explicit index-state is provided the most recent one from
# the index-state-hashes is used. This guarantees reproducability wrt
# to the haskell.nix revision. If reproducability beyond haskell.nix
# the index-state-hashes is used. This guarantees reproducibility wrt
# to the haskell.nix revision. If reproducibility beyond haskell.nix
# is required, a specific index-state should be provided!
hackage-package =
{ name, compiler-nix-name, ... }@args':
@ -567,7 +567,7 @@ final: prev: {
# `projectFileName = "cabal.project";`
# to let it know which to choose (or pick another name). If the
# selected file ends in a `.yaml` it is assumed to be for `stackProject`.
# If niether `stack.yaml` nor `cabal.project` exist `cabalProject` is
# If neither `stack.yaml` nor `cabal.project` exist `cabalProject` is
# used (as it will use a default `cabal.project`).
project' = { src, projectFileName ? null, ... }@args':
let

View File

@ -1,6 +1,6 @@
let
# Here we try to figure out which qemu to use based on the host platform.
# This guess can be overriden by passing qemuSuffix
# This guess can be overridden by passing qemuSuffix
qemuByHostPlatform = hostPlatform:
# I'd prefer this was a dictionary lookup, with a fall through into abort,
# that would make this more readable I guess. I think there is some similar

View File

@ -12,7 +12,7 @@ final: prev: prev.lib.optionalAttrs prev.stdenv.hostPlatform.isMusl ({
busybox-sandbox-shell = prev.busybox-sandbox-shell.override { inherit (final) busybox; };
# we don't want the static output to be split. That just
# messes with the z -> libz mapping. We can't have a conditonal
# messes with the z -> libz mapping. We can't have a conditional
# z -> libz / z -> libz.static mapping without threading the
# package configuration in. That seems a bit overkill.
zlib = prev.zlib.override { splitStaticOutput = false; };

View File

@ -5,7 +5,7 @@
final: prev:
{
# on windows we have this habit of putting libraries
# into `bin`, wheras on unix it's usually `lib`. For
# into `bin`, whereas on unix it's usually `lib`. For
# this confuses nix easily. So we'll just move the
# .dll's from `bin` into `$out/lib`. Such that they
# are trivially found.
@ -45,7 +45,7 @@ final: prev:
# extra-test-libs = [ pkgs.rocksdb pkgs.openssl.bin pkgs.libffi pkgs.gmp ];
} // {
# we can perform testing of cross compiled test-suites by using wine.
# Therfore let's enable doCrossCheck here!
# Therefore let's enable doCrossCheck here!
doCrossCheck = pkgs.stdenv.hostPlatform.isWindows;
};
in {
@ -79,9 +79,9 @@ final: prev:
# }
# else null)) ];
# clock 0.7.2 needs to be patche to support cross compilation.
# clock 0.7.2 needs to be patched to support cross compilation.
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)) ];
# nix calles this package crypto
# nix calls this package crypto
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) ];
# this patch seems to be rather flaky and highly dependent on

View File

@ -40,7 +40,7 @@ in pkgs.lib.evalModules {
in let pkg-def' = strip-pkg-def pkg-def;
# The desugar reason.
#
# it is quite combersome to write
# it is quite cumbersome to write
# (hackage: { packages.x.revision = hackage...;
# packages.y.revision = import ./foo.nix; })
# where we'd rather write:

View File

@ -1,4 +1,4 @@
# 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluting
# 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluating
# on a machine with e.g. no way to build the Darwin IFDs you need!
{ supportedSystems ? [ "x86_64-linux" "x86_64-darwin" ]
, ifdLevel ? 3

View File

@ -15,10 +15,10 @@ let
env = project.hsPkgs.shellFor {};
# Making this work for cross compilers will be dificult as setup-deps are
# Making this work for cross compilers will be difficult as setup-deps are
# built for the build platform and the shell will be for the host platform.
# We probably need a shell that provides both build and host ghc
# and corrisponding package DBs and a way to use them.
# and corresponding package DBs and a way to use them.
# This problem affects musl as well as the build libraries are linked to glibc.
in recurseIntoAttrs (if stdenv.buildPlatform != stdenv.hostPlatform
then