input-output-hk / haskell.nix

Alternative Haskell Infrastructure for Nixpkgs
https://input-output-hk.github.io/haskell.nix
Apache License 2.0
556 stars 240 forks source link

haskell.nix failes to evaluate because hackage.json is missing revisions #598

Closed Philonous closed 4 years ago

Philonous commented 4 years ago

I've created a default.nix in my stack (lts-15.12) project according to the example in the documentation:

let
  haskellNix = import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz) {};
  nixpkgsSrc = haskellNix.sources.nixpkgs-2003;
  nixpkgsArgs = haskellNix.nixpkgsArgs;
in
{ pkgs ? import nixpkgsSrc nixpkgsArgs
}:
pkgs.haskell-nix.stackProject {
  src = pkgs.haskell-nix.haskellLib.cleanGit { src = ./.; };
}

Trying to evaluate this expression fails with

attribute '6461d82f236ca33cd6cc502e6339f67c48506d3ebfd5de9305e3428d6f541499' missing, at /nix/store/8wa83fag7gj4jyhwvbmbqb5zqq661ml7-stackage-snapshot-source/lts-15.12.nix:1438:29

The problem seems to be in https://github.com/input-output-hk/hackage.nix/blob/master/hackage.json . which only lists the latest revision for basement-0.0.11, namely r2, af43e2e334e515b52ca309919b135c51b5e9411e6d4c68d0e8950d61eb5f25d1, according to https://hackage.haskell.org/package/basement-0.0.11/revisions/. (strangely it's listed as "r0" in hackage.json ) whereas stackage lts-15.12 requires revision r0 6461d82f236ca33cd6cc502e6339f67c48506d3ebfd5de9305e3428d6f541499

angerman commented 4 years ago

See #597, should be fixed with the next hackage.nix/stackage.nix update tomorrow.

Philonous commented 4 years ago

Oh, that's quick. Thanks!