Skip to content

Commit 4cac8bd

Browse files
authored
Remove internal deps on default ghc and stackage (#738)
Changes to the interface of haskell.nix (from the changelog.md file): * Removed `sources.nixpkgs-default`, use `sources.nixpkgs` instead. * Removed `./nixpkgs` directory, use `(import ./. {}).sources` or `./nix/sources.nix` instead. * Removes V1 interface for details on how to fix old code see: #709 * Removed defaultCompilerNixName. * cabalProject, cabalProject', hackage-project and hackage-package now require a `compiler-nix-name` argument. * `haskell-nix.tool` and `.tools` now require a `compiler-nix-name` argument. New functions `p.tool` and `p.tools` (where p is a project) do not. Like `shellFor { tools = ... }` they will use the compiler nix name from the project (including stack projects where it is derived from the resolver). * `haskell-nix.alex` and `haskell-nix.happy` have been removed. Use `p.tool "alex" "3.2.5"` or `shellFor { tools = { alex = "3.2.5"; } }`. * `haskell-nix.nix-tools` -> `haskell-nix.nix-tools.ghc883` (it includes the hpack exe now). * `haskell-nix.cabal-install` -> `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` Other changes: Adds hpack executable to the nix-tools derivations. Adds a `cabal-hpack` test to make sure `hpack` works with `cabalProject`. Reduces the number of calls to `cabalProject` (particularly when checking materialization), by giving internal tools a per-compiler attribute. Uses happy 1.19.12 when building newer ghc versions. Updates cabal-install 3.2.0.0 to use the source from github that is compatible with ghc 8.10.1. Updates the docs for callCabalProjectToNix. Adds a license mapping to fix a common warning.
1 parent 33445e4 commit 4cac8bd

File tree

84 files changed

+630
-1509
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+630
-1509
lines changed

.buildkite/pipeline.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
steps:
2-
- label: 'Run tests'
3-
command: "./test/tests.sh"
2+
- label: 'Run tests with ghc883'
3+
command: "./test/tests.sh ghc883"
44
agents:
55
system: x86_64-linux
66

@@ -14,9 +14,9 @@ steps:
1414
agents:
1515
system: x86_64-linux
1616

17-
- label: 'Check closure size'
17+
- label: 'Check closure size with ghc883'
1818
command:
19-
- nix-build build.nix -A maintainer-scripts.check-closure-size -o check-closure-size.sh
19+
- nix-build build.nix -A maintainer-scripts.check-closure-size --argstr compiler-nix-name ghc883 -o check-closure-size.sh
2020
- echo "+++ Closure size (MB)"
2121
- ./check-closure-size.sh
2222
agents:
@@ -36,5 +36,5 @@ steps:
3636

3737
- label: 'Make sure non store paths like can be used as src'
3838
command:
39-
- nix-build build.nix -A maintainer-scripts.check-path-support -o check-path-support.sh
39+
- nix-build build.nix -A maintainer-scripts.check-path-support --argstr compiler-nix-name ghc883 -o check-path-support.sh
4040
- ./check-path-support.sh

build.nix

+25-14
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,26 @@
55
let
66
haskellNix = (import ./default.nix {});
77
in
8-
{ nixpkgs ? haskellNix.sources.nixpkgs-default
8+
{ nixpkgs ? haskellNix.sources.nixpkgs
99
, nixpkgsArgs ? haskellNix.nixpkgsArgs
1010
, pkgs ? import nixpkgs nixpkgsArgs
1111
, ifdLevel ? 1000
12+
, compiler-nix-name ? throw "No `compiler-nix-name` passed to build.nix"
1213
}:
1314

1415
let
1516
haskell = pkgs.haskell-nix;
1617
buildHaskell = pkgs.buildPackages.haskell-nix;
1718
tool = buildHaskell.tool;
1819
in rec {
19-
tests = import ./test/default.nix { inherit pkgs ifdLevel; };
20+
tests = import ./test/default.nix { inherit pkgs ifdLevel compiler-nix-name; };
2021

2122
tools = pkgs.lib.optionalAttrs (ifdLevel >= 3) (
2223
pkgs.recurseIntoAttrs {
23-
ghcide-020 = tool "ghcide" "0.2.0";
24-
} // pkgs.lib.optionalAttrs (buildHaskell.defaultCompilerNixName == "ghc865") {
25-
cabal-30 = tool "cabal" "3.0.0.0";
26-
} // pkgs.lib.optionalAttrs (buildHaskell.defaultCompilerNixName != "ghc8101") {
27-
cabal-32 = tool "cabal" "3.2.0.0";
28-
ghcide-object-code = tool "ghcide" "object-code";
24+
ghcide-020 = tool compiler-nix-name "ghcide" "0.2.0";
25+
cabal-32 = tool compiler-nix-name "cabal" "3.2.0.0";
26+
} // pkgs.lib.optionalAttrs (compiler-nix-name != "ghc8101") {
27+
ghcide-object-code = tool compiler-nix-name "ghcide" "object-code";
2928
}
3029
);
3130

@@ -34,8 +33,21 @@ in rec {
3433
# as not all of them can work in restricted eval mode (as they
3534
# are not pure).
3635
maintainer-scripts = pkgs.dontRecurseIntoAttrs {
37-
update-hackage = haskell.callPackage ./scripts/update-hackage.nix {};
38-
update-stackage = haskell.callPackage ./scripts/update-stackage.nix {};
36+
update-hackage = import ./scripts/update-hackage.nix {
37+
inherit (pkgs) stdenv writeScript coreutils glibc git
38+
openssh nix-prefetch-git gawk bash curl findutils;
39+
# Update scripts use the internal nix-tools and cabal-install (compiled with a fixed GHC version)
40+
nix-tools = haskell.internal-nix-tools;
41+
cabal-install = haskell.internal-cabal-install;
42+
inherit (haskell) update-index-state-hashes;
43+
};
44+
update-stackage = haskell.callPackage ./scripts/update-stackage.nix {
45+
inherit (pkgs) stdenv writeScript coreutils glibc git
46+
openssh nix-prefetch-git gawk bash curl findutils;
47+
# Update scripts use the internal nix-tools and cabal-install (compiled with a fixed GHC version)
48+
nix-tools = haskell.internal-nix-tools;
49+
cabal-install = haskell.internal-cabal-install;
50+
};
3951
update-pins = haskell.callPackage ./scripts/update-pins.nix {};
4052
update-docs = pkgs.buildPackages.callPackage ./scripts/update-docs.nix {
4153
generatedOptions = pkgs.callPackage ./scripts/options-doc.nix { };
@@ -47,11 +59,10 @@ in rec {
4759
# use)
4860
check-hydra = pkgs.buildPackages.callPackage ./scripts/check-hydra.nix {};
4961
check-closure-size = pkgs.buildPackages.callPackage ./scripts/check-closure-size.nix {
50-
# Includes cabal-install and hpack since these are commonly used.
62+
# Includes cabal-install since this is commonly used.
5163
nix-tools = pkgs.linkFarm "common-tools" [
52-
{ name = "nix-tools"; path = haskell.nix-tools; }
53-
{ name = "cabal-install"; path = haskell.cabal-install; }
54-
{ name = "hpack"; path = haskell.haskellPackages.hpack.components.exes.hpack; }
64+
{ name = "nix-tools"; path = haskell.nix-tools.${compiler-nix-name}; }
65+
{ name = "cabal-install"; path = haskell.cabal-install.${compiler-nix-name}; }
5566
];
5667
};
5768
check-materialization-concurrency = pkgs.buildPackages.callPackage ./scripts/check-materialization-concurrency/check.nix {};

builder/default.nix

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ pkgs, buildPackages, stdenv, lib, haskellLib, ghc, fetchurl, pkgconfig, nonReinstallablePkgs, hsPkgs }:
1+
{ pkgs, buildPackages, stdenv, lib, haskellLib, ghc, fetchurl, pkgconfig, nonReinstallablePkgs, hsPkgs, compiler }:
22

33
let
44
# Builds a single component of a package.
@@ -44,7 +44,7 @@ let
4444

4545
hoogleLocal = let
4646
nixpkgsHoogle = import (pkgs.path + /pkgs/development/haskell-modules/hoogle.nix);
47-
in { packages ? [], hoogle ? pkgs.buildPackages.haskell-nix.tool "hoogle" {
47+
in { packages ? [], hoogle ? pkgs.buildPackages.haskell-nix.tool compiler.nix-name "hoogle" {
4848
version = "5.0.17.15";
4949
index-state = pkgs.haskell-nix.internalHackageIndexState;
5050
}
@@ -59,9 +59,8 @@ let
5959

6060
# Same as haskellPackages.shellFor in nixpkgs.
6161
shellFor = haskellLib.weakCallPackage pkgs ./shell-for.nix {
62-
inherit hsPkgs ghcForComponent makeConfigFiles hoogleLocal haskellLib buildPackages;
62+
inherit hsPkgs ghcForComponent makeConfigFiles hoogleLocal haskellLib buildPackages compiler;
6363
inherit (buildPackages) glibcLocales;
64-
buildGHC = ghc.passthru.buildGHC or ghc;
6564
};
6665

6766
# Same as haskellPackages.ghcWithPackages and ghcWithHoogle in nixpkgs.

builder/shell-for.nix

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ lib, stdenv, glibcLocales, pkgconfig, ghcForComponent, makeConfigFiles, hsPkgs, hoogleLocal, haskellLib, buildPackages, buildGHC }:
1+
{ lib, stdenv, glibcLocales, pkgconfig, ghcForComponent, makeConfigFiles, hsPkgs, hoogleLocal, haskellLib, buildPackages, compiler }:
22

33
{ packages ? ps:
44
let
@@ -94,7 +94,7 @@ in
9494
nativeBuildInputs = [ ghcEnv ]
9595
++ nativeBuildInputs
9696
++ mkDrvArgs.nativeBuildInputs or []
97-
++ lib.attrValues (buildPackages.haskell-nix.toolsForGhc buildGHC tools);
97+
++ lib.attrValues (buildPackages.haskell-nix.tools compiler.nix-name tools);
9898
phases = ["installPhase"];
9999
installPhase = "echo $nativeBuildInputs $buildInputs > $out";
100100
LANG = "en_US.UTF-8";

changelog.md

+22
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,28 @@
11
This file contains a summary of changes to Haskell.nix and `nix-tools`
22
that will impact users.
33

4+
## July 8, 2019
5+
* Removed `sources.nixpkgs-default`, use `sources.nixpkgs` instead.
6+
* Removed `./nixpkgs` directory, use `(import ./. {}).sources`
7+
or `./nix/sources.nix` instead.
8+
* Removes V1 interface for details on how to fix old code see:
9+
https://github.com/input-output-hk/haskell.nix/issues/709
10+
* Removed defaultCompilerNixName.
11+
* cabalProject, cabalProject', hackage-project and hackage-package
12+
now require a `compiler-nix-name` argument.
13+
* `haskell-nix.tool` and `.tools` now require a `compiler-nix-name` argument.
14+
New functions `p.tool` and `p.tools` (where p is a project) do not.
15+
Like `shellFor { tools = ... }` they will use the compiler nix name
16+
from the project (including stack projects where it is derived from
17+
the resolver).
18+
* `haskell-nix.alex` and `haskell-nix.happy` have been removed. Use
19+
`p.tool "alex" "3.2.5"` or `shellFor { tools = { alex = "3.2.5"; } }`.
20+
* `haskell-nix.nix-tools` -> `haskell-nix.nix-tools.ghc883` (it includes
21+
the hpack exe now).
22+
* `haskell-nix.cabal-install` ->
23+
`p.tool "cabal" "3.2.0.0"` or `shellFor { tools = { cabal = "3.2.0.0"; } }`
24+
* `haskell-nix.haskellNixRoots` -> `haskell-nix.roots ghc883` or `p.roots`
25+
426
## June 25, 2019
527
* Haddock docs are now built in their own derivation when needed (not as part
628
of the component build).

ci-lib.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
let
22
# Generic nixpkgs, use *only* for lib functions that are stable across versions
3-
pkgs = import (import ./nixpkgs/default.nix).nixpkgs-default {};
3+
pkgs = import (import ./nix/sources.nix).nixpkgs {};
44
lib = pkgs.lib;
55
in rec {
66
inherit (import ./dimension.nix) dimension;

ci.nix

+17-17
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
"R1909" = "nixpkgs-1909";
1313
"R2003" = "nixpkgs-2003";
1414
};
15-
compilerNixNames = nixpkgsName: nixpkgs: builtins.mapAttrs (defaultCompilerNixName: _:
16-
(import ./default.nix { inherit checkMaterialization defaultCompilerNixName; }).nixpkgsArgs) ({
15+
compilerNixNames = nixpkgsName: nixpkgs: builtins.mapAttrs (compiler-nix-name: _:
16+
(import ./default.nix { inherit checkMaterialization; }).nixpkgsArgs) ({
1717
ghc865 = {};
1818
} // nixpkgs.lib.optionalAttrs (nixpkgsName == "R2003") {
1919
ghc883 = {};
@@ -24,11 +24,11 @@
2424
linux = "x86_64-linux";
2525
darwin = "x86_64-darwin";
2626
};
27-
crossSystems = nixpkgsName: nixpkgs: compilerNixName: system:
27+
crossSystems = nixpkgsName: nixpkgs: compiler-nix-name: system:
2828
# We need to use the actual nixpkgs version we're working with here, since the values
2929
# of 'lib.systems.examples' are not understood between all versions
3030
let lib = nixpkgs.lib;
31-
in lib.optionalAttrs (system == "x86_64-linux" && compilerNixName != "ghc8101") {
31+
in lib.optionalAttrs (system == "x86_64-linux" && compiler-nix-name != "ghc8101") {
3232
# Windows cross compilation is currently broken on macOS
3333
inherit (lib.systems.examples) mingwW64;
3434
} // lib.optionalAttrs (system == "x86_64-linux") {
@@ -41,32 +41,32 @@ dimension "Nixpkgs version" nixpkgsVersions (nixpkgsName: nixpkgs-pin:
4141
let pinnedNixpkgsSrc = sources.${nixpkgs-pin};
4242
# We need this for generic nixpkgs stuff at the right version
4343
genericPkgs = import pinnedNixpkgsSrc {};
44-
in dimension "GHC version" (compilerNixNames nixpkgsName genericPkgs) (compilerNixName: nixpkgsArgs:
44+
in dimension "GHC version" (compilerNixNames nixpkgsName genericPkgs) (compiler-nix-name: nixpkgsArgs:
4545
dimension "System" (systems genericPkgs) (systemName: system:
4646
let pkgs = import pinnedNixpkgsSrc (nixpkgsArgs // { inherit system; });
47-
build = import ./build.nix { inherit pkgs ifdLevel; };
47+
build = import ./build.nix { inherit pkgs ifdLevel compiler-nix-name; };
4848
platformFilter = platformFilterGeneric pkgs system;
4949
in filterAttrsOnlyRecursive (_: v: platformFilter v) {
5050
# Native builds
5151
# TODO: can we merge this into the general case by picking an appropriate "cross system" to mean native?
5252
native = pkgs.recurseIntoAttrs ({
5353
inherit (build) tests tools maintainer-scripts maintainer-script-cache;
54-
ghc = pkgs.buildPackages.haskell-nix.compiler."${compilerNixName}";
54+
ghc = pkgs.buildPackages.haskell-nix.compiler."${compiler-nix-name}";
5555
} // pkgs.lib.optionalAttrs (ifdLevel >= 1) {
56-
iserv-proxy = pkgs.ghc-extra-packages."${compilerNixName}".iserv-proxy.components.exes.iserv-proxy;
56+
iserv-proxy = pkgs.ghc-extra-packages."${compiler-nix-name}".iserv-proxy.components.exes.iserv-proxy;
5757
} // pkgs.lib.optionalAttrs (ifdLevel >= 3) {
58-
hello = (pkgs.haskell-nix.hackage-package { name = "hello"; version = "1.0.0.2"; }).components.exes.hello;
58+
hello = (pkgs.haskell-nix.hackage-package { name = "hello"; version = "1.0.0.2"; inherit compiler-nix-name; }).components.exes.hello;
5959
});
6060
}
6161
//
62-
dimension "Cross system" (crossSystems nixpkgsName genericPkgs compilerNixName system) (crossSystemName: crossSystem:
62+
dimension "Cross system" (crossSystems nixpkgsName genericPkgs compiler-nix-name system) (crossSystemName: crossSystem:
6363
# Cross builds
6464
let pkgs = import pinnedNixpkgsSrc (nixpkgsArgs // { inherit system crossSystem; });
65-
build = import ./build.nix { inherit pkgs ifdLevel; };
65+
build = import ./build.nix { inherit pkgs ifdLevel compiler-nix-name; };
6666
in pkgs.recurseIntoAttrs (pkgs.lib.optionalAttrs (ifdLevel >= 1) {
67-
ghc = pkgs.buildPackages.haskell-nix.compiler."${compilerNixName}";
67+
ghc = pkgs.buildPackages.haskell-nix.compiler."${compiler-nix-name}";
6868
# TODO: look into cross compiling ghc itself
69-
# ghc = pkgs.haskell-nix.compiler."${compilerNixName}";
69+
# ghc = pkgs.haskell-nix.compiler."${compiler-nix-name}";
7070
# TODO: look into making tools work when cross compiling
7171
# inherit (build) tools;
7272
# Tests are broken on aarch64 cross https://github.com/input-output-hk/haskell.nix/issues/513
@@ -75,13 +75,13 @@ dimension "Nixpkgs version" nixpkgsVersions (nixpkgsName: nixpkgs-pin:
7575
then build.tests
7676
else pkgs.recurseIntoAttrs {
7777
# Even on aarch64 we still want to build the pinned files
78-
inherit (build.tests) haskellNixRoots;
78+
inherit (build.tests) roots;
7979
};
8080
} // pkgs.lib.optionalAttrs (ifdLevel >= 2) {
81-
remote-iserv = pkgs.ghc-extra-packages."${compilerNixName}".remote-iserv.components.exes.remote-iserv;
82-
iserv-proxy = pkgs.ghc-extra-packages."${compilerNixName}".iserv-proxy.components.exes.iserv-proxy;
81+
remote-iserv = pkgs.ghc-extra-packages."${compiler-nix-name}".remote-iserv.components.exes.remote-iserv;
82+
iserv-proxy = pkgs.ghc-extra-packages."${compiler-nix-name}".iserv-proxy.components.exes.iserv-proxy;
8383
} // pkgs.lib.optionalAttrs (ifdLevel >= 3) {
84-
hello = (pkgs.haskell-nix.hackage-package { name = "hello"; version = "1.0.0.2"; }).components.exes.hello;
84+
hello = (pkgs.haskell-nix.hackage-package { name = "hello"; version = "1.0.0.2"; inherit compiler-nix-name; }).components.exes.hello;
8585
})
8686
)
8787
)

default.nix

+27-55
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,28 @@
1-
let haskellNix = {
2-
checkMaterialization ? false, # Allows us to easily switch on materialization checking
3-
defaultCompilerNixName ? null, # Quick way to override the default compiler e.g. "ghc883"
4-
system ? builtins.currentSystem,
5-
sourcesOverride ? {},
6-
... }@args: rec {
7-
sources = (import ./nix/sources.nix) // sourcesOverride;
8-
9-
config = import ./config.nix;
10-
overlays = [ allOverlays.combined ] ++ (
11-
if checkMaterialization == true
12-
then [(
13-
final: prev: {
14-
haskell-nix = prev.haskell-nix // {
15-
checkMaterialization = true;
16-
};
17-
}
18-
)]
19-
else []
20-
) ++ (
21-
if defaultCompilerNixName != null
22-
then [(
23-
final: prev: {
24-
haskell-nix = prev.haskell-nix // {
25-
inherit defaultCompilerNixName;
26-
};
27-
}
28-
)]
29-
else []
30-
);
31-
allOverlays = import ./overlays args;
32-
nixpkgsArgs = { inherit config overlays system; };
33-
pkgs = import sources.nixpkgs-default nixpkgsArgs;
34-
};
35-
36-
v1DeprecationMessage = "Version 1 is deprecated: use version 2 (nixpkgs arguments are available as the `nixpkgsArgs` attribute of version 2)";
37-
haskellNixV1 = (haskellNix {}).nixpkgsArgs // {
38-
overlays = builtins.trace v1DeprecationMessage (haskellNix {}).nixpkgsArgs.overlays;
39-
};
40-
haskellNixV2 = haskellNix;
41-
42-
# If no arguments, then you get V1
43-
in haskellNixV1 // {
44-
__functor = _: {
45-
version ? 2,
46-
checkMaterialization ? false, # Allows us to easily switch on materialization checking
47-
defaultCompilerNixName ? null, # Quick way to override the default compiler e.g. "ghc883"
48-
system ? builtins.currentSystem,
49-
sourcesOverride ? {},
50-
... }@args:
51-
if version == 1
52-
then haskellNixV1
53-
else if version == 2
54-
then haskellNixV2 args
55-
else builtins.throw ("haskell.nix: unknown version: " + (builtins.toString version));
1+
{ checkMaterialization ? false # Allows us to easily switch on materialization checking
2+
, system ? builtins.currentSystem
3+
, sourcesOverride ? {}
4+
, ... }@args: rec {
5+
sources = (import ./nix/sources.nix) // sourcesOverride;
6+
config = import ./config.nix;
7+
overlays = [ allOverlays.combined ] ++ (
8+
if checkMaterialization == true
9+
then [(
10+
final: prev: {
11+
haskell-nix = prev.haskell-nix // {
12+
checkMaterialization = true;
13+
};
14+
}
15+
)]
16+
else []
17+
) ++ [(
18+
final: prev: {
19+
haskell-nix = prev.haskell-nix // {
20+
inherit overlays;
21+
sources = prev.haskell-nix.sources // sourcesOverride;
22+
};
23+
}
24+
)];
25+
allOverlays = import ./overlays args;
26+
nixpkgsArgs = { inherit config overlays system; };
27+
pkgs = import sources.nixpkgs nixpkgsArgs;
5628
}

docs/reference/library.md

+16-13
Original file line numberDiff line numberDiff line change
@@ -266,19 +266,22 @@ needed for `importAndFilterProject`.
266266
})).pkgs;
267267
```
268268

269-
| Argument | Type | Description |
270-
|------------------|------|---------------------|
271-
| `name` | String | Optional name for better error messages. |
272-
| `src` | Path | Location of the cabal project files. |
273-
| `index-state` | Timestamp | Optional hackage index-state, eg. "2019-10-10T00:00:00Z". |
274-
| `index-sha256` | Sha256 | Optional hash of the truncated hackage index-state. |
275-
| `plan-sha256` | Sha256 | Optional hash of the plan-to-nix output (makes the plan-to-nix step a fixed output derivation). |
276-
| `cabalProject` | Path | Optional cabal project file (defaults to "${src}/cabal.project"). |
277-
| `ghc` | | Optional ghc to use |
278-
| `nix-tools` | | Optional nix-tools to use |
279-
| `hpack` | | Optional hpack to use |
280-
| `cabal-install` | | Optional cabal-install to use |
281-
| `configureArgs` | String | Optional extra arguments to pass to `cabal new-configure` (--enable-tests is included by default, include `--disable-tests` to override that). |
269+
| Argument | Type | Description |
270+
|----------------------|------|---------------------|
271+
| `name` | String | Optional name for better error messages. |
272+
| `src` | Path | Location of the cabal project files. |
273+
| `compiler-nix-name` | String | The name of the ghc compiler to use eg. "ghc883" |
274+
| `index-state` | Timestamp | Optional hackage index-state, eg. "2019-10-10T00:00:00Z". |
275+
| `index-sha256` | Sha256 | Optional hash of the truncated hackage index-state. |
276+
| `plan-sha256` | Sha256 | Optional hash of the plan-to-nix output (makes the plan-to-nix step a fixed output derivation). |
277+
| `cabalProject` | String | Optional cabal project file contents (defaults to readFile "${src}/cabal.project"). |
278+
| `cabalProjectLocal` | String | Optional cabal project file contents (defaults to readFile "${src}/cabal.project.local"). |
279+
| `cabalProjectFreeze` | String | Optional cabal project file contents (defaults to readFile "${src}/cabal.project.freeze"). |
280+
| `ghc` | | Deprecated. Use `compiler-nix-name` instead. Optional ghc to use |
281+
| `nix-tools` | | Optional nix-tools to use |
282+
| `hpack` | | Optional hpack to use |
283+
| `cabal-install` | | Optional cabal-install to use |
284+
| `configureArgs` | String | Optional extra arguments to pass to `cabal new-configure` (--enable-tests is included by default, include `--disable-tests` to override that). |
282285

283286
## importAndFilterProject
284287

docs/troubleshooting.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ So this is expected, unfortunately.
6666

6767
### How do I prevent the evaluation-time dependencies of my project from being garbage-collected?
6868

69-
The `haskellNixRoots` attribute should include all the evaluation-time dependencies.
69+
The `haskell-nix.roots "ghc883"` should include all the evaluation-time dependencies
70+
and the main build time dependecies of a project using ghc 8.8.3.
7071
So you can add that to the relevant GC root.
7172
In practice, if you're using a CI system like Hydra/Hercules, this means adding it to a job in `release.nix`/`ci.nix`.

0 commit comments

Comments
 (0)