@@ -24,6 +24,16 @@ export expires="4000-01-01T00:00:00Z"
24ln -sf ${index} $out/01-index.tar.gz
24ln -sf ${index} $out/01-index.tar.gz
25export index_md5=$(nix-hash --flat --type md5 ${index})
25export index_md5=$(nix-hash --flat --type md5 ${index})
26export index_sha256=$(nix-hash --flat --type sha256 ${index})
26export index_sha256=$(nix-hash --flat --type sha256 ${index})
28+ # When possible check the hash we calculate here against the `outputHash`
29+ # of the index derivation (when the `extra-hackages` feature is used the index
30+ # may not have an outputHash).
31+ pkgs.lib.optionalString (index ? outputHash) ''
32+ if [[ "${index.outputHash}" != "$index_sha256" ]]; then
33+ echo "ERROR See https://github.com/input-output-hk/haskell.nix/issues/884"
27export index_length=$(stat --printf="%s" ${index})
37export index_length=$(stat --printf="%s" ${index})
29substituteAll ${./root.json} $out/root.json
39substituteAll ${./root.json} $out/root.json