dtc: fix dylib name on darwin

Prior to this commit, the install name of dylib is not absolute.
This commit is contained in:
Jiajie Chen 2022-08-17 00:43:26 +08:00
parent ace5332dcb
commit 23d21ce9c9

View File

@ -44,6 +44,10 @@ stdenv.mkDerivation rec {
makeFlags = [ "PYTHON=python" "STATIC_BUILD=${toString stdenv.hostPlatform.isStatic}" ];
installFlags = [ "INSTALL=install" "PREFIX=$(out)" "SETUP_PREFIX=$(out)" ];
postFixup = lib.optionalString stdenv.isDarwin ''
install_name_tool -id $out/lib/libfdt.dylib $out/lib/libfdt-${version}.dylib
'';
# Checks are broken on aarch64 darwin
# https://github.com/NixOS/nixpkgs/pull/118700#issuecomment-885892436
doCheck = !stdenv.isDarwin;