@@ -37,36 +37,33 @@ stdenv.mkDerivation (finalAttrs: {
3737 ./0001-build-Allow-using-V8-from-system.patch
3838 ] ;
3939
40- nativeBuildInputs = [
41- perl
42- ]
43- ++ lib . optionals stdenv . isDarwin [
44- clang
45- xcbuild
46- ] ;
40+ nativeBuildInputs =
41+ [ perl ]
42+ ++ lib . optionals stdenv . isDarwin [
43+ clang
44+ xcbuild
45+ ] ;
4746
4847 buildInputs = [
4948 v8
5049 postgresql
51- ]
52- ++ lib . optionals stdenv . isDarwin [
53- apple-sdk_11
54- ] ;
50+ ] ++ lib . optionals stdenv . isDarwin [ apple-sdk_11 ] ;
5551
5652 buildFlags = [ "all" ] ;
5753
58- makeFlags = [
59- # Nixpkgs build a v8 monolith instead of separate v8_libplatform.
60- "USE_SYSTEM_V8=1"
61- "V8_OUTDIR=${ v8 } /lib"
62- "PG_CONFIG=${ postgresql } /bin/pg_config"
63- ]
64- ++ lib . optionals stdenv . isDarwin [
65- "CC=${ clang } /bin/clang"
66- "CXX=${ clang } /bin/clang++"
67- "SHLIB_LINK=-L${ v8 } /lib -lv8_monolith -Wl,-rpath,${ v8 } /lib"
68- ]
69- ++ lib . optionals ( ! stdenv . isDarwin ) [ "SHLIB_LINK=-lv8" ] ;
54+ makeFlags =
55+ [
56+ # Nixpkgs build a v8 monolith instead of separate v8_libplatform.
57+ "USE_SYSTEM_V8=1"
58+ "V8_OUTDIR=${ v8 } /lib"
59+ "PG_CONFIG=${ postgresql } /bin/pg_config"
60+ ]
61+ ++ lib . optionals stdenv . isDarwin [
62+ "CC=${ clang } /bin/clang"
63+ "CXX=${ clang } /bin/clang++"
64+ "SHLIB_LINK=-L${ v8 } /lib -lv8_monolith -Wl,-rpath,${ v8 } /lib"
65+ ]
66+ ++ lib . optionals ( ! stdenv . isDarwin ) [ "SHLIB_LINK=-lv8" ] ;
7067
7168 NIX_LDFLAGS = (
7269 lib . optionals stdenv . isDarwin [
@@ -127,9 +124,11 @@ stdenv.mkDerivation (finalAttrs: {
127124 install_name_tool -change @rpath/libv8_monolith.dylib ${ v8 } /lib/libv8_monolith.dylib $out/lib/plv8.so
128125 '' }
129126
130- ${ lib . optionalString ( ! stdenv . isDarwin ) ''
131- ${ patchelf } /bin/patchelf --set-rpath "${ v8 } /lib:${ postgresql } /lib:${ stdenv . cc . cc . lib } /lib" $out/lib/plv8.so
132- '' }
127+ ${
128+ lib . optionalString ( ! stdenv . isDarwin ) ''
129+ ${ patchelf } /bin/patchelf --set-rpath "${ v8 } /lib:${ postgresql } /lib:${ stdenv . cc . cc . lib } /lib" $out/lib/plv8.so
130+ ''
131+ }
133132 else
134133 ${ lib . optionalString stdenv . isDarwin ''
135134 install_name_tool -add_rpath "${ v8 } /lib" $out/lib/plv8-${ finalAttrs . version } ${ postgresql . dlSuffix }
@@ -138,9 +137,11 @@ stdenv.mkDerivation (finalAttrs: {
138137 install_name_tool -change @rpath/libv8_monolith.dylib ${ v8 } /lib/libv8_monolith.dylib $out/lib/plv8-${ finalAttrs . version } ${ postgresql . dlSuffix }
139138 '' }
140139
141- ${ lib . optionalString ( ! stdenv . isDarwin ) ''
142- ${ patchelf } /bin/patchelf --set-rpath "${ v8 } /lib:${ postgresql } /lib:${ stdenv . cc . cc . lib } /lib" $out/lib/plv8-${ finalAttrs . version } ${ postgresql . dlSuffix }
143- '' }
140+ ${
141+ lib . optionalString ( ! stdenv . isDarwin ) ''
142+ ${ patchelf } /bin/patchelf --set-rpath "${ v8 } /lib:${ postgresql } /lib:${ stdenv . cc . cc . lib } /lib" $out/lib/plv8-${ finalAttrs . version } ${ postgresql . dlSuffix }
143+ ''
144+ }
144145 fi
145146 '' ;
146147
0 commit comments