Skip to content

Remove internal deps on default ghc and stackage #738

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 43 commits into from
Jul 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
904dd76
Remove internal deps on default ghc and stackage
hamishmack Jul 1, 2020
fe86dcf
Merge remote-tracking branch 'origin/master' into hkm/avoid-defaults
hamishmack Jul 1, 2020
ee0cbc4
ifdLevel 1
hamishmack Jul 1, 2020
e22fff7
Set `"builtin": false` in sources.json
hamishmack Jul 1, 2020
f0a1490
Use nixpkgs instead of nixpkgs-default for niv
hamishmack Jul 1, 2020
eeff15e
Use nixpkgs instead of nixpkgs-default for niv
hamishmack Jul 2, 2020
30df20a
ifdLevel 2
hamishmack Jul 2, 2020
482a1a1
ifdLevel 3
hamishmack Jul 2, 2020
b367bf2
Update tests to make compiler-nix-name explicit
hamishmack Jul 3, 2020
52793cf
Fix for cabal-install on ghc 8.10.1
hamishmack Jul 3, 2020
70f7775
Fix build.nix
hamishmack Jul 3, 2020
dd704bd
Fix test
hamishmack Jul 3, 2020
cf4eeff
Add missing compiler-nix-name in ci.nix
hamishmack Jul 3, 2020
46fd628
Better warnings
hamishmack Jul 6, 2020
275e162
Merge master into hkm/avoid-defaults
hamishmack Jul 6, 2020
caa940f
Better warnings
hamishmack Jul 6, 2020
ba4e38e
Remove redundant tests
hamishmack Jul 6, 2020
d41b1c8
Add default for ./test/test.sh on buildkite
hamishmack Jul 6, 2020
926766a
Add cabal-nix-name default for buildkite tests
hamishmack Jul 6, 2020
da181b4
Add compiler-nix-name to script functions
hamishmack Jul 6, 2020
b30a9a1
Fix extra-hackage buildkite test
hamishmack Jul 6, 2020
de8cbb7
Check the materialization
hamishmack Jul 6, 2020
10055a1
Fix materialization
hamishmack Jul 6, 2020
74935bc
Fix eval time warnings
hamishmack Jul 6, 2020
bc2e42c
Fix hydra eval (maybe)
hamishmack Jul 6, 2020
1903f33
Materialization fixes
hamishmack Jul 6, 2020
1ef36f3
Another materialization fix
hamishmack Jul 6, 2020
7461041
Switch checkMaterialization off (tests passed)
hamishmack Jul 6, 2020
0661b4e
Update getting-started
hamishmack Jul 6, 2020
757b9a4
Remove deprecated code
hamishmack Jul 7, 2020
dfc49e2
Remove ./nixpkgs
hamishmack Jul 7, 2020
855089e
Remove ./nixpkgs
hamishmack Jul 7, 2020
c1bf1a3
Reenable call-stack-to-nix ifdInput test
hamishmack Jul 7, 2020
18311c4
Merge remote-tracking branch 'origin/master' into hkm/avoid-defaults
hamishmack Jul 7, 2020
4ec19da
Documentation and explicit test compiler-nix-names
hamishmack Jul 8, 2020
c0b401b
Add missing \
hamishmack Jul 8, 2020
7c1453c
Add compiler-nix-name for maintainer scripts test
hamishmack Jul 8, 2020
cb3d1c0
Move compiler-nix-name to the right command
hamishmack Jul 8, 2020
1be5755
Merge remote-tracking branch 'origin/master' into hkm/avoid-defaults
hamishmack Jul 8, 2020
b9345d2
Fix test
hamishmack Jul 8, 2020
4cebce4
Expand comment
hamishmack Jul 8, 2020
21fb517
Fix docs for callCabalProjectToNix
hamishmack Jul 8, 2020
eba7f1e
Set date
hamishmack Jul 8, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
steps:
- label: 'Run tests'
command: "./test/tests.sh"
- label: 'Run tests with ghc883'
command: "./test/tests.sh ghc883"
agents:
system: x86_64-linux

Expand All @@ -14,9 +14,9 @@ steps:
agents:
system: x86_64-linux

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

- label: 'Make sure non store paths like can be used as src'
command:
- nix-build build.nix -A maintainer-scripts.check-path-support -o check-path-support.sh
- nix-build build.nix -A maintainer-scripts.check-path-support --argstr compiler-nix-name ghc883 -o check-path-support.sh
- ./check-path-support.sh
39 changes: 25 additions & 14 deletions build.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,26 @@
let
haskellNix = (import ./default.nix {});
in
{ nixpkgs ? haskellNix.sources.nixpkgs-default
{ nixpkgs ? haskellNix.sources.nixpkgs
, nixpkgsArgs ? haskellNix.nixpkgsArgs
, pkgs ? import nixpkgs nixpkgsArgs
, ifdLevel ? 1000
, compiler-nix-name ? throw "No `compiler-nix-name` passed to build.nix"
}:

let
haskell = pkgs.haskell-nix;
buildHaskell = pkgs.buildPackages.haskell-nix;
tool = buildHaskell.tool;
in rec {
tests = import ./test/default.nix { inherit pkgs ifdLevel; };
tests = import ./test/default.nix { inherit pkgs ifdLevel compiler-nix-name; };

tools = pkgs.lib.optionalAttrs (ifdLevel >= 3) (
pkgs.recurseIntoAttrs {
ghcide-020 = tool "ghcide" "0.2.0";
} // pkgs.lib.optionalAttrs (buildHaskell.defaultCompilerNixName == "ghc865") {
cabal-30 = tool "cabal" "3.0.0.0";
} // pkgs.lib.optionalAttrs (buildHaskell.defaultCompilerNixName != "ghc8101") {
cabal-32 = tool "cabal" "3.2.0.0";
ghcide-object-code = tool "ghcide" "object-code";
ghcide-020 = tool compiler-nix-name "ghcide" "0.2.0";
cabal-32 = tool compiler-nix-name "cabal" "3.2.0.0";
} // pkgs.lib.optionalAttrs (compiler-nix-name != "ghc8101") {
ghcide-object-code = tool compiler-nix-name "ghcide" "object-code";
}
);

Expand All @@ -34,8 +33,21 @@ in rec {
# as not all of them can work in restricted eval mode (as they
# are not pure).
maintainer-scripts = pkgs.dontRecurseIntoAttrs {
update-hackage = haskell.callPackage ./scripts/update-hackage.nix {};
update-stackage = haskell.callPackage ./scripts/update-stackage.nix {};
update-hackage = import ./scripts/update-hackage.nix {
inherit (pkgs) stdenv writeScript coreutils glibc git
openssh nix-prefetch-git gawk bash curl findutils;
# Update scripts use the internal nix-tools and cabal-install (compiled with a fixed GHC version)
nix-tools = haskell.internal-nix-tools;
cabal-install = haskell.internal-cabal-install;
inherit (haskell) update-index-state-hashes;
};
update-stackage = haskell.callPackage ./scripts/update-stackage.nix {
inherit (pkgs) stdenv writeScript coreutils glibc git
openssh nix-prefetch-git gawk bash curl findutils;
# Update scripts use the internal nix-tools and cabal-install (compiled with a fixed GHC version)
nix-tools = haskell.internal-nix-tools;
cabal-install = haskell.internal-cabal-install;
};
update-pins = haskell.callPackage ./scripts/update-pins.nix {};
update-docs = pkgs.buildPackages.callPackage ./scripts/update-docs.nix {
generatedOptions = pkgs.callPackage ./scripts/options-doc.nix { };
Expand All @@ -47,11 +59,10 @@ in rec {
# use)
check-hydra = pkgs.buildPackages.callPackage ./scripts/check-hydra.nix {};
check-closure-size = pkgs.buildPackages.callPackage ./scripts/check-closure-size.nix {
# Includes cabal-install and hpack since these are commonly used.
# Includes cabal-install since this is commonly used.
nix-tools = pkgs.linkFarm "common-tools" [
{ name = "nix-tools"; path = haskell.nix-tools; }
{ name = "cabal-install"; path = haskell.cabal-install; }
{ name = "hpack"; path = haskell.haskellPackages.hpack.components.exes.hpack; }
{ name = "nix-tools"; path = haskell.nix-tools.${compiler-nix-name}; }
{ name = "cabal-install"; path = haskell.cabal-install.${compiler-nix-name}; }
];
};
check-materialization-concurrency = pkgs.buildPackages.callPackage ./scripts/check-materialization-concurrency/check.nix {};
Expand Down
7 changes: 3 additions & 4 deletions builder/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ pkgs, buildPackages, stdenv, lib, haskellLib, ghc, fetchurl, pkgconfig, nonReinstallablePkgs, hsPkgs }:
{ pkgs, buildPackages, stdenv, lib, haskellLib, ghc, fetchurl, pkgconfig, nonReinstallablePkgs, hsPkgs, compiler }:

let
# Builds a single component of a package.
Expand Down Expand Up @@ -44,7 +44,7 @@ let

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

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

# Same as haskellPackages.ghcWithPackages and ghcWithHoogle in nixpkgs.
Expand Down
4 changes: 2 additions & 2 deletions builder/shell-for.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, stdenv, glibcLocales, pkgconfig, ghcForComponent, makeConfigFiles, hsPkgs, hoogleLocal, haskellLib, buildPackages, buildGHC }:
{ lib, stdenv, glibcLocales, pkgconfig, ghcForComponent, makeConfigFiles, hsPkgs, hoogleLocal, haskellLib, buildPackages, compiler }:

{ packages ? ps:
let
Expand Down Expand Up @@ -94,7 +94,7 @@ in
nativeBuildInputs = [ ghcEnv ]
++ nativeBuildInputs
++ mkDrvArgs.nativeBuildInputs or []
++ lib.attrValues (buildPackages.haskell-nix.toolsForGhc buildGHC tools);
++ lib.attrValues (buildPackages.haskell-nix.tools compiler.nix-name tools);
phases = ["installPhase"];
installPhase = "echo $nativeBuildInputs $buildInputs > $out";
LANG = "en_US.UTF-8";
Expand Down
22 changes: 22 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@
This file contains a summary of changes to Haskell.nix and `nix-tools`
that will impact users.

## July 8, 2019
* 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:
https://github.com/input-output-hk/haskell.nix/issues/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`

## June 25, 2019
* Haddock docs are now built in their own derivation when needed (not as part
of the component build).
Expand Down
2 changes: 1 addition & 1 deletion ci-lib.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
let
# Generic nixpkgs, use *only* for lib functions that are stable across versions
pkgs = import (import ./nixpkgs/default.nix).nixpkgs-default {};
pkgs = import (import ./nix/sources.nix).nixpkgs {};
lib = pkgs.lib;
in rec {
inherit (import ./dimension.nix) dimension;
Expand Down
34 changes: 17 additions & 17 deletions ci.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"R1909" = "nixpkgs-1909";
"R2003" = "nixpkgs-2003";
};
compilerNixNames = nixpkgsName: nixpkgs: builtins.mapAttrs (defaultCompilerNixName: _:
(import ./default.nix { inherit checkMaterialization defaultCompilerNixName; }).nixpkgsArgs) ({
compilerNixNames = nixpkgsName: nixpkgs: builtins.mapAttrs (compiler-nix-name: _:
(import ./default.nix { inherit checkMaterialization; }).nixpkgsArgs) ({
ghc865 = {};
} // nixpkgs.lib.optionalAttrs (nixpkgsName == "R2003") {
ghc883 = {};
Expand All @@ -24,11 +24,11 @@
linux = "x86_64-linux";
darwin = "x86_64-darwin";
};
crossSystems = nixpkgsName: nixpkgs: compilerNixName: system:
crossSystems = nixpkgsName: nixpkgs: compiler-nix-name: system:
# We need to use the actual nixpkgs version we're working with here, since the values
# of 'lib.systems.examples' are not understood between all versions
let lib = nixpkgs.lib;
in lib.optionalAttrs (system == "x86_64-linux" && compilerNixName != "ghc8101") {
in lib.optionalAttrs (system == "x86_64-linux" && compiler-nix-name != "ghc8101") {
# Windows cross compilation is currently broken on macOS
inherit (lib.systems.examples) mingwW64;
} // lib.optionalAttrs (system == "x86_64-linux") {
Expand All @@ -41,32 +41,32 @@ dimension "Nixpkgs version" nixpkgsVersions (nixpkgsName: nixpkgs-pin:
let pinnedNixpkgsSrc = sources.${nixpkgs-pin};
# We need this for generic nixpkgs stuff at the right version
genericPkgs = import pinnedNixpkgsSrc {};
in dimension "GHC version" (compilerNixNames nixpkgsName genericPkgs) (compilerNixName: nixpkgsArgs:
in dimension "GHC version" (compilerNixNames nixpkgsName genericPkgs) (compiler-nix-name: nixpkgsArgs:
dimension "System" (systems genericPkgs) (systemName: system:
let pkgs = import pinnedNixpkgsSrc (nixpkgsArgs // { inherit system; });
build = import ./build.nix { inherit pkgs ifdLevel; };
build = import ./build.nix { inherit pkgs ifdLevel compiler-nix-name; };
platformFilter = platformFilterGeneric pkgs system;
in filterAttrsOnlyRecursive (_: v: platformFilter v) {
# Native builds
# TODO: can we merge this into the general case by picking an appropriate "cross system" to mean native?
native = pkgs.recurseIntoAttrs ({
inherit (build) tests tools maintainer-scripts maintainer-script-cache;
ghc = pkgs.buildPackages.haskell-nix.compiler."${compilerNixName}";
ghc = pkgs.buildPackages.haskell-nix.compiler."${compiler-nix-name}";
} // pkgs.lib.optionalAttrs (ifdLevel >= 1) {
iserv-proxy = pkgs.ghc-extra-packages."${compilerNixName}".iserv-proxy.components.exes.iserv-proxy;
iserv-proxy = pkgs.ghc-extra-packages."${compiler-nix-name}".iserv-proxy.components.exes.iserv-proxy;
} // pkgs.lib.optionalAttrs (ifdLevel >= 3) {
hello = (pkgs.haskell-nix.hackage-package { name = "hello"; version = "1.0.0.2"; }).components.exes.hello;
hello = (pkgs.haskell-nix.hackage-package { name = "hello"; version = "1.0.0.2"; inherit compiler-nix-name; }).components.exes.hello;
});
}
//
dimension "Cross system" (crossSystems nixpkgsName genericPkgs compilerNixName system) (crossSystemName: crossSystem:
dimension "Cross system" (crossSystems nixpkgsName genericPkgs compiler-nix-name system) (crossSystemName: crossSystem:
# Cross builds
let pkgs = import pinnedNixpkgsSrc (nixpkgsArgs // { inherit system crossSystem; });
build = import ./build.nix { inherit pkgs ifdLevel; };
build = import ./build.nix { inherit pkgs ifdLevel compiler-nix-name; };
in pkgs.recurseIntoAttrs (pkgs.lib.optionalAttrs (ifdLevel >= 1) {
ghc = pkgs.buildPackages.haskell-nix.compiler."${compilerNixName}";
ghc = pkgs.buildPackages.haskell-nix.compiler."${compiler-nix-name}";
# TODO: look into cross compiling ghc itself
# ghc = pkgs.haskell-nix.compiler."${compilerNixName}";
# ghc = pkgs.haskell-nix.compiler."${compiler-nix-name}";
# TODO: look into making tools work when cross compiling
# inherit (build) tools;
# Tests are broken on aarch64 cross https://github.com/input-output-hk/haskell.nix/issues/513
Expand All @@ -75,13 +75,13 @@ dimension "Nixpkgs version" nixpkgsVersions (nixpkgsName: nixpkgs-pin:
then build.tests
else pkgs.recurseIntoAttrs {
# Even on aarch64 we still want to build the pinned files
inherit (build.tests) haskellNixRoots;
inherit (build.tests) roots;
};
} // pkgs.lib.optionalAttrs (ifdLevel >= 2) {
remote-iserv = pkgs.ghc-extra-packages."${compilerNixName}".remote-iserv.components.exes.remote-iserv;
iserv-proxy = pkgs.ghc-extra-packages."${compilerNixName}".iserv-proxy.components.exes.iserv-proxy;
remote-iserv = pkgs.ghc-extra-packages."${compiler-nix-name}".remote-iserv.components.exes.remote-iserv;
iserv-proxy = pkgs.ghc-extra-packages."${compiler-nix-name}".iserv-proxy.components.exes.iserv-proxy;
} // pkgs.lib.optionalAttrs (ifdLevel >= 3) {
hello = (pkgs.haskell-nix.hackage-package { name = "hello"; version = "1.0.0.2"; }).components.exes.hello;
hello = (pkgs.haskell-nix.hackage-package { name = "hello"; version = "1.0.0.2"; inherit compiler-nix-name; }).components.exes.hello;
})
)
)
Expand Down
82 changes: 27 additions & 55 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,56 +1,28 @@
let haskellNix = {
checkMaterialization ? false, # Allows us to easily switch on materialization checking
defaultCompilerNixName ? null, # Quick way to override the default compiler e.g. "ghc883"
system ? builtins.currentSystem,
sourcesOverride ? {},
... }@args: rec {
sources = (import ./nix/sources.nix) // sourcesOverride;

config = import ./config.nix;
overlays = [ allOverlays.combined ] ++ (
if checkMaterialization == true
then [(
final: prev: {
haskell-nix = prev.haskell-nix // {
checkMaterialization = true;
};
}
)]
else []
) ++ (
if defaultCompilerNixName != null
then [(
final: prev: {
haskell-nix = prev.haskell-nix // {
inherit defaultCompilerNixName;
};
}
)]
else []
);
allOverlays = import ./overlays args;
nixpkgsArgs = { inherit config overlays system; };
pkgs = import sources.nixpkgs-default nixpkgsArgs;
};

v1DeprecationMessage = "Version 1 is deprecated: use version 2 (nixpkgs arguments are available as the `nixpkgsArgs` attribute of version 2)";
haskellNixV1 = (haskellNix {}).nixpkgsArgs // {
overlays = builtins.trace v1DeprecationMessage (haskellNix {}).nixpkgsArgs.overlays;
};
haskellNixV2 = haskellNix;

# If no arguments, then you get V1
in haskellNixV1 // {
__functor = _: {
version ? 2,
checkMaterialization ? false, # Allows us to easily switch on materialization checking
defaultCompilerNixName ? null, # Quick way to override the default compiler e.g. "ghc883"
system ? builtins.currentSystem,
sourcesOverride ? {},
... }@args:
if version == 1
then haskellNixV1
else if version == 2
then haskellNixV2 args
else builtins.throw ("haskell.nix: unknown version: " + (builtins.toString version));
{ checkMaterialization ? false # Allows us to easily switch on materialization checking
, system ? builtins.currentSystem
, sourcesOverride ? {}
, ... }@args: rec {
sources = (import ./nix/sources.nix) // sourcesOverride;
config = import ./config.nix;
overlays = [ allOverlays.combined ] ++ (
if checkMaterialization == true
then [(
final: prev: {
haskell-nix = prev.haskell-nix // {
checkMaterialization = true;
};
}
)]
else []
) ++ [(
final: prev: {
haskell-nix = prev.haskell-nix // {
inherit overlays;
sources = prev.haskell-nix.sources // sourcesOverride;
};
}
)];
allOverlays = import ./overlays args;
nixpkgsArgs = { inherit config overlays system; };
pkgs = import sources.nixpkgs nixpkgsArgs;
}
29 changes: 16 additions & 13 deletions docs/reference/library.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,19 +266,22 @@ needed for `importAndFilterProject`.
})).pkgs;
```

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

## importAndFilterProject

Expand Down
3 changes: 2 additions & 1 deletion docs/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ So this is expected, unfortunately.

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

The `haskellNixRoots` attribute should include all the evaluation-time dependencies.
The `haskell-nix.roots "ghc883"` should include all the evaluation-time dependencies
and the main build time dependecies of a project using ghc 8.8.3.
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`.
Loading