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

@ -246,7 +246,7 @@ let
# Not sure why pkgconfig needs to be propagatedBuildInputs but # Not sure why pkgconfig needs to be propagatedBuildInputs but
# for gi-gtk-hs it seems to help. # for gi-gtk-hs it seems to help.
++ builtins.concatLists pkgconfig; ++ builtins.concatLists pkgconfig;
buildInputs = component.libs buildInputs = component.libs
++ map (d: d.components.library or d) component.depends; ++ map (d: d.components.library or d) component.depends;
@ -284,7 +284,7 @@ let
# Note: Cabal does *not* copy test executables during the `install` phase. # 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 # 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. # 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 # Note 3: if a package has no libs SETUP will not generate anything. This can
@ -342,7 +342,7 @@ let
''} ''}
fi 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 enableSeparateDataOutput "mkdir -p $data")
+ (lib.optionalString (stdenv.hostPlatform.isWindows && (haskellLib.mayHaveExecutable componentId)) '' + (lib.optionalString (stdenv.hostPlatform.isWindows && (haskellLib.mayHaveExecutable componentId)) ''
echo "Symlink libffi and gmp .dlls ..." echo "Symlink libffi and gmp .dlls ..."

View File

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

View File

@ -74,7 +74,7 @@ let
++ lib.optional doHaddock' "doc"; ++ lib.optional doHaddock' "doc";
propagatedBuildInputs = builtins.concatLists pkgconfig; propagatedBuildInputs = builtins.concatLists pkgconfig;
buildInputs = component.libs buildInputs = component.libs
++ map (d: d.components.library.haddock or d) component.depends; ++ map (d: d.components.library.haddock or d) component.depends;

View File

@ -10,18 +10,18 @@ let
target-pkg = "${ghc.targetPrefix}ghc-pkg"; 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` # Every library component built with `comp-builder.nix` includes an `exactDep`
# and `envDep` directory with precomputed values used here. # and `envDep` directory with precomputed values used here.
# GHC derivations include `exactDep` and `envDep` directories that have # GHC derivations include `exactDep` and `envDep` directories that have
# the same information for each of the built in packages. # 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 # 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 # 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 # 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: # need a bit of special handling:
# #
# - Sublibs: if the dependency is a sublibrary of a package, we need to use # - Sublibs: if the dependency is a sublibrary of a package, we need to use
@ -136,15 +136,15 @@ in
cat $ghc/exactDeps/$p/configure-flags >> $out/configure-flags cat $ghc/exactDeps/$p/configure-flags >> $out/configure-flags
cat $ghc/exactDeps/$p/cabal.config >> $out/cabal.config cat $ghc/exactDeps/$p/cabal.config >> $out/cabal.config
fi fi
done done
'' ''
# This code originates in the `generic-builder.nix` from nixpkgs. However GHC has been fixed # 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 # 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 resurfes in # 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 # 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 # 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 # 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. # common folder (as links) and thus prevent Cabal from going nuts.
# #
# TODO: Fix Cabal. # TODO: Fix Cabal.

View File

@ -4,7 +4,7 @@ that will impact users.
## July 21, 2020 ## July 21, 2020
* Removed `components.all`, use `symlinkJoin` on components.exes or * Removed `components.all`, use `symlinkJoin` on components.exes or
`shellFor` if you need a shell. `shellFor` if you need a shell.
* Added `components` arguemnt to `shellFor`. * Added `components` argument to `shellFor`.
## July 21, 2020 ## July 21, 2020
* Added GHC 8.8.4 and replaced 8.8.3 in tests and as the ghc * Added GHC 8.8.4 and replaced 8.8.3 in tests and as the ghc
@ -31,7 +31,7 @@ that will impact users.
`p.tool "alex" "3.2.5"` or `shellFor { tools = { alex = "3.2.5"; } }`. `p.tool "alex" "3.2.5"` or `shellFor { tools = { alex = "3.2.5"; } }`.
* `haskell-nix.nix-tools` -> `haskell-nix.nix-tools.ghc883` (it includes * `haskell-nix.nix-tools` -> `haskell-nix.nix-tools.ghc883` (it includes
the hpack exe now). the hpack exe now).
* `haskell-nix.cabal-install` -> * `haskell-nix.cabal-install` ->
`p.tool "cabal" "3.2.0.0"` or `shellFor { tools = { cabal = "3.2.0.0"; } }` `p.tool "cabal" "3.2.0.0"` or `shellFor { tools = { cabal = "3.2.0.0"; } }`
* `haskell-nix.haskellNixRoots` -> `haskell-nix.roots ghc883` or `p.roots` * `haskell-nix.haskellNixRoots` -> `haskell-nix.roots ghc883` or `p.roots`

4
ci.nix
View File

@ -1,5 +1,5 @@
# '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! # on a machine with e.g. no way to build the Darwin IFDs you need!
{ supportedSystems ? [ "x86_64-linux" "x86_64-darwin" ] { supportedSystems ? [ "x86_64-linux" "x86_64-darwin" ]
, ifdLevel ? 3 , ifdLevel ? 3
# Whether or not we are evaluating in restricted mode. This is true in Hydra, but not in Hercules. # Whether or not we are evaluating in restricted mode. This is true in Hydra, but not in Hercules.

View File

@ -19,7 +19,7 @@ stdenv.mkDerivation (rec {
patches = ghc-patches; patches = ghc-patches;
name = "${targetPrefix}ghc-${ghc-version}-configured-src"; 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; strictDeps = true;
nativeBuildInputs = [ nativeBuildInputs = [
@ -111,4 +111,4 @@ stdenv.mkDerivation (rec {
++ stdenv.lib.optional (ghc-patches != []) "autoreconfPhase" ++ stdenv.lib.optional (ghc-patches != []) "autoreconfPhase"
++ [ "configurePhase" "installPhase" ]; ++ [ "configurePhase" "installPhase" ];
installPhase = "cp -r . $out"; installPhase = "cp -r . $out";
}) })

View File

@ -19,7 +19,7 @@
libffi ? null libffi ? null
, useLLVM ? !stdenv.targetPlatform.isx86 , 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 # non-x86, we need LLVM to bootstrap later stages, so it becomes a
# build-time dependency too. # build-time dependency too.
buildLlvmPackages, llvmPackages buildLlvmPackages, llvmPackages
@ -37,7 +37,7 @@
, enableLibraryProfiling ? true , enableLibraryProfiling ? true
, # Whetherto build terminfo. Musl fails to build terminfo as ncurses seems to be linked to glibc , # Whether to build terminfo. Musl fails to build terminfo as ncurses seems to be linked to glibc
enableTerminfo ? !stdenv.targetPlatform.isWindows && !stdenv.targetPlatform.isMusl enableTerminfo ? !stdenv.targetPlatform.isWindows && !stdenv.targetPlatform.isMusl
, # What flavour to build. An empty string indicates no , # What flavour to build. An empty string indicates no
@ -68,7 +68,7 @@ let
inherit (bootPkgs) ghc; 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 = targetLibffi =
# on native platforms targetPlatform.{libffi, gmp} do not exist; thus fall back # on native platforms targetPlatform.{libffi, gmp} do not exist; thus fall back
# to the non-targetPlatform version in those cases. # to the non-targetPlatform version in those cases.
@ -174,8 +174,8 @@ stdenv.mkDerivation (rec {
"distPhase" "distPhase"
]; ];
# ghc hardcodes the TOP dir durcing config, this breaks when # ghc hardcodes the TOP dir during config, this breaks when
# splitting the configured src from the the build process. # splitting the configured src from the build process.
postUnpack = '' postUnpack = ''
(cd $sourceRoot (cd $sourceRoot
TOP=$(cat mk/config.mk|grep ^TOP|awk -F\ '{ print $3 }') TOP=$(cat mk/config.mk|grep ^TOP|awk -F\ '{ print $3 }')
@ -202,7 +202,7 @@ stdenv.mkDerivation (rec {
outputs = [ "out" "doc" "generated" ]; 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; strictDeps = true;
# Dont add -liconv to LDFLAGS automatically so that GHC will add it itself. # Dont add -liconv to LDFLAGS automatically so that GHC will add it itself.
@ -311,7 +311,7 @@ stdenv.mkDerivation (rec {
configured-src = configured-src; 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; isHaskellNixCompiler = true;
} // extra-passthru; } // extra-passthru;
@ -326,4 +326,4 @@ stdenv.mkDerivation (rec {
dontStrip = true; dontStrip = true;
dontPatchELF = true; dontPatchELF = true;
noAuditTmpdir = true; noAuditTmpdir = true;
}) })

View File

@ -40,7 +40,7 @@ let
passthru = { passthru = {
inherit all-ghcjs; inherit all-ghcjs;
inherit (project) configured-src; 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; isHaskellNixCompiler = true;
} // ghcjs.components.exes; } // ghcjs.components.exes;
dontConfigure = true; dontConfigure = true;
@ -65,4 +65,4 @@ let
# https://github.com/ghcjs/ghcjs/issues/654 # https://github.com/ghcjs/ghcjs/issues/654
# enableParallelBuilding = true; # enableParallelBuilding = true;
}; };
in booted-ghcjs in booted-ghcjs

View File

@ -2,7 +2,7 @@
## Update `overlays/bootstrap.nix` ## 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 ghc version definitions and replace the version numbers. Make sure
you update the `spec.sha256` or the other versions source will be used. you update the `spec.sha256` or the other versions source will be used.
Check the LLVM version that should be used in the 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 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 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 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` 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 [stackage.nix][] is similar to hackage.nix but provides all stackage
snapshots (lts, and nightly) as nix expressions. It naturally depends snapshots (lts, and nightly) as nix expressions. It naturally depends
on hackage.nix to resolve package names, versions and revisions to the 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 [haskell.nix]: https://github.com/input-output-hk/haskell.nix
[hackage.nix]: https://github.com/input-output-hk/hackage.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 ### 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 component builder will try to build every package from scratch and
rely as little as possible on packages that are shipped with the GHC rely as little as possible on packages that are shipped with the GHC
distribution. The exceptions are packages that are known to not be 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 cd haskell.nix
nix build -f . pkgs.haskell-nix.nix-tools.ghc884 --arg sourcesOverride '{ nix-tools = ../nix-tools; }' --out-link nt 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

@ -1,7 +1,7 @@
# Manually generating Nix expressions # Manually generating Nix expressions
We believe that imports from derivations (IFDs) provide tremendous We believe that imports from derivations (IFDs) provide tremendous
value in nix and the aversion towards them stems mostly from value in nix and the aversion towards them stems mostly from
poor tooling and ci support for them. We do not believe poor tooling and ci support for them. We do not believe
that poor tooling or ci support should cripple nix capability that poor tooling or ci support should cripple nix capability
of abstraction. Hence haskell.nix makes excessive use of of abstraction. Hence haskell.nix makes excessive use of

View File

@ -1,9 +1,9 @@
# Motivation # Motivation
Why do we need another Haskell infrastructure for Nix? Why do we need another Haskell infrastructure for Nix?
Doesn't nixpkgs Doesn't nixpkgs
provide a sufficiently good Haskell infrastructure already? provide a sufficiently good Haskell infrastructure already?
Problems with Problems with
the nixpkgs haskell infrastructure are covered in the following sections: the nixpkgs haskell infrastructure are covered in the following sections:

View File

@ -29,7 +29,7 @@ Make sure you are using the same compiler for the cabal build as for the `haskel
(Cabal users only. For stack users, package versions come from the snapshot, so stack and `haskell.nix` will agree.) (Cabal users only. For stack users, package versions come from the snapshot, so stack and `haskell.nix` will agree.)
Cabal has the concept of the Hackage "index state". Cabal has the concept of the Hackage "index state".
This is a timestamp, and it tells Cabal to behave "as if" it was seeing Hackage at that point in time. This is a timestamp, and it tells Cabal to behave "as if" it was seeing Hackage at that point in time.
Pinning it is generally good for reproducibility regardless of whether you use `haskell.nix` (you can do so in `cabal.project`). Pinning it is generally good for reproducibility regardless of whether you use `haskell.nix` (you can do so in `cabal.project`).
@ -67,6 +67,6 @@ So this is expected, unfortunately.
### How do I prevent the evaluation-time dependencies of my project from being garbage-collected? ### 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 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. 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`. 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

@ -20,7 +20,7 @@ you could run:
nix 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' nix 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'
``` ```
This would build the (public) library component of the [lens-4.17.1][] package This would build the (public) library component of the [lens-4.17.1][] package
from hackage. from hackage.
### Pinning hackage index ### Pinning hackage index
@ -32,7 +32,7 @@ nix build '(with import <nixpkgs> (import (builtins.fetchTarball "https://github
``` ```
This would use the hackage index as of `2019-07-14T00:00:00Z` to produce a This would use the hackage index as of `2019-07-14T00:00:00Z` to produce a
build plan for the [lens-4.17.1][] package. build plan for the [lens-4.17.1][] package.
[Stackage]: https://stackage.org [Stackage]: https://stackage.org
[Hackage]: https://hackage.haskell.org [Hackage]: https://hackage.haskell.org
[hackage.nix]: https://github.com/input-output-hk/hackage.nix [hackage.nix]: https://github.com/input-output-hk/hackage.nix

View File

@ -29,7 +29,7 @@ in a change to the `.cabal` file the test will still be built the same).
``` ```
components.tests.test.extraSrcFiles = [ "subdir-needed-by-test" ]; components.tests.test.extraSrcFiles = [ "subdir-needed-by-test" ];
``` ```
Or alternatively, override the source with a suitable filter function. Or alternatively, override the source with a suitable filter function.
``` ```
components.tests.test.src = haskell-nix.haskellLib.cleanSourceWith { components.tests.test.src = haskell-nix.haskellLib.cleanSourceWith {
inherit src; inherit src;
@ -64,7 +64,7 @@ sub directories containing git repos.
For example if `repoA` and `repoB` are two git repos with For example if `repoA` and `repoB` are two git repos with
cabal packages and want to use the `repoB` package when building 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: packages:

View File

@ -146,7 +146,7 @@ get a shell with some packages.
Once you have a development shell, then you can begin configuring Once you have a development shell, then you can begin configuring
Emacs to use it. The way I do it is: 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. build the shell environment and maintain GC roots.
2. Use [emacsdirenv](https://github.com/wbolster/emacs-direnv) to 2. Use [emacsdirenv](https://github.com/wbolster/emacs-direnv) to
@ -168,7 +168,7 @@ Emacs to use it. The way I do it is:
## Using `nix repl` ## Using `nix repl`
It's sometimes useful to load [Haskell.nix][] in the REPL to explore It's sometimes useful to load [Haskell.nix][] in the REPL to explore
attrsets and try examples. attrsets and try examples.
``` ```
# example.nix # example.nix
@ -194,8 +194,10 @@ Added 2 variables.
nix-repl> lib.take 5 pkgNames nix-repl> lib.take 5 pkgNames
[ "ALUT" "ANum" "Allure" "Boolean" "BoundedChan" ] [ "ALUT" "ANum" "Allure" "Boolean" "BoundedChan" ]
nix-repl> nix-repl>
``` ```
Now that you have `nix-tools` and are able to import [Haskell.nix][], Now that you have `nix-tools` and are able to import [Haskell.nix][],
you can continue to the next chapter. you can continue to the next chapter.
[haskell.nix]: https://github.com/input-output-hk/haskell.nix

View File

@ -6,14 +6,14 @@ If your project depends on a Hackage package, then the `hackage.nix` revision us
## Updating and pinning `hackage.nix` and `stackage.nix` ## Updating and pinning `hackage.nix` and `stackage.nix`
`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. `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.
These revisions are updated nightly, so you can get newer revisions of `hackage.nix` and `stackage.nix` by updating your revision of `haskell.nix` itself. These revisions are updated nightly, so you can get newer revisions of `hackage.nix` and `stackage.nix` by updating your revision of `haskell.nix` itself.
However, this exposes you to changes in `haskell.nix` which you may not want, such as changes that force compiler rebuilds, or the occasional bug. However, this exposes you to changes in `haskell.nix` which you may not want, such as changes that force compiler rebuilds, or the occasional bug.
Instead, you can pin `hackage.nix` and `stackage.nix` independently. For example: Instead, you can pin `hackage.nix` and `stackage.nix` independently. For example:
```nix ```nix
let let
# You can use a tool like `niv` to manage this boilerplate # You can use a tool like `niv` to manage this boilerplate
hackageSrc = builtins.fetchTarball https://github.com/input-output-hk/hackage.nix/archive/master.tar.gz; hackageSrc = builtins.fetchTarball https://github.com/input-output-hk/hackage.nix/archive/master.tar.gz;
stackageSrc = builtins.fetchTarball https://github.com/input-output-hk/stackage.nix/archive/master.tar.gz; stackageSrc = builtins.fetchTarball https://github.com/input-output-hk/stackage.nix/archive/master.tar.gz;

View File

@ -4,7 +4,7 @@
Capturing and storing the nix files for a project so that they do 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 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? ## Why use materialization?
@ -32,7 +32,7 @@ dependencies of nix-tools for instance).
nix files automatically. nix files automatically.
* You are certain that the IFD you materialize is not `system`-dependent. If it was you'd * You are certain that the IFD you materialize is not `system`-dependent. If it was you'd
obtain different nix expressions depending on which `system` the IFD was evaluated. obtain different nix expressions depending on which `system` the IFD was evaluated.
## How can we materialize the nix files? ## How can we materialize the nix files?
Lets say we want to build `hlint`. We might start with an `hlint` Lets say we want to build `hlint`. We might start with an `hlint`
@ -150,7 +150,7 @@ store will be read only.
## How can we check `sha256` and `materialized` are up to date? ## 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`. 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` * Removing the materialization files with `rm -rf hlint.materialized`
* Temporarily adding `checkMaterialization = true;` * 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). * It does not help at all in `restricted-eval` mode (Hydra).
* Users will still wind up building or downloading the dependencies * 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 For those reasons it might be best to make a copy instead
of using the `/nix/store/...` path directly. of using the `/nix/store/...` path directly.
If you really want to use 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: a non-existing path is now an error:
```nix ```nix

View File

@ -2,8 +2,9 @@
Cabal files may contain dependencies to external non-Haskell Cabal files may contain dependencies to external non-Haskell
dependencies via: 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). * [`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)
* [`frameworks`](https://cabal.readthedocs.io/en/latest/developing-packages.html#pkg-field-frameworks) * [`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) * [`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 that we wish to use. This is mostly handled automatically by
`nix-tools` and `haskell.nix` however when we want to use a nix `nix-tools` and `haskell.nix` however when we want to use a nix
system that is configured to use restricted mode (typically hydra) 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 When using `project`, `cabalProject` or `stackProject` functions
you can include the hash needed in a comment. you can include the hash needed in a comment.

View File

@ -65,7 +65,7 @@ let
nextState (builtins.head pair) (builtins.elemAt pair 1) nextState (builtins.head pair) (builtins.elemAt pair 1)
else else
if name != null 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; } else __trace "Expected attribute but found `${s}`" { inherit name attrs; }
) { name = null; attrs = {}; } (stripComments (unindent blockLines))).attrs; ) { name = null; attrs = {}; } (stripComments (unindent blockLines))).attrs;

View File

@ -18,7 +18,7 @@ in
, cabalProject ? readIfExists src cabalProjectFileName , cabalProject ? readIfExists src cabalProjectFileName
, cabalProjectLocal ? readIfExists src "${cabalProjectFileName}.local" , cabalProjectLocal ? readIfExists src "${cabalProjectFileName}.local"
, cabalProjectFreeze ? readIfExists src "${cabalProjectFileName}.freeze" , 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` , ghc ? null # Deprecated in favour of `compiler-nix-name`
, ghcOverride ? null # Used when we need to set ghc explicitly during bootstrapping , 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 , 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`. , configureArgs ? "" # Extra arguments to pass to `cabal v2-configure`.
# `--enable-tests --enable-benchmarks` are included by default. # `--enable-tests --enable-benchmarks` are included by default.
# If the tests and benchmarks are not needed and they # 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";` # `configureArgs = "--disable-tests --disable-benchmarks";`
, sha256map ? null , sha256map ? null
# An alternative to adding `--sha256` comments into the # 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 # Deal with source-repository-packages in a way that will work in
# restricted-eval mode (as long as a sha256 is included). # restricted-eval mode (as long as a sha256 is included).
# Replace source-repository-package blocks that have a sha256 with # 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: replaceSoureRepos = projectFile:
let let
blocks = pkgs.lib.splitString "\nsource-repository-package\n" ("\n" + projectFile); blocks = pkgs.lib.splitString "\nsource-repository-package\n" ("\n" + projectFile);
@ -194,7 +194,7 @@ let
} }
else replaceSoureRepos rawCabalProject; 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 # * 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 # 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. # GHC to be used it must be rebuilt before the list of jobs can be assembled.
@ -377,7 +377,7 @@ let
# This creates `.cabal` directory that is as it would have # This creates `.cabal` directory that is as it would have
# been at the time `cached-index-state`. We may include # been at the time `cached-index-state`. We may include
# some packages that will be excluded by `index-state-found` # some packages that will be excluded by `index-state-found`
# which is used by cabal (cached-index-state >= index-state-found). # which is used by cabal (cached-index-state >= index-state-found).
dotCabal { dotCabal {
inherit cabal-install nix-tools extra-hackage-tarballs; inherit cabal-install nix-tools extra-hackage-tarballs;
index-state = cached-index-state; index-state = cached-index-state;

View File

@ -6,7 +6,7 @@ let
# Transform # Transform
# "." -> "" # "." -> ""
# "./." -> "" # "./." -> ""
# "./xyz" -> "xyz" # "./xyz" -> "xyz"
normalizeRelativePath = rel: normalizeRelativePath = rel:
if rel == "." || rel == "./." if rel == "." || rel == "./."
then "" then ""
@ -86,4 +86,4 @@ in
|| traceReason "extra source file" (extraSrcMatch rPath) || traceReason "extra source file" (extraSrcMatch rPath)
|| traceReason "extra doc file" (extraDocMatch rPath) || traceReason "extra doc file" (extraDocMatch rPath)
|| traceReason "other source file" (lib.any (f: f == rPath) otherSourceFiles); || traceReason "other source file" (lib.any (f: f == rPath) otherSourceFiles);
} }

View File

@ -1,7 +1,7 @@
# This is a source filter function which cleans common build products # This is a source filter function which cleans common build products
# and files not needed to do a haskell build from a source directory. # 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, # It should be used with "pkgs.lib.cleanSourceWith". Alternatively,
# use the convenience function "cleanSourceHaskell". # use the convenience function "cleanSourceHaskell".

View File

@ -40,7 +40,7 @@
# relative references to those siblings will work. # relative references to those siblings will work.
# #
# name: Optional name to use as part of the store path. # 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 # from the `subDir`. You should provide `name` or
# `subDir`. If you do not a warning will be displayed # `subDir`. If you do not a warning will be displayed
# and the name used will be `source`. # and the name used will be `source`.
@ -80,7 +80,7 @@
else else
if subDirName != "" if subDirName != ""
then if src ? name then if src ? name
then src.name + "-" + subDirName then src.name + "-" + subDirName
else "source-" + subDirName else "source-" + subDirName
else if src ? name else if src ? name
then src.name then src.name
@ -120,4 +120,4 @@
src ? _isLibCleanSourceWithEx src ? _isLibCleanSourceWithEx
|| src ? _isLibCleanSourceWith || src ? _isLibCleanSourceWith
|| !(pathHasContext (toString src)); || !(pathHasContext (toString src));
} }

View File

@ -248,7 +248,7 @@ in {
&& stdenv.hostPlatform == stdenv.targetPlatform; && stdenv.hostPlatform == stdenv.targetPlatform;
# Takes a version number or attr set of arguments (for cabalProject) # 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"; ... } # the use of "1.0.0.0" or { version = "1.0.0.0"; ... }
versionOrArgsToArgs = versionOrArgs: versionOrArgsToArgs = versionOrArgs:
if lib.isAttrs versionOrArgs if lib.isAttrs versionOrArgs

View File

@ -21,7 +21,7 @@ let
in in
pkgs.lib.lists.head (rs ++ [ null ]); pkgs.lib.lists.head (rs ++ [ null ]);
# If we found a resolver andwe have a resolverSha256 then we should download it. # If we found a resolver and we have a resolverSha256 then we should download it.
fetchedResolver = fetchedResolver =
if resolver != null && resolverSha256 != null if resolver != null && resolverSha256 != null
then pkgs.fetchurl { then pkgs.fetchurl {

View File

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

View File

@ -26,7 +26,7 @@ let
inherit src stackYaml resolverSha256; inherit src stackYaml resolverSha256;
}) resolver fetchedResolver; }) 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 = maybeCleanedSource =
if haskellLib.canCleanSource src if haskellLib.canCleanSource src
then haskellLib.cleanSourceWith { then haskellLib.cleanSourceWith {
@ -39,7 +39,7 @@ let
# All repos served via ssh or git protocols are usually private # All repos served via ssh or git protocols are usually private
private = url: pkgs.lib.substring 0 4 url != "http"; private = url: pkgs.lib.substring 0 4 url != "http";
repos = builtins.fromJSON (builtins.readFile (pkgs.runCommand "stack-repos" { repos = builtins.fromJSON (builtins.readFile (pkgs.runCommand "stack-repos" {
buildInputs = [ nix-tools ]; buildInputs = [ nix-tools ];
} '' } ''

View File

@ -1,4 +1,4 @@
# Maps of system pkg refenreces from # Maps of system pkg references from
# cabal file to nixpkgs pkgs. # cabal file to nixpkgs pkgs.
# See ../docs/dev/pkg-map.md # See ../docs/dev/pkg-map.md
pkgs: pkgs:
@ -94,5 +94,5 @@ pkgs:
Crypt32 = null; Crypt32 = null;
} }
# -- os x # -- 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 // 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: # This will include:
# - 01-index.tar.gz (the index file) # - 01-index.tar.gz (the index file)
@ -12,7 +12,7 @@
# #
# We will create a completely unsigned bare repository. Using signing keys within # 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 # nix would be pointless as we'd have to hardcode them to produce the same output
# reproducably. # reproducibly.
# #
pkgs: pkgs:
{ name, index }: { name, index }:

View File

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

View File

@ -9,9 +9,9 @@ let
in 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 # 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 # 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. # and if it's not a list of -/+ prefixed strings, be assumed to be overwriting.
# This seems ugly. # This seems ugly.

View File

@ -1,6 +1,6 @@
# This file is for configuration that should be required by every # This file is for configuration that should be required by every
# package set. Hopefully we can keep configuration for particular # 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. # fixing things that are broken due to the Nix infrastructure.
{ pkgs, ... }: { { pkgs, ... }: {

View File

@ -67,7 +67,7 @@ in {
# in the nixpkgs setup, and properly override the # in the nixpkgs setup, and properly override the
# complier as needed. # complier as needed.
default = pkgs.buildPackages.haskell-nix.compiler.${config.compiler.nix-name} or (throw '' default = pkgs.buildPackages.haskell-nix.compiler.${config.compiler.nix-name} or (throw ''
This version of Nixpkgs does not contain GHC ${config.compiler.version} This version of Nixpkgs does not contain GHC ${config.compiler.version}
(or it is not present at attribute '${config.compiler.nix-name})'). (or it is not present at attribute '${config.compiler.nix-name})').
Either switch to a version of Nixpkgs which does have this version, or use a version Either switch to a version of Nixpkgs which does have this version, or use a version
of GHC which the current version of Nixpkgs contains. of GHC which the current version of Nixpkgs contains.

View File

@ -226,7 +226,7 @@ in {
doExactConfig = false; doExactConfig = false;
# We have to set hsSourceDirs or cleanCabalComponent will # We have to set hsSourceDirs or cleanCabalComponent will
# include everything (and as a result all the components of # 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 # TODO find a better way
hsSourceDirs = ["setup-src"]; hsSourceDirs = ["setup-src"];
includeDirs = []; includeDirs = [];

View File

@ -1,5 +1,5 @@
# The plan (that is, a package set description like an LTS set or a # 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: # looks like, which is stored in config.plan.pkg-def:
# #
# { packages = { "package" = { revision = hackageConfigs.$package.$version.revisions.default; # { packages = { "package" = { revision = hackageConfigs.$package.$version.revisions.default;
@ -16,9 +16,9 @@ with lib;
with types; with types;
let 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. # 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 # without raising an error. And a way to fetch default options that will retain `null` if the
# option is not defined or "". # option is not defined or "".
getDefaultOrNull = def: key: if def ? ${key} && def.${key} != "" then def.${key} else null; 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. # 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. # the nix-tools materialization without it.
# #
# Without this script: # Without this script:
@ -8,7 +8,7 @@
# 2. run `nix-build -E '(import ./. { checkMaterialization = true; }).pkgs.haskell-nix.nix-tools'` # 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) # 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.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; }' # 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. # 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; doCrossCheck = pkgs.stdenv.hostPlatform.isWindows;
}; };
in { in {
packages = { 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)) ]; 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) ]; # 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) ]; # 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:
) )
]; ];
}); });
} }

View File

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

View File

@ -29,7 +29,7 @@ let
ordered = with overlays; [ ordered = with overlays; [
# Hide nixpkgs haskell and haskellPackages from the haskell-nix 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: { (_: prev: {
haskell = { }; haskell = { };
haskellPackages = { }; haskellPackages = { };

View File

@ -56,7 +56,7 @@ stdenv.mkDerivation {
cp $out/${appdir}/config $HOME/.emscripten cp $out/${appdir}/config $HOME/.emscripten
export PATH=$PATH:$out/bin export PATH=$PATH:$out/bin
#export EMCC_DEBUG=2 #export EMCC_DEBUG=2
${python}/bin/python $src/tests/runner.py test_hello_world ${python}/bin/python $src/tests/runner.py test_hello_world
echo "--------------- /running test -----------------" echo "--------------- /running test -----------------"
''; '';

View File

@ -17,13 +17,13 @@ in { haskell-nix = prev.haskell-nix // {
packages: . packages: .
allow-newer: cabal-install:base allow-newer: cabal-install:base
''; '';
modules = [ modules = [
{ reinstallableLibGhc = true; } { 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") { (lib.optionalAttrs (version == "3.2.0.0") {
packages.cabal-install.src = final.haskell-nix.sources.cabal-32 + "/cabal-install"; packages.cabal-install.src = final.haskell-nix.sources.cabal-32 + "/cabal-install";
}) })
]; ];
}; };
hpack = { hpack = {

View File

@ -2,7 +2,7 @@
, ... }: , ... }:
# The haskell.nix infrastructure # 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. # Using haskell.nix in nix is awkward as I needs to be quoted.
final: prev: { final: prev: {
haskell-nix = with final.haskell-nix; { haskell-nix = with final.haskell-nix; {
@ -234,7 +234,7 @@ final: prev: {
''; '';
# Some of features of haskell.nix rely on using a hackage index # 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. # to allow the outputs to be materialized we pin this value here.
# If you want to update this value it important to check the # If you want to update this value it important to check the
# materializations. Turn `checkMaterialization` on below and # materializations. Turn `checkMaterialization` on below and
@ -348,7 +348,7 @@ final: prev: {
# stack-to-nix or plan-to-nix to prevent them # stack-to-nix or plan-to-nix to prevent them
# from needing network access. # from needing network access.
# The cache contains only local paths to nix files so that it can # 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. # mode.
mkCacheFile = repos: mkCacheFile = repos:
final.buildPackages.pkgs.runCommand "cache-file" {} '' 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 # from hackage. This is useful if you want to build an executable from
# a given package. # a given package.
# NB: If no explicit index-state is provided the most recent one from # NB: If no explicit index-state is provided the most recent one from
# the index-state-hashes is used. This guarantees reproducability wrt # the index-state-hashes is used. This guarantees reproducibility wrt
# to the haskell.nix revision. If reproducability beyond haskell.nix # to the haskell.nix revision. If reproducibility beyond haskell.nix
# is required, a specific index-state should be provided! # is required, a specific index-state should be provided!
hackage-package = hackage-package =
{ name, compiler-nix-name, ... }@args': { name, compiler-nix-name, ... }@args':
@ -567,9 +567,9 @@ final: prev: {
# `projectFileName = "cabal.project";` # `projectFileName = "cabal.project";`
# to let it know which to choose (or pick another name). If the # 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`. # 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`). # used (as it will use a default `cabal.project`).
project' = { src, projectFileName ? null, ... }@args': project' = { src, projectFileName ? null, ... }@args':
let let
args = { caller = "project'"; } // args'; args = { caller = "project'"; } // args';
dir = __readDir (src.origSrcSubDir or src); dir = __readDir (src.origSrcSubDir or src);

View File

@ -1,6 +1,6 @@
let let
# Here we try to figure out which qemu to use based on the host platform. # 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: qemuByHostPlatform = hostPlatform:
# I'd prefer this was a dictionary lookup, with a fall through into abort, # 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 # 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; }; busybox-sandbox-shell = prev.busybox-sandbox-shell.override { inherit (final) busybox; };
# we don't want the static output to be split. That just # 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 # z -> libz / z -> libz.static mapping without threading the
# package configuration in. That seems a bit overkill. # package configuration in. That seems a bit overkill.
zlib = prev.zlib.override { splitStaticOutput = false; }; zlib = prev.zlib.override { splitStaticOutput = false; };

View File

@ -5,7 +5,7 @@
final: prev: final: prev:
{ {
# on windows we have this habit of putting libraries # 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 # this confuses nix easily. So we'll just move the
# .dll's from `bin` into `$out/lib`. Such that they # .dll's from `bin` into `$out/lib`. Such that they
# are trivially found. # are trivially found.
@ -45,7 +45,7 @@ final: prev:
# extra-test-libs = [ pkgs.rocksdb pkgs.openssl.bin pkgs.libffi pkgs.gmp ]; # extra-test-libs = [ pkgs.rocksdb pkgs.openssl.bin pkgs.libffi pkgs.gmp ];
} // { } // {
# we can perform testing of cross compiled test-suites by using wine. # 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; doCrossCheck = pkgs.stdenv.hostPlatform.isWindows;
}; };
in { in {
@ -79,9 +79,9 @@ final: prev:
# } # }
# else null)) ]; # 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)) ]; 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) ]; 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 # this patch seems to be rather flaky and highly dependent on
@ -126,4 +126,4 @@ final: prev:
) )
]; ];
}); });
} }

View File

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

View File

@ -1,5 +1,5 @@
# '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! # on a machine with e.g. no way to build the Darwin IFDs you need!
{ supportedSystems ? [ "x86_64-linux" "x86_64-darwin" ] { supportedSystems ? [ "x86_64-linux" "x86_64-darwin" ]
, ifdLevel ? 3 , ifdLevel ? 3
, checkMaterialization ? false }: , checkMaterialization ? false }:

View File

@ -21,7 +21,7 @@ writeScript "check-closure-size.sh" ''
echo "$nt" echo "$nt"
total=$(awk '$2 == "total" { print $1; }' <<< "$nt") total=$(awk '$2 == "total" { print $1; }' <<< "$nt")
if [ $total -gt ${toString limitMB} ]; then if [ $total -gt ${toString limitMB} ]; then
echo "Closure size exceeds limit of ${toString limitMB}MB!" echo "Closure size exceeds limit of ${toString limitMB}MB!"
exit 1 exit 1

View File

@ -39,7 +39,7 @@ let
${ if lib.hasAttr "example" value ${ if lib.hasAttr "example" value
then '' then ''
**Example**: **Example**:
${builtins.toJSON value.example} ${builtins.toJSON value.example}
'' ''
else "**No Example**" else "**No Example**"

View File

@ -3,24 +3,24 @@ with builtins;
with stdenv.lib; with stdenv.lib;
writeShellScriptBin "update-index-state-hashes" '' writeShellScriptBin "update-index-state-hashes" ''
export PATH="${makeBinPath [ coreutils nix-tools nix curl ]}" export PATH="${makeBinPath [ coreutils nix-tools nix curl ]}"
# We'll take the last element from the indexStatesHashes file via nix and get the name. # We'll take the last element from the indexStatesHashes file via nix and get the name.
# This is the last timestamp recorded in the file (implicit assumption: the file is # This is the last timestamp recorded in the file (implicit assumption: the file is
# ordered, and nix preserved that order when parsing it into a attributeset). # ordered, and nix preserved that order when parsing it into a attributeset).
start=${let ls = attrNames (import indexStateHashesPath); in elemAt ls (length ls - 1)} start=${let ls = attrNames (import indexStateHashesPath); in elemAt ls (length ls - 1)}
# The indexStatesHashesPath looks like # The indexStatesHashesPath looks like
# { # {
# ... # ...
# } # }
# Idea: take everything but drop the last line, and can then just append each new # Idea: take everything but drop the last line, and can then just append each new
# entry and finally close the file with "}". We'll do this by echoing to STDOUT! # entry and finally close the file with "}". We'll do this by echoing to STDOUT!
# Old file without the closing curly brace. # Old file without the closing curly brace.
cat ${indexStateHashesPath} | head -n -1 cat ${indexStateHashesPath} | head -n -1
# Parse the $start date, and now into seconds with the date command. Then walk # Parse the $start date, and now into seconds with the date command. Then walk
# them by 86400 (24*60*60) days. We need to format the output with '%.f' as we # them by 86400 (24*60*60) days. We need to format the output with '%.f' as we
# don't want fractional values. # don't want fractional values.
for d in $(seq -f '%.f' $(date -u +%s -d $start) 86400 $(date -u +%s)) ; do for d in $(seq -f '%.f' $(date -u +%s -d $start) 86400 $(date -u +%s)) ; do
# turn the step date $d into a YYYY-MM-DD string, and generate the truncated # turn the step date $d into a YYYY-MM-DD string, and generate the truncated
@ -35,7 +35,7 @@ writeShellScriptBin "update-index-state-hashes" ''
echo " \"''${dt}T00:00:00Z\" = \"''${sha256}\";" echo " \"''${dt}T00:00:00Z\" = \"''${sha256}\";"
fi fi
done done
# emit the final closing brace. # emit the final closing brace.
echo '}' echo '}'
'' ''

View File

@ -18,7 +18,7 @@ in recurseIntoAttrs {
run = stdenv.mkDerivation { run = stdenv.mkDerivation {
name = "buildable-test"; name = "buildable-test";
buildCommand = buildCommand =
(concatStrings (mapAttrsToList (name: value: '' (concatStrings (mapAttrsToList (name: value: ''
printf "checking whether executable runs... " >& 2 printf "checking whether executable runs... " >& 2
cat ${haskellLib.check value} cat ${haskellLib.check value}

View File

@ -2,19 +2,19 @@ let
buildDepError = pkg: buildDepError = pkg:
builtins.throw '' builtins.throw ''
The Haskell package set does not contain the package: ${pkg} (build dependency). The Haskell package set does not contain the package: ${pkg} (build dependency).
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. 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.
''; '';
sysDepError = pkg: sysDepError = pkg:
builtins.throw '' builtins.throw ''
The Nixpkgs package set does not contain the package: ${pkg} (system dependency). The Nixpkgs package set does not contain the package: ${pkg} (system dependency).
You may need to augment the system package mapping in haskell.nix so that it can be found. You may need to augment the system package mapping in haskell.nix so that it can be found.
''; '';
pkgConfDepError = pkg: pkgConfDepError = pkg:
builtins.throw '' builtins.throw ''
The pkg-conf packages does not contain the package: ${pkg} (pkg-conf dependency). The pkg-conf packages does not contain the package: ${pkg} (pkg-conf dependency).
You may need to augment the pkg-conf package mapping in haskell.nix so that it can be found. You may need to augment the pkg-conf package mapping in haskell.nix so that it can be found.
''; '';
exeDepError = pkg: exeDepError = pkg:
@ -24,16 +24,16 @@ let
legacyExeDepError = pkg: legacyExeDepError = pkg:
builtins.throw '' builtins.throw ''
The Haskell package set does not contain the package: ${pkg} (executable dependency). The Haskell package set does not contain the package: ${pkg} (executable dependency).
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. 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.
''; '';
buildToolDepError = pkg: buildToolDepError = pkg:
builtins.throw '' builtins.throw ''
Neither the Haskell package set or the Nixpkgs package set contain the package: ${pkg} (build tool dependency). Neither the Haskell package set or the Nixpkgs package set contain the package: ${pkg} (build tool dependency).
If this is a system dependency: If this is a system dependency:
You may need to augment the system package mapping in haskell.nix so that it can be found. You may need to augment the system package mapping in haskell.nix so that it can be found.
If this is a Haskell dependency: If this is a Haskell dependency:
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. 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.
''; '';
@ -63,4 +63,4 @@ in { system, compiler, flags, pkgs, hsPkgs, pkgconfPkgs, ... }:
buildable = true; buildable = true;
}; };
}; };
} // rec { src = (pkgs.lib).mkDefault ../.; } } // rec { src = (pkgs.lib).mkDefault ../.; }

View File

@ -2,19 +2,19 @@ let
buildDepError = pkg: buildDepError = pkg:
builtins.throw '' builtins.throw ''
The Haskell package set does not contain the package: ${pkg} (build dependency). The Haskell package set does not contain the package: ${pkg} (build dependency).
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. 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.
''; '';
sysDepError = pkg: sysDepError = pkg:
builtins.throw '' builtins.throw ''
The Nixpkgs package set does not contain the package: ${pkg} (system dependency). The Nixpkgs package set does not contain the package: ${pkg} (system dependency).
You may need to augment the system package mapping in haskell.nix so that it can be found. You may need to augment the system package mapping in haskell.nix so that it can be found.
''; '';
pkgConfDepError = pkg: pkgConfDepError = pkg:
builtins.throw '' builtins.throw ''
The pkg-conf packages does not contain the package: ${pkg} (pkg-conf dependency). The pkg-conf packages does not contain the package: ${pkg} (pkg-conf dependency).
You may need to augment the pkg-conf package mapping in haskell.nix so that it can be found. You may need to augment the pkg-conf package mapping in haskell.nix so that it can be found.
''; '';
exeDepError = pkg: exeDepError = pkg:
@ -24,16 +24,16 @@ let
legacyExeDepError = pkg: legacyExeDepError = pkg:
builtins.throw '' builtins.throw ''
The Haskell package set does not contain the package: ${pkg} (executable dependency). The Haskell package set does not contain the package: ${pkg} (executable dependency).
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. 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.
''; '';
buildToolDepError = pkg: buildToolDepError = pkg:
builtins.throw '' builtins.throw ''
Neither the Haskell package set or the Nixpkgs package set contain the package: ${pkg} (build tool dependency). Neither the Haskell package set or the Nixpkgs package set contain the package: ${pkg} (build tool dependency).
If this is a system dependency: If this is a system dependency:
You may need to augment the system package mapping in haskell.nix so that it can be found. You may need to augment the system package mapping in haskell.nix so that it can be found.
If this is a Haskell dependency: If this is a Haskell dependency:
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. 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.
''; '';

View File

@ -2,8 +2,8 @@
with stdenv.lib; with stdenv.lib;
let let
hackage = import ./hackage; hackage = import ./hackage;
tarball = { tarball = {
@ -57,10 +57,10 @@ in recurseIntoAttrs {
otool -L $exe |grep .dylib otool -L $exe |grep .dylib
'')) + '' '')) + ''
touch $out touch $out
''; '';
meta.platforms = platforms.all; meta.platforms = platforms.all;
passthru = { passthru = {
inherit project; inherit project;
}; };
}; };
} }

View File

@ -2,19 +2,19 @@ let
buildDepError = pkg: buildDepError = pkg:
builtins.throw '' builtins.throw ''
The Haskell package set does not contain the package: ${pkg} (build dependency). The Haskell package set does not contain the package: ${pkg} (build dependency).
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. 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.
''; '';
sysDepError = pkg: sysDepError = pkg:
builtins.throw '' builtins.throw ''
The Nixpkgs package set does not contain the package: ${pkg} (system dependency). The Nixpkgs package set does not contain the package: ${pkg} (system dependency).
You may need to augment the system package mapping in haskell.nix so that it can be found. You may need to augment the system package mapping in haskell.nix so that it can be found.
''; '';
pkgConfDepError = pkg: pkgConfDepError = pkg:
builtins.throw '' builtins.throw ''
The pkg-conf packages does not contain the package: ${pkg} (pkg-conf dependency). The pkg-conf packages does not contain the package: ${pkg} (pkg-conf dependency).
You may need to augment the pkg-conf package mapping in haskell.nix so that it can be found. You may need to augment the pkg-conf package mapping in haskell.nix so that it can be found.
''; '';
exeDepError = pkg: exeDepError = pkg:
@ -24,16 +24,16 @@ let
legacyExeDepError = pkg: legacyExeDepError = pkg:
builtins.throw '' builtins.throw ''
The Haskell package set does not contain the package: ${pkg} (executable dependency). The Haskell package set does not contain the package: ${pkg} (executable dependency).
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. 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.
''; '';
buildToolDepError = pkg: buildToolDepError = pkg:
builtins.throw '' builtins.throw ''
Neither the Haskell package set or the Nixpkgs package set contain the package: ${pkg} (build tool dependency). Neither the Haskell package set or the Nixpkgs package set contain the package: ${pkg} (build tool dependency).
If this is a system dependency: If this is a system dependency:
You may need to augment the system package mapping in haskell.nix so that it can be found. You may need to augment the system package mapping in haskell.nix so that it can be found.
If this is a Haskell dependency: If this is a Haskell dependency:
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. 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.
''; '';
@ -73,4 +73,4 @@ in { system, compiler, flags, pkgs, hsPkgs, pkgconfPkgs, config, ... }:
url = "http://not-there//package/external-package-demo-0.1.0.0/external-package-demo-0.1.0.0.tar.gz"; url = "http://not-there//package/external-package-demo-0.1.0.0/external-package-demo-0.1.0.0.tar.gz";
sha256 = config.sha256; sha256 = config.sha256;
}); });
} }

View File

@ -3,7 +3,7 @@
inherit compiler-nix-name; inherit compiler-nix-name;
name = "pandoc"; name = "pandoc";
version = "2.9.2.1"; version = "2.9.2.1";
index-state = "2020-05-25T00:00:00Z"; index-state = "2020-05-25T00:00:00Z";
# Function that returns a sha256 string by looking up the location # Function that returns a sha256 string by looking up the location
# and tag in a nested attrset # and tag in a nested attrset
lookupSha256 = { location, tag, ... }: lookupSha256 = { location, tag, ... }:

View File

@ -47,11 +47,11 @@ writeScript "regen-tests.sh" ''
cd cabal-simple cd cabal-simple
regen cabal-simple regen cabal-simple
cd .. cd ..
cd cabal-sublib cd cabal-sublib
regen cabal-sublib regen cabal-sublib
cd .. cd ..
cd with-packages cd with-packages
regen test-with-packages regen test-with-packages

View File

@ -15,10 +15,10 @@ let
env = project.hsPkgs.shellFor {}; 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. # 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 # 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. # This problem affects musl as well as the build libraries are linked to glibc.
in recurseIntoAttrs (if stdenv.buildPlatform != stdenv.hostPlatform in recurseIntoAttrs (if stdenv.buildPlatform != stdenv.hostPlatform
then then

View File

@ -2,19 +2,19 @@ let
buildDepError = pkg: buildDepError = pkg:
builtins.throw '' builtins.throw ''
The Haskell package set does not contain the package: ${pkg} (build dependency). The Haskell package set does not contain the package: ${pkg} (build dependency).
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. 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.
''; '';
sysDepError = pkg: sysDepError = pkg:
builtins.throw '' builtins.throw ''
The Nixpkgs package set does not contain the package: ${pkg} (system dependency). The Nixpkgs package set does not contain the package: ${pkg} (system dependency).
You may need to augment the system package mapping in haskell.nix so that it can be found. You may need to augment the system package mapping in haskell.nix so that it can be found.
''; '';
pkgConfDepError = pkg: pkgConfDepError = pkg:
builtins.throw '' builtins.throw ''
The pkg-conf packages does not contain the package: ${pkg} (pkg-conf dependency). The pkg-conf packages does not contain the package: ${pkg} (pkg-conf dependency).
You may need to augment the pkg-conf package mapping in haskell.nix so that it can be found. You may need to augment the pkg-conf package mapping in haskell.nix so that it can be found.
''; '';
exeDepError = pkg: exeDepError = pkg:
@ -24,16 +24,16 @@ let
legacyExeDepError = pkg: legacyExeDepError = pkg:
builtins.throw '' builtins.throw ''
The Haskell package set does not contain the package: ${pkg} (executable dependency). The Haskell package set does not contain the package: ${pkg} (executable dependency).
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. 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.
''; '';
buildToolDepError = pkg: buildToolDepError = pkg:
builtins.throw '' builtins.throw ''
Neither the Haskell package set or the Nixpkgs package set contain the package: ${pkg} (build tool dependency). Neither the Haskell package set or the Nixpkgs package set contain the package: ${pkg} (build tool dependency).
If this is a system dependency: If this is a system dependency:
You may need to augment the system package mapping in haskell.nix so that it can be found. You may need to augment the system package mapping in haskell.nix so that it can be found.
If this is a Haskell dependency: If this is a Haskell dependency:
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. 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.
''; '';
@ -70,4 +70,4 @@ in { system, compiler, flags, pkgs, hsPkgs, pkgconfPkgs, ... }:
}; };
}; };
}; };
} // rec { src = (pkgs.lib).mkDefault ../pkga; } } // rec { src = (pkgs.lib).mkDefault ../pkga; }

View File

@ -2,19 +2,19 @@ let
buildDepError = pkg: buildDepError = pkg:
builtins.throw '' builtins.throw ''
The Haskell package set does not contain the package: ${pkg} (build dependency). The Haskell package set does not contain the package: ${pkg} (build dependency).
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. 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.
''; '';
sysDepError = pkg: sysDepError = pkg:
builtins.throw '' builtins.throw ''
The Nixpkgs package set does not contain the package: ${pkg} (system dependency). The Nixpkgs package set does not contain the package: ${pkg} (system dependency).
You may need to augment the system package mapping in haskell.nix so that it can be found. You may need to augment the system package mapping in haskell.nix so that it can be found.
''; '';
pkgConfDepError = pkg: pkgConfDepError = pkg:
builtins.throw '' builtins.throw ''
The pkg-conf packages does not contain the package: ${pkg} (pkg-conf dependency). The pkg-conf packages does not contain the package: ${pkg} (pkg-conf dependency).
You may need to augment the pkg-conf package mapping in haskell.nix so that it can be found. You may need to augment the pkg-conf package mapping in haskell.nix so that it can be found.
''; '';
exeDepError = pkg: exeDepError = pkg:
@ -24,16 +24,16 @@ let
legacyExeDepError = pkg: legacyExeDepError = pkg:
builtins.throw '' builtins.throw ''
The Haskell package set does not contain the package: ${pkg} (executable dependency). The Haskell package set does not contain the package: ${pkg} (executable dependency).
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. 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.
''; '';
buildToolDepError = pkg: buildToolDepError = pkg:
builtins.throw '' builtins.throw ''
Neither the Haskell package set or the Nixpkgs package set contain the package: ${pkg} (build tool dependency). Neither the Haskell package set or the Nixpkgs package set contain the package: ${pkg} (build tool dependency).
If this is a system dependency: If this is a system dependency:
You may need to augment the system package mapping in haskell.nix so that it can be found. You may need to augment the system package mapping in haskell.nix so that it can be found.
If this is a Haskell dependency: If this is a Haskell dependency:
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. 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.
''; '';
@ -91,4 +91,4 @@ in { system, compiler, flags, pkgs, hsPkgs, pkgconfPkgs, ... }:
}; };
}; };
}; };
} // rec { src = (pkgs.lib).mkDefault ../pkgb; } } // rec { src = (pkgs.lib).mkDefault ../pkgb; }

View File

@ -2,19 +2,19 @@ let
buildDepError = pkg: buildDepError = pkg:
builtins.throw '' builtins.throw ''
The Haskell package set does not contain the package: ${pkg} (build dependency). The Haskell package set does not contain the package: ${pkg} (build dependency).
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. 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.
''; '';
sysDepError = pkg: sysDepError = pkg:
builtins.throw '' builtins.throw ''
The Nixpkgs package set does not contain the package: ${pkg} (system dependency). The Nixpkgs package set does not contain the package: ${pkg} (system dependency).
You may need to augment the system package mapping in haskell.nix so that it can be found. You may need to augment the system package mapping in haskell.nix so that it can be found.
''; '';
pkgConfDepError = pkg: pkgConfDepError = pkg:
builtins.throw '' builtins.throw ''
The pkg-conf packages does not contain the package: ${pkg} (pkg-conf dependency). The pkg-conf packages does not contain the package: ${pkg} (pkg-conf dependency).
You may need to augment the pkg-conf package mapping in haskell.nix so that it can be found. You may need to augment the pkg-conf package mapping in haskell.nix so that it can be found.
''; '';
exeDepError = pkg: exeDepError = pkg:
@ -24,16 +24,16 @@ let
legacyExeDepError = pkg: legacyExeDepError = pkg:
builtins.throw '' builtins.throw ''
The Haskell package set does not contain the package: ${pkg} (executable dependency). The Haskell package set does not contain the package: ${pkg} (executable dependency).
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. 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.
''; '';
buildToolDepError = pkg: buildToolDepError = pkg:
builtins.throw '' builtins.throw ''
Neither the Haskell package set or the Nixpkgs package set contain the package: ${pkg} (build tool dependency). Neither the Haskell package set or the Nixpkgs package set contain the package: ${pkg} (build tool dependency).
If this is a system dependency: If this is a system dependency:
You may need to augment the system package mapping in haskell.nix so that it can be found. You may need to augment the system package mapping in haskell.nix so that it can be found.
If this is a Haskell dependency: If this is a Haskell dependency:
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. 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.
''; '';
@ -80,4 +80,4 @@ in { system, compiler, flags, pkgs, hsPkgs, pkgconfPkgs, ... }:
}; };
} // rec { src = (pkgs.lib).mkDefault ./.; }) // { } // rec { src = (pkgs.lib).mkDefault ./.; }) // {
cabal-generator = "hpack"; cabal-generator = "hpack";
} }

View File

@ -2,19 +2,19 @@ let
buildDepError = pkg: buildDepError = pkg:
builtins.throw '' builtins.throw ''
The Haskell package set does not contain the package: ${pkg} (build dependency). The Haskell package set does not contain the package: ${pkg} (build dependency).
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. 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.
''; '';
sysDepError = pkg: sysDepError = pkg:
builtins.throw '' builtins.throw ''
The Nixpkgs package set does not contain the package: ${pkg} (system dependency). The Nixpkgs package set does not contain the package: ${pkg} (system dependency).
You may need to augment the system package mapping in haskell.nix so that it can be found. You may need to augment the system package mapping in haskell.nix so that it can be found.
''; '';
pkgConfDepError = pkg: pkgConfDepError = pkg:
builtins.throw '' builtins.throw ''
The pkg-conf packages does not contain the package: ${pkg} (pkg-conf dependency). The pkg-conf packages does not contain the package: ${pkg} (pkg-conf dependency).
You may need to augment the pkg-conf package mapping in haskell.nix so that it can be found. You may need to augment the pkg-conf package mapping in haskell.nix so that it can be found.
''; '';
exeDepError = pkg: exeDepError = pkg:
@ -24,16 +24,16 @@ let
legacyExeDepError = pkg: legacyExeDepError = pkg:
builtins.throw '' builtins.throw ''
The Haskell package set does not contain the package: ${pkg} (executable dependency). The Haskell package set does not contain the package: ${pkg} (executable dependency).
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. 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.
''; '';
buildToolDepError = pkg: buildToolDepError = pkg:
builtins.throw '' builtins.throw ''
Neither the Haskell package set or the Nixpkgs package set contain the package: ${pkg} (build tool dependency). Neither the Haskell package set or the Nixpkgs package set contain the package: ${pkg} (build tool dependency).
If this is a system dependency: If this is a system dependency:
You may need to augment the system package mapping in haskell.nix so that it can be found. You may need to augment the system package mapping in haskell.nix so that it can be found.
If this is a Haskell dependency: If this is a Haskell dependency:
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. 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.
''; '';
@ -63,4 +63,4 @@ in { system, compiler, flags, pkgs, hsPkgs, pkgconfPkgs, ... }:
buildable = true; buildable = true;
}; };
}; };
} // rec { src = (pkgs.lib).mkDefault ../.; } } // rec { src = (pkgs.lib).mkDefault ../.; }