mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 22:03:54 +03:00
ghostscript: fix broken rpath on Darwin
Dynamic library name on Darwin contains only 'maj.min' eg "9.53";
the build however used $version to set rpath;
this broke on 2029ca37
when $version went from "9.52" to "9.53.3".
Add a call to 'gs' in installCheckPhase,
to break the build if dylib issues arise in the future.
Signed-off-by: Sirio Balmelli <sirio@b-ad.ch>
Co-authored-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
This commit is contained in:
parent
54745a4f5e
commit
a775974c8a
@ -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 = {
|
||||
|
Loading…
Reference in New Issue
Block a user