Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It's impossible to override expressions that have "meta.broken = true" set. #7541

Closed
cstrahan opened this issue Apr 24, 2015 · 8 comments
Closed

Comments

@cstrahan
Copy link
Contributor

I have the following in my ~/.nixpkgs/config.nix:

  haskellngPackages_7101 = with self.haskell-ng.lib; self.haskell-ng.packages.ghc7101.override {
    overrides = self: super: {
      ghc-mod = overrideCabal super.ghc-mod (drv: {
        broken = false;
        src = pkgs.fetchFromGitHub {
          owner = "DanielG";
          repo = "ghc-mod";
          rev = "247e4e0e7616fe1fecc68fdcf80d6249ac4cee4f";
          sha256 = "02i6z0navp5a73nk9k46rh01hl5r10s6gzq1c6fmcrdrzjq6nwv4";
        };
        buildDepends = drv.buildDepends ++ [ self.cabal-helper self.cereal ];
      });
    };
  };

And yet, despite setting broken = false;, I still get the following error:

error: Package ‘haskell-ghc-mod-5.2.1.2’ in ‘/home/cstrahan/src/nixpkgs/pkgs/development/haskell-modules/hackage-packages.nix:51580’ is marked as broken, refusing to evaluate.
For `nixos-rebuild` you can set
  { nixpkgs.config.allowBroken = true; }
in configuration.nix to override this.
For `nix-env` you can add
  { allowBroken = true; }
to ~/.nixpkgs/config.nix.

(use ‘--show-trace’ to show detailed location information)

I'm positive that my overrides are taking place, and that this isn't user error.

@peti
Copy link
Member

peti commented Apr 25, 2015

This is a bug in Nix/Nixpkgs: meta.broken is too strict. See also NixOS/cabal2nix#130.

@peti peti changed the title can't mark haskell package as unbroken via overrideCabal It's impossible to override expressions that have "meta.broken = true" set. Apr 25, 2015
@Mathnerd314
Copy link
Contributor

I filed #9305 to fix this. Did GitHub notify anybody here?

@peti peti closed this as completed in 4d6452b Aug 19, 2015
peti added a commit that referenced this issue Aug 19, 2015
Move licenseAllowed check into the builder attribute (fixes #7541)
peti added a commit that referenced this issue Aug 19, 2015
…7541)"

This reverts commit 4d6452b. The change affects Hydra in a way we didn't
expect: #9305 (comment).
@peti
Copy link
Member

peti commented Aug 19, 2015

The first attempt from #9305 had to be reverted (81ce9be).

@vcunat
Copy link
Member

vcunat commented Jan 14, 2018

Fixed by 67e8392.

@vcunat vcunat closed this as completed Jan 14, 2018
@peti
Copy link
Member

peti commented Jan 19, 2018

@vcunat, unfortunately, this change had the undesired side-effect of re-enabling the builds of all kinds of broken packages on Hydra, so now I get hundreds of evaluation errors where there used to be none, i.e.: https://hydra.nixos.org/jobset/nixpkgs/haskell-updates#tabs-errors.

How am I supposed to remedy that issue?

@vcunat
Copy link
Member

vcunat commented Jan 19, 2018

I'm a little confused by the fact/statement that there used to be none, but I think we can get rid of all, as there's now a lot of flexibility in handling the errors.

@peti
Copy link
Member

peti commented Jan 19, 2018

Note that this is the haskell-updates jobset -- not trunk. That jobset always had zero evaluation errors until the behavior changed. I suppose I can fix most of them by changing the generator to set meta.hydraPlatforms = [] at the same time as meta.broken = true. This used to be implicit before ...

peti added a commit to NixOS/cabal2nix that referenced this issue Jan 19, 2018
Recent changes [1] allow Hydra to build packages that are marked broken. To
avoid plenty of evaluation errors on Hydra, explicitly disable Hydra builds of
broken packages.

[1] NixOS/nixpkgs#7541 (comment)
@vcunat
Copy link
Member

vcunat commented Jan 19, 2018

I noticed but I didn't know you managed to clear all of them in haskell packages. I'll try to get rid of all (incl. trunk), as I expect that to be relatively easy now, but I can't promise it will be during this weekend already.

peti added a commit to peti/nixpkgs that referenced this issue Jan 20, 2018
Recent changes [1] allow Hydra to build packages that are marked broken. To
avoid plenty of evaluation errors on Hydra, explicitly disable Hydra builds of
broken packages.

[1] NixOS#7541 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants