Getting "is not allowed to refer to the following paths" since upgrading to unstable

I have the following override that I was using up until I just upgraded to unstable and has been working fine for a long time.

{ lib, fetchFromGitHub, pkgs }:

  packages = [
    # packages to move to mason once it supports it
  pkgs.neovim-unwrapped.overrideAttrs (oldAttrs: rec {
    nativeBuildInputs = oldAttrs.nativeBuildInputs ++ [ pkgs.makeWrapper ];

    postInstall = ''
      wrapProgram $out/bin/nvim \
        --prefix PATH : ${lib.makeBinPath packages}

However now when I try and build I get the following error:

error: output '/nix/store/6p033r3m8zgmil55sy9ms1hln6k29dxj-neovim-unwrapped-0.7.2' is not allowed to refer to the following paths:

If I comment out the gcc line it builds fine, however I do need gcc

Why can it no longer refer to that path any longer since upgrading to unstable?

1 Like

fixed it by using gcc-unwrapped

Actually gcc-unwrapped is causing other issues when compiling c related stuff - I’m not sure that this is the solution.

I’m getting errors like:

error: linker cc not found etc

I found this issue

which basically says to use the gcc package (the one I was previously using).

Why will it not let me reference the gcc package anymore?

This is because the neovim derivation now sets disallowedRequisites = [ ] to prevent the build time $CC to leak into the output store path. Since you specifically want this you can simply set disallowedRequisites = [] via the override.

1 Like

yep that was it thank you :slight_smile: