I’m on Darwin, and the relevant parts of my Nix setup are https://github.com/Smaug123/nix-dotfiles/blob/72e4884436c80dab81ccf43b698f8150290fb09b/darwin-configuration.nix lines 3 and 25, and https://github.com/Smaug123/nix-dotfiles/blob/72e4884436c80dab81ccf43b698f8150290fb09b/config.nix .
The problem I am having is that Lean (as installed via elan
, which is itself installed by Nix) dynamically loads /usr/local/opt/gmp/lib/libgmp.10.dylib
. I’ve used Nix to install gmp
, but of course it doesn’t put that symlink there.
How do I amend the gmp
install process to put a symlink in /usr/local/opt
? I’ve tried the following (which is the contents of the config.nix
file I link above):
{
packageOverrides = pkgs: {
gmp = pkgs.gmp.override { postInstall = ''
echo hello
ln -s /usr/local/opt/gmp/lib/libgmp.10.dylib $out/lib/libgmp.10.dylib
'';
};
};
}
But as far as I can tell, this does nothing at all; hello
is not printed, and the symlink is not created.
Nix-darwin does have environment.etc
, but that only lets you put things in /etc
; I tried with "../usr/local/opt"
and the environment.etc
again appeared to do nothing.