2024-07-27 06:49:29 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchgit,
|
|
|
|
cmake,
|
|
|
|
linux-pam,
|
|
|
|
substituteAll,
|
|
|
|
enablePython ? false,
|
|
|
|
python ? null,
|
2020-05-29 06:06:01 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
assert enablePython -> python != null;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libpam-wrapper";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "1.1.5";
|
2020-05-29 06:06:01 +00:00
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "git://git.samba.org/pam_wrapper.git";
|
|
|
|
rev = "pam_wrapper-${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-AtfkiCUvCxUfll6lOlbMyy5AhS5R2BGF1+ecC1VuwzM=";
|
2020-05-29 06:06:01 +00:00
|
|
|
};
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./python.patch;
|
|
|
|
siteDir = lib.optionalString enablePython python.sitePackages;
|
|
|
|
includeDir = lib.optionalString enablePython "include/${python.libPrefix}";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
nativeBuildInputs = [ cmake ] ++ lib.optionals enablePython [ python ];
|
2020-05-29 06:06:01 +00:00
|
|
|
|
|
|
|
# We must use linux-pam, using openpam will result in broken fprintd.
|
|
|
|
buildInputs = [ linux-pam ];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-05-29 06:06:01 +00:00
|
|
|
description = "Wrapper for testing PAM modules";
|
|
|
|
homepage = "https://cwrap.org/pam_wrapper.html";
|
|
|
|
license = licenses.gpl3Plus;
|
2022-07-14 12:49:19 +00:00
|
|
|
maintainers = [ ];
|
2020-05-29 06:06:01 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|