<p>Try installing niv and running <code>niv update hackage-nix</code> from the root of the repository.</p>

CC BY-SA 4.0
2022-11-30T07:54:52.137Z
2022-11-30T07:54:52.137Z
Sid K
<p>I am trying to update the packages in my plutus app to the newest version of the PAB. I am by no means an expert with nix or cabal, or any haskell package managers for that matter. I can't seem to figure out how to update hackage.nix, like the error says to do.</p>
<pre><code>&gt;&gt;&gt;  nix-shell
trace: haskell-nix.haskellLib.cleanGit: /Users/{...} does not seem to be a git repository, 
assuming it is a clean checkout.
error: Unknown index-state 2022-01-22T00:00:00Z, the latest index-state I know about is 2021-08-15T00:00:00Z. 
You may need to update to a newer hackage.nix.
(use '--show-trace' to show detailed location information)
</code></pre>
<pre><code>&gt;&gt;&gt;  nix-shell --show-trace
trace: haskell-nix.haskellLib.cleanGit: /Users/{...} does not seem to be a git repository,
assuming it is a clean checkout.
error: Unknown index-state 2022-01-22T00:00:00Z, the latest index-state I know about is 2021-08-15T00:00:00Z. You may need to update to a newer hackage.nix.

       … 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 = &quot;cabalProject'&quot;; } // 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 'project'

       at /nix/store/8n76c1c3nz2wl6dzxmxdz2y5xrx70flw-source/overlays/haskell.nix:836:19:

          835|         # for `cabalPackage` and `stackPackage`.
          836|         project = args: let p = project' args;
             |                   ^
          837|           in p.hsPkgs // p;

       … from call site

       at /Users/{...}/nix/pkgs/haskell/haskell.nix:12:13:

           11| let
           12|   project = haskell-nix.project {
             |             ^
           13|     # 'cleanGit' cleans a source directory based on the files known by git

       … while evaluating anonymous lambda

       at /Users/{...}/nix/pkgs/haskell/haskell.nix:4:1:

            3| ############################################################################
            4| { haskell-nix
             | ^
            5| , gitignore-nix

       … from call site

       at /Users/{...}/nix/pkgs/haskell/default.nix:24:13:

           23|   # The haskell project created by haskell-nix.cabalProject'
           24|   project = import ./haskell.nix {
             |             ^
           25|     inherit lib haskell-nix compiler-nix-name gitignore-nix libsodium-vrf;

       … while evaluating the attribute 'project.shellFor'

       at /Users/{...}/nix/pkgs/haskell/default.nix:35:10:

           34| rec {
           35|   inherit project projectPackages packages;
             |          ^
           36| }
</code></pre>
<p>I found the hackage.nix repository located at <a href="https://github.com/input-output-hk/hackage.nix" rel="nofollow noreferrer">https://github.com/input-output-hk/hackage.nix</a>. It seems that somehow this needs to be used to update it using nix-tools, located at <a href="https://github.com/input-output-hk/nix-tools" rel="nofollow noreferrer">https://github.com/input-output-hk/nix-tools</a>.</p>
<p>I have very limited experience using nix or other haskell package managers so upgrading hackage.nix has been a blocker for me.</p>
<p>If someone can provide any guidance, or even better, a step by step of how to update hackage.nix, that would be greatly appreciated.</p>
<p>Thanks</p>

CC BY-SA 4.0
2023-02-24T11:23:46.377Z
Did you resolve this error? I met this error.
Lovely
<nix>
"You may need to update to a newer hackage.nix" when trying to enter a nix-shell
# "You may need to update to a newer hackage.nix" when trying to enter a nix-shell

(Asked by: username_0 on 2022-02-03)

I am trying to update the packages in my plutus app to the newest version of the PAB. I am by no means an expert with nix or cabal, or any haskell package managers for that matter. I can't seem to figure out how to update hackage.nix, like the error says to do.
>>>  nix-shell
trace: haskell-nix.haskellLib.cleanGit: /Users/{...} does not seem to be a git repository, 
assuming it is a clean checkout.
error: Unknown index-state 2022-01-22T00:00:00Z, the latest index-state I know about is 2021-08-15T00:00:00Z. 
You may need to update to a newer hackage.nix.
(use '--show-trace' to show detailed location information)

>>>  nix-shell --show-trace
trace: haskell-nix.haskellLib.cleanGit: /Users/{...} does not seem to be a git repository,
assuming it is a clean checkout.
error: Unknown index-state 2022-01-22T00:00:00Z, the latest index-state I know about is 2021-08-15T00:00:00Z. You may need to update to a newer hackage.nix.

       … 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 'project'

       at /nix/store/8n76c1c3nz2wl6dzxmxdz2y5xrx70flw-source/overlays/haskell.nix:836:19:

          835|         # for `cabalPackage` and `stackPackage`.
          836|         project = args: let p = project' args;
             |                   ^
          837|           in p.hsPkgs // p;

       … from call site

       at /Users/{...}/nix/pkgs/haskell/haskell.nix:12:13:

           11| let
           12|   project = haskell-nix.project {
             |             ^
           13|     # 'cleanGit' cleans a source directory based on the files known by git

       … while evaluating anonymous lambda

       at /Users/{...}/nix/pkgs/haskell/haskell.nix:4:1:

            3| ############################################################################
            4| { haskell-nix
             | ^
            5| , gitignore-nix

       … from call site

       at /Users/{...}/nix/pkgs/haskell/default.nix:24:13:

           23|   # The haskell project created by haskell-nix.cabalProject'
           24|   project = import ./haskell.nix {
             |             ^
           25|     inherit lib haskell-nix compiler-nix-name gitignore-nix libsodium-vrf;

       … while evaluating the attribute 'project.shellFor'

       at /Users/{...}/nix/pkgs/haskell/default.nix:35:10:

           34| rec {
           35|   inherit project projectPackages packages;
             |          ^
           36| }

I found the hackage.nix repository located at https://github.com/input-output-hk/hackage.nix. It seems that somehow this needs to be used to update it using nix-tools, located at https://github.com/input-output-hk/nix-tools.
I have very limited experience using nix or other haskell package managers so upgrading hackage.nix has been a blocker for me.
If someone can provide any guidance, or even better, a step by step of how to update hackage.nix, that would be greatly appreciated.
Thanks

**Tags:** nix
> **Comments:**
> **username_1**: Did you resolve this error? I met this error.  

---

## 1 answers

### Answer by username_2 on 2022-11-30. Score: 0

Try installing niv and running `niv update hackage-nix` from the root of the repository.


---

