aboutsummaryrefslogtreecommitdiff
path: root/overlays/databases
diff options
context:
space:
mode:
Diffstat (limited to 'overlays/databases')
-rw-r--r--overlays/databases/mysql/default.nix18
1 files changed, 18 insertions, 0 deletions
diff --git a/overlays/databases/mysql/default.nix b/overlays/databases/mysql/default.nix
index 4302cd1..f9e5791 100644
--- a/overlays/databases/mysql/default.nix
+++ b/overlays/databases/mysql/default.nix
@@ -2,5 +2,23 @@ self: super: rec {
2 mariadb_pam = super.mariadb.overrideAttrs(old: { 2 mariadb_pam = super.mariadb.overrideAttrs(old: {
3 cmakeFlags = old.cmakeFlags ++ [ "-DWITH_AUTHENTICATION_PAM=ON" ]; 3 cmakeFlags = old.cmakeFlags ++ [ "-DWITH_AUTHENTICATION_PAM=ON" ];
4 buildInputs = old.buildInputs ++ [ self.pam ]; 4 buildInputs = old.buildInputs ++ [ self.pam ];
5 outputs = old.outputs ++ [ "dev" ];
6 postInstall = ''
7 mkdir -p $dev $dev/lib $dev/share
8 cp -a $out/include $dev
9 cp -a $out/lib/{libmariadbclient.a,libmysqlclient.a,libmysqlclient_r.a,libmysqlservices.a} $dev/lib
10 cp -a $out/lib/pkgconfig $dev/lib
11 cp -a $out/share/aclocal $dev/share
12 '' + old.postInstall;
13 });
14 # This patched version includes C headers from the server part (see
15 # above). It seems to be required to build pam support in clients.
16 libmysqlclient_pam = super.libmysqlclient.overrideAttrs(old: {
17 prePatch = old.prePatch or "" + ''
18 sed -i -e '/define INCLUDE/s|"$| -I@CMAKE_SYSROOT@@CMAKE_INSTALL_PREFIX@/@INSTALL_INCLUDEDIR@/mysql/server -I@CMAKE_SYSROOT@@CMAKE_INSTALL_PREFIX@/@INSTALL_INCLUDEDIR@/mysql/server/private"|' mariadb_config/mariadb_config.c.in
19 '';
20 postInstall = old.postInstall or "" + ''
21 cp -a ${mariadb_pam.dev}/include/* $out/include/mariadb
22 '';
5 }); 23 });
6} 24}