From 9e012056593274f80a15c09c76b6d7a2d78746d2 Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Tue, 28 May 2013 18:28:25 -0400 Subject: [PATCH] Set library path properly for v8 on darwin --- pkgs/development/libraries/v8/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/libraries/v8/default.nix b/pkgs/development/libraries/v8/default.nix index b325c2a107de..25deb9eb3516 100644 --- a/pkgs/development/libraries/v8/default.nix +++ b/pkgs/development/libraries/v8/default.nix @@ -48,4 +48,9 @@ stdenv.mkDerivation { "mv -v out/${arch}.release/lib.target/libv8.so $out/lib"} mv -v include $out/ ''; + + postFixup = if stdenv.isDarwin then '' + install_name_tool -change /usr/local/lib/libv8.dylib $out/lib/libv8.dylib -change /usr/lib/libgcc_s.1.dylib ${stdenv.gcc.gcc}/lib/libgcc_s.1.dylib $out/bin/d8 + install_name_tool -id $out/lib/libv8.dylib -change /usr/lib/libgcc_s.1.dylib ${stdenv.gcc.gcc}/lib/libgcc_s.1.dylib $out/lib/libv8.dylib + '' else null; }