gnu: ganeti: Add the output directory on GUIX_PYTHONPATH.

This is a follow-up to commit 1ed567c872.

* gnu/packages/virtualization.scm (ganeti)[arguments]: Adjust wrap phase to
include Ganetis own site-packages on $GUIX_PYTHONPATH.
This commit is contained in:
Marius Bakke 2021-12-02 20:23:48 +01:00
parent 846bd3d083
commit d801827b84
No known key found for this signature in database
GPG key ID: A2A06DF2A33A54FA

View file

@ -529,6 +529,7 @@ (define-public ganeti
(guix build python-build-system))
#:modules (,@%gnu-build-system-modules
((guix build haskell-build-system) #:prefix haskell:)
((guix build python-build-system) #:select (site-packages))
(srfi srfi-1)
(srfi srfi-26)
(ice-9 match)
@ -742,10 +743,12 @@ (define-public ganeti
;; the phase from python-build-system because we also need to wrap
;; the scripts in $out/lib/ganeti such as "node-daemon-setup".
(add-after 'install 'wrap
(lambda* (#:key outputs #:allow-other-keys)
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(sbin (string-append out "/sbin"))
(lib (string-append out "/lib")))
(lib (string-append out "/lib"))
(PYTHONPATH (string-append (site-packages inputs outputs)
":" (getenv "GUIX_PYTHONPATH"))))
(define (shell-script? file)
(call-with-ascii-input-file file
(lambda (port)
@ -767,7 +770,7 @@ (define* (wrap? file #:rest _)
(for-each (lambda (file)
(wrap-program file
`("GUIX_PYTHONPATH" ":" prefix
(,(getenv "GUIX_PYTHONPATH")))))
(,PYTHONPATH))))
(append-map (cut find-files <> wrap?)
(list (string-append lib "/ganeti")
sbin)))))))))