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 }:
let
packages = [
pkgs.ripgrep
pkgs.gcc
pkgs.unzip
pkgs.cargo
pkgs.dotnet-sdk
pkgs.go
pkgs.ruby
# packages to move to mason once it supports it
pkgs.java-language-server
];
in
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:
/nix/store/k6yka69n28j47wjhm14h41r2kbv262y6-gcc-wrapper-11.3.0
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?
This is because the neovim derivation now sets disallowedRequisites = [ stdenv.cc ] 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.