Skip to content

Commit 29c79bf

Browse files
committed
chore: fix formatting
1 parent 758c52d commit 29c79bf

File tree

19 files changed

+339
-352
lines changed

19 files changed

+339
-352
lines changed

nix/ext/gdal.nix

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,14 @@ stdenv.mkDerivation rec {
4747
zlib
4848
];
4949

50-
cmakeFlags =
51-
[
52-
"-DGDAL_USE_INTERNAL_LIBS=OFF"
53-
"-DGEOTIFF_INCLUDE_DIR=${lib.getDev libgeotiff}/include"
54-
"-DGEOTIFF_LIBRARY_RELEASE=${lib.getLib libgeotiff}/lib/libgeotiff${stdenv.hostPlatform.extensions.sharedLibrary}"
55-
"-DBUILD_PYTHON_BINDINGS=OFF"
56-
]
57-
++ lib.optionals (!stdenv.isDarwin) [ "-DCMAKE_SKIP_BUILD_RPATH=ON" ]
58-
++ lib.optionals stdenv.isDarwin [ "-DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON" ];
50+
cmakeFlags = [
51+
"-DGDAL_USE_INTERNAL_LIBS=OFF"
52+
"-DGEOTIFF_INCLUDE_DIR=${lib.getDev libgeotiff}/include"
53+
"-DGEOTIFF_LIBRARY_RELEASE=${lib.getLib libgeotiff}/lib/libgeotiff${stdenv.hostPlatform.extensions.sharedLibrary}"
54+
"-DBUILD_PYTHON_BINDINGS=OFF"
55+
]
56+
++ lib.optionals (!stdenv.isDarwin) [ "-DCMAKE_SKIP_BUILD_RPATH=ON" ]
57+
++ lib.optionals stdenv.isDarwin [ "-DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON" ];
5958

6059
enableParallelBuilding = true;
6160

nix/ext/pg_jsonschema/default.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ let
4545
nativeBuildInputs = [ cargo ];
4646
buildInputs = [
4747
postgresql
48-
] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ];
48+
]
49+
++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ];
4950
# update the following array when the pg_jsonschema version is updated
5051
# required to ensure that extensions update scripts from previous versions are generated
5152

nix/ext/pg_net.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ let
2020
buildInputs = [
2121
curl
2222
postgresql
23-
] ++ lib.optional (version == "0.6") libuv;
23+
]
24+
++ lib.optional (version == "0.6") libuv;
2425

2526
src = fetchFromGitHub {
2627
owner = "supabase";

nix/ext/pgaudit.nix

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -184,22 +184,20 @@ buildEnv {
184184
echo "Found control version: $controlVer from package ${pkg}"
185185
186186
# Create migrations from control version to all supported versions on this PG major
187-
${
188-
lib.concatMapStringsSep "\n" (targetVer: ''
189-
# Skip if control version equals target version
190-
if [[ "$controlVer" != "${targetVer}" ]]; then
191-
# Skip if migration already exists
192-
if [[ ! -f "$out/share/postgresql/extension/${pname}--$controlVer--${targetVer}.sql" ]]; then
193-
# Create symlink to migration if target SQL exists
194-
if [[ -f "$out/share/postgresql/extension/${pname}--${targetVer}.sql" ]]; then
195-
echo "Creating migration symlink from control version $controlVer to ${targetVer}"
196-
ln -s "$out/share/postgresql/extension/${pname}--${targetVer}.sql" \
197-
"$out/share/postgresql/extension/${pname}--$controlVer--${targetVer}.sql"
198-
fi
187+
${lib.concatMapStringsSep "\n" (targetVer: ''
188+
# Skip if control version equals target version
189+
if [[ "$controlVer" != "${targetVer}" ]]; then
190+
# Skip if migration already exists
191+
if [[ ! -f "$out/share/postgresql/extension/${pname}--$controlVer--${targetVer}.sql" ]]; then
192+
# Create symlink to migration if target SQL exists
193+
if [[ -f "$out/share/postgresql/extension/${pname}--${targetVer}.sql" ]]; then
194+
echo "Creating migration symlink from control version $controlVer to ${targetVer}"
195+
ln -s "$out/share/postgresql/extension/${pname}--${targetVer}.sql" \
196+
"$out/share/postgresql/extension/${pname}--$controlVer--${targetVer}.sql"
199197
fi
200198
fi
201-
'') versions
202-
}
199+
fi
200+
'') versions}
203201
fi
204202
'') packages}
205203

nix/ext/pgroonga.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ stdenv.mkDerivation rec {
2828
msgpack-c
2929
supabase-groonga
3030
mecab
31-
] ++ lib.optionals stdenv.isDarwin [ xxHash ];
31+
]
32+
++ lib.optionals stdenv.isDarwin [ xxHash ];
3233

3334
propagatedBuildInputs = [ supabase-groonga ];
3435
configureFlags = [

nix/ext/pgroonga/default.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ let
5757
msgpack-c
5858
supabase-groonga
5959
mecab
60-
] ++ lib.optionals stdenv.isDarwin [ xxHash ];
60+
]
61+
++ lib.optionals stdenv.isDarwin [ xxHash ];
6162

6263
propagatedBuildInputs = [
6364
supabase-groonga

nix/ext/pgrouting.nix

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,14 @@ let
5454
stdenv.isDarwin && lib.versionAtLeast postgresql.version "16"
5555
) "-Wno-error=int-conversion -Wno-error=incompatible-pointer-types";
5656

57-
cmakeFlags =
58-
[ "-DPOSTGRESQL_VERSION=${postgresql.version}" ]
59-
++ lib.optionals (stdenv.isDarwin && lib.versionAtLeast postgresql.version "16") [
60-
"-DCMAKE_MACOSX_RPATH=ON"
61-
"-DCMAKE_SHARED_MODULE_SUFFIX=.dylib"
62-
"-DCMAKE_SHARED_LIBRARY_SUFFIX=.dylib"
63-
];
57+
cmakeFlags = [
58+
"-DPOSTGRESQL_VERSION=${postgresql.version}"
59+
]
60+
++ lib.optionals (stdenv.isDarwin && lib.versionAtLeast postgresql.version "16") [
61+
"-DCMAKE_MACOSX_RPATH=ON"
62+
"-DCMAKE_SHARED_MODULE_SUFFIX=.dylib"
63+
"-DCMAKE_SHARED_LIBRARY_SUFFIX=.dylib"
64+
];
6465

6566
preConfigure = lib.optionalString (stdenv.isDarwin && lib.versionAtLeast postgresql.version "16") ''
6667
export DLSUFFIX=.dylib

nix/ext/plv8.nix

Lines changed: 27 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -37,33 +37,34 @@ stdenv.mkDerivation (finalAttrs: {
3737
./0001-build-Allow-using-V8-from-system.patch
3838
];
3939

40-
nativeBuildInputs =
41-
[ perl ]
42-
++ lib.optionals stdenv.isDarwin [
43-
clang
44-
xcbuild
45-
];
40+
nativeBuildInputs = [
41+
perl
42+
]
43+
++ lib.optionals stdenv.isDarwin [
44+
clang
45+
xcbuild
46+
];
4647

4748
buildInputs = [
4849
v8
4950
postgresql
50-
] ++ lib.optionals stdenv.isDarwin [ apple-sdk_11 ];
51+
]
52+
++ lib.optionals stdenv.isDarwin [ apple-sdk_11 ];
5153

5254
buildFlags = [ "all" ];
5355

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" ];
56+
makeFlags = [
57+
# Nixpkgs build a v8 monolith instead of separate v8_libplatform.
58+
"USE_SYSTEM_V8=1"
59+
"V8_OUTDIR=${v8}/lib"
60+
"PG_CONFIG=${postgresql}/bin/pg_config"
61+
]
62+
++ lib.optionals stdenv.isDarwin [
63+
"CC=${clang}/bin/clang"
64+
"CXX=${clang}/bin/clang++"
65+
"SHLIB_LINK=-L${v8}/lib -lv8_monolith -Wl,-rpath,${v8}/lib"
66+
]
67+
++ lib.optionals (!stdenv.isDarwin) [ "SHLIB_LINK=-lv8" ];
6768

6869
NIX_LDFLAGS = (
6970
lib.optionals stdenv.isDarwin [
@@ -124,11 +125,9 @@ stdenv.mkDerivation (finalAttrs: {
124125
install_name_tool -change @rpath/libv8_monolith.dylib ${v8}/lib/libv8_monolith.dylib $out/lib/plv8.so
125126
''}
126127
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-
}
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+
''}
132131
else
133132
${lib.optionalString stdenv.isDarwin ''
134133
install_name_tool -add_rpath "${v8}/lib" $out/lib/plv8-${finalAttrs.version}${postgresql.dlSuffix}
@@ -137,11 +136,9 @@ stdenv.mkDerivation (finalAttrs: {
137136
install_name_tool -change @rpath/libv8_monolith.dylib ${v8}/lib/libv8_monolith.dylib $out/lib/plv8-${finalAttrs.version}${postgresql.dlSuffix}
138137
''}
139138
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-
}
139+
${lib.optionalString (!stdenv.isDarwin) ''
140+
${patchelf}/bin/patchelf --set-rpath "${v8}/lib:${postgresql}/lib:${stdenv.cc.cc.lib}/lib" $out/lib/plv8-${finalAttrs.version}${postgresql.dlSuffix}
141+
''}
145142
fi
146143
'';
147144

nix/ext/plv8/default.nix

Lines changed: 42 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -59,49 +59,47 @@ let
5959
inherit hash;
6060
};
6161

62-
patches =
63-
[
64-
# Allow building with system v8.
65-
# https://github.com/plv8/plv8/pull/505 (rejected)
66-
./0001-build-Allow-using-V8-from-system-${version}.patch
67-
]
68-
++ lib.optionals (builtins.compareVersions "3.1.10" version >= 0) [
69-
# Apply https://github.com/plv8/plv8/pull/552/ patch to fix extension upgrade problems
70-
./0001-fix-upgrade-related-woes-with-GUC-redefinitions-${version}.patch
71-
];
62+
patches = [
63+
# Allow building with system v8.
64+
# https://github.com/plv8/plv8/pull/505 (rejected)
65+
./0001-build-Allow-using-V8-from-system-${version}.patch
66+
]
67+
++ lib.optionals (builtins.compareVersions "3.1.10" version >= 0) [
68+
# Apply https://github.com/plv8/plv8/pull/552/ patch to fix extension upgrade problems
69+
./0001-fix-upgrade-related-woes-with-GUC-redefinitions-${version}.patch
70+
];
7271

73-
nativeBuildInputs =
74-
[ perl ]
75-
++ lib.optionals stdenv.isDarwin [
76-
clang
77-
xcbuild
78-
];
72+
nativeBuildInputs = [
73+
perl
74+
]
75+
++ lib.optionals stdenv.isDarwin [
76+
clang
77+
xcbuild
78+
];
7979

80-
buildInputs =
81-
[
82-
(if (builtins.compareVersions "3.1.10" version >= 0) then v8 else nodejs_20.libv8)
83-
postgresql
84-
]
85-
++ lib.optionals stdenv.isDarwin [
86-
darwin.apple_sdk.frameworks.CoreFoundation
87-
darwin.apple_sdk.frameworks.Kerberos
88-
];
80+
buildInputs = [
81+
(if (builtins.compareVersions "3.1.10" version >= 0) then v8 else nodejs_20.libv8)
82+
postgresql
83+
]
84+
++ lib.optionals stdenv.isDarwin [
85+
darwin.apple_sdk.frameworks.CoreFoundation
86+
darwin.apple_sdk.frameworks.Kerberos
87+
];
8988

9089
buildFlags = [ "all" ];
9190

92-
makeFlags =
93-
[
94-
# Nixpkgs build a v8 monolith instead of separate v8_libplatform.
95-
"USE_SYSTEM_V8=1"
96-
"V8_OUTDIR=${v8}/lib"
97-
"PG_CONFIG=${postgresql}/bin/pg_config"
98-
]
99-
++ lib.optionals stdenv.isDarwin [
100-
"CC=${clang}/bin/clang"
101-
"CXX=${clang}/bin/clang++"
102-
"SHLIB_LINK=-L${v8}/lib -lv8_monolith -Wl,-rpath,${v8}/lib"
103-
]
104-
++ lib.optionals (!stdenv.isDarwin) [ "SHLIB_LINK=-lv8" ];
91+
makeFlags = [
92+
# Nixpkgs build a v8 monolith instead of separate v8_libplatform.
93+
"USE_SYSTEM_V8=1"
94+
"V8_OUTDIR=${v8}/lib"
95+
"PG_CONFIG=${postgresql}/bin/pg_config"
96+
]
97+
++ lib.optionals stdenv.isDarwin [
98+
"CC=${clang}/bin/clang"
99+
"CXX=${clang}/bin/clang++"
100+
"SHLIB_LINK=-L${v8}/lib -lv8_monolith -Wl,-rpath,${v8}/lib"
101+
]
102+
++ lib.optionals (!stdenv.isDarwin) [ "SHLIB_LINK=-lv8" ];
105103

106104
NIX_LDFLAGS = lib.optionals stdenv.isDarwin [
107105
"-L${postgresql}/lib"
@@ -153,11 +151,9 @@ let
153151
install_name_tool -change @rpath/libv8_monolith.dylib ${v8}/lib/libv8_monolith.dylib $out/lib/$LIB_NAME
154152
''}
155153
156-
${
157-
lib.optionalString (!stdenv.isDarwin) ''
158-
${patchelf}/bin/patchelf --set-rpath "${v8}/lib:${postgresql}/lib:${libcxx}/lib" $out/lib/$LIB_NAME
159-
''
160-
}
154+
${lib.optionalString (!stdenv.isDarwin) ''
155+
${patchelf}/bin/patchelf --set-rpath "${v8}/lib:${postgresql}/lib:${libcxx}/lib" $out/lib/$LIB_NAME
156+
''}
161157
else
162158
${lib.optionalString stdenv.isDarwin ''
163159
install_name_tool -add_rpath "${v8}/lib" $out/lib/$LIB_NAME
@@ -166,11 +162,9 @@ let
166162
install_name_tool -change @rpath/libv8_monolith.dylib ${v8}/lib/libv8_monolith.dylib $out/lib/$LIB_NAME
167163
''}
168164
169-
${
170-
lib.optionalString (!stdenv.isDarwin) ''
171-
${patchelf}/bin/patchelf --set-rpath "${v8}/lib:${postgresql}/lib:${libcxx}/lib" $out/lib/$LIB_NAME
172-
''
173-
}
165+
${lib.optionalString (!stdenv.isDarwin) ''
166+
${patchelf}/bin/patchelf --set-rpath "${v8}/lib:${postgresql}/lib:${libcxx}/lib" $out/lib/$LIB_NAME
167+
''}
174168
fi
175169
176170
# plv8 3.2.x removed support for coffeejs and livescript

nix/ext/postgis.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ let
7979
protobufc
8080
pcre2.dev
8181
sfcgal
82-
] ++ lib.optional stdenv.isDarwin libiconv;
82+
]
83+
++ lib.optional stdenv.isDarwin libiconv;
8384
nativeBuildInputs = [
8485
perl
8586
pkg-config

0 commit comments

Comments
 (0)