Skip to content

Commit 288b31d

Browse files
committed
chore: reformat + bump version suffix to test
1 parent 73cc38f commit 288b31d

File tree

18 files changed

+316
-305
lines changed

18 files changed

+316
-305
lines changed

ansible/vars.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ postgres_major:
1010

1111
# Full version strings for each major version
1212
postgres_release:
13-
postgresorioledb-17: "17.6.0.020-orioledb-update-nixpkgs"
14-
postgres17: "17.6.1.063-update-nixpkgs"
15-
postgres15: "15.14.1.063-update-nixpkgs"
13+
postgresorioledb-17: "17.6.0.020-orioledb-update-nixpkgs-1"
14+
postgres17: "17.6.1.063-update-nixpkgs-1"
15+
postgres15: "15.14.1.063-update-nixpkgs-1"
1616

1717
# Non Postgres Extensions
1818
pgbouncer_release: 1.19.0

nix/ext/gdal.nix

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

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" ];
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" ];
5859

5960
enableParallelBuilding = true;
6061

nix/ext/pg_jsonschema/default.nix

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,7 @@ let
4242
"";
4343

4444
nativeBuildInputs = [ cargo ];
45-
buildInputs = [
46-
postgresql
47-
];
45+
buildInputs = [ postgresql ];
4846
# update the following array when the pg_jsonschema version is updated
4947
# required to ensure that extensions update scripts from previous versions are generated
5048
previousVersions = [

nix/ext/pg_net.nix

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ let
2323
buildInputs = [
2424
curl
2525
postgresql
26-
]
27-
++ lib.optional (version == "0.6") libuv;
26+
] ++ lib.optional (version == "0.6") libuv;
2827

2928
src = fetchFromGitHub {
3029
owner = "supabase";

nix/ext/pgaudit.nix

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -184,20 +184,22 @@ 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-
${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"
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
197199
fi
198200
fi
199-
fi
200-
'') versions}
201+
'') versions
202+
}
201203
fi
202204
'') packages}
203205

nix/ext/pgroonga/default.nix

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ let
6060
msgpack-c
6161
supabase-groonga
6262
mecab
63-
]
64-
++ lib.optionals stdenv.isDarwin [ xxHash ];
63+
] ++ lib.optionals stdenv.isDarwin [ xxHash ];
6564

6665
propagatedBuildInputs = [
6766
supabase-groonga

nix/ext/pgroonga/groonga.nix

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,21 @@ stdenv.mkDerivation (finalAttrs: {
3636
pkg-config
3737
makeWrapper
3838
];
39-
buildInputs = [
40-
rapidjson
41-
xxHash
42-
zstd
43-
mecab
44-
kytea
45-
msgpack-c
46-
]
47-
++ lib.optionals lz4Support [ lz4 ]
48-
++ lib.optional zlibSupport [ zlib ]
49-
++ lib.optionals suggestSupport [
50-
zeromq
51-
libevent
52-
];
39+
buildInputs =
40+
[
41+
rapidjson
42+
xxHash
43+
zstd
44+
mecab
45+
kytea
46+
msgpack-c
47+
]
48+
++ lib.optionals lz4Support [ lz4 ]
49+
++ lib.optional zlibSupport [ zlib ]
50+
++ lib.optionals suggestSupport [
51+
zeromq
52+
libevent
53+
];
5354
cmakeFlags = [
5455
"-DWITH_MECAB=ON"
5556
"-DMECAB_DICDIR=${mecab-naist-jdic}/lib/mecab/dic/naist-jdic"

nix/ext/pgrouting/default.nix

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,16 @@ let
5858
stdenv.isDarwin && lib.versionAtLeast postgresql.version "16"
5959
) "-Wno-error=int-conversion -Wno-error=incompatible-pointer-types";
6060

61-
cmakeFlags = [
62-
"-DPOSTGRESQL_VERSION=${postgresql.version}"
63-
"-DCMAKE_POLICY_VERSION_MINIMUM=3.5"
64-
]
65-
++ lib.optionals (stdenv.isDarwin && lib.versionAtLeast postgresql.version "16") [
66-
"-DCMAKE_MACOSX_RPATH=ON"
67-
"-DCMAKE_SHARED_MODULE_SUFFIX=.dylib"
68-
"-DCMAKE_SHARED_LIBRARY_SUFFIX=.dylib"
69-
];
61+
cmakeFlags =
62+
[
63+
"-DPOSTGRESQL_VERSION=${postgresql.version}"
64+
"-DCMAKE_POLICY_VERSION_MINIMUM=3.5"
65+
]
66+
++ lib.optionals (stdenv.isDarwin && lib.versionAtLeast postgresql.version "16") [
67+
"-DCMAKE_MACOSX_RPATH=ON"
68+
"-DCMAKE_SHARED_MODULE_SUFFIX=.dylib"
69+
"-DCMAKE_SHARED_LIBRARY_SUFFIX=.dylib"
70+
];
7071

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

nix/ext/plv8/default.nix

Lines changed: 39 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -54,23 +54,23 @@ let
5454
inherit hash;
5555
};
5656

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

67-
nativeBuildInputs = [
68-
perl
69-
]
70-
++ lib.optionals stdenv.isDarwin [
71-
clang
72-
xcbuild
73-
];
68+
nativeBuildInputs =
69+
[ perl ]
70+
++ lib.optionals stdenv.isDarwin [
71+
clang
72+
xcbuild
73+
];
7474

7575
buildInputs = [
7676
(if (builtins.compareVersions "3.1.10" version >= 0) then v8 else nodejs_20.libv8)
@@ -79,18 +79,19 @@ let
7979

8080
buildFlags = [ "all" ];
8181

82-
makeFlags = [
83-
# Nixpkgs build a v8 monolith instead of separate v8_libplatform.
84-
"USE_SYSTEM_V8=1"
85-
"V8_OUTDIR=${v8}/lib"
86-
"PG_CONFIG=${postgresql}/bin/pg_config"
87-
]
88-
++ lib.optionals stdenv.isDarwin [
89-
"CC=${clang}/bin/clang"
90-
"CXX=${clang}/bin/clang++"
91-
"SHLIB_LINK=-L${v8}/lib -lv8_monolith -Wl,-rpath,${v8}/lib -Wl,-headerpad_max_install_names"
92-
]
93-
++ lib.optionals (!stdenv.isDarwin) [ "SHLIB_LINK=-lv8" ];
82+
makeFlags =
83+
[
84+
# Nixpkgs build a v8 monolith instead of separate v8_libplatform.
85+
"USE_SYSTEM_V8=1"
86+
"V8_OUTDIR=${v8}/lib"
87+
"PG_CONFIG=${postgresql}/bin/pg_config"
88+
]
89+
++ lib.optionals stdenv.isDarwin [
90+
"CC=${clang}/bin/clang"
91+
"CXX=${clang}/bin/clang++"
92+
"SHLIB_LINK=-L${v8}/lib -lv8_monolith -Wl,-rpath,${v8}/lib -Wl,-headerpad_max_install_names"
93+
]
94+
++ lib.optionals (!stdenv.isDarwin) [ "SHLIB_LINK=-lv8" ];
9495

9596
NIX_LDFLAGS = lib.optionals stdenv.isDarwin [
9697
"-L${postgresql}/lib"
@@ -141,9 +142,11 @@ let
141142
install_name_tool -change @rpath/libv8_monolith.dylib ${v8}/lib/libv8_monolith.dylib $out/lib/$LIB_NAME
142143
''}
143144
144-
${lib.optionalString (!stdenv.isDarwin) ''
145-
${patchelf}/bin/patchelf --set-rpath "${v8}/lib:${postgresql}/lib:${libcxx}/lib" $out/lib/$LIB_NAME
146-
''}
145+
${
146+
lib.optionalString (!stdenv.isDarwin) ''
147+
${patchelf}/bin/patchelf --set-rpath "${v8}/lib:${postgresql}/lib:${libcxx}/lib" $out/lib/$LIB_NAME
148+
''
149+
}
147150
else
148151
${lib.optionalString stdenv.isDarwin ''
149152
install_name_tool -add_rpath "${v8}/lib" $out/lib/$LIB_NAME
@@ -152,9 +155,11 @@ let
152155
install_name_tool -change @rpath/libv8_monolith.dylib ${v8}/lib/libv8_monolith.dylib $out/lib/$LIB_NAME
153156
''}
154157
155-
${lib.optionalString (!stdenv.isDarwin) ''
156-
${patchelf}/bin/patchelf --set-rpath "${v8}/lib:${postgresql}/lib:${libcxx}/lib" $out/lib/$LIB_NAME
157-
''}
158+
${
159+
lib.optionalString (!stdenv.isDarwin) ''
160+
${patchelf}/bin/patchelf --set-rpath "${v8}/lib:${postgresql}/lib:${libcxx}/lib" $out/lib/$LIB_NAME
161+
''
162+
}
158163
fi
159164
160165
# plv8 3.2.x removed support for coffeejs and livescript

nix/ext/postgis.nix

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

0 commit comments

Comments
 (0)