infinisil/all-hies

Templates don't work

Galagora opened this issue · 4 comments

Hi. On a fresh install of this repository, both of the templates fail with the same error:

error: error parsing derivation '/nix/store/xwrkqwipq8bnb299y7zwrf8ai1ypvqrh-cpio-2.13.tar.bz2.drv': expected string 'Derive(['
Here is the stack trace for the haskell.nix template:
error: while evaluating the file '/home/ao/code/all-hies/templates/haskell.nix/default.nix':
while evaluating the attribute 'hsPkgs.all-hies-template.components.exes.all-hies-template' at /nix/store/4p74s0h0z1w3bpm7z3qqwi33rkds73vv-source/overlays/haskell.nix:469:42:
while evaluating the attribute 'config' at /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/lib/modules.nix:96:25:
while evaluating 'yieldConfig' at /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/lib/modules.nix:83:29, called from /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/lib/modules.nix:82:16:
while evaluating 'mergeModules' at /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/lib/modules.nix:233:26, called from /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/lib/modules.nix:73:17:
while evaluating 'mergeModules'' at /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/lib/modules.nix:237:36, called from /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/lib/modules.nix:234:5:
while evaluating 'flip' at /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/lib/trivial.nix:138:16, called from /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/lib/modules.nix:280:6:
while evaluating 'byName' at /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/lib/modules.nix:260:25, called from /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/lib/modules.nix:268:21:
while evaluating 'reverseList' at /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/lib/lists.nix:393:17, called from /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/lib/modules.nix:73:38:
while evaluating anonymous function at /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/lib/modules.nix:167:37, called from /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/lib/modules.nix:68:19:
while evaluating 'filterModules' at /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/lib/modules.nix:157:36, called from /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/lib/modules.nix:168:7:
while evaluating 'imap1' at /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/lib/lists.nix:116:14, called from /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/lib/modules.nix:142:73:
while evaluating the attribute 'pkgs' at /nix/store/4p74s0h0z1w3bpm7z3qqwi33rkds73vv-source/lib/import-and-filter-project.nix:10:3:
while evaluating the attribute 'buildCommand' of the derivation 'all-hies-template-plan-to-nix-pkgs' at /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating the attribute 'buildCommand' of the derivation 'dot-cabal-hackage.haskell.org-at-2020-05-15T000000Z' at /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating anonymous function at /nix/store/4p74s0h0z1w3bpm7z3qqwi33rkds73vv-source/overlays/haskell.nix:213:24, called from undefined position:
while evaluating the attribute 'buildCommand' of the derivation 'hackage-repo-hackage.haskell.org-at-2020-05-15T000000Z' at /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating the attribute 'postFetch' of the derivation '01-index.tar.gz-at-2020-05-15T000000Z' at /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/pkgs/build-support/fetchurl/default.nix:119:3:
while evaluating the attribute 'buildCommand' of the derivation 'nix-tools' at /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating 'makeSearchPathOutput' at /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/lib/strings.nix:142:5, called from /nix/store/4p74s0h0z1w3bpm7z3qqwi33rkds73vv-source/nix-tools/default.nix:67:57:
while evaluating 'makeSearchPath' at /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/lib/strings.nix:122:5, called from /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/lib/strings.nix:142:11:
while evaluating anonymous function at /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/lib/strings.nix:123:32, called from undefined position:
while evaluating the attribute 'buildInputs' of the derivation 'git-2.25.0' at /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/pkgs/stdenv/generic/make-derivation.nix:191:11:
error parsing derivation '/nix/store/xwrkqwipq8bnb299y7zwrf8ai1ypvqrh-cpio-2.13.tar.bz2.drv': expected string 'Derive(['
And here is its nixpkgs-infra counterpart:
error: while evaluating the attribute 'nativeBuildInputs' of the derivation 'ghc-shell-for-all-hies-template-0.1.0.0-0' at /nix/store/gba12ggm4j8i07jarpgcp90dsw3s6xl0-source/pkgs/development/haskell-modules/generic-builder.nix:615:16:
while evaluating 'assertValidity' at /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/pkgs/stdenv/generic/check-meta.nix:247:20, called from /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/pkgs/stdenv/generic/make-derivation.nix:278:18:
while evaluating 'checkValidity' at /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/pkgs/stdenv/generic/check-meta.nix:228:19, called from /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/pkgs/stdenv/generic/check-meta.nix:248:18:
while evaluating 'hasDeniedUnfreeLicense' at /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/pkgs/stdenv/generic/check-meta.nix:64:28, called from /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/pkgs/stdenv/generic/check-meta.nix:229:8:
while evaluating 'hasLicense' at /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/pkgs/stdenv/generic/check-meta.nix:35:16, called from /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/pkgs/stdenv/generic/check-meta.nix:66:5:
while evaluating 'stackProject' at /nix/store/4p74s0h0z1w3bpm7z3qqwi33rkds73vv-source/overlays/haskell.nix:496:24, called from /home/ao/code/all-hies/build.nix:40:20:
while evaluating the attribute 'hsPkgs' at /nix/store/4p74s0h0z1w3bpm7z3qqwi33rkds73vv-source/overlays/haskell.nix:494:42:
while evaluating the attribute 'hsPkgs' at undefined position:
while evaluating anonymous function at /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/lib/modules.nix:84:45, called from undefined position:
while evaluating the attribute 'value' at /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/lib/modules.nix:379:9:
while evaluating the option `hsPkgs':
while evaluating the attribute 'mergedValue' at /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/lib/modules.nix:411:5:
while evaluating the attribute 'values' at /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/lib/modules.nix:405:9:
while evaluating the attribute 'values' at /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/lib/modules.nix:505:7:
while evaluating anonymous function at /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/lib/modules.nix:391:28, called from /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/lib/modules.nix:391:17:
while evaluating 'dischargeProperties' at /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/lib/modules.nix:464:25, called from /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/lib/modules.nix:392:62:
while evaluating the attribute 'value' at /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/lib/modules.nix:277:44:
while evaluating the attribute 'packages' at undefined position:
while evaluating anonymous function at /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/lib/modules.nix:84:45, called from undefined position:
while evaluating the attribute 'value' at /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/lib/modules.nix:379:9:
while evaluating the option `packages':
while evaluating the attribute 'mergedValue' at /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/lib/modules.nix:411:5:
while evaluating the attribute 'values' at /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/lib/modules.nix:405:9:
while evaluating the attribute 'values' at /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/lib/modules.nix:505:7:
while evaluating anonymous function at /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/lib/modules.nix:391:28, called from /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/lib/modules.nix:391:17:
while evaluating 'dischargeProperties' at /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/lib/modules.nix:464:25, called from /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/lib/modules.nix:392:62:
while evaluating the attribute 'value' at /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/lib/modules.nix:277:44:
while evaluating anonymous function at /nix/store/4p74s0h0z1w3bpm7z3qqwi33rkds73vv-source/lib/stack-cache-generator.nix:4:1, called from /nix/store/4p74s0h0z1w3bpm7z3qqwi33rkds73vv-source/overlays/haskell.nix:482:34:
while evaluating the attribute 'buildInputs' of the derivation 'stack-repos' at /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating the attribute 'buildCommand' of the derivation 'nix-tools' at /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating 'makeSearchPathOutput' at /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/lib/strings.nix:142:5, called from /nix/store/4p74s0h0z1w3bpm7z3qqwi33rkds73vv-source/nix-tools/default.nix:67:57:
while evaluating 'makeSearchPath' at /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/lib/strings.nix:122:5, called from /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/lib/strings.nix:142:11:
while evaluating anonymous function at /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/lib/strings.nix:123:32, called from undefined position:
while evaluating the attribute 'buildInputs' of the derivation 'git-2.25.0' at /nix/store/rkamf4cwqf8hbzr3sd7sq3x4qdzs6m3j-nixpkgs/pkgs/stdenv/generic/make-derivation.nix:191:11:
error parsing derivation '/nix/store/xwrkqwipq8bnb299y7zwrf8ai1ypvqrh-cpio-2.13.tar.bz2.drv': expected string 'Derive(['

I'm using NixOS, with Nix 2.3.7.

I also tried removing the ghc argument to pkgs.haskell-nix.cabalProject' and replacing it with compiler-nix-name = ghc883, as recommended by haskell.nix, that resulted in nix-shell compiling GHC 8.8.4 (?) before failing with this stack trace:

error: while evaluating the attribute 'nativeBuildInputs' of the derivation 'ghc-shell-for-asx' at /nix/store/bnnxplh2v3vr5hjzlxhp0q48lylc06if-source/builder/shell-for.nix:99:5:
while evaluating 'getOutput' at /nix/store/dyca73pcc7d9zmmdnrcf35ycjg1gl4x6-source/lib/attrsets.nix:464:23, called from undefined position:
while evaluating anonymous function at /nix/store/dyca73pcc7d9zmmdnrcf35ycjg1gl4x6-source/pkgs/stdenv/generic/make-derivation.nix:134:17, called from undefined position:
while evaluating 'tool' at /nix/store/bnnxplh2v3vr5hjzlxhp0q48lylc06if-source/overlays/tools.nix:68:35, called from undefined position:
while evaluating 'unstable' at /nix/store/jbqfk452w45db7jlssbhrh7nzd4pswgm-source/overlay.nix:27:22, called from /nix/store/bnnxplh2v3vr5hjzlxhp0q48lylc06if-source/overlays/tools.nix:73:7:
while evaluating the attribute 'combined' at /nix/store/jbqfk452w45db7jlssbhrh7nzd4pswgm-source/build.nix:64:10:
while evaluating the attribute 'glibcSpecificPkgs."glibc-2.31"' at /nix/store/jbqfk452w45db7jlssbhrh7nzd4pswgm-source/sources.nix:34:10:
attribute 'glibc-2.31' missing, at /nix/store/jbqfk452w45db7jlssbhrh7nzd4pswgm-source/build.nix:3:10

What's the contents of /nix/store/xwrkqwipq8bnb299y7zwrf8ai1ypvqrh-cpio-2.13.tar.bz2.drv? This is very weird

No, never mind it. It was just a random empty file. I removed it by running nix-collect-garbage. I originally thought that the fetchurl function wasn't unzipping the contents, but it seems I inadvertently created the file at some point. The issue is fixed and I got it working. Check out my pull request, which also solves the second issue. Thanks for the package.

Possibly a nix-store --verify --check-contents --repair could've fixed it too