2019-07-29 13:08:13 +01:00
|
|
|
{ mkDerivation, lib, extra-cmake-modules, pam, socat, libgcrypt, qtbase, kwallet, }:
|
2016-08-10 15:01:47 +01:00
|
|
|
|
2017-05-15 17:44:58 +01:00
|
|
|
mkDerivation {
|
2022-03-06 21:28:56 +00:00
|
|
|
pname = "kwallet-pam";
|
2017-02-26 12:49:15 +00:00
|
|
|
nativeBuildInputs = [ extra-cmake-modules ];
|
2019-07-29 13:08:13 +01:00
|
|
|
buildInputs = [ pam socat libgcrypt qtbase kwallet ];
|
2017-05-26 21:47:39 +01:00
|
|
|
postPatch = ''
|
|
|
|
sed -i pam_kwallet_init -e "s|socat|${lib.getBin socat}/bin/socat|"
|
|
|
|
'';
|
2020-04-08 06:12:03 +01:00
|
|
|
|
|
|
|
# We get a crash when QT_PLUGIN_PATH is more than 1000 characters.
|
|
|
|
# pam_kwallet_init passes its environment to kwalletd5, but
|
|
|
|
# wrapQtApps gives our environment a huge QT_PLUGIN_PATH value. We
|
|
|
|
# are able to unset it here since kwalletd5 will have its own
|
|
|
|
# QT_PLUGIN_PATH.
|
2019-09-30 22:44:02 +01:00
|
|
|
postFixup = ''
|
2020-04-08 06:12:03 +01:00
|
|
|
wrapProgram $out/libexec/pam_kwallet_init --unset QT_PLUGIN_PATH
|
2019-09-30 22:44:02 +01:00
|
|
|
'';
|
2020-04-08 06:12:03 +01:00
|
|
|
|
2019-09-30 22:44:02 +01:00
|
|
|
dontWrapQtApps = true;
|
2016-08-10 15:01:47 +01:00
|
|
|
}
|