From 371d80c468a3cf7343cab49b780d5e08d40f6b37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phan=20Kochen?= Date: Sun, 16 May 2021 22:27:23 +0200 Subject: [PATCH] libical: fix darwin build --- pkgs/development/libraries/libical/default.nix | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/libical/default.nix b/pkgs/development/libraries/libical/default.nix index fa396e96650..d7eb085df7f 100644 --- a/pkgs/development/libraries/libical/default.nix +++ b/pkgs/development/libraries/libical/default.nix @@ -12,13 +12,12 @@ , libical , python3 , tzdata +, fixDarwinDylibNames , introspectionSupport ? stdenv.buildPlatform == stdenv.hostPlatform -, gobject-introspection ? null -, vala ? null +, gobject-introspection +, vala }: -assert introspectionSupport -> gobject-introspection != null && vala != null; - stdenv.mkDerivation rec { pname = "libical"; version = "3.0.9"; @@ -47,6 +46,8 @@ stdenv.mkDerivation rec { ] ++ lib.optionals introspectionSupport [ gobject-introspection vala + ] ++ lib.optionals stdenv.isDarwin [ + fixDarwinDylibNames ]; installCheckInputs = [ # running libical-glib tests @@ -80,6 +81,13 @@ stdenv.mkDerivation rec { # LD_LIBRARY_PATH and GI_TYPELIB_PATH variables doInstallCheck = true; enableParallelChecking = false; + preInstallCheck = if stdenv.isDarwin then '' + for testexe in $(find ./src/test -maxdepth 1 -type f -executable); do + for lib in $(cd lib && ls *.3.dylib); do + install_name_tool -change $lib $out/lib/$lib $testexe + done + done + '' else null; installCheckPhase = '' runHook preInstallCheck