2020-09-25 04:45:31 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2022-09-30 11:47:45 +00:00
|
|
|
, setuptools
|
2020-09-25 04:45:31 +00:00
|
|
|
, pam
|
2022-08-12 12:06:08 +00:00
|
|
|
, six
|
|
|
|
, toml
|
2020-09-25 04:45:31 +00:00
|
|
|
}:
|
2020-06-18 07:06:33 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-pam";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "2.0.2";
|
|
|
|
format = "pyproject";
|
2020-06-18 07:06:33 +00:00
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "FirefighterBlu3";
|
|
|
|
repo = pname;
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
sha256 = "sha256-MR9LYXtkbltAmn7yoyyKZn4yMHyh3rj/i/pA8nJy2xU=";
|
2020-06-18 07:06:33 +00:00
|
|
|
};
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace src/pam/__internals.py \
|
|
|
|
--replace 'find_library("pam")' '"${pam}/lib/libpam.so"' \
|
|
|
|
--replace 'find_library("pam_misc")' '"${pam}/lib/libpam_misc.so"'
|
|
|
|
'';
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
buildInputs = [
|
|
|
|
pam
|
|
|
|
];
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
six
|
|
|
|
toml
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "pam" ];
|
2020-06-18 07:06:33 +00:00
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
meta = with lib; {
|
2022-08-12 12:06:08 +00:00
|
|
|
description = "Python pam module";
|
2020-06-18 07:06:33 +00:00
|
|
|
homepage = "https://github.com/FirefighterBlu3/python-pam";
|
|
|
|
license = licenses.mit;
|
2020-09-25 04:45:31 +00:00
|
|
|
maintainers = with maintainers; [ abbradar mkg20001 ];
|
2020-06-18 07:06:33 +00:00
|
|
|
};
|
|
|
|
}
|