<p>I was able to fix the problem by copying the content of <code>cabal.project</code> from one of the latest examples in the plutus pioneer program to the <code>cabal.project</code> file of my own project - while ensuring that the <code>index-state</code> is left out.</p>
<p>Copying the content of the file also requires that I update <code>nix/pkgs/haskell/haskell.nix</code> with the latest tags of the <code>source-repository-package</code>s in the <code>cabal.project</code> file and their corresponding <code>sha256</code> hashes (this is gotten from running <code>nix-shell --show-trace</code> repeatedly and observing the error messages for wrong expected <code>sha256</code> hash)</p>
<pre><code>    sha256map = {
      ...
      &quot;https://github.com/Quid2/flat.git&quot;.&quot;95e5d7488451e43062ca84d5376b3adcc465f1cd&quot; = &quot;06l31x3y93rjpryvlxnpsyq2zyxvb0z6lik6yq2fvh36i5zwvwa3&quot;;
      &quot;https://github.com/input-output-hk/plutus.git&quot;.&quot;2f11c28bd8f6d630daab582255e16d8408075bd7&quot; = &quot;0sh4mfsanvdg43qhq321v24vamrw7nzc6gpjb0d34nyrq2lw55wj&quot;;
      &quot;https://github.com/shmish111/purescript-bridge.git&quot;.&quot;6a92d7853ea514be8b70bab5e72077bf5a510596&quot; = &quot;13j64vv116in3c204qsl1v0ajphac9fqvsjp7x3zzfr7n7g61drb&quot;;
      ...
    }
</code></pre>
<p>Afterwards, I ran <code>cabal update</code> and replaced the new index state on the <code>cabal.project</code> file with the new index state generated by cabal and running <code>nix-shell</code> works, finally!</p>

CC BY-SA 4.0
2021-09-10T23:51:35.997Z
Hopefully someone finds or makes a better way...
ZachSweet
CC BY-SA 4.0
2021-08-14T02:13:10.737Z
2021-08-14T02:13:10.737Z
Aoaddeola
<p>I've been trying to get the latest version of <code>plutus</code> on my project but I get the following error message when I run <code>nix-shell</code>:</p>
<p><code>error: attribute '8a20664f00d8f396920385947903761a9a897fe0' missing, at /nix/store/przi4l85b1yd1irwss0qnhg1lsw2925k-haskell.nix-src/modules/cabal-project.nix:118:37</code></p>
<p>In the <code>cabal.project</code> file, I made the change of the tag from:</p>
<pre><code>-- Plutus revision from 2021/06/11
source-repository-package
  type: git
  location: https://github.com/input-output-hk/plutus.git
  subdir:
    freer-extras
    playground-common
    plutus-core
    plutus-contract
    plutus-ledger
    plutus-ledger-api
    plutus-tx
    plutus-tx-plugin
    plutus-pab
    plutus-use-cases
    prettyprinter-configurable
    quickcheck-dynamic
    word-array
  tag: plutus-starter-devcontainer/v1.0.6
</code></pre>
<p>to the latest <code>plutus</code> tag, which is currently <code>8a20664f00d8f396920385947903761a9a897fe0</code></p>
<p>The line (118) the error refers to in <code>cabal.project.nix</code> is as follows:</p>
<p><code>then { location, tag, ...}: config.sha256map.${location}.${tag}</code></p>
<p>OR</p>
<pre><code>    lookupSha256 = mkOption {
      type = nullOr unspecified;
      default = if config.sha256map != null
        then { location, tag, ...}: config.sha256map.${location}.${tag} -- &lt;- Error here
        else _: null;
    };
</code></pre>
<p>Could someone kindly point me in the right direction on how to fetch the latest version from the plutus repo?</p>

<plutus><git><nix-shell>
How to get latest version of Plutus in project file of plutus-starter-devcontainer
# How to get latest version of Plutus in project file of plutus-starter-devcontainer

(Asked by: username_0 on 2021-08-13)

I've been trying to get the latest version of plutus on my project but I get the following error message when I run nix-shell:
error: attribute '8a20664f00d8f396920385947903761a9a897fe0' missing, at /nix/store/przi4l85b1yd1irwss0qnhg1lsw2925k-haskell.nix-src/modules/cabal-project.nix:118:37
In the cabal.project file, I made the change of the tag from:
-- Plutus revision from 2021/06/11
source-repository-package
  type: git
  location: https://github.com/input-output-hk/plutus.git
  subdir:
    freer-extras
    playground-common
    plutus-core
    plutus-contract
    plutus-ledger
    plutus-ledger-api
    plutus-tx
    plutus-tx-plugin
    plutus-pab
    plutus-use-cases
    prettyprinter-configurable
    quickcheck-dynamic
    word-array
  tag: plutus-starter-devcontainer/v1.0.6

to the latest plutus tag, which is currently 8a20664f00d8f396920385947903761a9a897fe0
The line (118) the error refers to in cabal.project.nix is as follows:
then { location, tag, ...}: config.sha256map.${location}.${tag}
OR
    lookupSha256 = mkOption {
      type = nullOr unspecified;
      default = if config.sha256map != null
        then { location, tag, ...}: config.sha256map.${location}.${tag} -- <- Error here
        else _: null;
    };

Could someone kindly point me in the right direction on how to fetch the latest version from the plutus repo?

**Tags:** plutus, git, nix-shell

---

## 1 answers

### Answer by username_0 on 2021-08-14. Score: 0

I was able to fix the problem by copying the content of cabal.project from one of the latest examples in the plutus pioneer program to the cabal.project file of my own project - while ensuring that the index-state is left out.
Copying the content of the file also requires that I update nix/pkgs/haskell/haskell.nix with the latest tags of the source-repository-packages in the cabal.project file and their corresponding sha256 hashes (this is gotten from running nix-shell --show-trace repeatedly and observing the error messages for wrong expected sha256 hash)
    sha256map = {
      ...
      "https://github.com/Quid2/flat.git"."95e5d7488451e43062ca84d5376b3adcc465f1cd" = "06l31x3y93rjpryvlxnpsyq2zyxvb0z6lik6yq2fvh36i5zwvwa3";
      "https://github.com/input-output-hk/plutus.git"."2f11c28bd8f6d630daab582255e16d8408075bd7" = "0sh4mfsanvdg43qhq321v24vamrw7nzc6gpjb0d34nyrq2lw55wj";
      "https://github.com/shmish111/purescript-bridge.git"."6a92d7853ea514be8b70bab5e72077bf5a510596" = "13j64vv116in3c204qsl1v0ajphac9fqvsjp7x3zzfr7n7g61drb";
      ...
    }

Afterwards, I ran cabal update and replaced the new index state on the cabal.project file with the new index state generated by cabal and running nix-shell works, finally!

> **Comments:**
> **username_1**: Hopefully someone finds or makes a better way...  

---

