Files
nixpkgs/pkgs/development/python-modules/python-pam/default.nix
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

49 lines
941 B
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
pam,
six,
toml,
}:
buildPythonPackage rec {
pname = "python-pam";
version = "2.0.2";
format = "pyproject";
src = fetchFromGitHub {
owner = "FirefighterBlu3";
repo = "python-pam";
tag = "v${version}";
hash = "sha256-MR9LYXtkbltAmn7yoyyKZn4yMHyh3rj/i/pA8nJy2xU=";
};
postPatch = ''
substituteInPlace src/pam/__internals.py \
--replace 'find_library("pam")' '"${pam}/lib/libpam.so"' \
--replace 'find_library("pam_misc")' '"${pam}/lib/libpam_misc.so"'
'';
nativeBuildInputs = [ setuptools ];
buildInputs = [ pam ];
propagatedBuildInputs = [
six
toml
];
pythonImportsCheck = [ "pam" ];
meta = {
description = "Python pam module";
homepage = "https://github.com/FirefighterBlu3/python-pam";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
mkg20001
];
};
}