Haskell-language-server: Nix Shell error: Package ‘retrie-0.1.1.1’ is marked as broken, refusing to evaluate

Created on 16 Aug 2020  Â·  7Comments  Â·  Source: haskell/haskell-language-server

On a fresh master, when running nix-shell, it fails because of retrie being marked as broken:

$ nix-shell
error: Package ‘retrie-0.1.1.1’ in /nix/store/p49mi5i4r35n1m6kx07lkxp07p8hh8hs-source/pkgs/development/haskell-modules/hackage-packages.nix:214783 is marked as broken, refusing to evaluate.

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowBroken = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowBroken = true; }
to ~/.config/nixpkgs/config.nix.

(use '--show-trace' to show detailed location information)

Edit: FYI changing the following in shell.nix makes it work, but I am unsure if this is a good idea...

-   nixpkgs ? import sources.nixpkgs {},
+   nixpkgs ? import sources.nixpkgs {config.allowBroken = true;},
build can-workaround nixos bug

Most helpful comment

I think the definitive solution is for retrie to no longer be marked as broken in Nixpkgs :smile:

It seems that @maralorn has fixed it already (while also kindly bumping Nixpkgs version of HLS to 0.3), this should be fine in a couple of days when the next wave of Haskell package is published.

When this becomes available in Nixpkgs, all we need to do is update the sources in ./nix/ and we should be good to go :smile:

All 7 comments

Please send a PR with the allowBroken fix

I guess we should keep this open to find out the root cause and find another definitive solution.

The root cause is that the package is marked as broken in Nix because the tests fail. This is unlikely to change, the tests will continue to fail in a Nix build.
I failed to notice it earlier because I have allowBroken=True in my system settings.

I think the definitive solution is for retrie to no longer be marked as broken in Nixpkgs :smile:

It seems that @maralorn has fixed it already (while also kindly bumping Nixpkgs version of HLS to 0.3), this should be fine in a couple of days when the next wave of Haskell package is published.

When this becomes available in Nixpkgs, all we need to do is update the sources in ./nix/ and we should be good to go :smile:

Shouldn't this issue be reopened?

Even if the retrie tests are disabled in Nix, I think we should keep allowBroken=true in our shell.nix file

EDIT: in keeping with the guidelines at the top of the file, maybe removing broken dependencies from the shell.nix file is more appropriate, because if they are tagged as broken in Nixpkgs, there will be no cache artefacts for them.

# This shell.nix file is designed for use with cabal build
# It aims to leverage the nix cache in as much as possible
# while reducing Nix maintenance costs.
Was this page helpful?
0 / 5 - 0 ratings