Subject: Re: [bug#54266] [PATCH] samba: wrap scripts with GUIX_PYTHONPATH

From: Maxime Devos <[email-masked]>
Date: Sat, 05 Mar 2022 21:12:09 +0100

fesoj000 schreef op za 05-03-2022 om 13:06 [+0100]:
> +                           (wrap-program (string-append out file)
> +                             `("GUIX_PYTHONPATH" = (,(getenv 
> "GUIX_PYTHONPATH")))))

(getenv "...") includes too much, it also includes the python libraries
from native-inputs that are only required for tests.  I recommend:

(string-join
  (map (cut (@ (guix build python-build-system) site-packages)
            (list (assoc-ref inputs "this-python-input")
                  (assoc-ref inputs "that-python-input")
                  [...])
            outputs)
  #\:)

(untested).  Possibly there's a simpler way to do this ...

(Many packages simply do (getenv "GUIX_PYTHONPATH"), but that's a bug
in those packages, see e.g. <https://issues.guix.gnu.org/25235>.)

Greetings,
Maxime.