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

Build broken using nixpkgs-unstable and nix-darwin. #1

Open
duckpuppy opened this issue Jul 20, 2020 · 2 comments
Open

Build broken using nixpkgs-unstable and nix-darwin. #1

duckpuppy opened this issue Jul 20, 2020 · 2 comments

Comments

@duckpuppy
Copy link

duckpuppy commented Jul 20, 2020

When I try to add barbq to my darwin-configuration.nix, running darwin-rebuild check results in the following error:

➜ darwin-rebuild check
building the system configuration...
error: Package ‘async-timer-0.2.0.0’ in /nix/store/dv1fglfn26v9jh3qq2y25k85qa0gbi2i-nixpkgs-unstable.tar.gz/pkgs/development/haskell-modules/hackage-packages.nix:33590 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)

I'm fairly new to nix, so I'm not sure where to go from here. I've tried a couple of things, mainly different ways to specify allowBroken = true in my configuration. Currently, I have

  nixpkgs = {
    config = {
      allowBroken = true;
      allowUnfree = true;
    };
  };

but that doesn't seem to help.

Can you provide any suggestions about how to fix this, or is this something that needs upstream work?

I've copied the config from the documentation (with barbq currently commented out due to the error):

let
  barbq =
    let
      src = pkgs.fetchFromGitHub {
        owner = "bkase";
        repo = "barbq";
        rev = "50a75b51e7cfb98c697c7a7ce320ea6acb699c72";
        sha256 = "0d1rfgz64kc7z4cxyasxm8rlaw8shfr1r7jqikjpragi0zlr2r1y";
      };
    in
      (import "${src}/release.nix").barbq;
in
with builtins;
with {
  # Grab useful configs from other people
  cmacraeNixpkgs = fetchGit {
    url    = https://github.com/cmacrae/.nixpkgs.git;
    rev    = "d4b51eb414b0edaffaeee9b926c32b118014c4fa";
  };
};
{
  environment = {
    # List packages installed in system profile. To search by name, run:
    # $ nix-env -qaP | grep wget
    systemPackages =
      with pkgs;
      [
        vim
        tmux
        tree
        tig
        git
        lorri
        docker
        # google-chrome
        alacritty
        # barbq

        cmus
      ];

      ...
@bkase
Copy link
Owner

bkase commented Apr 17, 2021

Hmm I wish I saw this earlier! Anyway, I only just reproduced this and I believe I found a fix for this -- though it's a bit hacky. I'll push the fix in a moment.

I wonder why I never ran into this on any my machines until now 🤔

@lafoma
Copy link

lafoma commented Nov 3, 2021

Same issue, is the fix applied ?

Anyways, I got this error after i changed the version of ghc compiler from 8.10.4 to 8.10.7 in default.unix.

Before this, i was getting
attribute 'ghc8104' missing.

Now i'm getting the same, and if i allow broken packages to be enabled using the suggessted environment variable, the compilation fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants