Open
Description
(For reference, I am working with ttuegel/kore, but I have pasted the relevant Nix expressions here.)
I use stack-to-nix
to generate pkgs.nix
, which I import into default.nix
:
let sources = import ./nix/sources.nix; in
let overlay = _: pkgs: { niv = import sources."niv" {}; }; in
let nixpkgs = import sources."nixpkgs" { overlays = [ overlay ]; config = {}; }; in
# Import haskell.nix rev 3d79fa95205c6877521118cde3a36b90ce273a02 using niv.
let haskell = import sources."haskell.nix" {}; in
let inherit (nixpkgs.nix-gitignore) gitignoreSourcePure; in
let
pkgSet = haskell.mkStackPkgSet {
stack-pkgs = import ./nix/pkgs.nix;
modules = [
# TODO: Modify existing `src' attribute instead?
{ packages.kore.src = gitignoreSourcePure [./.gitignore] ./kore; }
];
};
in
{
inherit (haskell) nix-tools;
inherit (nixpkgs) niv;
inherit (pkgSet.config) hsPkgs;
}
nix build -f . hsPkgs.kore.components.tests.kore-test --show-trace
fails with:
error: while evaluating the attribute 'CABAL_CONFIG' of the derivation 'kore-0.0.1.0-test-kore-test' at /nix/store/sv3k6axx9hmn9l8l33lqgpsplpksky02-source/builder/comp-builder.nix:113:3:
while evaluating the attribute 'buildCommand' of the derivation 'kore-0.0.1.0-test-kore-test-config' at /nix/store/k424784n1gqjks4nzg70p8rmd59hcq8i-nixpkgs/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating 'concatMapStringsSep' at /nix/store/k424784n1gqjks4nzg70p8rmd59hcq8i-nixpkgs/lib/strings.nix:88:5, called from /nix/store/sv3k6axx9hmn9l8l33lqgpsplpksky02-source/builder/make-config-files.nix:69:7:
while evaluating 'flatLibDepends' at /nix/store/sv3k6axx9hmn9l8l33lqgpsplpksky02-source/lib/default.nix:89:20, called from /nix/store/sv3k6axx9hmn9l8l33lqgpsplpksky02-source/builder/make-config-files.nix:71:10:
while evaluating the attribute 'CABAL_CONFIG' of the derivation 'hedgehog-0.6.1-lib-hedgehog' at /nix/store/sv3k6axx9hmn9l8l33lqgpsplpksky02-source/builder/comp-builder.nix:113:3:
while evaluating the attribute 'buildCommand' of the derivation 'hedgehog-0.6.1-lib-hedgehog-config' at /nix/store/k424784n1gqjks4nzg70p8rmd59hcq8i-nixpkgs/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating 'concatMapStringsSep' at /nix/store/k424784n1gqjks4nzg70p8rmd59hcq8i-nixpkgs/lib/strings.nix:88:5, called from /nix/store/sv3k6axx9hmn9l8l33lqgpsplpksky02-source/builder/make-config-files.nix:69:7:
while evaluating 'flatLibDepends' at /nix/store/sv3k6axx9hmn9l8l33lqgpsplpksky02-source/lib/default.nix:89:20, called from /nix/store/sv3k6axx9hmn9l8l33lqgpsplpksky02-source/builder/make-config-files.nix:71:10:
while evaluating the attribute 'CABAL_CONFIG' of the derivation 'concurrent-output-1.10.9-lib-concurrent-output' at /nix/store/sv3k6axx9hmn9l8l33lqgpsplpksky02-source/builder/comp-builder.nix:113:3:
while evaluating the attribute 'buildCommand' of the derivation 'concurrent-output-1.10.9-lib-concurrent-output-config' at /nix/store/k424784n1gqjks4nzg70p8rmd59hcq8i-nixpkgs/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating 'concatMapStringsSep' at /nix/store/k424784n1gqjks4nzg70p8rmd59hcq8i-nixpkgs/lib/strings.nix:88:5, called from /nix/store/sv3k6axx9hmn9l8l33lqgpsplpksky02-source/builder/make-config-files.nix:69:7:
while evaluating 'flatLibDepends' at /nix/store/sv3k6axx9hmn9l8l33lqgpsplpksky02-source/lib/default.nix:89:20, called from /nix/store/sv3k6axx9hmn9l8l33lqgpsplpksky02-source/builder/make-config-files.nix:71:10:
while evaluating the attribute 'nativeBuildInputs' of the derivation 'terminal-size-0.3.2.1-lib-terminal-size' at /nix/store/sv3k6axx9hmn9l8l33lqgpsplpksky02-source/builder/comp-builder.nix:113:3:
while evaluating 'chooseDevOutputs' at /nix/store/k424784n1gqjks4nzg70p8rmd59hcq8i-nixpkgs/lib/attrsets.nix:474:22, called from undefined position:
while evaluating the attribute 'build-tools' at undefined position:
while evaluating anonymous function at /nix/store/k424784n1gqjks4nzg70p8rmd59hcq8i-nixpkgs/lib/modules.nix:75:45, called from undefined position:
while evaluating the attribute 'value' at /nix/store/k424784n1gqjks4nzg70p8rmd59hcq8i-nixpkgs/lib/modules.nix:338:9:
while evaluating the option `packages.terminal-size.components.library.build-tools':
while evaluating the attribute 'mergedValue' at /nix/store/k424784n1gqjks4nzg70p8rmd59hcq8i-nixpkgs/lib/modules.nix:370:5:
while evaluating anonymous function at /nix/store/k424784n1gqjks4nzg70p8rmd59hcq8i-nixpkgs/lib/modules.nix:370:32, called from /nix/store/k424784n1gqjks4nzg70p8rmd59hcq8i-nixpkgs/lib/modules.nix:370:19:
while evaluating 'merge' at /nix/store/sv3k6axx9hmn9l8l33lqgpsplpksky02-source/modules/plan.nix:23:18, called from /nix/store/k424784n1gqjks4nzg70p8rmd59hcq8i-nixpkgs/lib/modules.nix:373:8:
while evaluating anonymous function at /nix/store/sv3k6axx9hmn9l8l33lqgpsplpksky02-source/modules/plan.nix:24:33, called from undefined position:
while evaluating anonymous function at /nix/store/k424784n1gqjks4nzg70p8rmd59hcq8i-nixpkgs/lib/lists.nix:103:29, called from undefined position:
while evaluating anonymous function at /nix/store/sv3k6axx9hmn9l8l33lqgpsplpksky02-source/modules/plan.nix:26:21, called from /nix/store/k424784n1gqjks4nzg70p8rmd59hcq8i-nixpkgs/lib/lists.nix:103:32:
while evaluating the attribute 'optionalValue' at /nix/store/k424784n1gqjks4nzg70p8rmd59hcq8i-nixpkgs/lib/modules.nix:377:5:
while evaluating the attribute 'values' at /nix/store/k424784n1gqjks4nzg70p8rmd59hcq8i-nixpkgs/lib/modules.nix:364:9:
while evaluating the attribute 'values' at /nix/store/k424784n1gqjks4nzg70p8rmd59hcq8i-nixpkgs/lib/modules.nix:458:7:
while evaluating anonymous function at /nix/store/k424784n1gqjks4nzg70p8rmd59hcq8i-nixpkgs/lib/modules.nix:350:28, called from /nix/store/k424784n1gqjks4nzg70p8rmd59hcq8i-nixpkgs/lib/modules.nix:350:17:
while evaluating 'dischargeProperties' at /nix/store/k424784n1gqjks4nzg70p8rmd59hcq8i-nixpkgs/lib/modules.nix:417:25, called from /nix/store/k424784n1gqjks4nzg70p8rmd59hcq8i-nixpkgs/lib/modules.nix:351:62:
while evaluating the attribute 'value' at /nix/store/sv3k6axx9hmn9l8l33lqgpsplpksky02-source/modules/plan.nix:30:38:
while evaluating the attribute 'buildPackages.hsc2hs' at /nix/store/sv3k6axx9hmn9l8l33lqgpsplpksky02-source/modules/component-driver.nix:53:7:
while evaluating the attribute 'buildPackages.hsc2hs' at /nix/store/k424784n1gqjks4nzg70p8rmd59hcq8i-nixpkgs/pkgs/top-level/stage.nix:74:5:
attribute 'hsc2hs' missing, at /nix/store/vbva59dnmjyss0sbqc6xkaqawkw3l720-hackage-exprs-source/hackage/terminal-size-0.3.2.1-r0-7b2d8e0475a46961d07ddfb91dee618de70eff55d9ba0402ebeac1f9dcf9b18b.nix:23:44
The referenced expression for terminal-size-0.3.2.1
is:
{ system, compiler, flags, pkgs, hsPkgs, pkgconfPkgs, ... }:
{
flags = {};
package = {
specVersion = "1.10";
identifier = { name = "terminal-size"; version = "0.3.2.1"; };
license = "BSD-3-Clause";
copyright = "";
maintainer = "[email protected]";
author = "Andreas Hammar, Matvey Aksenov";
homepage = "";
url = "";
synopsis = "Get terminal window height and width";
description = "Get terminal window height and width without ncurses dependency.";
buildType = "Simple";
};
components = {
"library" = {
depends = ([
(hsPkgs.base)
] ++ (pkgs.lib).optional (compiler.isGhc && ((compiler.version).ge "7.2" && (compiler.version).lt "7.6")) (hsPkgs.ghc-prim)) ++ (pkgs.lib).optional (system.isWindows) (hsPkgs.process);
build-tools = [
(hsPkgs.buildPackages.hsc2hs or (pkgs.buildPackages.hsc2hs))
];
};
};
}
I think hsc2hs
should be bundled with GHC, isn't that right?