Skip to content

Commit 6f36c65

Browse files
committed
fix: apparently incorrectly rebased changes, and % nix fmt
1 parent f048522 commit 6f36c65

File tree

15 files changed

+231
-253
lines changed

15 files changed

+231
-253
lines changed

nix/checks.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
self',
66
system,
77
pkgs,
8+
lib,
89
...
910
}:
1011
let

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_net.nix

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

2625
src = fetchFromGitHub {
2726
owner = "supabase";

nix/ext/pgroonga.nix

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

3433
propagatedBuildInputs = [ supabase-groonga ];
3534
configureFlags = [

nix/ext/pgrouting.nix

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -127,34 +127,12 @@ buildEnv {
127127
expectedFiles=${toString (numberOfVersions + 1)}
128128
actualFiles=$(ls -l $out/lib/lib${pname}*${postgresql.dlSuffix} | wc -l)
129129
130-
<<<<<<< HEAD
131130
if [[ "$actualFiles" != "$expectedFiles" ]]; then
132131
echo "Error: Expected $expectedFiles library files, found $actualFiles"
133132
echo "Files found:"
134133
ls -la $out/lib/*${postgresql.dlSuffix} || true
135134
exit 1
136135
fi
137-
=======
138-
#disable compile time warnings for incompatible pointer types only on macos and pg16
139-
NIX_CFLAGS_COMPILE = lib.optionalString (
140-
stdenv.isDarwin && lib.versionAtLeast postgresql.version "16"
141-
) "-Wno-error=int-conversion -Wno-error=incompatible-pointer-types";
142-
143-
cmakeFlags = [
144-
"-DPOSTGRESQL_VERSION=${postgresql.version}"
145-
]
146-
++ lib.optionals (stdenv.isDarwin && lib.versionAtLeast postgresql.version "16") [
147-
"-DCMAKE_MACOSX_RPATH=ON"
148-
"-DCMAKE_SHARED_MODULE_SUFFIX=.dylib"
149-
"-DCMAKE_SHARED_LIBRARY_SUFFIX=.dylib"
150-
];
151-
152-
preConfigure = lib.optionalString (stdenv.isDarwin && lib.versionAtLeast postgresql.version "16") ''
153-
export DLSUFFIX=.dylib
154-
export CMAKE_SHARED_LIBRARY_SUFFIX=.dylib
155-
export CMAKE_SHARED_MODULE_SUFFIX=.dylib
156-
export MACOSX_RPATH=ON
157-
>>>>>>> 4847adac (chore: update fmt)
158136
'';
159137

160138
passthru = {

nix/ext/plv8.nix

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -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

nix/ext/tests/lib.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ def assert_version_matches(self, expected_version: str):
8484
AssertionError: If the installed version does not match the expected version
8585
"""
8686
installed_version = self.get_installed_version()
87-
assert installed_version == expected_version, (
88-
f"Expected version {expected_version}, but found {installed_version}"
89-
)
87+
assert (
88+
installed_version == expected_version
89+
), f"Expected version {expected_version}, but found {installed_version}"
9090

9191
def check_upgrade_path(self, pg_version: str):
9292
"""Test the complete upgrade path for a PostgreSQL version.
@@ -172,6 +172,6 @@ def check_switch_extension_with_background_worker(
172172
self.vm.succeed(f"switch_{self.extension_name}_version {last_version}")
173173
# Check that we are using the last version now
174174
ext_version = self.vm.succeed(f"readlink -f {extension_lib_path}").strip()
175-
assert ext_version.endswith(f"{self.extension_name}-{last_version}.so"), (
176-
f"Expected {self.extension_name} version {last_version}, but found {ext_version}"
177-
)
175+
assert ext_version.endswith(
176+
f"{self.extension_name}-{last_version}.so"
177+
), f"Expected {self.extension_name} version {last_version}, but found {ext_version}"

nix/ext/wal2json.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
let
1111
pname = "wal2json";
1212
build =
13-
version: rev: hash:
13+
version: _rev: hash:
1414
stdenv.mkDerivation rec {
1515
inherit version pname;
1616

nix/ext/wrappers/default.nix

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,7 @@ let
4040
buildInputs = [
4141
openssl
4242
postgresql
43-
]
44-
++ lib.optionals stdenv.isDarwin [
45-
apple-sdk_11
46-
];
43+
] ++ lib.optionals stdenv.isDarwin [ apple-sdk_11 ];
4744

4845
NIX_LDFLAGS = "-L${postgresql}/lib -lpq";
4946

nix/overlays/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{ self, ... }:
22
{
3-
flake.overlays.default = final: _prev: {
3+
flake.overlays.default = final: prev: {
44
# NOTE: add any needed overlays here. in theory we could
55
# pull them from the overlays/ directory automatically, but we don't
66
# want to have an arbitrary order, since it might matter. being

0 commit comments

Comments
 (0)