Skip to content
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

Flake not working #824

Closed
dwarfmaster opened this issue Aug 16, 2020 · 1 comment · Fixed by #832
Closed

Flake not working #824

dwarfmaster opened this issue Aug 16, 2020 · 1 comment · Fixed by #832

Comments

@dwarfmaster
Copy link

dwarfmaster commented Aug 16, 2020

When trying to use haskell.nix as a flake, I get the error attribute 'currentSystem' missing in pkgs/top-level/impure.nix. This is to be expected, since currentSystem is unavailable in flakes. But, from my understanding, the reason it tries to access it is because localSystem has not been passed as argument.

flake.nix
{
 description = "Builds the Untitled Language™ compiler";

  inputs = {
    haskell.url = github:input-output-hk/haskell.nix;
  };

  outputs = { self, haskell }:
    let

      system  = "x86_64-linux";
      pkgs    = haskell.legacyPackages.${system};

      project = pkgs.haskell-nix.project {
        src = pkgs.haskell-nix.haskellLib.cleanGit {
          name = "Untitled-Language";
          src  = ./.;
        };
        compiler-nix-name = "ghc8101";
      };
      drv     = project.components.exes.Untitled-Language;

      shell   = project.shellFor {
        packages     = hpkgs: with hpkgs; [ Untitled-Language ];
        withHoogle   = true;

        # Tools
        tools        = {
          cabal = "3.2.0.0";
          hlint = "2.2.11";
        };

        # Other packages
        builtInputs = with project.haskellPackages; [
        ];

        # Prevent cabal from choosing dependencies not provided by nix
        exactDeps   = true;
      };

    in {
      packages.${system}       = {
        untitled-language = drv;
      };
      defaultPackage.${system} = self.packages.${system}.untitled-language;
      devShell.${system}       = shell;
      apps.${system}           = {
        compiler = {
          type    = "app";
          program = "${self.defaultPackage.${system}}/bin/Untitled-Language";
      };
    };
  };
}
Trace I'm not sure what is important, so I included everything.
warning: Git tree '/data/luc/annex/projects/programming/Untitled-Language' is dirty
trace: gitSource.nix: /nix/store/n4634yhck2qplc7gi0ja4p0697q3qs42-source does not seem to be a git repository,
assuming it is a clean checkout.
trace: Using latest index state for Untitled-Language!
error: --- EvalError --- nix
at: (90:39) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/pkgs/top-level/impure.nix

    89|                 else (if args ? localSystem then {}
    90|                       else { system = builtins.currentSystem; }) // localSystem;
      |                                       ^
    91| })

attribute 'currentSystem' missing
---- show-trace ----
trace: while evaluating the attribute 'system'
at: (90:30) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/pkgs/top-level/impure.nix

    89|                 else (if args ? localSystem then {}
    90|                       else { system = builtins.currentSystem; }) // localSystem;
      |                              ^
    91| })

trace: while evaluating 'addContextFrom'
at: (369:23) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/strings.nix

   368|   */
   369|   addContextFrom = a: b: substring 0 0 a + b;
      |                       ^
   370| 

trace: from call site
at: (385:11) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/strings.nix

   384|       sep = addContextFrom _s _sep;
   385|       s = addContextFrom _sep _s;
      |           ^
   386|       sepLen = stringLength sep;

trace: while evaluating 'recurse'
at: (392:24) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/strings.nix

   391| 
   392|       recurse = index: startAt:
      |                        ^
   393|         let cutUntil = i: [(substring startAt (i - startAt) s)]; in

trace: from call site
at: (403:7) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/strings.nix

   402|     in
   403|       recurse 0 0;
      |       ^
   404| 

trace: while evaluating 'splitString'
at: (382:23) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/strings.nix

   381|   */
   382|   splitString = _sep: _s:
      |                       ^
   383|     let

trace: from call site
at: (440:69) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/systems/parse.nix

   439| 
   440|   mkSystemFromString = s: mkSystemFromSkeleton (mkSkeletonFromList (lib.splitString "-" s));
      |                                                                     ^
   441| 

trace: while evaluating 'mkSkeletonFromList'
at: (367:24) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/systems/parse.nix

   366| 
   367|   mkSkeletonFromList = l: {
      |                        ^
   368|     "1" = if elemAt l 0 == "avr"

trace: from call site
at: (440:49) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/systems/parse.nix

   439| 
   440|   mkSystemFromString = s: mkSystemFromSkeleton (mkSkeletonFromList (lib.splitString "-" s));
      |                                                 ^
   441| 

trace: while evaluating 'mkSystemFromString'
at: (440:24) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/systems/parse.nix

   439| 
   440|   mkSystemFromString = s: mkSystemFromSkeleton (mkSkeletonFromList (lib.splitString "-" s));
      |                        ^
   441| 

trace: from call site
at: (22:16) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/systems/default.nix

    21|       # Prefer to parse `config` as it is strictly more informative.
    22|       parsed = parse.mkSystemFromString (if args ? config then args.config else args.system);
      |                ^
    23|       # Either of these can be losslessly-extracted from `parsed` iff parsing succeeds.

trace: while evaluating the attribute 'parsed.abi.assertions'
at: (22:7) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/systems/default.nix

    21|       # Prefer to parse `config` as it is strictly more informative.
    22|       parsed = parse.mkSystemFromString (if args ? config then args.config else args.system);
      |       ^
    23|       # Either of these can be losslessly-extracted from `parsed` iff parsing succeeds.

trace: while evaluating 'foldl''
at: (82:16) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/lists.nix

    81|     let
    82|       foldl' = n:
      |                ^
    83|         if n == -1

trace: from call site
at: (86:8) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/lists.nix

    85|         else op (foldl' (n - 1)) (elemAt list n);
    86|     in foldl' (length list - 1);
      |        ^
    87| 

trace: while evaluating 'foldl'
at: (80:20) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/lists.nix

    79|   */
    80|   foldl = op: nul: list:
      |                    ^
    81|     let

trace: from call site
at: (127:13) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/systems/default.nix

   126|   in assert final.useAndroidPrebuilt -> final.isAndroid;
   127|      assert lib.foldl
      |             ^
   128|        (pass: { assertion, message }:

trace: while evaluating 'elaborate'
at: (17:15) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/systems/default.nix

    16|   # always just used `final.*` would fail on both counts.
    17|   elaborate = args': let
      |               ^
    18|     args = if lib.isString args' then { system = args'; }

trace: from call site
at: (60:17) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/pkgs/top-level/default.nix

    59|   # nixpkgs configuration), infer the other one and platform as needed.
    60|   localSystem = lib.systems.elaborate (if builtins.isAttrs args.localSystem then (
      |                 ^
    61|     # Allow setting the platform in the config file. This take precedence over

trace: while evaluating anonymous lambdaction
at: (7:1) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/pkgs/stdenv/default.nix

     6| 
     7| { # Args just for stdenvs' usage
      | ^
     8|   lib

trace: from call site
at: (119:12) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/pkgs/top-level/default.nix

   118| 
   119|   stages = stdenvStages {
      |            ^
   120|     inherit lib localSystem crossSystem config overlays crossOverlays;

trace: while evaluating 'reverseList'
at: (393:17) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/lists.nix

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

trace: from call site
at: (85:6) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/pkgs/stdenv/booter.nix

    84|       // (stageFun prevStage))
    85|     (lib.lists.reverseList stageFuns);
      |      ^
    86| 

trace: while evaluating 'imap1'
at: (116:14) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/lists.nix

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

trace: from call site
at: (78:30) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/pkgs/stdenv/booter.nix

    77|   # isn't already set.
    78|   withAllowCustomOverrides = lib.lists.imap1
      |                              ^
    79|     (index: stageFun: prevStage:

trace: while evaluating 'go'
at: (63:18) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/pkgs/stdenv/booter.nix

    62|       len = builtins.length list;
    63|       go = pred: n:
      |                  ^
    64|         if n == len

trace: from call site
at: (72:13) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/pkgs/stdenv/booter.nix

    71|       lapp = lnul cur;
    72|       cur = go lapp 0;
      |             ^
    73|     in cur;

trace: while evaluating 'dfold'
at: (60:27) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/pkgs/stdenv/booter.nix

    59|   */
    60|   dfold = op: lnul: rnul: list:
      |                           ^
    61|     let

trace: from call site
at: (136:4) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/pkgs/stdenv/booter.nix

   135| 
   136| in dfold folder postStage (_: {}) withAllowCustomOverrides
      |    ^

trace: while evaluating anonymous lambdaction
at: (42:1) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/pkgs/stdenv/booter.nix

    41| # other words, this does a foldr not foldl.
    42| stageFuns: let
      | ^
    43| 

trace: from call site
at: (123:10) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/pkgs/top-level/default.nix

   122| 
   123|   pkgs = boot stages;
      |          ^
   124| 

trace: while evaluating anonymous lambdaction
at: (20:1) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/pkgs/top-level/default.nix

    19| 
    20| { # The system packages will be built on. See the manual for the
      | ^
    21|   # subtle division of labor between these two `*System`s and the three

trace: from call site
at: (84:1) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/pkgs/top-level/impure.nix

    83| 
    84| import ./. (builtins.removeAttrs args [ "system" "platform" ] // {
      | ^
    85|   inherit config overlays crossSystem crossOverlays;

trace: while evaluating anonymous lambdaction
at: (15:1) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/pkgs/top-level/impure.nix

    14| 
    15| { # We combine legacy `system` and `platform` into `localSystem`, if
      | ^
    16|   # `localSystem` was not passed. Strictly speaking, this is pure desugar, but

trace: from call site
at: (5:19) in file: /nix/store/6kq2m68cc6gzl9zdyk5m43wf58acc9c8-source/overlays/eval-on-current.nix

     4|   # See `eval-on-build.nix` for alternative that just uses `buildPackages`.
     5|   evalPackages = (import final.path {
      |                   ^
     6|     inherit (final.haskell-nix) overlays;

trace: while evaluating the attribute 'evalPackages.pkgs'
at: (5:3) in file: /nix/store/6kq2m68cc6gzl9zdyk5m43wf58acc9c8-source/overlays/eval-on-current.nix

     4|   # See `eval-on-build.nix` for alternative that just uses `buildPackages`.
     5|   evalPackages = (import final.path {
      |   ^
     6|     inherit (final.haskell-nix) overlays;

trace: while evaluating anonymous lambdaction
at: (21:4) in file: /nix/store/6kq2m68cc6gzl9zdyk5m43wf58acc9c8-source/lib/materialize.nix

    20|                  # `sha256` and `materialized` (if set).
    21| }: derivation:
      |    ^
    22| 

trace: from call site
at: (320:14) in file: /nix/store/6kq2m68cc6gzl9zdyk5m43wf58acc9c8-source/lib/call-cabal-project-to-nix.nix

   319| 
   320|   plan-nix = materialize ({
      |              ^
   321|     inherit materialized;

trace: while evaluating the attribute 'projectNix'
at: (436:3) in file: /nix/store/6kq2m68cc6gzl9zdyk5m43wf58acc9c8-source/lib/call-cabal-project-to-nix.nix

   435| in {
   436|   projectNix = plan-nix;
      |   ^
   437|   index-state = index-state-found;

trace: while evaluating anonymous lambdaction
at: (5:1) in file: /nix/store/6kq2m68cc6gzl9zdyk5m43wf58acc9c8-source/lib/import-and-filter-project.nix

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

trace: from call site
at: (474:31) in file: /nix/store/6kq2m68cc6gzl9zdyk5m43wf58acc9c8-source/overlays/haskell.nix

   473|             in let pkg-set = mkCabalProjectPkgSet
   474|                 { plan-pkgs = importAndFilterProject {
      |                               ^
   475|                     inherit (callProjectResults) projectNix sourceRepos src;

trace: while evaluating 'imap1'
at: (116:14) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/lists.nix

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

trace: from call site
at: (142:73) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/modules.nix

   141|           };
   142|         in parentFile: parentKey: initialModules: args: collectResults (imap1 (n: x:
      |                                                                         ^
   143|           let

trace: while evaluating 'filterModules'
at: (157:36) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/modules.nix

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

trace: from call site
at: (168:7) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/modules.nix

   167|     in modulesPath: initialModules: args:
   168|       filterModules modulesPath (collectStructuredModules unknownModule "" initialModules args);
      |       ^
   169| 

trace: while evaluating anonymous lambdaction
at: (167:37) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/modules.nix

   166| 
   167|     in modulesPath: initialModules: args:
      |                                     ^
   168|       filterModules modulesPath (collectStructuredModules unknownModule "" initialModules args);

trace: from call site
at: (68:19) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/modules.nix

    67| 
    68|       collected = collectModules
      |                   ^
    69|         (specialArgs.modulesPath or "")

trace: while evaluating 'reverseList'
at: (393:17) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/lists.nix

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

trace: from call site
at: (73:38) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/modules.nix

    72| 
    73|       options = mergeModules prefix (reverseList collected);
      |                                      ^
    74| 

trace: while evaluating 'byName'
at: (260:25) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/modules.nix

   259|       */
   260|       byName = attr: f: modules:
      |                         ^
   261|         foldl' (acc: module:

trace: from call site
at: (268:21) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/modules.nix

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

trace: while evaluating 'flip'
at: (138:16) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/trivial.nix

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

trace: from call site
at: (280:6) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/modules.nix

   279|     in
   280|     (flip mapAttrs declsByName (name: decls:
      |      ^
   281|       # We're descending into attribute ‘name’.

trace: while evaluating 'mergeModules''
at: (237:36) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/modules.nix

   236| 
   237|   mergeModules' = prefix: options: configs:
      |                                    ^
   238|     let

trace: from call site
at: (234:5) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/modules.nix

   233|   mergeModules = prefix: modules:
   234|     mergeModules' prefix modules
      |     ^
   235|       (concatMap (m: map (config: { file = m._file; inherit config; }) (pushDownProperties m.config)) modules);

trace: while evaluating 'mergeModules'
at: (233:26) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/modules.nix

   232|      in the ‘value’ attribute of each option. */
   233|   mergeModules = prefix: modules:
      |                          ^
   234|     mergeModules' prefix modules

trace: from call site
at: (73:17) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/modules.nix

    72| 
    73|       options = mergeModules prefix (reverseList collected);
      |                 ^
    74| 

trace: while evaluating 'yieldConfig'
at: (83:29) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/modules.nix

    82|       config = yieldConfig prefix options;
    83|       yieldConfig = prefix: set:
      |                             ^
    84|         let res = removeAttrs (mapAttrs (n: v:

trace: from call site
at: (82:16) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/modules.nix

    81|       # and only do the check in 'result'.
    82|       config = yieldConfig prefix options;
      |                ^
    83|       yieldConfig = prefix: set:

trace: while evaluating the attribute 'config'
at: (96:25) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/modules.nix

    95|           res;
    96|       result = { inherit options config; };
      |                         ^
    97|     in result;

trace: while evaluating the attribute 'hsPkgs'
at: (486:39) in file: /nix/store/6kq2m68cc6gzl9zdyk5m43wf58acc9c8-source/overlays/haskell.nix

   485|             in addProjectAndPackageAttrs {
   486|               inherit (pkg-set.config) hsPkgs;
      |                                       ^
   487|               inherit pkg-set;

trace: while evaluating the attribute 'hsPkgs.alex'
at: (502:15) in file: /nix/store/6kq2m68cc6gzl9zdyk5m43wf58acc9c8-source/overlays/haskell.nix

   501|             in rawProject // {
   502|               hsPkgs = (final.lib.mapAttrs (n: package':
      |               ^
   503|                 if package' == null

trace: while evaluating 'hackage-package'
at: (443:11) in file: /nix/store/6kq2m68cc6gzl9zdyk5m43wf58acc9c8-source/overlays/haskell.nix

   442|         hackage-package =
   443|           { name, compiler-nix-name, ... }@args':
      |           ^
   444|           let args = { caller = "hackage-package"; } // args';

trace: from call site
at: (64:8) in file: /nix/store/6kq2m68cc6gzl9zdyk5m43wf58acc9c8-source/overlays/tools.nix

    63|     in
    64|       (final.haskell-nix.hackage-package
      |        ^
    65|         (args // { name = final.haskell-nix.toolPackageName.${name} or name; }))

trace: while evaluating 'hackage-tool'
at: (60:18) in file: /nix/store/6kq2m68cc6gzl9zdyk5m43wf58acc9c8-source/overlays/tools.nix

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

trace: from call site
at: (73:7) in file: /nix/store/6kq2m68cc6gzl9zdyk5m43wf58acc9c8-source/overlays/tools.nix

    72|     in
    73|       (if final.haskell-nix.custom-tools ? "${name}"
      |       ^
    74|           && final.haskell-nix.custom-tools."${name}" ? "${args.version}"

trace: while evaluating 'tool'
at: (68:35) in file: /nix/store/6kq2m68cc6gzl9zdyk5m43wf58acc9c8-source/overlays/tools.nix

    67| 
    68|   tool = compiler-nix-name: name: versionOrArgs:
      |                                   ^
    69|     let

trace: from call site
at: (605:31) in file: /nix/store/6kq2m68cc6gzl9zdyk5m43wf58acc9c8-source/overlays/bootstrap.nix

   604|             # infinite recusion).
   605|             alex-tool = args: tool buildBootstrapper.compilerNixName "alex" ({
      |                               ^
   606|                 version = "3.2.4";

trace: while evaluating 'alex-tool'
at: (605:25) in file: /nix/store/6kq2m68cc6gzl9zdyk5m43wf58acc9c8-source/overlays/bootstrap.nix

   604|             # infinite recusion).
   605|             alex-tool = args: tool buildBootstrapper.compilerNixName "alex" ({
      |                         ^
   606|                 version = "3.2.4";

trace: from call site
at: (611:30) in file: /nix/store/6kq2m68cc6gzl9zdyk5m43wf58acc9c8-source/overlays/bootstrap.nix

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

trace: while evaluating the attribute 'haskell-nix.bootstrap.packages.alex-unchecked'
at: (611:13) in file: /nix/store/6kq2m68cc6gzl9zdyk5m43wf58acc9c8-source/overlays/bootstrap.nix

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

trace: while evaluating the attribute 'alex'
at: (46:17) in file: /nix/store/6kq2m68cc6gzl9zdyk5m43wf58acc9c8-source/overlays/bootstrap.nix

    45|                 ghc = final.buildPackages.buildPackages.haskell-nix.bootstrap.compiler."${buildBootstrapper.compilerNixName}";
    46|                 alex = final.haskell-nix.bootstrap.packages.alex-unchecked;
      |                 ^
    47|                 happy = final.haskell-nix.bootstrap.packages.happy-unchecked;

trace: while evaluating anonymous lambdaction
at: (133:17) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/pkgs/stdenv/generic/make-derivation.nix

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

trace: from call site
trace: while evaluating 'getOutput'
at: (464:23) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/attrsets.nix

   463|   */
   464|   getOutput = output: pkg:
      |                       ^
   465|     if pkg.outputUnspecified or false

trace: from call site
trace: while evaluating the attribute 'nativeBuildInputs' of the derivation 'ghc-8.8.4'
at: (159:3) in file: /nix/store/6kq2m68cc6gzl9zdyk5m43wf58acc9c8-source/compiler/ghc/default.nix

   158|   version = ghc-version;
   159|   name = "${targetPrefix}ghc-${version}";
      |   ^
   160| 

trace: while evaluating anonymous lambdaction
at: (425:38) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/attrsets.nix

   424|   recursiveUpdate = lhs: rhs:
   425|     recursiveUpdateUntil (path: lhs: rhs:
      |                                      ^
   426|       !(isAttrs lhs && isAttrs rhs)

trace: from call site
at: (398:12) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/attrsets.nix

   397|         if tail values == []
   398|         || pred here (head (tail values)) (head values) then
      |            ^
   399|           head values

trace: while evaluating anonymous lambdaction
at: (395:24) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/attrsets.nix

   394|     let f = attrPath:
   395|       zipAttrsWith (n: values:
      |                        ^
   396|         let here = attrPath ++ [n]; in

trace: from call site
at: (344:15) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/attrsets.nix

   343|       inherit name;
   344|       value = f name (catAttrs name sets);
      |               ^
   345|     }) names);

trace: while evaluating the attribute 'nativeBuildInputs' of the derivation 'ghc-8.10.1'
at: (159:3) in file: /nix/store/6kq2m68cc6gzl9zdyk5m43wf58acc9c8-source/compiler/ghc/default.nix

   158|   version = ghc-version;
   159|   name = "${targetPrefix}ghc-${version}";
      |   ^
   160| 

trace: while evaluating anonymous lambdaction
at: (425:38) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/attrsets.nix

   424|   recursiveUpdate = lhs: rhs:
   425|     recursiveUpdateUntil (path: lhs: rhs:
      |                                      ^
   426|       !(isAttrs lhs && isAttrs rhs)

trace: from call site
at: (398:12) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/attrsets.nix

   397|         if tail values == []
   398|         || pred here (head (tail values)) (head values) then
      |            ^
   399|           head values

trace: while evaluating anonymous lambdaction
at: (395:24) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/attrsets.nix

   394|     let f = attrPath:
   395|       zipAttrsWith (n: values:
      |                        ^
   396|         let here = attrPath ++ [n]; in

trace: from call site
at: (344:15) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/attrsets.nix

   343|       inherit name;
   344|       value = f name (catAttrs name sets);
      |               ^
   345|     }) names);

trace: while evaluating anonymous lambdaction
at: (425:38) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/attrsets.nix

   424|   recursiveUpdate = lhs: rhs:
   425|     recursiveUpdateUntil (path: lhs: rhs:
      |                                      ^
   426|       !(isAttrs lhs && isAttrs rhs)

trace: from call site
at: (398:12) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/attrsets.nix

   397|         if tail values == []
   398|         || pred here (head (tail values)) (head values) then
      |            ^
   399|           head values

trace: while evaluating anonymous lambdaction
at: (395:24) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/attrsets.nix

   394|     let f = attrPath:
   395|       zipAttrsWith (n: values:
      |                        ^
   396|         let here = attrPath ++ [n]; in

trace: from call site
at: (344:15) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/attrsets.nix

   343|       inherit name;
   344|       value = f name (catAttrs name sets);
      |               ^
   345|     }) names);

trace: while evaluating the attribute 'buildCommand' of the derivation 'default-Setup-setup-config'
at: (7:14) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/pkgs/build-support/trivial-builders.nix

     6|     stdenv.mkDerivation ({
     7|       inherit name buildCommand;
      |              ^
     8|       passAsFile = [ "buildCommand" ];

trace: while evaluating the attribute 'buildPhase' of the derivation 'default-Setup-setup'
at: (37:7) in file: /nix/store/6kq2m68cc6gzl9zdyk5m43wf58acc9c8-source/builder/setup-builder.nix

    36|     stdenv.mkDerivation ({
    37|       name = "${ghc.targetPrefix}${fullName}";
      |       ^
    38|       src = cleanSrc;

trace: while evaluating the attribute 'SETUP_HS' of the derivation 'nix-tools-exe-cabal-name-0.1.0.0'
at: (191:11) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/pkgs/stdenv/generic/make-derivation.nix

   190|         // (lib.optionalAttrs (!(attrs ? name) && attrs ? pname && attrs ? version)) {
   191|           name = "${attrs.pname}-${attrs.version}";
      |           ^
   192|         } // (lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform && !dontAddHostSuffix && (attrs ? name || (attrs ? pname && attrs ? version)))) {

trace: while evaluating the attribute 'paths' of the derivation 'nix-tools'
at: (7:14) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/pkgs/build-support/trivial-builders.nix

     6|     stdenv.mkDerivation ({
     7|       inherit name buildCommand;
      |              ^
     8|       passAsFile = [ "buildCommand" ];

trace: while evaluating the attribute 'postFetch' of the derivation '01-index.tar.gz-at-2020-08-16T000000Z'
at: (119:3) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/pkgs/build-support/fetchurl/default.nix

   118| stdenvNoCC.mkDerivation {
   119|   name =
      |   ^
   120|     if showURLs then "urls"

trace: while evaluating the attribute 'buildCommand' of the derivation 'hackage-repo-hackage.haskell.org-at-2020-08-16T000000Z'
at: (7:14) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/pkgs/build-support/trivial-builders.nix

     6|     stdenv.mkDerivation ({
     7|       inherit name buildCommand;
      |              ^
     8|       passAsFile = [ "buildCommand" ];

trace: while evaluating anonymous lambdaction
at: (213:24) in file: /nix/store/6kq2m68cc6gzl9zdyk5m43wf58acc9c8-source/overlays/haskell.nix

   212|                 ${final.lib.concatStrings (
   213|                   map (tarball:
      |                        ^
   214|                 ''

trace: from call site
trace: while evaluating the attribute 'buildCommand' of the derivation 'dot-cabal-hackage.haskell.org-at-2020-08-16T000000Z'
at: (7:14) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/pkgs/build-support/trivial-builders.nix

     6|     stdenv.mkDerivation ({
     7|       inherit name buildCommand;
      |              ^
     8|       passAsFile = [ "buildCommand" ];

trace: while evaluating the attribute 'buildCommand' of the derivation 'Untitled-Language-plan-to-nix-pkgs'
at: (7:14) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/pkgs/build-support/trivial-builders.nix

     6|     stdenv.mkDerivation ({
     7|       inherit name buildCommand;
      |              ^
     8|       passAsFile = [ "buildCommand" ];

trace: while evaluating anonymous lambdaction
at: (5:1) in file: /nix/store/6kq2m68cc6gzl9zdyk5m43wf58acc9c8-source/lib/import-and-filter-project.nix

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

trace: from call site
at: (474:31) in file: /nix/store/6kq2m68cc6gzl9zdyk5m43wf58acc9c8-source/overlays/haskell.nix

   473|             in let pkg-set = mkCabalProjectPkgSet
   474|                 { plan-pkgs = importAndFilterProject {
      |                               ^
   475|                     inherit (callProjectResults) projectNix sourceRepos src;

trace: while evaluating 'imap1'
at: (116:14) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/lists.nix

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

trace: from call site
at: (142:73) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/modules.nix

   141|           };
   142|         in parentFile: parentKey: initialModules: args: collectResults (imap1 (n: x:
      |                                                                         ^
   143|           let

trace: while evaluating 'filterModules'
at: (157:36) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/modules.nix

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

trace: from call site
at: (168:7) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/modules.nix

   167|     in modulesPath: initialModules: args:
   168|       filterModules modulesPath (collectStructuredModules unknownModule "" initialModules args);
      |       ^
   169| 

trace: while evaluating anonymous lambdaction
at: (167:37) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/modules.nix

   166| 
   167|     in modulesPath: initialModules: args:
      |                                     ^
   168|       filterModules modulesPath (collectStructuredModules unknownModule "" initialModules args);

trace: from call site
at: (68:19) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/modules.nix

    67| 
    68|       collected = collectModules
      |                   ^
    69|         (specialArgs.modulesPath or "")

trace: while evaluating 'reverseList'
at: (393:17) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/lists.nix

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

trace: from call site
at: (73:38) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/modules.nix

    72| 
    73|       options = mergeModules prefix (reverseList collected);
      |                                      ^
    74| 

trace: while evaluating 'byName'
at: (260:25) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/modules.nix

   259|       */
   260|       byName = attr: f: modules:
      |                         ^
   261|         foldl' (acc: module:

trace: from call site
at: (268:21) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/modules.nix

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

trace: while evaluating 'flip'
at: (138:16) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/trivial.nix

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

trace: from call site
at: (280:6) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/modules.nix

   279|     in
   280|     (flip mapAttrs declsByName (name: decls:
      |      ^
   281|       # We're descending into attribute ‘name’.

trace: while evaluating 'mergeModules''
at: (237:36) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/modules.nix

   236| 
   237|   mergeModules' = prefix: options: configs:
      |                                    ^
   238|     let

trace: from call site
at: (234:5) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/modules.nix

   233|   mergeModules = prefix: modules:
   234|     mergeModules' prefix modules
      |     ^
   235|       (concatMap (m: map (config: { file = m._file; inherit config; }) (pushDownProperties m.config)) modules);

trace: while evaluating 'mergeModules'
at: (233:26) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/modules.nix

   232|      in the ‘value’ attribute of each option. */
   233|   mergeModules = prefix: modules:
      |                          ^
   234|     mergeModules' prefix modules

trace: from call site
at: (73:17) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/modules.nix

    72| 
    73|       options = mergeModules prefix (reverseList collected);
      |                 ^
    74| 

trace: while evaluating 'yieldConfig'
at: (83:29) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/modules.nix

    82|       config = yieldConfig prefix options;
    83|       yieldConfig = prefix: set:
      |                             ^
    84|         let res = removeAttrs (mapAttrs (n: v:

trace: from call site
at: (82:16) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/modules.nix

    81|       # and only do the check in 'result'.
    82|       config = yieldConfig prefix options;
      |                ^
    83|       yieldConfig = prefix: set:

trace: while evaluating the attribute 'config'
at: (96:25) in file: /nix/store/x0vxvwcf9hja4m9x73ajrz3210r04f8y-source/lib/modules.nix

    95|           res;
    96|       result = { inherit options config; };
      |                         ^
    97|     in result;

trace: while evaluating the attribute 'hsPkgs'
at: (486:39) in file: /nix/store/6kq2m68cc6gzl9zdyk5m43wf58acc9c8-source/overlays/haskell.nix

   485|             in addProjectAndPackageAttrs {
   486|               inherit (pkg-set.config) hsPkgs;
      |                                       ^
   487|               inherit pkg-set;

trace: while evaluating the attribute 'hsPkgs'
at: (502:15) in file: /nix/store/6kq2m68cc6gzl9zdyk5m43wf58acc9c8-source/overlays/haskell.nix

   501|             in rawProject // {
   502|               hsPkgs = (final.lib.mapAttrs (n: package':
      |               ^
   503|                 if package' == null

trace: while evaluating 'project'
at: (597:19) in file: /nix/store/6kq2m68cc6gzl9zdyk5m43wf58acc9c8-source/overlays/haskell.nix

   596|         # for `cabalPackage` and `stackPackage`.
   597|         project = args':
      |                   ^
   598|           let

trace: from call site
at: (17:17) in file: /nix/store/n4634yhck2qplc7gi0ja4p0697q3qs42-source/flake.nix

    16| 
    17|       project = pkgs.haskell-nix.project {
      |                 ^
    18|         src = pkgs.haskell-nix.haskellLib.cleanGit {

trace: while evaluating the attribute 'packages.x86_64-linux.untitled-language'
at: (46:9) in file: /nix/store/n4634yhck2qplc7gi0ja4p0697q3qs42-source/flake.nix

    45|       packages.${system}       = {
    46|         untitled-language = drv;
      |         ^
    47|       };

@bqv
Copy link
Contributor

bqv commented Aug 25, 2020

+1

Something is still importing /nix/sources.nix even after #797

ju1m pushed a commit to ju1m/haskell.nix that referenced this issue Aug 29, 2020
@ju1m ju1m mentioned this issue Aug 29, 2020
hamishmack pushed a commit that referenced this issue Aug 31, 2020
Co-authored-by: Julien Moutinho <julm+haskell.nix@sourcephile.fr>
booniepepper pushed a commit to booniepepper/haskell.nix that referenced this issue Feb 4, 2022
Co-authored-by: Julien Moutinho <julm+haskell.nix@sourcephile.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants