Merge pull request #104593 from siriobalmelli-foss/fix/ghostscript

ghostscript: fix broken rpath on Darwin
This commit is contained in:
Dmitry Kalinkin 2020-11-26 10:01:38 -05:00 committed by GitHub
commit a97cb19b38
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -103,8 +103,20 @@ stdenv.mkDerivation rec {
done
'';
# dynamic library name only contains maj.min, eg. '9.53'
dylib_version = lib.versions.majorMinor version;
preFixup = lib.optionalString stdenv.isDarwin ''
install_name_tool -change libgs.dylib.${version} $out/lib/libgs.dylib.${version} $out/bin/gs
install_name_tool -change libgs.dylib.$dylib_version $out/lib/libgs.dylib.$dylib_version $out/bin/gs
'';
# validate dynamic linkage
doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck
$out/bin/gs --version
runHook postInstallCheck
'';
meta = {