diff options
Diffstat (limited to 'overlays/databases')
-rw-r--r-- | overlays/databases/mysql/default.nix | 12 | ||||
-rw-r--r-- | overlays/databases/postgresql/default.nix | 11 | ||||
-rw-r--r-- | overlays/databases/postgresql/postgresql_run_socket_path.patch | 12 |
3 files changed, 35 insertions, 0 deletions
diff --git a/overlays/databases/mysql/default.nix b/overlays/databases/mysql/default.nix new file mode 100644 index 00000000..5e402841 --- /dev/null +++ b/overlays/databases/mysql/default.nix | |||
@@ -0,0 +1,12 @@ | |||
1 | self: super: rec { | ||
2 | mariadb = mariadbPAM; | ||
3 | mariadbPAM = super.mariadb.overrideAttrs(old: { | ||
4 | cmakeFlags = old.cmakeFlags ++ [ "-DWITH_AUTHENTICATION_PAM=ON" ]; | ||
5 | buildInputs = old.buildInputs ++ [ self.pam ]; | ||
6 | }) // (with super.mariadb; { | ||
7 | inherit client; | ||
8 | servier = super.mariadb; | ||
9 | inherit connector-c; | ||
10 | inherit galera; | ||
11 | }); | ||
12 | } | ||
diff --git a/overlays/databases/postgresql/default.nix b/overlays/databases/postgresql/default.nix new file mode 100644 index 00000000..8d1405e3 --- /dev/null +++ b/overlays/databases/postgresql/default.nix | |||
@@ -0,0 +1,11 @@ | |||
1 | self: super: rec { | ||
2 | postgresql_11_custom = super.postgresql_11.overrideAttrs(old: { | ||
3 | # datadir in /var/lib/postgresql is named after psqlSchema | ||
4 | passthru = old.passthru // { psqlSchema = "11.0"; }; | ||
5 | configureFlags = old.configureFlags ++ [ "--with-pam" ]; | ||
6 | buildInputs = (old.buildInputs or []) ++ [ self.pam ]; | ||
7 | patches = old.patches ++ [ | ||
8 | ./postgresql_run_socket_path.patch | ||
9 | ]; | ||
10 | }); | ||
11 | } | ||
diff --git a/overlays/databases/postgresql/postgresql_run_socket_path.patch b/overlays/databases/postgresql/postgresql_run_socket_path.patch new file mode 100644 index 00000000..b558c7b7 --- /dev/null +++ b/overlays/databases/postgresql/postgresql_run_socket_path.patch | |||
@@ -0,0 +1,12 @@ | |||
1 | diff -Naur postgresql-9.2.0.sockets/src/include/pg_config_manual.h postgresql-9.2.0/src/include/pg_config_manual.h | ||
2 | --- postgresql-9.2.0.sockets/src/include/pg_config_manual.h 2012-09-06 17:26:17.000000000 -0400 | ||
3 | +++ postgresql-9.2.0/src/include/pg_config_manual.h 2012-09-06 18:13:18.183092471 -0400 | ||
4 | @@ -144,7 +144,7 @@ | ||
5 | * here's where to twiddle it. You can also override this at runtime | ||
6 | * with the postmaster's -k switch. | ||
7 | */ | ||
8 | -#define DEFAULT_PGSOCKET_DIR "/tmp" | ||
9 | +#define DEFAULT_PGSOCKET_DIR "/run/postgresql" | ||
10 | |||
11 | /* | ||
12 | * The random() function is expected to yield values between 0 and | ||