mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 15:36:20 -05:00
gnu: sudo: Separate Python output.
The Python plugin of "sudo" drags the Python interpreter to the closure of Guix System. Put it in a separate output. * gnu/packages/admin.scm (sudo)[arguments]: Add a 'separate-python-output phase, that's populating ... [outputs]: ... the new "python" output.
This commit is contained in:
parent
ea5d9bf991
commit
173d22a1c0
1 changed files with 17 additions and 1 deletions
|
@ -1375,6 +1375,7 @@ (define-public sudo
|
||||||
(delete-file-recursively "lib/zlib")
|
(delete-file-recursively "lib/zlib")
|
||||||
#t))))
|
#t))))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
|
(outputs (list "out" "python"))
|
||||||
(arguments
|
(arguments
|
||||||
`(#:configure-flags
|
`(#:configure-flags
|
||||||
(list (string-append "--docdir=" (assoc-ref %outputs "out")
|
(list (string-append "--docdir=" (assoc-ref %outputs "out")
|
||||||
|
@ -1432,7 +1433,22 @@ (define-public sudo
|
||||||
(substitute* "plugins/sudoers/Makefile.in"
|
(substitute* "plugins/sudoers/Makefile.in"
|
||||||
(("^pre-install:" match)
|
(("^pre-install:" match)
|
||||||
(string-append match "\ndisabled-" match)))
|
(string-append match "\ndisabled-" match)))
|
||||||
#t)))
|
#t))
|
||||||
|
(add-after 'install 'separate-python-output
|
||||||
|
(lambda* (#:key target outputs #:allow-other-keys)
|
||||||
|
(let ((out (assoc-ref outputs "out"))
|
||||||
|
(out:python (assoc-ref outputs "python")))
|
||||||
|
(if target
|
||||||
|
(mkdir-p (string-append out:python "/empty"))
|
||||||
|
(for-each
|
||||||
|
(lambda (file)
|
||||||
|
(let ((old (string-append out "/" file))
|
||||||
|
(new (string-append out:python "/" file)))
|
||||||
|
(mkdir-p (dirname new))
|
||||||
|
(rename-file old new)))
|
||||||
|
(list "libexec/sudo/python_plugin.so"
|
||||||
|
"libexec/sudo/python_plugin.la")))
|
||||||
|
#t))))
|
||||||
|
|
||||||
;; XXX: The 'testsudoers' test series expects user 'root' to exist, but
|
;; XXX: The 'testsudoers' test series expects user 'root' to exist, but
|
||||||
;; the chroot's /etc/passwd doesn't have it. Turn off the tests.
|
;; the chroot's /etc/passwd doesn't have it. Turn off the tests.
|
||||||
|
|
Loading…
Reference in a new issue