diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2020-08-09 15:45:33 +0300 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2020-08-09 15:45:33 +0300 |
commit | e8f04331702ceacdc7484aea1b6f0e889762dfa2 (patch) | |
tree | 83ddec944f3dfa8f6da7158004d323dbe8cdd50d /gnu/packages/linux.scm | |
parent | 5e5c695deabeb8164c86246236e9f483f837f22d (diff) | |
download | guix-e8f04331702ceacdc7484aea1b6f0e889762dfa2.tar guix-e8f04331702ceacdc7484aea1b6f0e889762dfa2.tar.gz |
gnu: Add python-pamela.
* gnu/packages/linux.scm (python-pamela): New variable.
Diffstat (limited to 'gnu/packages/linux.scm')
-rw-r--r-- | gnu/packages/linux.scm | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 2f83801dc2..f04cd999f4 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -1332,6 +1332,49 @@ at login. Local and dynamic reconfiguration are its key features.") "1n9lnf9gjs72kbj1g354v1xhi2j27aqaah15vykh7cnkq08i4arl")) (patches (search-patches "linux-pam-no-setfsuid.patch")))))) +(define-public python-pamela + (package + (name "python-pamela") + (version "1.0.0") + (source + (origin + ;; Tests not distributed in pypi release. + (method git-fetch) + (uri (git-reference + (url "https://github.com/minrk/pamela.git") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0cg3w6np1fbjpvzhv54xg567hpf38szwp2d4gvzb9r736nxbv0vr")))) + (build-system python-build-system) + (arguments + '(#:tests? #f ; Test suite isn't designed to be run inside a container. + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'hardcode-pam.so + (lambda* (#:key inputs #:allow-other-keys) + (let ((pam (assoc-ref inputs "linux-pam"))) + (substitute* "pamela.py" + (("find_library\\(\"pam\")") + (string-append "'" pam "/lib/libpam.so'"))) + #t))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (if tests? + (if (file-exists? "test_pamela.py") + (invoke "py.test" "--assert=plain" "test_pamela.py") + (invoke "python" "-m" "pamela" "-a" "`whoami`")) + #t)))))) + (inputs + `(("linux-pam" ,linux-pam))) + (native-inputs + `(("python-pytest" ,python-pytest))) + (home-page "https://github.com/minrk/pamela") + (synopsis "PAM interface using ctypes") + (description "This package provides a PAM interface using @code{ctypes}.") + (license license:expat))) + ;;; ;;; Miscellaneous. |