1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools, 6 pam, 7 six, 8 toml, 9}: 10 11buildPythonPackage rec { 12 pname = "python-pam"; 13 version = "2.0.2"; 14 format = "pyproject"; 15 16 src = fetchFromGitHub { 17 owner = "FirefighterBlu3"; 18 repo = "python-pam"; 19 tag = "v${version}"; 20 hash = "sha256-MR9LYXtkbltAmn7yoyyKZn4yMHyh3rj/i/pA8nJy2xU="; 21 }; 22 23 postPatch = '' 24 substituteInPlace src/pam/__internals.py \ 25 --replace 'find_library("pam")' '"${pam}/lib/libpam.so"' \ 26 --replace 'find_library("pam_misc")' '"${pam}/lib/libpam_misc.so"' 27 ''; 28 29 nativeBuildInputs = [ setuptools ]; 30 31 buildInputs = [ pam ]; 32 33 propagatedBuildInputs = [ 34 six 35 toml 36 ]; 37 38 pythonImportsCheck = [ "pam" ]; 39 40 meta = with lib; { 41 description = "Python pam module"; 42 homepage = "https://github.com/FirefighterBlu3/python-pam"; 43 license = licenses.mit; 44 maintainers = with maintainers; [ 45 mkg20001 46 ]; 47 }; 48}