barbq icon indicating copy to clipboard operation
barbq copied to clipboard

Build broken using nixpkgs-unstable and nix-darwin.

Open duckpuppy opened this issue 4 years ago • 2 comments

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
      ];

      ...

duckpuppy avatar Jul 20 '20 16:07 duckpuppy

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 🤔

bkase avatar Apr 17 '21 21:04 bkase

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.

lafoma avatar Nov 03 '21 22:11 lafoma