diff options
author | Sirio Balmelli <sirio@b-ad.ch> | 2020-11-24 10:46:19 +0100 |
---|---|---|
committer | Sirio Balmelli <sirio@b-ad.ch> | 2020-11-25 10:28:21 +0100 |
commit | a775974c8ac756d2293c4c9f8b2db887d3aa47e7 (patch) | |
tree | 29b8fde6ae407e156f2412f633ef61df315216e0 /pkgs/misc | |
parent | 54745a4f5e4177bb7b5c46c1217a55d27162f8b1 (diff) |
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>
Diffstat (limited to 'pkgs/misc')
-rw-r--r-- | pkgs/misc/ghostscript/default.nix | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/pkgs/misc/ghostscript/default.nix b/pkgs/misc/ghostscript/default.nix index 5a7762640f73..6f113bcd99cb 100644 --- a/pkgs/misc/ghostscript/default.nix +++ b/pkgs/misc/ghostscript/default.nix @@ -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 = { |