Files
haskell.nix/test/project-flags/stack.nix
T
Hamish Mackenzie a9b01221dd Replace collectRunComponents with haskellLib.check (#316)
This change replaces `passthru.run` and `collectRunComponents` with
`haskellLib.check` and `$pkg.checks`.

Uses `ln -s` instead of `cp` for DLLs to avoid duplicating them.

Adds features to help debugging eval issues with haskell.nix/release.nix.
The ifdInputLevel can be set to limit the jobs included to control
how much work is done at the eval stage when looking for issues.

Reduce CI times by excluding older ghc versions from haskellNixRoots
(GHC 8.6.3 and 8.6.4)

Sets `preferLocalBuild=false` on `callCabalProjectToNix` and `callStackToNix`
to ensure they are cached on hydra for both Linux and macOS.

Fix `data-dir:` when cleaning components.
`normalizeRelativeDir` adds a slash on to the end of `dataDir`.
Adding another one here results in `//` and files are left out by
mistake.
2019-11-29 23:28:47 +13:00

36 lines
836 B
Nix

{ stdenv, stackProject', recurseIntoAttrs, haskellLib }:
with stdenv.lib;
let
project = stackProject' {
src = ./.;
};
packages = project.hsPkgs;
in recurseIntoAttrs {
ifdInputs = {
inherit (project) stack-nix;
};
run = stdenv.mkDerivation {
name = "callStackToNix-test";
buildCommand = ''
exe="${packages.test-project-flags.components.exes.test-project-flags-exe}/bin/test-project-flags-exe${stdenv.hostPlatform.extensions.executable}"
printf "checking whether executable runs... " >& 2
cat ${haskellLib.check packages.test-project-flags.components.exes.test-project-flags-exe}
touch $out
'';
meta.platforms = platforms.all;
passthru = {
# Attributes used for debugging with nix repl
inherit pkgSet packages;
stack-nix = stack.nix;
};
};
}