Subject: bug#52684: [BUG] Multiple Packages Failing to Build

From: Maxime Devos <[email-masked]>
Date: Tue, 21 Dec 2021 20:44:26 +0000

Hi,

Christopher Rodriguez schreef op di 21-12-2021 om 14:47 [-0500]:
> I believe the issue was indeed beets-bandcamp missing needed 
> beets-related inputs. I started by copying all of the inputs from beets, 
> and then removed each one to see if it was required for beets-bandcamp 
> to build successfully. [...]

Seems like the issue is that beets-bandcamp depends on beets,
and beets depends on a number of python packages in inputs not in
propagated-inputs.  So beets-bandcamp can't find indirect dependencies
IIUC.

Moving things back to propagated-inputs is not ideal because beets
is a ‘user-facing’ package with a command, not ‘merely’ a library
and propagation can cause problems (conflicts, slower profile building
...).

beets-bandcamp is also user-facing, being a plug-in, so it should also
preferably not have propagated-inputs.

There is no ideal solution here, but I think it would be acceptable
to do something like

  (inputs
    ;; Avoid propagation, here and in beets, because this package is
    ;; ‘user-facing’ and not ‘merely’ a library, see
    ;; <https://issues.guix.gnu.org/52684#6>.
    (modify-inputs (package-inputs beets)
      (append beets python-six python-requests
              python-beautifulsoup4 python-isodate)))

An additional problem is that 'beets' does not have GUIX_PYTHONPATH
in its search paths. As such, if you create a minimal environment with
only beets and beets-bandcamp and without python, GUIX_PYTHONPATH won't
contain beets-bandcamp and hence beets cannot find beets-bandcamp
(untested).

Even better would be to let 'beets' have its own search path (e.g.
GUIX_BEETSPATH) independent of GUIX_PYTHONPATH. This is implementable
by wrapping 'beets' to set GUIX_PYTHPONPATH to "dependencies of
beets:$GUIX_BEETSPATH". I don't know if wrap-program supports that
though.

Greetings,
Maxime.