From c1b6f97a72e0b4897ce11414df28259d4ea3c5ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Thu, 2 May 2019 02:17:28 +0200 Subject: Move some overlays to parent directory --- overlays/databases/mysql/default.nix | 7 +++++++ overlays/databases/postgresql/default.nix | 12 ++++++++++++ .../databases/postgresql/postgresql_run_socket_path.patch | 12 ++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 overlays/databases/mysql/default.nix create mode 100644 overlays/databases/postgresql/default.nix create mode 100644 overlays/databases/postgresql/postgresql_run_socket_path.patch (limited to 'overlays/databases') diff --git a/overlays/databases/mysql/default.nix b/overlays/databases/mysql/default.nix new file mode 100644 index 0000000..24bad1b --- /dev/null +++ b/overlays/databases/mysql/default.nix @@ -0,0 +1,7 @@ +self: super: rec { + mariadb = mariadbPAM; + mariadbPAM = super.mariadb.overrideAttrs(old: { + cmakeFlags = old.cmakeFlags ++ [ "-DWITH_AUTHENTICATION_PAM=ON" ]; + buildInputs = old.buildInputs ++ [ self.pam ]; + }); +} diff --git a/overlays/databases/postgresql/default.nix b/overlays/databases/postgresql/default.nix new file mode 100644 index 0000000..8dec7ff --- /dev/null +++ b/overlays/databases/postgresql/default.nix @@ -0,0 +1,12 @@ +self: super: rec { + postgresql = postgresql_11; + postgresql_11 = super.postgresql_11.overrideAttrs(old: { + # datadir in /var/lib/postgresql is named after psqlSchema + passthru = old.passthru // { psqlSchema = "11.0"; }; + configureFlags = old.configureFlags ++ [ "--with-pam" ]; + buildInputs = (old.buildInputs or []) ++ [ self.pam ]; + patches = old.patches ++ [ + ./postgresql_run_socket_path.patch + ]; + }); +} 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 0000000..b558c7b --- /dev/null +++ b/overlays/databases/postgresql/postgresql_run_socket_path.patch @@ -0,0 +1,12 @@ +diff -Naur postgresql-9.2.0.sockets/src/include/pg_config_manual.h postgresql-9.2.0/src/include/pg_config_manual.h +--- postgresql-9.2.0.sockets/src/include/pg_config_manual.h 2012-09-06 17:26:17.000000000 -0400 ++++ postgresql-9.2.0/src/include/pg_config_manual.h 2012-09-06 18:13:18.183092471 -0400 +@@ -144,7 +144,7 @@ + * here's where to twiddle it. You can also override this at runtime + * with the postmaster's -k switch. + */ +-#define DEFAULT_PGSOCKET_DIR "/tmp" ++#define DEFAULT_PGSOCKET_DIR "/run/postgresql" + + /* + * The random() function is expected to yield values between 0 and -- cgit v1.2.3