input-output-hk / haskell.nix

Alternative Haskell Infrastructure for Nixpkgs
https://input-output-hk.github.io/haskell.nix
Apache License 2.0
556 stars 240 forks source link

"error: attribute 'alex' missing" when building for aarch64 (via emulation) #1189

Closed funketh closed 1 year ago

funketh commented 3 years ago

I'm using flakes and am building on x86_64. The build for x86_64 works fine but when I try to build for aarch64 (which would use qemu afaik) I get an error.

{
  description = "A discord bot";
  inputs.haskellNix.url = "github:input-output-hk/haskell.nix";
  inputs.nixpkgs.follows = "haskellNix/nixpkgs-unstable";
  inputs.flake-utils.url = "github:numtide/flake-utils";

  outputs = { self, nixpkgs, flake-utils, haskellNix }:
    flake-utils.lib.eachSystem [ "x86_64-linux" "aarch64-linux" ] (system:
      let
        overlays = [ haskellNix.overlay (final: prev: {
          # This overlay adds our project to pkgs
          shinobu-bot = final.haskell-nix.project {
            src = ./.;
            compiler-nix-name = "ghc901";
            projectFileName = "stack.yaml";
            # https://github.com/input-output-hk/haskell.nix/issues/1177
            modules = [{
              nonReinstallablePkgs = [
                "rts" "ghc-heap" "ghc-prim" "integer-gmp" "integer-simple" "base"
                "deepseq" "array" "ghc-boot-th" "pretty" "template-haskell"
                # ghcjs custom packages
                "ghcjs-prim" "ghcjs-th"
                "ghc-bignum" "exceptions" "stm"
                "ghc-boot"
                "ghc" "Cabal" "Win32" "array" "binary" "bytestring" "containers"
                "directory" "filepath" "ghc-boot" "ghc-compact" "ghc-prim"
                # "ghci" "haskeline"
                "hpc"
                "mtl" "parsec" "process" "text" "time" "transformers"
                "unix" "xhtml" "terminfo"
              ];
            }];
          };
        })];
        pkgs = import nixpkgs { inherit system overlays; };
        flake = pkgs.shinobu-bot.flake {};
      in flake // {
        defaultPackage = flake.packages."shinobu-bot:exe:shinobu-bot";
      }
    );
}

Full stack trace (the new nix traces are quite verbose...):

trace: To make project.stack-nix for haskell-project a fixed-output derivation but not materialized, set `stack-sha256` to the output of the 'calculateMaterializedSha' script in 'passthru'.
trace: To materialize project.stack-nix for haskell-project entirely, pass a writable path as the `materialized` argument and run the 'updateMaterialized' script in 'passthru'.
trace: WARNING: `cleanSourceWith` called on /nix/store/3f86zll1s0a2mjwa5m0b6rr4qp6zknj5-source without a `name`. Consider adding `name = "3f86zll1s0a2mjwa5m0b6rr4qp6zknj5-source";`
trace: To make project.stack-nix for haskell-project a fixed-output derivation but not materialized, set `stack-sha256` to the output of the 'calculateMaterializedSha' script in 'passthru'.
trace: To materialize project.stack-nix for haskell-project entirely, pass a writable path as the `materialized` argument and run the 'updateMaterialized' script in 'passthru'.
trace: WARNING: `cleanSourceWith` called on /nix/store/3f86zll1s0a2mjwa5m0b6rr4qp6zknj5-source without a `name`. Consider adding `name = "3f86zll1s0a2mjwa5m0b6rr4qp6zknj5-source";`
trace: WARNING: 8.8.2 is out of date, consider using 8.8.4.
error: attribute 'alex' missing

       at /nix/store/lax26q1iblp3bdz9f0dznmkp3rickc92-source/overlays/haskell.nix:570:34:

          569|                             then components.library
          570|                             else components.${haskellLib.prefixComponent.${builtins.elemAt m 0}}.${builtins.elemAt m 1};
             |                                  ^
          571|

       … while evaluating the attribute 'exes.alex'

       … while evaluating 'getComponent'

       at /nix/store/lax26q1iblp3bdz9f0dznmkp3rickc92-source/overlays/haskell.nix:563:38:

          562|                       # Look up a component in the package based on ctype:name
          563|                       getComponent = componentName:
             |                                      ^
          564|                         let m = builtins.match "(lib|flib|exe|test|bench):([^:]*)" componentName;

       … from call site

       at /nix/store/lax26q1iblp3bdz9f0dznmkp3rickc92-source/overlays/tools.nix:64:7:

           63|     in
           64|       (final.haskell-nix.hackage-package
             |       ^
           65|         ( # Disable benchmarks and tests by default (since we only want the exe component)

       … while evaluating 'hackage-tool'

       at /nix/store/lax26q1iblp3bdz9f0dznmkp3rickc92-source/overlays/tools.nix:60:18:

           59|
           60|   hackage-tool = { name, ... }@args':
             |                  ^
           61|     let

       … from call site

       at /nix/store/lax26q1iblp3bdz9f0dznmkp3rickc92-source/overlays/tools.nix:76:7:

           75|     in
           76|       (if final.haskell-nix.custom-tools ? "${name}"
             |       ^
           77|           && final.haskell-nix.custom-tools."${name}" ? "${args.version}"

       … while evaluating 'tool'

       at /nix/store/lax26q1iblp3bdz9f0dznmkp3rickc92-source/overlays/tools.nix:71:35:

           70|
           71|   tool = compiler-nix-name: name: versionOrArgs:
             |                                   ^
           72|     let

       … from call site

       at /nix/store/lax26q1iblp3bdz9f0dznmkp3rickc92-source/overlays/bootstrap.nix:838:31:

          837|             # infinite recursion).
          838|             alex-tool = args: tool buildBootstrapper.compilerNixName "alex" ({
             |                               ^
          839|                 version = "3.2.4";

       … while evaluating 'alex-tool'

       at /nix/store/lax26q1iblp3bdz9f0dznmkp3rickc92-source/overlays/bootstrap.nix:838:25:

          837|             # infinite recursion).
          838|             alex-tool = args: tool buildBootstrapper.compilerNixName "alex" ({
             |                         ^
          839|                 version = "3.2.4";

       … from call site

       at /nix/store/lax26q1iblp3bdz9f0dznmkp3rickc92-source/overlays/bootstrap.nix:844:30:

          843|             alex = bootstrap.packages.alex-tool {};
          844|             alex-unchecked = bootstrap.packages.alex-tool { checkMaterialization = false; };
             |                              ^
          845|             happy-tool = { version ? "1.19.12", ... }@args: tool buildBootstrapper.compilerNixName "happy" ({

       … while evaluating the attribute 'haskell-nix.bootstrap.packages.alex-unchecked'

       at /nix/store/lax26q1iblp3bdz9f0dznmkp3rickc92-source/overlays/bootstrap.nix:844:13:

          843|             alex = bootstrap.packages.alex-tool {};
          844|             alex-unchecked = bootstrap.packages.alex-tool { checkMaterialization = false; };
             |             ^
          845|             happy-tool = { version ? "1.19.12", ... }@args: tool buildBootstrapper.compilerNixName "happy" ({

       … while evaluating the attribute 'alex'

       at /nix/store/lax26q1iblp3bdz9f0dznmkp3rickc92-source/overlays/bootstrap.nix:58:17:

           57|                 ghc = final.buildPackages.buildPackages.haskell-nix.bootstrap.compiler."${buildBootstrapper.compilerNixName}";
           58|                 alex = final.haskell-nix.bootstrap.packages.alex-unchecked;
             |                 ^
           59|                 happy = final.haskell-nix.bootstrap.packages.happy-unchecked;

       … while evaluating anonymous lambda

       at /nix/store/vdh6zx2ri3sl6xb5cv2crg90s8821ysf-source/pkgs/stdenv/generic/make-derivation.nix:143:17:

          142|           (map (drv: drv.__spliced.buildBuild or drv) depsBuildBuild)
          143|           (map (drv: drv.nativeDrv or drv) nativeBuildInputs
             |                 ^
          144|              ++ lib.optional separateDebugInfo' ../../build-support/setup-hooks/separate-debug-info.sh

       … from call site

       … while evaluating 'getOutput'

       at /nix/store/vdh6zx2ri3sl6xb5cv2crg90s8821ysf-source/lib/attrsets.nix:486:23:

          485|   */
          486|   getOutput = output: pkg:
             |                       ^
          487|     if pkg.outputUnspecified or false

       … from call site

       … while evaluating the attribute 'nativeBuildInputs' of the derivation 'ghc-8.6.5'

       at /nix/store/vdh6zx2ri3sl6xb5cv2crg90s8821ysf-source/pkgs/stdenv/generic/make-derivation.nix:201:11:

          200|         // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
          201|           name =
             |           ^
          202|             let

       … while evaluating anonymous lambda

       at /nix/store/vdh6zx2ri3sl6xb5cv2crg90s8821ysf-source/lib/attrsets.nix:447:38:

          446|   recursiveUpdate = lhs: rhs:
          447|     recursiveUpdateUntil (path: lhs: rhs:
             |                                      ^
          448|       !(isAttrs lhs && isAttrs rhs)

       … from call site

       at /nix/store/vdh6zx2ri3sl6xb5cv2crg90s8821ysf-source/lib/attrsets.nix:420:12:

          419|         if tail values == []
          420|         || pred here (head (tail values)) (head values) then
             |            ^
          421|           head values

       … while evaluating anonymous lambda

       at /nix/store/vdh6zx2ri3sl6xb5cv2crg90s8821ysf-source/lib/attrsets.nix:417:24:

          416|     let f = attrPath:
          417|       zipAttrsWith (n: values:
             |                        ^
          418|         let here = attrPath ++ [n]; in

       … from call site

       at /nix/store/vdh6zx2ri3sl6xb5cv2crg90s8821ysf-source/lib/attrsets.nix:366:15:

          365|       inherit name;
          366|       value = f name (catAttrs name sets);
             |               ^
          367|     }) names);

       … while evaluating the attribute 'nativeBuildInputs' of the derivation 'ghc-8.10.5'

       at /nix/store/vdh6zx2ri3sl6xb5cv2crg90s8821ysf-source/pkgs/stdenv/generic/make-derivation.nix:201:11:

          200|         // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
          201|           name =
             |           ^
          202|             let

       … while evaluating anonymous lambda

       at /nix/store/vdh6zx2ri3sl6xb5cv2crg90s8821ysf-source/lib/attrsets.nix:447:38:

          446|   recursiveUpdate = lhs: rhs:
          447|     recursiveUpdateUntil (path: lhs: rhs:
             |                                      ^
          448|       !(isAttrs lhs && isAttrs rhs)

       … from call site

       at /nix/store/vdh6zx2ri3sl6xb5cv2crg90s8821ysf-source/lib/attrsets.nix:420:12:

          419|         if tail values == []
          420|         || pred here (head (tail values)) (head values) then
             |            ^
          421|           head values

       … while evaluating anonymous lambda

       at /nix/store/vdh6zx2ri3sl6xb5cv2crg90s8821ysf-source/lib/attrsets.nix:417:24:

          416|     let f = attrPath:
          417|       zipAttrsWith (n: values:
             |                        ^
          418|         let here = attrPath ++ [n]; in

       … from call site

       at /nix/store/vdh6zx2ri3sl6xb5cv2crg90s8821ysf-source/lib/attrsets.nix:366:15:

          365|       inherit name;
          366|       value = f name (catAttrs name sets);
             |               ^
          367|     }) names);

       … while evaluating anonymous lambda

       at /nix/store/vdh6zx2ri3sl6xb5cv2crg90s8821ysf-source/lib/attrsets.nix:447:38:

          446|   recursiveUpdate = lhs: rhs:
          447|     recursiveUpdateUntil (path: lhs: rhs:
             |                                      ^
          448|       !(isAttrs lhs && isAttrs rhs)

       … from call site

       at /nix/store/vdh6zx2ri3sl6xb5cv2crg90s8821ysf-source/lib/attrsets.nix:420:12:

          419|         if tail values == []
          420|         || pred here (head (tail values)) (head values) then
             |            ^
          421|           head values

       … while evaluating anonymous lambda

       at /nix/store/vdh6zx2ri3sl6xb5cv2crg90s8821ysf-source/lib/attrsets.nix:417:24:

          416|     let f = attrPath:
          417|       zipAttrsWith (n: values:
             |                        ^
          418|         let here = attrPath ++ [n]; in

       … from call site

       at /nix/store/vdh6zx2ri3sl6xb5cv2crg90s8821ysf-source/lib/attrsets.nix:366:15:

          365|       inherit name;
          366|       value = f name (catAttrs name sets);
             |               ^
          367|     }) names);

       … while evaluating the attribute 'buildCommand' of the derivation 'default-Setup-setup-config'

       at /nix/store/vdh6zx2ri3sl6xb5cv2crg90s8821ysf-source/pkgs/stdenv/generic/make-derivation.nix:201:11:

          200|         // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
          201|           name =
             |           ^
          202|             let

       … while evaluating the attribute 'buildPhase' of the derivation 'default-Setup-setup'

       at /nix/store/vdh6zx2ri3sl6xb5cv2crg90s8821ysf-source/pkgs/stdenv/generic/make-derivation.nix:201:11:

          200|         // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
          201|           name =
             |           ^
          202|             let

       … while evaluating the attribute 'SETUP_HS' of the derivation 'nix-tools-exe-cabal-to-nix-0.1.0.0'

       at /nix/store/vdh6zx2ri3sl6xb5cv2crg90s8821ysf-source/pkgs/stdenv/generic/make-derivation.nix:201:11:

          200|         // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
          201|           name =
             |           ^
          202|             let

       … while evaluating the attribute 'paths' of the derivation 'nix-tools'

       at /nix/store/vdh6zx2ri3sl6xb5cv2crg90s8821ysf-source/pkgs/stdenv/generic/make-derivation.nix:201:11:

          200|         // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
          201|           name =
             |           ^
          202|             let

       … while evaluating the attribute 'buildInputs' of the derivation 'stack-repos'

       at /nix/store/vdh6zx2ri3sl6xb5cv2crg90s8821ysf-source/pkgs/stdenv/generic/make-derivation.nix:201:11:

          200|         // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
          201|           name =
             |           ^
          202|             let

       … while evaluating anonymous lambda

       at /nix/store/lax26q1iblp3bdz9f0dznmkp3rickc92-source/lib/stack-cache-generator.nix:4:1:

            3| { pkgs, haskellLib }:
            4| { src
             | ^
            5| , stackYaml    ? "stack.yaml"

       … from call site

       at /nix/store/lax26q1iblp3bdz9f0dznmkp3rickc92-source/overlays/haskell.nix:776:34:

          775|                   // final.lib.optionalAttrs (args.cache == null) { inherit cache; });
          776|                 generatedCache = genStackCache args;
             |                                  ^
          777|                 cache = if args.cache != null then args.cache else generatedCache;

       … while evaluating 'optionalString'

       at /nix/store/vdh6zx2ri3sl6xb5cv2crg90s8821ysf-source/lib/strings.nix:202:5:

          201|     # String to return if condition is true
          202|     string: if cond then string else "";
             |     ^
          203|

       … from call site

       at /nix/store/lax26q1iblp3bdz9f0dznmkp3rickc92-source/lib/call-stack-to-nix.nix:81:7:

           80|     ''}
           81|     ${pkgs.lib.optionalString (cache != null) ''
             |       ^
           82|       cp ${mkCacheFile cache}/.stack-to-nix.cache* $out${subDir'}

       … while evaluating the attribute 'buildCommand' of the derivation 'haskell-project-stack-to-nix-pkgs'

       at /nix/store/vdh6zx2ri3sl6xb5cv2crg90s8821ysf-source/pkgs/stdenv/generic/make-derivation.nix:201:11:

          200|         // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
          201|           name =
             |           ^
          202|             let

       … while evaluating anonymous lambda

       at /nix/store/lax26q1iblp3bdz9f0dznmkp3rickc92-source/lib/import-and-filter-project.nix:5:1:

            4| { pkgs, haskellLib }:
            5| { projectNix, sourceRepos, src }:
             | ^
            6| let

       … from call site

       at /nix/store/lax26q1iblp3bdz9f0dznmkp3rickc92-source/overlays/haskell.nix:779:32:

          778|             in let pkg-set = mkStackPkgSet
          779|                 { stack-pkgs = importAndFilterProject callProjectResults;
             |                                ^
          780|                   pkg-def-extras = (args.pkg-def-extras or []);

       … while evaluating 'imap1'

       at /nix/store/vdh6zx2ri3sl6xb5cv2crg90s8821ysf-source/lib/lists.nix:116:14:

          115|   */
          116|   imap1 = f: list: genList (n: f (n + 1) (elemAt list n)) (length list);
             |              ^
          117|

       … from call site

       at /nix/store/vdh6zx2ri3sl6xb5cv2crg90s8821ysf-source/lib/modules.nix:228:73:

          227|           };
          228|         in parentFile: parentKey: initialModules: args: collectResults (imap1 (n: x:
             |                                                                         ^
          229|           let

       … while evaluating 'filterModules'

       at /nix/store/vdh6zx2ri3sl6xb5cv2crg90s8821ysf-source/lib/modules.nix:243:36:

          242|       # modules recursively. It returns the final list of unique-by-key modules
          243|       filterModules = modulesPath: { disabled, modules }:
             |                                    ^
          244|         let

       … from call site

       at /nix/store/vdh6zx2ri3sl6xb5cv2crg90s8821ysf-source/lib/modules.nix:254:7:

          253|     in modulesPath: initialModules: args:
          254|       filterModules modulesPath (collectStructuredModules unknownModule "" initialModules args);
             |       ^
          255|

       … while evaluating anonymous lambda

       at /nix/store/vdh6zx2ri3sl6xb5cv2crg90s8821ysf-source/lib/modules.nix:253:37:

          252|
          253|     in modulesPath: initialModules: args:
             |                                     ^
          254|       filterModules modulesPath (collectStructuredModules unknownModule "" initialModules args);

       … from call site

       at /nix/store/vdh6zx2ri3sl6xb5cv2crg90s8821ysf-source/lib/modules.nix:128:25:

          127|       merged =
          128|         let collected = collectModules
             |                         ^
          129|           (specialArgs.modulesPath or "")

       … while evaluating 'reverseList'

       at /nix/store/vdh6zx2ri3sl6xb5cv2crg90s8821ysf-source/lib/lists.nix:393:17:

          392|   */
          393|   reverseList = xs:
             |                 ^
          394|     let l = length xs; in genList (n: elemAt xs (l - n - 1)) l;

       … from call site

       at /nix/store/vdh6zx2ri3sl6xb5cv2crg90s8821ysf-source/lib/modules.nix:132:33:

          131|           ({ inherit lib options config specialArgs; } // specialArgs);
          132|         in mergeModules prefix (reverseList collected);
             |                                 ^
          133|

       … while evaluating 'byName'

       at /nix/store/vdh6zx2ri3sl6xb5cv2crg90s8821ysf-source/lib/modules.nix:364:25:

          363|       */
          364|       byName = attr: f: modules:
             |                         ^
          365|         foldl' (acc: module:

       … from call site

       at /nix/store/vdh6zx2ri3sl6xb5cv2crg90s8821ysf-source/lib/modules.nix:383:21:

          382|       # an attrset 'name' => list of submodules that declare ‘name’.
          383|       declsByName = byName "options" (module: option:
             |                     ^
          384|           [{ inherit (module) _file; options = option; }]

       … while evaluating 'flip'

       at /nix/store/vdh6zx2ri3sl6xb5cv2crg90s8821ysf-source/lib/trivial.nix:138:16:

          137|   */
          138|   flip = f: a: b: f b a;
             |                ^
          139|

       … from call site

       at /nix/store/vdh6zx2ri3sl6xb5cv2crg90s8821ysf-source/lib/modules.nix:395:23:

          394|
          395|       resultsByName = flip mapAttrs declsByName (name: decls:
             |                       ^
          396|         # We're descending into attribute ‘name’.

       … while evaluating the attribute 'matchedOptions'

       at /nix/store/vdh6zx2ri3sl6xb5cv2crg90s8821ysf-source/lib/modules.nix:427:14:

          426|     in {
          427|       inherit matchedOptions;
             |              ^
          428|

       … while evaluating 'recurse'

       at /nix/store/vdh6zx2ri3sl6xb5cv2crg90s8821ysf-source/lib/attrsets.nix:295:23:

          294|     let
          295|       recurse = path: set:
             |                       ^
          296|         let

       … from call site

       at /nix/store/vdh6zx2ri3sl6xb5cv2crg90s8821ysf-source/lib/attrsets.nix:303:8:

          302|         in mapAttrs g set;
          303|     in recurse [] set;
             |        ^
          304|

       … while evaluating 'mapAttrsRecursiveCond'

       at /nix/store/vdh6zx2ri3sl6xb5cv2crg90s8821ysf-source/lib/attrsets.nix:293:36:

          292|   */
          293|   mapAttrsRecursiveCond = cond: f: set:
             |                                    ^
          294|     let

       … from call site

       at /nix/store/vdh6zx2ri3sl6xb5cv2crg90s8821ysf-source/lib/modules.nix:140:28:

          139|           # For definitions that have an associated option
          140|           declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
             |                            ^
          141|

       … while evaluating 'evalModules'

       at /nix/store/vdh6zx2ri3sl6xb5cv2crg90s8821ysf-source/lib/modules.nix:63:17:

           62|      evalModules) and the less declarative the module set is. */
           63|   evalModules = { modules
             |                 ^
           64|                 , prefix ? []

       … from call site

       at /nix/store/lax26q1iblp3bdz9f0dznmkp3rickc92-source/package-set.nix:3:4:

            2|   buildModules = f { inherit hackage pkg-def pkg-def-extras modules; pkgs = pkgs.buildPackages; };
            3| in pkgs.lib.evalModules {
             |    ^
            4|   modules = modules ++ [

       … while evaluating 'f'

       at /nix/store/lax26q1iblp3bdz9f0dznmkp3rickc92-source/package-set.nix:1:9:

            1| let f = { hackage, pkgs, pkg-def, pkg-def-extras ? [], modules ? [] }: let
             |         ^
            2|   buildModules = f { inherit hackage pkg-def pkg-def-extras modules; pkgs = pkgs.buildPackages; };

       … from call site

       at /nix/store/lax26q1iblp3bdz9f0dznmkp3rickc92-source/overlays/haskell.nix:93:13:

           92|
           93|             import ../package-set.nix {
             |             ^
           94|                 inherit (args) pkg-def pkg-def-extras;

       … while evaluating 'mkPkgSet'

       at /nix/store/lax26q1iblp3bdz9f0dznmkp3rickc92-source/overlays/haskell.nix:83:13:

           82|         mkPkgSet =
           83|             { pkg-def  # Base package set. Either from stackage (via stack-to-nix) or from a cabal projects plan file (via plan-to-nix)
             |             ^
           84|             , pkg-def-extras ? [] # Additional packages to augment the Base package set `pkg-def` with.

       … from call site

       at /nix/store/lax26q1iblp3bdz9f0dznmkp3rickc92-source/overlays/haskell.nix:137:16:

          136|                 removeSpecialPackages = ps: removeAttrs ps [ "$locals" "$targets" "$everything" ];
          137|             in mkPkgSet {
             |                ^
          138|                 pkg-def = excludeBootPackages null pkg-def;

       … while evaluating 'mkStackPkgSet'

       at /nix/store/lax26q1iblp3bdz9f0dznmkp3rickc92-source/overlays/haskell.nix:119:13:

          118|         mkStackPkgSet =
          119|             { stack-pkgs  # Path to the output of stack-to-nix
             |             ^
          120|             , pkg-def-extras ? []

       … from call site

       at /nix/store/lax26q1iblp3bdz9f0dznmkp3rickc92-source/overlays/haskell.nix:778:30:

          777|                 cache = if args.cache != null then args.cache else generatedCache;
          778|             in let pkg-set = mkStackPkgSet
             |                              ^
          779|                 { stack-pkgs = importAndFilterProject callProjectResults;

       … while evaluating the attribute 'hsPkgs'

       at /nix/store/lax26q1iblp3bdz9f0dznmkp3rickc92-source/overlays/haskell.nix:789:43:

          788|                 project = addProjectAndPackageAttrs {
          789|                   inherit (pkg-set.config) hsPkgs;
             |                                           ^
          790|                   inherit pkg-set;

       … while evaluating the attribute 'hsPkgs'

       at /nix/store/lax26q1iblp3bdz9f0dznmkp3rickc92-source/overlays/haskell.nix:549:15:

          548|               # Haskell packages
          549|               hsPkgs = final.lib.mapAttrs (packageName: package':
             |               ^
          550|                 if package' == null

       … while evaluating 'project'

       at /nix/store/lax26q1iblp3bdz9f0dznmkp3rickc92-source/overlays/haskell.nix:852:19:

          851|         # for `cabalPackage` and `stackPackage`.
          852|         project = args: let p = project' args;
             |                   ^
          853|           in p.hsPkgs // p;

       … from call site

       at /nix/store/3f86zll1s0a2mjwa5m0b6rr4qp6zknj5-source/flake.nix:12:25:

           11|           # This overlay adds our project to pkgs
           12|           shinobu-bot = final.haskell-nix.project {
             |                         ^
           13|             src = ./.;

       … while evaluating the attribute 'shinobu-bot.flake'

       at /nix/store/3f86zll1s0a2mjwa5m0b6rr4qp6zknj5-source/flake.nix:12:11:

           11|           # This overlay adds our project to pkgs
           12|           shinobu-bot = final.haskell-nix.project {
             |           ^
           13|             src = ./.;

       … while evaluating anonymous lambda

       at /nix/store/3f86zll1s0a2mjwa5m0b6rr4qp6zknj5-source/flake.nix:8:68:

            7|   outputs = { self, nixpkgs, flake-utils, haskellNix }:
            8|     flake-utils.lib.eachSystem [ "x86_64-linux" "aarch64-linux" ] (system:
             |                                                                    ^
            9|       let

       … from call site

       at /nix/store/spivsakbmq8vb5mn9sj1n6m77y6yc5ky-source/default.nix:69:17:

           68|         let
           69|           ret = f system;
             |                 ^
           70|           op = attrs: key:

       … while evaluating 'op'

       at /nix/store/spivsakbmq8vb5mn9sj1n6m77y6yc5ky-source/default.nix:67:19:

           66|     let
           67|       op = attrs: system:
             |                   ^
           68|         let

       … from call site

       at /nix/store/spivsakbmq8vb5mn9sj1n6m77y6yc5ky-source/default.nix:79:5:

           78|     in
           79|     builtins.foldl' op { } systems
             |     ^
           80|   ;

       … while evaluating 'eachSystem'

       at /nix/store/spivsakbmq8vb5mn9sj1n6m77y6yc5ky-source/default.nix:65:25:

           64|   #
           65|   eachSystem = systems: f:
             |                         ^
           66|     let

       … from call site

       at /nix/store/3f86zll1s0a2mjwa5m0b6rr4qp6zknj5-source/flake.nix:8:5:

            7|   outputs = { self, nixpkgs, flake-utils, haskellNix }:
            8|     flake-utils.lib.eachSystem [ "x86_64-linux" "aarch64-linux" ] (system:
             |     ^
            9|       let

       … while evaluating 'outputs'

       at /nix/store/3f86zll1s0a2mjwa5m0b6rr4qp6zknj5-source/flake.nix:7:13:

            6|
            7|   outputs = { self, nixpkgs, flake-utils, haskellNix }:
             |             ^
            8|     flake-utils.lib.eachSystem [ "x86_64-linux" "aarch64-linux" ] (system:

       … from call site

       at «string»:45:21:

           44|
           45|           outputs = flake.outputs (inputs // { self = result; });
             |                     ^
           46|

       … while evaluating anonymous lambda

       at «string»:10:13:

            9|     builtins.mapAttrs
           10|       (key: node:
             |             ^
           11|         let

       … from call site

       … while evaluating the attribute 'root'

       … while evaluating anonymous lambda

       at «string»:2:23:

            1|
            2| lockFileStr: rootSrc: rootSubdir:
             |                       ^
            3|

       … from call site
funketh commented 3 years ago

A more minimal example with the same error on aarch64:

{
  inputs.haskellNix.url = "github:input-output-hk/haskell.nix";
  inputs.nixpkgs.follows = "haskellNix/nixpkgs-unstable";
  inputs.flake-utils.url = "github:numtide/flake-utils";

  outputs = { self, nixpkgs, flake-utils, haskellNix }:
    flake-utils.lib.eachSystem [ "x86_64-linux" "aarch64-linux" ] (system:
      let
        overlays = [ haskellNix.overlay (final: prev: {
          myalex = final.haskell-nix.tool "ghc901" "alex" "3.2.6";
        })];
        pkgs = import nixpkgs { inherit system overlays; };
      in { defaultPackage = pkgs.myalex; }
    );
}
funketh commented 3 years ago

I get the same error using ghc8104 so this seems unrelated to ghc 9?

TravisWhitaker commented 3 years ago

Give this patch a spin: https://github.com/input-output-hk/haskell.nix/pull/1168

funketh commented 3 years ago

I'm getting a network error. Am I doing something wrong? I just changed the haskellNix input url to your branch.

error checking the existence of http://tarballs.nixos.org/sha256/1x2pfj9mnxac9rfki96bwwlmgi8ns0s7mhp99jmxkdm8726npdml:
curl: (6) Could not resolve host: tarballs.nixos.org

trying https://haskell.org/ghc/dist/8.8.2/ghc-8.8.2-aarch64-deb9-linux.tar.xz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
^M  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (6) Could not resolve host: haskell.org
Warning: Problem : timeout. Will retry in 1 seconds. 3 retries left.
^M  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (6) Could not resolve host: haskell.org
Warning: Problem : timeout. Will retry in 2 seconds. 2 retries left.
^M  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (6) Could not resolve host: haskell.org
Warning: Problem : timeout. Will retry in 4 seconds. 1 retries left.
^M  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (6) Could not resolve host: haskell.org
error: cannot download ghc-8.8.2-aarch64-deb9-linux.tar.xz from any mirror
TravisWhitaker commented 3 years ago

curl: (6) Could not resolve host: haskell.org

Looks like it might be flakiness from wherever you're getting DNS?

TravisWhitaker commented 3 years ago

This is a separate issue from the one addressed in #1168 anyway, and was actually caused by #1166 (https://github.com/input-output-hk/haskell.nix/issues/1207)

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.