aboutsummaryrefslogtreecommitdiff
path: root/overlays/databases
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2020-06-13 02:07:52 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2020-06-13 02:08:03 +0200
commit8f1d6cb579ec203ce86f8af30bea729dbb0a9f7f (patch)
treeded4d754f324f59688345b3fd19459b3bb8ad70e /overlays/databases
parent8b2f048bed8d081f18d9ba7bc1cce16c28670217 (diff)
downloadNix-8f1d6cb579ec203ce86f8af30bea729dbb0a9f7f.tar.gz
Nix-8f1d6cb579ec203ce86f8af30bea729dbb0a9f7f.tar.zst
Nix-8f1d6cb579ec203ce86f8af30bea729dbb0a9f7f.zip
Fix Adminer mysql connection for PAM authentication
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}