I have the following shell.nix
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
buildInputs = [
pkgs.php73
];
}
Running phpdbg
in nix-shell
gives me the following error:
dyld: Library not loaded: @rpath/libargon2.1.dylib
Referenced from: /nix/store/kq8b5k3waj1hpsad2qndky7azj97jzb0-php-with-extensions-7.3.23/bin/phpdbg
Reason: image not found
[1] 63208 abort phpdbg
This looks like nix is failing to patch the phpdbg elf in some manner.
otool -l $(which phpdbg)
gives the entry for libargon2 thusly:
Load command 11
cmd LC_LOAD_DYLIB
cmdsize 56
name @rpath/libargon2.1.dylib (offset 24)
time stamp 2 Thu Jan 1 01:00:02 1970
current version 0.0.0
Whereas all the other dynamic libraries look like this:
Load command 13
cmd LC_LOAD_DYLIB
cmdsize 112
name /nix/store/h144jawqa92rqjhaahrsikq5j2dwkh5n-Libsystem-osx-10.12.6/lib/libSystem.B.dylib (offset 24)
time stamp 2 Thu Jan 1 01:00:02 1970
current version 1226.10.1
So it looks like maybe the php package is failing to patch the argon 2 dependency somehow? Any idea how to fix this?
Thanks
Alex