-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdefault.nix
More file actions
40 lines (37 loc) · 3.31 KB
/
Copy pathdefault.nix
File metadata and controls
40 lines (37 loc) · 3.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{
system ? builtins.currentSystem
, threading ? builtins.getEnv "HPGSQL_THREADED"
, ghc ? "ghc9103"
, PGHOST ? builtins.getEnv "PGHOST"
, pkgs ? import ./nix/nixpkgs.nix { inherit system threading; }
}:
let
addPgExtensions = postgres: postgres.withPackages (ps: [ /* ps.pg_cron */ ]);
haskellPackages = builtins.getAttr ghc pkgs.haskell.packages;
in
rec {
hpgsql = haskellPackages.hpgsql;
hpgsql-tests = haskellPackages.hpgsql-tests;
# Building for Windows doesn't work yet. It would be nice to test with wine.
hpgsql-tests-for-windows = (builtins.getAttr ghc pkgs.pkgsCross.x86_64-windows.haskell.packages).hpgsql-tests;
hpgsql-simple-compat = haskellPackages.hpgsql-simple-compat;
hpgsql-simple-compat-tests = haskellPackages.hpgsql-simple-compat-tests;
hpgsql-benchmarks = haskellPackages.hpgsql-benchmarks;
inherit haskellPackages;
hpgsqlSimpleCompatTestsPg18 = { hspecArgs ? ""}: import ./nix/run-hpgsql-simple-compat-db-tests.nix { inherit pkgs hpgsql-simple-compat-tests hspecArgs PGHOST; postgres = addPgExtensions pkgs.postgresql_18; };
hpgsqlSimpleCompatTestsPg17 = { hspecArgs ? ""}: import ./nix/run-hpgsql-simple-compat-db-tests.nix { inherit pkgs hpgsql-simple-compat-tests hspecArgs PGHOST; postgres = addPgExtensions pkgs.postgresql_17; };
hpgsqlSimpleCompatTestsPg16 = { hspecArgs ? ""}: import ./nix/run-hpgsql-simple-compat-db-tests.nix { inherit pkgs hpgsql-simple-compat-tests hspecArgs PGHOST; postgres = addPgExtensions pkgs.postgresql_16; };
hpgsqlSimpleCompatTestsPg15 = { hspecArgs ? ""}: import ./nix/run-hpgsql-simple-compat-db-tests.nix { inherit pkgs hpgsql-simple-compat-tests hspecArgs PGHOST; postgres = addPgExtensions pkgs.postgresql_15; };
hpgsqlSimpleCompatTestsPg14 = { hspecArgs ? ""}: import ./nix/run-hpgsql-simple-compat-db-tests.nix { inherit pkgs hpgsql-simple-compat-tests hspecArgs PGHOST; postgres = addPgExtensions pkgs.postgresql_14; };
testsPg18 = { hspecArgs ? ""}: import ./nix/run-db-tests.nix { inherit pkgs hpgsql-tests hspecArgs PGHOST; postgres = addPgExtensions pkgs.postgresql_18; };
testsPg17 = { hspecArgs ? ""}: import ./nix/run-db-tests.nix { inherit pkgs hpgsql-tests hspecArgs PGHOST; postgres = addPgExtensions pkgs.postgresql_17; };
testsPg16 = { hspecArgs ? ""}: import ./nix/run-db-tests.nix { inherit pkgs hpgsql-tests hspecArgs PGHOST; postgres = addPgExtensions pkgs.postgresql_16; };
testsPg15 = { hspecArgs ? ""}: import ./nix/run-db-tests.nix { inherit pkgs hpgsql-tests hspecArgs PGHOST; postgres = addPgExtensions pkgs.postgresql_15; };
testsPg14 = { hspecArgs ? ""}: import ./nix/run-db-tests.nix { inherit pkgs hpgsql-tests hspecArgs PGHOST; postgres = addPgExtensions pkgs.postgresql_14; };
# Shells with specific-versioned postgres servers to run tests locally
shellPg18 = import ./nix/test-shell-pg.nix { inherit pkgs PGHOST; postgres = addPgExtensions pkgs.postgresql_18; };
shellPg17 = import ./nix/test-shell-pg.nix { inherit pkgs PGHOST; postgres = addPgExtensions pkgs.postgresql_17; };
shellPg16 = import ./nix/test-shell-pg.nix { inherit pkgs PGHOST; postgres = addPgExtensions pkgs.postgresql_16; };
shellPg15 = import ./nix/test-shell-pg.nix { inherit pkgs PGHOST; postgres = addPgExtensions pkgs.postgresql_15; };
shellPg14 = import ./nix/test-shell-pg.nix { inherit pkgs PGHOST; postgres = addPgExtensions pkgs.postgresql_14; };
}