1

I'm having issues starting nix-shell from the plutus-apps directory.

I have followed the steps provided here: https://docs.plutus-community.com/docs/setup/WindowsCohort2.html.

Below is the full output of what I see when I try to start nix-shell with the --show-trace flag:

/mnt/c/dev/workspace/plutus-apps$ nix-shell --show-trace
error: Index state found was 2021-10-20T00:00:00Z and no `index-sha256` was provided.

       … 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.shellFor'

       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 'shellFor'

       at /nix/store/8n76c1c3nz2wl6dzxmxdz2y5xrx70flw-source/overlays/haskell.nix:612:24:

          611|             #
          612|             shellFor = shellArgs:
             |                        ^
          613|               let

       … from call site

       at /mnt/c/dev/workspace/plutus-apps/shell.nix:115:1:

          114| in
          115| haskell.project.shellFor {
             | ^
          116|   nativeBuildInputs = nixpkgsInputs ++ localInputs ++ [ sphinxTools ];

       … while evaluating anonymous lambda

       at /mnt/c/dev/workspace/plutus-apps/shell.nix:1:1:

            1| { system ? builtins.currentSystem
             | ^
            2| , enableHaskellProfiling ? false

       … from call site

I am using Windows 11 wsl2 with Debian distro

1
  • This very much looks like your plutus-apps checkout is corrupted? Can you provide the git rev of your plutus-apps checkout (e.g. git rev-parse HEAD) and what ever git status lists?
    – angerman
    Jan 17, 2022 at 5:27

1 Answer 1

0

With some help from a few fellow plutus pioneers that also ran into this issue, it has been resolved.

This was the solution:

For Windows users who encounter the following error in Docker or wsl:
 "Index state found was 2021-02-24T00:00:00Z and no index-sha256 was provided."
It turns out, you have to git clone Plutus with autocrlf disabled: 
git config --global core.autocrlf false 
prior to cloning. 

Another option is to clone using git inside wsl or Docker, which implicitly checks out with Linux line endings.

The automatic eol conversion seems to mess something up. No clue what exactly. See [here](https://github.com/input-output-hk/plutus/issues/2983) for details.
2
  • As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Jan 22, 2022 at 10:33
  • The proposed solution works.
    – lambda
    May 7, 2022 at 13:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.