mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-08 07:56:16 -05:00
gnu: Add python-pamela.
* gnu/packages/linux.scm (python-pamela): New variable.
This commit is contained in:
parent
5e5c695dea
commit
e8f0433170
1 changed files with 43 additions and 0 deletions
|
@ -1332,6 +1332,49 @@ (define-public linux-pam-1.2
|
|||
"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.
|
||||
|
|
Loading…
Reference in a new issue