|
38 | 38 | # want to have an arbitrary order, since it might matter. being
|
39 | 39 | # explicit is better.
|
40 | 40 | (import ./nix/overlays/cargo-pgrx.nix)
|
41 |
| - (import ./nix/overlays/gdal-small.nix) |
42 | 41 | (import ./nix/overlays/psql_16-oriole.nix)
|
43 | 42 |
|
44 | 43 | ];
|
|
68 | 67 | };
|
69 | 68 | })
|
70 | 69 | (import ./nix/overlays/cargo-pgrx-0-11-3.nix)
|
71 |
| - # (import ./nix/overlays/postgis.nix) |
72 |
| - #(import ./nix/overlays/gdal-small.nix) |
73 |
| - |
74 | 70 | ];
|
75 | 71 | };
|
76 | 72 | postgresql_15 = pkgs.postgresql.postgresql_15;
|
77 |
| - postgresql = pkgs.postgresql.postgresql_15; |
78 | 73 | sfcgal = pkgs.callPackage ./nix/ext/sfcgal/sfcgal.nix { };
|
79 |
| - pg_regress = pkgs.callPackage ./nix/ext/pg_regress.nix { inherit postgresql; }; |
80 | 74 | supabase-groonga = pkgs.callPackage ./nix/supabase-groonga.nix { };
|
81 | 75 | mecab-naist-jdic = pkgs.callPackage ./nix/ext/mecab-naist-jdic/default.nix { };
|
82 | 76 | # Our list of PostgreSQL extensions which come from upstream Nixpkgs.
|
|
284 | 278 | # be used with 'nix build'. Don't use the names listed below; check the
|
285 | 279 | # name in 'nix flake show' in order to make sure exactly what name you
|
286 | 280 | # want.
|
287 |
| - basePackages = { |
| 281 | + basePackages = let |
| 282 | + # Function to get the PostgreSQL version from the attribute name |
| 283 | + getVersion = name: |
| 284 | + let |
| 285 | + match = builtins.match "psql_([0-9]+)" name; |
| 286 | + in |
| 287 | + if match == null then null else builtins.head match; |
| 288 | + |
| 289 | + # Define the available PostgreSQL versions |
| 290 | + postgresVersions = { |
| 291 | + psql_15 = makePostgres "15"; |
| 292 | + # Uncomment the line below to enable PostgreSQL 16 |
| 293 | + # psql_16 = makePostgres "16"; |
| 294 | + # psql_orioledb_16 = makeOrioleDbPostgres "16_23" postgresql_orioledb_16; |
| 295 | + }; |
| 296 | + |
| 297 | + # Find the active PostgreSQL version |
| 298 | + activeVersion = getVersion (builtins.head (builtins.attrNames postgresVersions)); |
| 299 | + |
| 300 | + # Function to create the pg_regress package |
| 301 | + makePgRegress = version: |
| 302 | + let |
| 303 | + postgresqlPackage = pkgs."postgresql_${version}"; |
| 304 | + in |
| 305 | + pkgs.callPackage ./nix/ext/pg_regress.nix { |
| 306 | + postgresql = postgresqlPackage; |
| 307 | + }; |
| 308 | + |
| 309 | + in |
| 310 | + postgresVersions //{ |
288 | 311 | supabase-groonga = supabase-groonga;
|
289 | 312 | # PostgreSQL versions.
|
290 | 313 | psql_15 = makePostgres "15";
|
291 |
| - #psql_16 = makePostgres "16"; |
292 | 314 | #psql_orioledb_16 = makeOrioleDbPostgres "16_23" postgresql_orioledb_16;
|
293 | 315 | sfcgal = sfcgal;
|
294 |
| - pg_regress = pg_regress; |
295 | 316 | pg_prove = pkgs.perlPackages.TAPParserSourceHandlerpgTAP;
|
296 | 317 | postgresql_15 = pkgs.postgresql_15;
|
297 | 318 |
|
|
319 | 340 | };
|
320 | 341 | mecab_naist_jdic = mecab-naist-jdic;
|
321 | 342 | supabase_groonga = supabase-groonga;
|
| 343 | + pg_regress = makePgRegress activeVersion; |
322 | 344 | # Start a version of the server.
|
323 | 345 | start-server =
|
324 | 346 | let
|
|
455 | 477 | sqlTests = ./nix/tests/smoke;
|
456 | 478 | pg_prove = pkgs.perlPackages.TAPParserSourceHandlerpgTAP;
|
457 | 479 | supabase-groonga = pkgs.callPackage ./nix/supabase-groonga.nix { };
|
| 480 | + pg_regress = basePackages.pg_regress; |
458 | 481 | in
|
459 | 482 | pkgs.runCommand "postgres-${pgpkg.version}-check-harness"
|
460 | 483 | {
|
|
0 commit comments