Subject: bug#63050: "guix pull" requires graphical libraries

From: Josselin Poiret <[email-masked]>
Date: Wed, 26 Apr 2023 10:45:34 +0200

Hi Andreas,

Andreas Enge <[email-masked]> writes:

> So "guix pull" builds what is defined as the guix package, but with the
> current checkout as source?

No, guix pull uses (guix self), and the dependencies there are not used
in a singular place like (inputs ...) or (native-inputs ...), but are
peppered throughout the file.  However, it uses a reduced dictionary for
specification->package to speed it up, and so gives a pretty good idea
of what's used:

--8<---------------cut here---------------start------------->8---
(("guile"              . ,(ref 'guile 'guile-3.0-latest))
 ("guile-avahi"        . ,(ref 'guile-xyz 'guile-avahi))
 ("guile-json"         . ,(ref 'guile 'guile-json-4))
 ("guile-ssh"          . ,(ref 'ssh   'guile-ssh))
 ("guile-git"          . ,(ref 'guile 'guile-git))
 ("guile-semver"       . ,(ref 'guile-xyz 'guile-semver))
 ("guile-lib"          . ,(ref 'guile-xyz 'guile-lib))
 ("guile-sqlite3"      . ,(ref 'guile 'guile-sqlite3))
 ("guile-zlib"         . ,(ref 'guile 'guile-zlib))
 ("guile-lzlib"        . ,(ref 'guile 'guile-lzlib))
 ("guile-zstd"         . ,(ref 'guile 'guile-zstd))
 ("guile-gcrypt"       . ,(ref 'gnupg 'guile-gcrypt))
 ("guile-gnutls"       . ,(ref 'tls 'guile-gnutls))
 ("guix-daemon"        . ,(ref 'package-management 'guix-daemon))
 ("disarchive"         . ,(ref 'backup 'disarchive))
 ("guile-lzma"         . ,(ref 'guile 'guile-lzma))
 ("gzip"               . ,(ref 'compression 'gzip))
 ("bzip2"              . ,(ref 'compression 'bzip2))
 ("xz"                 . ,(ref 'compression 'xz))
 ("po4a"               . ,(ref 'gettext 'po4a))
 ("gettext-minimal"    . ,(ref 'gettext 'gettext-minimal))
 ("gcc-toolchain"      . ,(ref 'commencement 'gcc-toolchain))
 ("glibc-utf8-locales" . ,(ref 'base 'glibc-utf8-locales))
 ("graphviz"           . ,(ref 'graphviz 'graphviz))
 ("texinfo"            . ,(ref 'texinfo 'texinfo)))
--8<---------------cut here---------------end--------------->8---

> The package definition of guix has this among the native inputs:
>                        ;; XXX: Keep the development inputs here even though
>                        ;; they're unnecessary, just so that 'guix environment
>                        ;; guix' always contains them.
>                        ("autoconf" ,autoconf)
>                        ("automake" ,automake)
>                        ("gettext" ,gettext-minimal)
>                        ("texinfo" ,texinfo)
>                        ("graphviz" ,graphviz)
>                        ("help2man" ,help2man)
>                        ("po4a" ,po4a)))
>
> Maybe these could be dropped then, and we could have an expanded package
> guix-devel that would add these inputs for "guix shell -D guix-devel"?
>
> Or is it needed for "guix graph"?

No, guix graph uses its own graphviz implementation!  It is used to
generated png files from .dot files while building the documentation.

I don't really know if we can skip graphical libraries for this reason.

Best,
-- 
Josselin Poiret