I'm attempting to finish the setup for plutus pioneers cohort3 on wsl2 (Windows 10) with Ubunutu 20.04
Nix version: 2.5.1
I cloned the plutus-apps repo (and previously tried the plutus repo before instructions to change to plutus-apps)
I have followed several different sets of instructions, reinstalled nix, tried removing and recloning the repo, and various other potential fixes, but always get to the same error:
/plutus-apps$ nix-build -A plutus-playground.server --show-trace
error: reading from file: Is a directory
… while evaluating 'gitignoreToRegexes'
at /nix/store/wqw9whwr9qkhhzjs81cv38y4ssspd0sw-source/rules.nix:86:24:
85| # string -> [[regex bool]]
86| gitignoreToRegexes = gitignore:
| ^
87| assert throwIfOldNix;
… from call site
at /nix/store/wqw9whwr9qkhhzjs81cv38y4ssspd0sw-source/rules.nix:151:47:
150|
151| gitignoreFilter = ign: root: filterPattern (gitignoreToRegexes ign) root;
| ^
152| }
… while evaluating 'reverseList'
at /nix/store/kawxd91ly09hlyqprqs7yn650s3cfvf6-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/wqw9whwr9qkhhzjs81cv38y4ssspd0sw-source/rules.nix:46:18:
45| # Last item has the last say; might as well start there
46| reversed = reverseList patterns;
| ^
47|
… while evaluating anonymous lambda
at /nix/store/wqw9whwr9qkhhzjs81cv38y4ssspd0sw-source/rules.nix:56:13:
55| in
56| name: _type:
| ^
57| let
… from call site
at /nix/store/wqw9whwr9qkhhzjs81cv38y4ssspd0sw-source/rules.nix:75:14:
74| let ra = pa name type;
75| rb = pb name type;
| ^
76| in if rb != null
… while evaluating 'mergePattern'
at /nix/store/wqw9whwr9qkhhzjs81cv38y4ssspd0sw-source/rules.nix:73:33:
72| # may override the result of preceding ones.
73| mergePattern = pa: pb: (name: type:
| ^
74| let ra = pa name type;
… from call site
at /nix/store/wqw9whwr9qkhhzjs81cv38y4ssspd0sw-source/rules.nix:74:14:
73| mergePattern = pa: pb: (name: type:
74| let ra = pa name type;
| ^
75| rb = pb name type;
… while evaluating 'mergePattern'
at /nix/store/wqw9whwr9qkhhzjs81cv38y4ssspd0sw-source/rules.nix:73:33:
72| # may override the result of preceding ones.
73| mergePattern = pa: pb: (name: type:
| ^
74| let ra = pa name type;
… from call site
at /nix/store/wqw9whwr9qkhhzjs81cv38y4ssspd0sw-source/rules.nix:36:18:
35| let
36| result = r (toString path) type;
| ^
37| in
… while evaluating 'runFilterPattern'
at /nix/store/wqw9whwr9qkhhzjs81cv38y4ssspd0sw-source/rules.nix:34:14:
33| runFilterPattern =
34| r: path: type:
| ^
35| let
… from call site
at /nix/store/wqw9whwr9qkhhzjs81cv38y4ssspd0sw-source/find-files.nix:84:32:
83| type == nodeTypes.directory &&
84| (parse-gitignore.runFilterPattern currentPatterns (dir + "/${name}") type)
| ^
85| ) nodes;
… while evaluating anonymous lambda
at /nix/store/wqw9whwr9qkhhzjs81cv38y4ssspd0sw-source/find-files.nix:82:35:
81| let nodes = readDir dir;
82| dirs = filterAttrs (name: type:
| ^
83| type == nodeTypes.directory &&
… from call site
at /nix/store/kawxd91ly09hlyqprqs7yn650s3cfvf6-source/lib/attrsets.nix:125:62:
124| filterAttrs = pred: set:
125| listToAttrs (concatMap (name: let v = set.${name}; in if pred name v then [(nameValuePair name v)] else []) (attrNames set));
| ^
126|
… while evaluating anonymous lambda
at /nix/store/kawxd91ly09hlyqprqs7yn650s3cfvf6-source/lib/attrsets.nix:125:29:
124| filterAttrs = pred: set:
125| listToAttrs (concatMap (name: let v = set.${name}; in if pred name v then [(nameValuePair name v)] else []) (attrNames set));
| ^
126|
… from call site
at /nix/store/kawxd91ly09hlyqprqs7yn650s3cfvf6-source/lib/attrsets.nix:125:18:
124| filterAttrs = pred: set:
125| listToAttrs (concatMap (name: let v = set.${name}; in if pred name v then [(nameValuePair name v)] else []) (attrNames set));
| ^
126|
… while evaluating 'filterAttrs'
at /nix/store/kawxd91ly09hlyqprqs7yn650s3cfvf6-source/lib/attrsets.nix:124:23:
123| */
124| filterAttrs = pred: set:
| ^
125| listToAttrs (concatMap (name: let v = set.${name}; in if pred name v then [(nameValuePair name v)] else []) (attrNames set));
… from call site
at /nix/store/wqw9whwr9qkhhzjs81cv38y4ssspd0sw-source/find-files.nix:82:16:
81| let nodes = readDir dir;
82| dirs = filterAttrs (name: type:
| ^
83| type == nodeTypes.directory &&
… while evaluating 'findDescendantPatternsTree'
at /nix/store/wqw9whwr9qkhhzjs81cv38y4ssspd0sw-source/find-files.nix:80:49:
79| # currentPatterns.
80| findDescendantPatternsTree = currentPatterns: dir:
| ^
81| let nodes = readDir dir;
… from call site
at /nix/store/wqw9whwr9qkhhzjs81cv38y4ssspd0sw-source/find-files.nix:70:7:
69| in
70| findDescendantPatternsTree startingPatterns dir;
| ^
71|
… while evaluating 'findPatternsTree'
at /nix/store/wqw9whwr9qkhhzjs81cv38y4ssspd0sw-source/find-files.nix:60:22:
59| */
60| findPatternsTree = dir:
| ^
61| let
… from call site
at /nix/store/wqw9whwr9qkhhzjs81cv38y4ssspd0sw-source/find-files.nix:22:24:
21| let
22| patternsBelowP = findPatternsTree basePath;
| ^
23| basePathStr = toString basePath;
… while evaluating 'getPatterns'
at /nix/store/wqw9whwr9qkhhzjs81cv38y4ssspd0sw-source/find-files.nix:34:18:
33| getPatterns =
34| patternTree: pathElems:
| ^
35| if length pathElems == 0
… from call site
at /nix/store/wqw9whwr9qkhhzjs81cv38y4ssspd0sw-source/find-files.nix:39:14:
38| if hd == "" || hd == "."
39| then getPatterns patternTree (tail pathElems)
| ^
40| else
… while evaluating 'getPatterns'
at /nix/store/wqw9whwr9qkhhzjs81cv38y4ssspd0sw-source/find-files.nix:34:18:
33| getPatterns =
34| patternTree: pathElems:
| ^
35| if length pathElems == 0
… from call site
at /nix/store/wqw9whwr9qkhhzjs81cv38y4ssspd0sw-source/find-files.nix:28:59:
27| localDirPathElements = splitString "/" localDirPath;
28| patternResult = parse-gitignore.runFilterPattern (getPatterns patternsBelowP localDirPathElements)."/patterns" path type;
| ^
29| nonempty = any (nodeName: gitignoreFilter (basePath + "/${nodeName}") != false)
… while evaluating 'runFilterPattern'
at /nix/store/wqw9whwr9qkhhzjs81cv38y4ssspd0sw-source/rules.nix:34:14:
33| runFilterPattern =
34| r: path: type:
| ^
35| let
… from call site
at /nix/store/wqw9whwr9qkhhzjs81cv38y4ssspd0sw-source/find-files.nix:28:25:
27| localDirPathElements = splitString "/" localDirPath;
28| patternResult = parse-gitignore.runFilterPattern (getPatterns patternsBelowP localDirPathElements)."/patterns" path type;
| ^
29| nonempty = any (nodeName: gitignoreFilter (basePath + "/${nodeName}") != false)
… while evaluating anonymous lambda
at /nix/store/wqw9whwr9qkhhzjs81cv38y4ssspd0sw-source/find-files.nix:25:13:
24| in
25| path: type: let
| ^
26| localDirPath = removePrefix basePathStr (toString (dirOf path));
… from call site
at /nix/store/8n76c1c3nz2wl6dzxmxdz2y5xrx70flw-source/lib/clean-source-with.nix:75:17:
74| ((includeSiblings || lib.strings.hasPrefix (origSrcSubDir + "/") path)
75| && filter path type # Use the filter function to decide if we need it
| ^
76| )
… while evaluating 'filter''
at /nix/store/8n76c1c3nz2wl6dzxmxdz2y5xrx70flw-source/lib/clean-source-with.nix:67:23:
66| else path: type: true;
67| filter' = path: type:
| ^
68| # Respect the parent filter
… from call site
at /nix/store/8n76c1c3nz2wl6dzxmxdz2y5xrx70flw-source/lib/clean-source-with.nix:109:18:
108| filter = filter';
109| outPath = (builtins.path { filter = filter'; path = origSrc; name = name'; }) + origSubDir;
| ^
110| _isLibCleanSourceWithEx = true;
… while adding path '/home/toddy/Cardano-all-stuff/plutus-apps'
at /nix/store/8n76c1c3nz2wl6dzxmxdz2y5xrx70flw-source/lib/clean-source-with.nix:109:18:
108| filter = filter';
109| outPath = (builtins.path { filter = filter'; path = origSrc; name = name'; }) + origSubDir;
| ^
110| _isLibCleanSourceWithEx = true;
… while evaluating 'check'
at /nix/store/kawxd91ly09hlyqprqs7yn650s3cfvf6-source/lib/types.nix:356:15:
355| name = "path";
356| check = x: isCoercibleToString x && builtins.substring 0 1 (toString x) == "/";
| ^
357| merge = mergeEqualOption;
… from call site
at /nix/store/kawxd91ly09hlyqprqs7yn650s3cfvf6-source/lib/types.nix:611:18:
610| description = "${t1.description} or ${t2.description}";
611| check = x: t1.check x || t2.check x;
| ^
612| merge = loc: defs:
… while evaluating 'check'
at /nix/store/kawxd91ly09hlyqprqs7yn650s3cfvf6-source/lib/types.nix:611:15:
610| description = "${t1.description} or ${t2.description}";
611| check = x: t1.check x || t2.check x;
| ^
612| merge = loc: defs:
… from call site
at /nix/store/kawxd91ly09hlyqprqs7yn650s3cfvf6-source/lib/modules.nix:559:22:
558| if isDefined then
559| if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
| ^
560| else let allInvalid = filter (def: ! type.check def.value) defsFinal;
… while evaluating anonymous lambda
at /nix/store/kawxd91ly09hlyqprqs7yn650s3cfvf6-source/lib/modules.nix:559:17:
558| if isDefined then
559| if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
| ^
560| else let allInvalid = filter (def: ! type.check def.value) defsFinal;
… from call site
at /nix/store/kawxd91ly09hlyqprqs7yn650s3cfvf6-source/lib/modules.nix:559:12:
558| if isDefined then
559| if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
| ^
560| else let allInvalid = filter (def: ! type.check def.value) defsFinal;
… while evaluating the attribute 'mergedValue'
at /nix/store/kawxd91ly09hlyqprqs7yn650s3cfvf6-source/lib/modules.nix:557:5:
556| # Type-check the remaining definitions, and merge them. Or throw if no definitions.
557| mergedValue =
| ^
558| if isDefined then
… while evaluating the option `src':
… while evaluating the attribute 'value'
at /nix/store/kawxd91ly09hlyqprqs7yn650s3cfvf6-source/lib/modules.nix:525:9:
524| in warnDeprecation opt //
525| { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
| ^
526| inherit (res.defsFinal') highestPrio;
… while evaluating anonymous lambda
at /nix/store/kawxd91ly09hlyqprqs7yn650s3cfvf6-source/lib/modules.nix:140:72:
139| # For definitions that have an associated option
140| declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
| ^
141|
… from call site
at /nix/store/kawxd91ly09hlyqprqs7yn650s3cfvf6-source/lib/attrsets.nix:301:20:
300| then recurse (path ++ [name]) value
301| else f (path ++ [name]) value;
| ^
302| in mapAttrs g set;
… while evaluating 'g'
at /nix/store/kawxd91ly09hlyqprqs7yn650s3cfvf6-source/lib/attrsets.nix:298:19:
297| g =
298| name: value:
| ^
299| if isAttrs value && cond value
… from call site
… while evaluating 'readIfExists'
at /nix/store/8n76c1c3nz2wl6dzxmxdz2y5xrx70flw-source/modules/cabal-project.nix:4:25:
3| with types;
4| let readIfExists = src: fileName:
| ^
5| let origSrcDir = src.origSrcSubDir or src;
… from call site
at /nix/store/8n76c1c3nz2wl6dzxmxdz2y5xrx70flw-source/modules/cabal-project.nix:49:17:
48| type = nullOr str;
49| default = readIfExists config.src config.cabalProjectFileName;
| ^
50| };
… while evaluating the attribute 'default'
at /nix/store/8n76c1c3nz2wl6dzxmxdz2y5xrx70flw-source/modules/cabal-project.nix:49:7:
48| type = nullOr str;
49| default = readIfExists config.src config.cabalProjectFileName;
| ^
50| };
… while evaluating the attribute 'value.content'
at /nix/store/kawxd91ly09hlyqprqs7yn650s3cfvf6-source/lib/modules.nix:708:14:
707| { _type = "override";
708| inherit priority content;
| ^
709| };
… while evaluating the attribute 'value._type'
at /nix/store/kawxd91ly09hlyqprqs7yn650s3cfvf6-source/lib/modules.nix:648:73:
647| highestPrio = foldl' (prio: def: min (getPrio def) prio) 9999 defs;
648| strip = def: if def.value._type or "" == "override" then def // { value = def.value.content; } else def;
| ^
649| in {
… while evaluating anonymous lambda
at /nix/store/kawxd91ly09hlyqprqs7yn650s3cfvf6-source/lib/modules.nix:547:19:
546| # Avoid sorting if we don't have to.
547| if any (def: def.value._type or "" == "order") defs''.values
| ^
548| then sortProperties defs''.values
… from call site
at /nix/store/kawxd91ly09hlyqprqs7yn650s3cfvf6-source/lib/modules.nix:547:14:
546| # Avoid sorting if we don't have to.
547| if any (def: def.value._type or "" == "order") defs''.values
| ^
548| then sortProperties defs''.values
… while evaluating the attribute 'values'
at /nix/store/kawxd91ly09hlyqprqs7yn650s3cfvf6-source/lib/modules.nix:551:9:
550| in {
551| values = defs''';
| ^
552| inherit (defs'') highestPrio;
… while evaluating the attribute 'mergedValue'
at /nix/store/kawxd91ly09hlyqprqs7yn650s3cfvf6-source/lib/modules.nix:557:5:
556| # Type-check the remaining definitions, and merge them. Or throw if no definitions.
557| mergedValue =
| ^
558| if isDefined then
… while evaluating the option `cabalProject':
… while evaluating the attribute 'value'
at /nix/store/kawxd91ly09hlyqprqs7yn650s3cfvf6-source/lib/modules.nix:525:9:
524| in warnDeprecation opt //
525| { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
| ^
526| inherit (res.defsFinal') highestPrio;
… while evaluating anonymous lambda
at /nix/store/kawxd91ly09hlyqprqs7yn650s3cfvf6-source/lib/modules.nix:140:72:
139| # For definitions that have an associated option
140| declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
| ^
141|
… from call site
at /nix/store/kawxd91ly09hlyqprqs7yn650s3cfvf6-source/lib/attrsets.nix:301:20:
300| then recurse (path ++ [name]) value
301| else f (path ++ [name]) value;
| ^
302| in mapAttrs g set;
… while evaluating 'g'
at /nix/store/kawxd91ly09hlyqprqs7yn650s3cfvf6-source/lib/attrsets.nix:298:19:
297| g =
298| name: value:
| ^
299| if isAttrs value && cond value
… from call site
… while evaluating anonymous lambda
at /nix/store/8n76c1c3nz2wl6dzxmxdz2y5xrx70flw-source/lib/call-cabal-project-to-nix.nix:9:1:
8| in
9| { name ? src.name or null # optional name for better error messages
| ^
10| , src
… from call site
at /nix/store/8n76c1c3nz2wl6dzxmxdz2y5xrx70flw-source/overlays/haskell.nix:487:36:
486| args = { caller = "cabalProject'"; } // args';
487| callProjectResults = callCabalProjectToNix args;
| ^
488| plan-pkgs = importAndFilterProject {
… while evaluating anonymous lambda
at /nix/store/8n76c1c3nz2wl6dzxmxdz2y5xrx70flw-source/lib/import-and-filter-project.nix:5:1:
4| { pkgs, haskellLib }:
5| { projectNix, sourceRepos, src }:
| ^
6| let
… from call site
at /nix/store/8n76c1c3nz2wl6dzxmxdz2y5xrx70flw-source/overlays/haskell.nix:488:27:
487| callProjectResults = callCabalProjectToNix args;
488| plan-pkgs = importAndFilterProject {
| ^
489| inherit (callProjectResults) projectNix sourceRepos src;
… while evaluating the attribute 'hsPkgs'
at /nix/store/8n76c1c3nz2wl6dzxmxdz2y5xrx70flw-source/overlays/haskell.nix:510:43:
509| project = addProjectAndPackageAttrs rec {
510| inherit (pkg-set.config) hsPkgs;
| ^
511| inherit pkg-set;
… while evaluating the attribute 'hsPkgs'
at /nix/store/8n76c1c3nz2wl6dzxmxdz2y5xrx70flw-source/overlays/haskell.nix:533:15:
532| # Haskell packages
533| hsPkgs = final.lib.mapAttrs (packageName: package':
| ^
534| if package' == null
… while evaluating the attribute 'packages.plutus-playground-server.components.exes.plutus-playground-server'
at /home/toddy/Cardano-all-stuff/plutus-apps/nix/pkgs/haskell/default.nix:63:10:
62| rec {
63| inherit index-state compiler-nix-name project projectAllHaddock projectPackages projectPackagesAllHaddock packages;
| ^
64| inherit extraPackages;
… while evaluating the attribute 'server'
at /home/toddy/Cardano-all-stuff/plutus-apps/plutus-playground-client/default.nix:87:3:
86| inherit client generate-purescript start-backend;
87| server = playground-exe;
| ^
88| }
I've included the entire trace for completeness. I get the same error when running:
nix build -f default.nix plutus.haskell.packages.plutus-core.components.library --extra-experimental-features nix-command --show-trace