From c62ebcd02c2eb190ab5dc157475ef4a93a1c7581 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Tyburn?= Date: Wed, 3 Jun 2026 10:56:10 +0200 Subject: doc: Move Commentary above module definition. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Merges: https://codeberg.org/guix/guix/pulls/9052 Reviewed-by: Ludovic Courtès Reviewed-by: Maxim Cournoyer Signed-off-by: Nguyễn Gia Phong --- build-aux/build-self.scm | 28 +++---- etc/teams/qt/qt5-manifest.scm | 4 +- gnu.scm | 12 +-- gnu/artwork.scm | 10 +-- gnu/bootloader/grub.scm | 12 +-- gnu/build/activation.scm | 16 ++-- gnu/build/chromium-extension.scm | 12 +-- gnu/build/cross-toolchain.scm | 12 +-- gnu/build/file-systems.scm | 14 ++-- gnu/build/hurd-boot.scm | 13 ++-- gnu/build/install.scm | 18 ++--- gnu/build/linux-boot.scm | 18 ++--- gnu/build/linux-initrd.scm | 16 ++-- gnu/build/linux-modules.scm | 12 +-- gnu/build/marionette.scm | 22 +++--- gnu/build/secret-service.scm | 18 ++--- gnu/build/shepherd.scm | 14 ++-- gnu/ci.scm | 12 +-- gnu/home.scm | 16 ++-- gnu/home/services.scm | 106 ++++++++++++------------- gnu/home/services/fontutils.scm | 18 ++--- gnu/home/services/mcron.scm | 14 ++-- gnu/home/services/music.scm | 12 +-- gnu/home/services/shells.scm | 12 +-- gnu/home/services/symlink-manager.scm | 15 ++-- gnu/home/services/xdg.scm | 22 +++--- gnu/installer/connman.scm | 16 ++-- gnu/installer/newt/page.scm | 22 +++--- gnu/installer/tests.scm | 22 +++--- gnu/machine.scm | 18 ++--- gnu/machine/digital-ocean.scm | 14 ++-- gnu/machine/hetzner.scm | 12 +-- gnu/machine/hetzner/http.scm | 12 +-- gnu/machine/ssh.scm | 18 ++--- gnu/packages.scm | 14 ++-- gnu/packages/avr.scm | 22 +++--- gnu/packages/base.scm | 12 +-- gnu/packages/bootstrap.scm | 15 ++-- gnu/packages/commencement.scm | 44 +++++------ gnu/packages/cross-toolchain.scm | 10 +-- gnu/packages/dbm.scm | 10 +-- gnu/packages/duckdb.scm | 15 ++-- gnu/packages/embedded.scm | 17 +++-- gnu/packages/gnome-circle.scm | 2 +- gnu/packages/golang-apps.scm | 23 +++--- gnu/packages/golang-build.scm | 25 +++--- gnu/packages/golang-check.scm | 19 ++--- gnu/packages/golang-compression.scm | 11 +-- gnu/packages/golang-crypto.scm | 19 ++--- gnu/packages/golang-graphics.scm | 11 +-- gnu/packages/golang-maths.scm | 11 +-- gnu/packages/golang-vcs.scm | 11 +-- gnu/packages/golang-web.scm | 25 +++--- gnu/packages/golang-xyz.scm | 27 +++---- gnu/packages/guile.scm | 12 +-- gnu/packages/ld-wrapper.in | 12 +-- gnu/packages/make-bootstrap.scm | 16 ++-- gnu/packages/prometheus.scm | 17 +++-- gnu/packages/python-build.scm | 16 ++-- gnu/packages/python-graphics.scm | 17 +++-- gnu/packages/quantum.scm | 13 ++-- gnu/packages/ruby-check.scm | 11 +-- gnu/packages/sqlite.scm | 12 +-- gnu/packages/tex.scm | 140 +++++++++++++++++----------------- gnu/packages/toys.scm | 11 +-- gnu/services.scm | 50 ++++++------ gnu/services/admin.scm | 14 ++-- gnu/services/audio.scm | 12 +-- gnu/services/avahi.scm | 14 ++-- gnu/services/base.scm | 14 ++-- gnu/services/certbot.scm | 12 +-- gnu/services/cgit.scm | 20 ++--- gnu/services/ci.scm | 14 ++-- gnu/services/configuration.scm | 12 +-- gnu/services/cuirass.scm | 14 ++-- gnu/services/cups.scm | 12 +-- gnu/services/databases.scm | 12 +-- gnu/services/desktop.scm | 12 +-- gnu/services/getmail.scm | 12 +-- gnu/services/guix.scm | 12 +-- gnu/services/herd.scm | 18 ++--- gnu/services/hurd.scm | 12 +-- gnu/services/lirc.scm | 12 +-- gnu/services/mail.scm | 14 ++-- gnu/services/mcron.scm | 30 ++++---- gnu/services/messaging.scm | 12 +-- gnu/services/networking.scm | 12 +-- gnu/services/nix.scm | 12 +-- gnu/services/rsync.scm | 14 ++-- gnu/services/shepherd.scm | 13 ++-- gnu/services/sound.scm | 12 +-- gnu/services/ssh.scm | 14 ++-- gnu/services/syncthing.scm | 12 +-- gnu/services/upnp.scm | 12 +-- gnu/services/version-control.scm | 12 +-- gnu/services/web.scm | 12 +-- gnu/services/xorg.scm | 12 +-- gnu/system.scm | 12 +-- gnu/system/accounts.scm | 17 ++--- gnu/system/file-systems.scm | 18 ++--- gnu/system/hurd.scm | 14 ++-- gnu/system/images/visionfive2.scm | 24 +++--- gnu/system/install.scm | 14 ++-- gnu/system/keyboard.scm | 16 ++-- gnu/system/linux-initrd.scm | 15 ++-- gnu/system/locale.scm | 12 +-- gnu/system/mapped-devices.scm | 14 ++-- gnu/system/nss.scm | 12 +-- gnu/system/pam.scm | 12 +-- gnu/system/privilege.scm | 16 ++-- gnu/system/setuid.scm | 16 ++-- gnu/system/shadow.scm | 12 +-- gnu/system/vm.scm | 12 +-- gnu/tests.scm | 18 ++--- gnu/tests/image.scm | 22 +++--- gnu/tests/install.scm | 14 ++-- gnu/tests/linux-modules.scm | 12 +-- gnu/tests/package-management.scm | 12 +-- gnu/tests/reconfigure.scm | 14 ++-- guix/amd-gpu.scm | 12 +-- guix/android-repo-download.scm | 18 ++--- guix/base32.scm | 14 ++-- guix/build-system/channel.scm | 16 ++-- guix/build/android-repo.scm | 12 +-- guix/build/bournish.scm | 16 ++-- guix/build/bzr.scm | 8 +- guix/build/compile.scm | 12 +-- guix/build/cvs.scm | 12 +-- guix/build/debug-link.scm | 28 +++---- guix/build/download-nar.scm | 18 ++--- guix/build/download.scm | 12 +-- guix/build/elm-build-system.scm | 40 +++++----- guix/build/emacs-utils.scm | 14 ++-- guix/build/git.scm | 14 ++-- guix/build/gnu-dist.scm | 12 +-- guix/build/graft.scm | 28 +++---- guix/build/gremlin.scm | 14 ++-- guix/build/hg.scm | 12 +-- guix/build/lisp-utils.scm | 16 ++-- guix/build/pack.scm | 18 ++--- guix/build/profiles.scm | 14 ++-- guix/build/pyproject-build-system.scm | 47 ++++++------ guix/build/store-copy.scm | 18 ++--- guix/build/svn.scm | 10 +-- guix/build/syscalls.scm | 38 ++++----- guix/build/union.scm | 14 ++-- guix/bzr-download.scm | 16 ++-- guix/cache.scm | 14 ++-- guix/channels.scm | 26 +++---- guix/ci.scm | 14 ++-- guix/colors.scm | 12 +-- guix/combinators.scm | 14 ++-- guix/config.scm.in | 14 ++-- guix/cpio.scm | 14 ++-- guix/cpu.scm | 14 ++-- guix/cve.scm | 16 ++-- guix/cvs-download.scm | 18 ++--- guix/deprecation.scm | 12 +-- guix/describe.scm | 20 ++--- guix/diagnostics.scm | 14 ++-- guix/discovery.scm | 14 ++-- guix/download.scm | 12 +-- guix/ftp-client.scm | 12 +-- guix/gexp.scm | 34 ++++----- guix/git-authenticate.scm | 18 ++--- guix/git-download.scm | 16 ++-- guix/glob.scm | 14 ++-- guix/gnu-maintenance.scm | 14 ++-- guix/gnupg.scm | 12 +-- guix/graph.scm | 20 ++--- guix/hg-download.scm | 16 ++-- guix/http-client.scm | 14 ++-- guix/i18n.scm | 12 +-- guix/import/apache.scm | 16 ++-- guix/import/cpan.scm | 14 ++-- guix/import/cran.scm | 16 ++-- guix/import/egg.scm | 46 +++++------ guix/import/git.scm | 36 ++++----- guix/import/gnome.scm | 16 ++-- guix/import/gnu.scm | 14 ++-- guix/import/go.scm | 72 ++++++++--------- guix/import/kde.scm | 16 ++-- guix/import/test.scm | 14 ++-- guix/import/texlive.scm | 16 ++-- guix/inferior.scm | 16 ++-- guix/ipfs.scm | 16 ++-- guix/least-authority.scm | 14 ++-- guix/licenses.scm | 26 +++---- guix/man-db.scm | 20 ++--- guix/modules.scm | 20 ++--- guix/monad-repl.scm | 14 ++-- guix/monads.scm | 24 +++--- guix/nar.scm | 12 +-- guix/openpgp.scm | 28 +++---- guix/packages.scm | 14 ++-- guix/pki.scm | 18 ++--- guix/profiles.scm | 14 ++-- guix/profiling.scm | 12 +-- guix/progress.scm | 12 +-- guix/quirks.scm | 18 ++--- guix/read-print.scm | 14 ++-- guix/records.scm | 12 +-- guix/remote-procedures.scm | 18 ++--- guix/remote.scm | 22 +++--- guix/repl.scm | 14 ++-- guix/rpm.scm | 16 ++-- guix/scripts.scm | 12 +-- guix/scripts/authenticate.scm | 16 ++-- guix/scripts/challenge.scm | 24 +++--- guix/scripts/deploy.scm | 14 ++-- guix/scripts/git/authenticate.scm | 14 ++-- guix/scripts/home/import.scm | 14 ++-- guix/scripts/offload.scm | 24 +++--- guix/scripts/pack.scm | 16 ++-- guix/scripts/repl.scm | 12 +-- guix/scripts/substitute.scm | 22 +++--- guix/scripts/system/installer.scm | 14 ++-- guix/scripts/system/reconfigure.scm | 20 ++--- guix/scripts/system/search.scm | 14 ++-- guix/search-paths.scm | 18 ++--- guix/serialization.scm | 15 ++-- guix/sets.scm | 22 +++--- guix/ssh.scm | 14 ++-- guix/status.scm | 20 ++--- guix/store/roots.scm | 14 ++-- guix/store/ssh.scm | 12 +-- guix/svn-download.scm | 16 ++-- guix/swh.scm | 24 +++--- guix/tests.scm | 14 ++-- guix/tests/http.scm | 12 +-- guix/transformations.scm | 16 ++-- guix/ui.scm | 20 ++--- guix/upstream.scm | 14 ++-- guix/workers.scm | 28 +++---- tests/services/vpn.scm | 12 +-- 235 files changed, 2050 insertions(+), 2031 deletions(-) diff --git a/build-aux/build-self.scm b/build-aux/build-self.scm index 942cf5f5346..96a288672a8 100644 --- a/build-aux/build-self.scm +++ b/build-aux/build-self.scm @@ -16,6 +16,20 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; When loaded, this module returns a monadic procedure of at least one +;;; argument: the source tree to build. It returns a derivation that +;;; builds it. +;;; +;;; This file uses modules provided by the already-installed Guix. Those +;;; modules may be arbitrarily old compared to the version we want to +;;; build. Because of that, it must rely on the smallest set of features +;;; that are likely to be provided by the (guix) and (gnu) modules, and by +;;; Guile itself, forever and ever. +;;; +;;; Code: + (define-module (build-self) #:use-module (gnu) #:use-module (guix) @@ -32,20 +46,6 @@ #:use-module (ice-9 popen) #:export (build)) -;;; Commentary: -;;; -;;; When loaded, this module returns a monadic procedure of at least one -;;; argument: the source tree to build. It returns a derivation that -;;; builds it. -;;; -;;; This file uses modules provided by the already-installed Guix. Those -;;; modules may be arbitrarily old compared to the version we want to -;;; build. Because of that, it must rely on the smallest set of features -;;; that are likely to be provided by the (guix) and (gnu) modules, and by -;;; Guile itself, forever and ever. -;;; -;;; Code: - (define (date-version-string) "Return the current date and hour in UTC timezone, for use as a poor person's version identifier." diff --git a/etc/teams/qt/qt5-manifest.scm b/etc/teams/qt/qt5-manifest.scm index 96f13d478d6..754ba2744ab 100644 --- a/etc/teams/qt/qt5-manifest.scm +++ b/etc/teams/qt/qt5-manifest.scm @@ -16,8 +16,6 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . -(load "common.scm") - ;;; Commentary: ;;; ;;; This manifest can be used to update the Qt 5 packages collection, via @@ -27,4 +25,6 @@ ;;; ;;; Code: +(load "common.scm") + (qt-packages-manifest #:major-version "5") diff --git a/gnu.scm b/gnu.scm index f139531ef3e..5230c68c522 100644 --- a/gnu.scm +++ b/gnu.scm @@ -18,6 +18,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This composite module re-exports core parts the (gnu …) public modules. +;;; +;;; Code: + (define-module (gnu) #:use-module (guix i18n) #:use-module (guix diagnostics) @@ -31,12 +37,6 @@ use-service-modules use-system-modules)) -;;; Commentary: -;;; -;;; This composite module re-exports core parts the (gnu …) public modules. -;;; -;;; Code: - (eval-when (eval load compile) (begin (define %public-modules diff --git a/gnu/artwork.scm b/gnu/artwork.scm index d3ab13b8af7..866af42a987 100644 --- a/gnu/artwork.scm +++ b/gnu/artwork.scm @@ -17,17 +17,17 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . -(define-module (gnu artwork) - #:use-module (guix packages) - #:use-module (guix git-download) - #:export (%artwork-repository)) - ;;; Commentary: ;;; ;;; Common place for the definition of the Guix artwork repository. ;;; ;;; Code: +(define-module (gnu artwork) + #:use-module (guix packages) + #:use-module (guix git-download) + #:export (%artwork-repository)) + (define %artwork-repository (let ((commit "08259679a0faef63e3ba169df5b937d836bd9262")) (origin diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm index 79b9a1cac6f..a518c565700 100644 --- a/gnu/bootloader/grub.scm +++ b/gnu/bootloader/grub.scm @@ -27,6 +27,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Configuration of GNU GRUB. +;;; +;;; Code: + (define-module (gnu bootloader grub) #:use-module (guix build union) #:use-module (guix deprecation) @@ -73,12 +79,6 @@ grub-configuration)) -;;; Commentary: -;;; -;;; Configuration of GNU GRUB. -;;; -;;; Code: - (define* (normalize-file file mount-point store-directory-prefix) "Strip MOUNT-POINT and prepend STORE-DIRECTORY-PREFIX, if any, to FILE, a G-expression or other lowerable object denoting a file name." diff --git a/gnu/build/activation.scm b/gnu/build/activation.scm index dbe35f41b88..516f9d86bbe 100644 --- a/gnu/build/activation.scm +++ b/gnu/build/activation.scm @@ -28,6 +28,14 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module provides "activation" helpers. Activation is the process that +;;; consists in setting up system-wide files and directories so that an +;;; 'operating-system' configuration becomes active. +;;; +;;; Code: + (define-module (gnu build activation) #:use-module (gnu system accounts) #:use-module (gnu system privilege) @@ -53,14 +61,6 @@ activate-current-system mkdir-p/perms)) -;;; Commentary: -;;; -;;; This module provides "activation" helpers. Activation is the process that -;;; consists in setting up system-wide files and directories so that an -;;; 'operating-system' configuration becomes active. -;;; -;;; Code: - (define %skeleton-directory ;; Directory containing skeleton files for new accounts. ;; Note: keep the trailing '/' so that 'scandir' enters it. diff --git a/gnu/build/chromium-extension.scm b/gnu/build/chromium-extension.scm index 8171c727341..881cbbbcbc7 100644 --- a/gnu/build/chromium-extension.scm +++ b/gnu/build/chromium-extension.scm @@ -17,6 +17,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Tools to deal with Chromium extensions. +;;; +;;; Code: + (define-module (gnu build chromium-extension) #:use-module (guix gexp) #:use-module (guix packages) @@ -26,12 +32,6 @@ #:use-module (guix build-system trivial) #:export (make-chromium-extension)) -;;; Commentary: -;;; -;;; Tools to deal with Chromium extensions. -;;; -;;; Code: - (define (make-signing-key seed) "Return a derivation for a deterministic PKCS #8 private key using SEED." (computed-file diff --git a/gnu/build/cross-toolchain.scm b/gnu/build/cross-toolchain.scm index da9016488f7..2246f45519d 100644 --- a/gnu/build/cross-toolchain.scm +++ b/gnu/build/cross-toolchain.scm @@ -21,6 +21,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module provides tools to build a cross-compiler. +;;; +;;; Code: + (define-module (gnu build cross-toolchain) #:use-module (guix build utils) #:use-module (guix build gnu-build-system) @@ -30,12 +36,6 @@ #:use-module (ice-9 ftw) #:export (cross-gcc-build-phases)) -;;; Commentary: -;;; -;;; This module provides tools to build a cross-compiler. -;;; -;;; Code: - (define %gcc-include-paths ;; Environment variables for header search paths. ;; Note: See for why not 'CPATH'. diff --git a/gnu/build/file-systems.scm b/gnu/build/file-systems.scm index f236efd9250..d7831767b45 100644 --- a/gnu/build/file-systems.scm +++ b/gnu/build/file-systems.scm @@ -26,6 +26,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This modules provides tools to deal with disk partitions, and to mount and +;;; check file systems. +;;; +;;; Code: + (define-module (gnu build file-systems) #:use-module (gnu system uuid) #:use-module (gnu system file-systems) @@ -80,13 +87,6 @@ swap-space->flags-bit-mask)) -;;; Commentary: -;;; -;;; This modules provides tools to deal with disk partitions, and to mount and -;;; check file systems. -;;; -;;; Code: - (define (system*/console program . args) "Run PROGRAM with ARGS in a tty on top of /dev/console. The return value is as for 'system*'." diff --git a/gnu/build/hurd-boot.scm b/gnu/build/hurd-boot.scm index 67975bfa647..7de9f0ec63a 100644 --- a/gnu/build/hurd-boot.scm +++ b/gnu/build/hurd-boot.scm @@ -17,6 +17,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This modules provides tools to deal with disk partitions, and to mount and +;;; check file systems. +;;; +;;; Code: + (define-module (gnu build hurd-boot) #:use-module (system repl error-handling) #:autoload (system repl repl) (start-repl) @@ -29,12 +36,6 @@ #:export (make-hurd-device-nodes boot-hurd-system)) -;;; Commentary: -;;; -;;; Utility procedures useful to boot a Hurd system. -;;; -;;; Code: - ;; XXX FIXME c&p from linux-boot.scm (define (find-long-option option arguments) "Find OPTION among ARGUMENTS, where OPTION is something like \"--load\". diff --git a/gnu/build/install.scm b/gnu/build/install.scm index 58ee77d1831..df9befe058a 100644 --- a/gnu/build/install.scm +++ b/gnu/build/install.scm @@ -19,6 +19,15 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module supports the installation of the GNU system on a hard disk. +;;; It is meant to be used both in a build environment (in derivations that +;;; build VM images), and on the bare metal (when really installing the +;;; system.) +;;; +;;; Code: + (define-module (gnu build install) #:use-module (guix build syscalls) #:use-module (guix build utils) @@ -33,15 +42,6 @@ mount-cow-store unmount-cow-store)) -;;; Commentary: -;;; -;;; This module supports the installation of the GNU system on a hard disk. -;;; It is meant to be used both in a build environment (in derivations that -;;; build VM images), and on the bare metal (when really installing the -;;; system.) -;;; -;;; Code: - (define (install-boot-config bootcfg bootcfg-location mount-point) "Atomically copy BOOTCFG into BOOTCFG-LOCATION on the MOUNT-POINT. Note that the caller must make sure that BOOTCFG is registered as a GC root so diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm index e0743eae55a..c1a294db18c 100644 --- a/gnu/build/linux-boot.scm +++ b/gnu/build/linux-boot.scm @@ -20,6 +20,15 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Utility procedures useful in a Linux initial RAM disk (initrd). Note that +;;; many of these use procedures not yet available in vanilla Guile (`mount', +;;; `load-linux-module', etc.); these are provided by a Guile patch used in +;;; the GNU distribution. +;;; +;;; Code: + (define-module (gnu build linux-boot) #:use-module (rnrs io ports) #:use-module (system repl error-handling) @@ -67,15 +76,6 @@ read-linux-consoles)) -;;; Commentary: -;;; -;;; Utility procedures useful in a Linux initial RAM disk (initrd). Note that -;;; many of these use procedures not yet available in vanilla Guile (`mount', -;;; `load-linux-module', etc.); these are provided by a Guile patch used in -;;; the GNU distribution. -;;; -;;; Code: - (define* (mount-essential-file-systems #:key (root "/")) "Mount /dev, /proc, and /sys under ROOT." (define (scope dir) diff --git a/gnu/build/linux-initrd.scm b/gnu/build/linux-initrd.scm index bb2ed0db0c7..559f02fc2a0 100644 --- a/gnu/build/linux-initrd.scm +++ b/gnu/build/linux-initrd.scm @@ -16,6 +16,14 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Tools to create Linux initial RAM disks ("initrds"). Initrds are +;;; essentially gzipped cpio archives, with a '/init' executable that the +;;; kernel runs at boot time. +;;; +;;; Code: + (define-module (gnu build linux-initrd) #:use-module ((guix cpio) #:prefix cpio:) #:use-module (guix build utils) @@ -27,14 +35,6 @@ #:export (write-cpio-archive build-initrd)) -;;; Commentary: -;;; -;;; Tools to create Linux initial RAM disks ("initrds"). Initrds are -;;; essentially gzipped cpio archives, with a '/init' executable that the -;;; kernel runs at boot time. -;;; -;;; Code: - (define* (write-cpio-archive output directory #:key (compress? #t) diff --git a/gnu/build/linux-modules.scm b/gnu/build/linux-modules.scm index 6bf71100e49..ae0137e1c12 100644 --- a/gnu/build/linux-modules.scm +++ b/gnu/build/linux-modules.scm @@ -20,6 +20,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Tools to deal with Linux kernel modules. +;;; +;;; Code: + (define-module (gnu build linux-modules) #:use-module (guix elf) #:use-module (guix glob) @@ -78,12 +84,6 @@ make-linux-module-directory)) -;;; Commentary: -;;; -;;; Tools to deal with Linux kernel modules. -;;; -;;; Code: - (define current-module-debugging-port (make-parameter (%make-void-port "w"))) diff --git a/gnu/build/marionette.scm b/gnu/build/marionette.scm index 015fc8a98b7..b6d4ec0de9c 100644 --- a/gnu/build/marionette.scm +++ b/gnu/build/marionette.scm @@ -19,6 +19,17 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Instrumentation tools for QEMU virtual machines (VMs). A "marionette" is +;;; essentially a VM (a QEMU instance) with its monitor connected to a +;;; Unix-domain socket, and with a REPL inside the guest listening on a +;;; virtual console, which is itself connected to the host via a Unix-domain +;;; socket--these are the marionette's strings, connecting it to the almighty +;;; puppeteer. +;;; +;;; Code: + (define-module (gnu build marionette) #:use-module (srfi srfi-9) #:use-module (srfi srfi-26) @@ -44,17 +55,6 @@ system-test-runner qemu-command)) -;;; Commentary: -;;; -;;; Instrumentation tools for QEMU virtual machines (VMs). A "marionette" is -;;; essentially a VM (a QEMU instance) with its monitor connected to a -;;; Unix-domain socket, and with a REPL inside the guest listening on a -;;; virtual console, which is itself connected to the host via a Unix-domain -;;; socket--these are the marionette's strings, connecting it to the almighty -;;; puppeteer. -;;; -;;; Code: - (define-record-type (marionette command pid monitor repl) marionette? diff --git a/gnu/build/secret-service.scm b/gnu/build/secret-service.scm index 5447563cd94..0c8a0c7677b 100644 --- a/gnu/build/secret-service.scm +++ b/gnu/build/secret-service.scm @@ -17,6 +17,15 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Utility procedures for copying secrets into a VM. +;;; +;;; Note: This code runs within the 'shepherd' process, hence the use of +;;; Fibers. +;;; +;;; Code: + (define-module (gnu build secret-service) #:autoload (fibers io-wakeup) (wait-until-port-readable-operation) #:autoload (fibers operations) (perform-operation @@ -33,15 +42,6 @@ #:export (secret-service-receive-secrets secret-service-send-secrets)) -;;; Commentary: -;;; -;;; Utility procedures for copying secrets into a VM. -;;; -;;; Note: This code runs within the 'shepherd' process, hence the use of -;;; Fibers. -;;; -;;; Code: - (define-syntax log (lambda (s) "Log the given message." diff --git a/gnu/build/shepherd.scm b/gnu/build/shepherd.scm index 4ead27be0be..26f75e5d533 100644 --- a/gnu/build/shepherd.scm +++ b/gnu/build/shepherd.scm @@ -19,6 +19,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module provides extensions to the GNU Shepherd. In particular, it +;;; provides a helper to start services in a container. +;;; +;;; Code: + (define-module (gnu build shepherd) #:use-module (gnu system file-systems) #:use-module (gnu build linux-container) @@ -35,13 +42,6 @@ #:export (default-mounts fork+exec-command/container)) -;;; Commentary: -;;; -;;; This module provides extensions to the GNU Shepherd. In particular, it -;;; provides a helper to start services in a container. -;;; -;;; Code: - (define (clean-up file) (when file (catch 'system-error diff --git a/gnu/ci.scm b/gnu/ci.scm index a55dfc2a5f3..83f3ff21e34 100644 --- a/gnu/ci.scm +++ b/gnu/ci.scm @@ -20,6 +20,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This file defines build jobs for Cuirass. +;;; +;;; Code: + (define-module (gnu ci) #:use-module (guix build-system channel) #:use-module (guix config) @@ -82,12 +88,6 @@ arguments->systems cuirass-jobs)) -;;; Commentary: -;;; -;;; This file defines build jobs for Cuirass. -;;; -;;; Code: - (define* (derivation->job name drv #:key (max-silent-time 3600) diff --git a/gnu/home.scm b/gnu/home.scm index f0dd4a19273..40abe49191e 100644 --- a/gnu/home.scm +++ b/gnu/home.scm @@ -17,6 +17,14 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module provides a record for managing +;;; per-user packages and configuration files in the similar way as +;;; do for system packages and configuration files. +;;; +;;; Code: + (define-module (gnu home) #:use-module (gnu home services) #:use-module (gnu home services symlink-manager) @@ -50,14 +58,6 @@ %base-home-services)) -;;; Comment: -;;; -;;; This module provides a record for managing -;;; per-user packages and configuration files in the similar way as -;;; do for system packages and configuration files. -;;; -;;; Code: - (define-record-type* home-environment make-home-environment home-environment? diff --git a/gnu/home/services.scm b/gnu/home/services.scm index f7d0ff08228..06f872e6460 100644 --- a/gnu/home/services.scm +++ b/gnu/home/services.scm @@ -20,6 +20,59 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module is similar to (gnu system services) module, but +;;; provides Home Services, which are supposed to be used for building +;;; home-environment. +;;; +;;; Home Services use the same extension as System Services. Consult +;;; (gnu system services) module or manual for more information. +;;; +;;; home-service-type is a root of home services DAG. +;;; +;;; home-profile-service-type is almost the same as profile-service-type, at least +;;; for now. +;;; +;;; home-environment-variables-service-type generates a @file{setup-environment} +;;; shell script, which is expected to be sourced by login shell or other program, +;;; which starts early and spawns all other processes. Home services for shells +;;; automatically add code for sourcing this file, if person do not use those home +;;; services they have to source this script manually in their's shell *profile +;;; file (details described in the manual). +;;; +;;; home-files-service-type is similar to etc-service-type, but doesn't extend +;;; home-activation, because deploy mechanism for config files is pluggable +;;; and can be different for different home environments: The default one is +;;; called symlink-manager, which creates links for various dotfiles and xdg +;;; configuration files to store, but is possible to implement alternative +;;; approaches like read-only home from Julien's guix-home-manager. +;;; +;;; home-run-on-first-login-service-type provides an @file{on-first-login} guile +;;; script, which runs provided gexps once, when user makes first login. It can +;;; be used to start user's Shepherd and maybe some other process. It relies on +;;; assumption that /run/user/$UID will be created on login by some login +;;; manager (elogind for example). +;;; +;;; home-activation-service-type provides an @file{activate} guile script, which +;;; do three main things: +;;; +;;; - Sets environment variables to the values declared in +;;; @file{setup-environment} shell script. It's necessary, because user can set +;;; for example XDG_CONFIG_HOME and it should be respected by activation gexp of +;;; symlink-manager. +;;; +;;; - Sets GUIX_NEW_HOME and possibly GUIX_OLD_HOME vars to paths in the store. +;;; Later those variables can be used by activation gexps, for example by +;;; symlink-manager or run-on-change services. +;;; +;;; - Run all activation gexps provided by other home services. +;;; +;;; home-run-on-change-service-type allows to trigger actions during +;;; activation if file or directory specified by pattern is changed. +;;; +;;; Code: + (define-module (gnu home services) #:use-module (gnu services) #:use-module ((gnu packages package-management) #:select (guix)) @@ -81,59 +134,6 @@ for-home for-home?)) -;;; Comment: -;;; -;;; This module is similar to (gnu system services) module, but -;;; provides Home Services, which are supposed to be used for building -;;; home-environment. -;;; -;;; Home Services use the same extension as System Services. Consult -;;; (gnu system services) module or manual for more information. -;;; -;;; home-service-type is a root of home services DAG. -;;; -;;; home-profile-service-type is almost the same as profile-service-type, at least -;;; for now. -;;; -;;; home-environment-variables-service-type generates a @file{setup-environment} -;;; shell script, which is expected to be sourced by login shell or other program, -;;; which starts early and spawns all other processes. Home services for shells -;;; automatically add code for sourcing this file, if person do not use those home -;;; services they have to source this script manually in their's shell *profile -;;; file (details described in the manual). -;;; -;;; home-files-service-type is similar to etc-service-type, but doesn't extend -;;; home-activation, because deploy mechanism for config files is pluggable -;;; and can be different for different home environments: The default one is -;;; called symlink-manager, which creates links for various dotfiles and xdg -;;; configuration files to store, but is possible to implement alternative -;;; approaches like read-only home from Julien's guix-home-manager. -;;; -;;; home-run-on-first-login-service-type provides an @file{on-first-login} guile -;;; script, which runs provided gexps once, when user makes first login. It can -;;; be used to start user's Shepherd and maybe some other process. It relies on -;;; assumption that /run/user/$UID will be created on login by some login -;;; manager (elogind for example). -;;; -;;; home-activation-service-type provides an @file{activate} guile script, which -;;; do three main things: -;;; -;;; - Sets environment variables to the values declared in -;;; @file{setup-environment} shell script. It's necessary, because user can set -;;; for example XDG_CONFIG_HOME and it should be respected by activation gexp of -;;; symlink-manager. -;;; -;;; - Sets GUIX_NEW_HOME and possibly GUIX_OLD_HOME vars to paths in the store. -;;; Later those variables can be used by activation gexps, for example by -;;; symlink-manager or run-on-change services. -;;; -;;; - Run all activation gexps provided by other home services. -;;; -;;; home-run-on-change-service-type allows to trigger actions during -;;; activation if file or directory specified by pattern is changed. -;;; -;;; Code: - (define (home-derivation entries mextensions) "Return as a monadic value the derivation of the 'home' diff --git a/gnu/home/services/fontutils.scm b/gnu/home/services/fontutils.scm index 083cdd4b569..ee5cfda9938 100644 --- a/gnu/home/services/fontutils.scm +++ b/gnu/home/services/fontutils.scm @@ -19,6 +19,15 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Services related to fonts. home-fontconfig service provides +;;; fontconfig configuration, which allows fc-* utilities to find +;;; fonts in Guix Home's profile and regenerates font cache on +;;; activation. +;;; +;;; Code: + (define-module (gnu home services fontutils) #:use-module (gnu home services) #:use-module (gnu packages fontutils) @@ -29,15 +38,6 @@ #:export (home-fontconfig-service-type)) -;;; Commentary: -;;; -;;; Services related to fonts. home-fontconfig service provides -;;; fontconfig configuration, which allows fc-* utilities to find -;;; fonts in Guix Home's profile and regenerates font cache on -;;; activation. -;;; -;;; Code: - (define (write-fontconfig-doctype) "Prints fontconfig's DOCTYPE to current-output-port." ;; This is necessary because SXML doesn't seem to have a way to represent a doctype, diff --git a/gnu/home/services/mcron.scm b/gnu/home/services/mcron.scm index eab6b9bda44..2e012ddeb41 100644 --- a/gnu/home/services/mcron.scm +++ b/gnu/home/services/mcron.scm @@ -19,13 +19,6 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . -(define-module (gnu home services mcron) - #:use-module (gnu home services) - #:use-module (gnu home services shepherd) - #:use-module (gnu services mcron) ;for the service mapping - #:export (home-mcron-configuration - home-mcron-service-type)) - ;;; Commentary: ;; ;; Service for the GNU mcron cron job manager. @@ -49,6 +42,13 @@ ;; ;;; Code: +(define-module (gnu home services mcron) + #:use-module (gnu home services) + #:use-module (gnu home services shepherd) + #:use-module (gnu services mcron) ;for the service mapping + #:export (home-mcron-configuration + home-mcron-service-type)) + (define-syntax-rule (home-mcron-configuration fields ...) ;; Macro provided for backward compatibility. (for-home (mcron-configuration fields ...))) diff --git a/gnu/home/services/music.scm b/gnu/home/services/music.scm index 3813ea230e4..86ec82fb359 100644 --- a/gnu/home/services/music.scm +++ b/gnu/home/services/music.scm @@ -16,6 +16,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; A Guix Home service to configure Beets, a music file and metadata manager. +;;; +;;; Code: + (define-module (gnu home services music) #:use-module (guix gexp) #:use-module (guix records) @@ -25,12 +31,6 @@ #:export (home-beets-configuration home-beets-service-type)) -;;; Commentary: -;;; -;;; A Guix Home service to configure Beets, a music file and metadata manager. -;;; -;;; Code: - (define-record-type* home-beets-configuration make-home-beets-configuration home-beets-configuration? diff --git a/gnu/home/services/shells.scm b/gnu/home/services/shells.scm index b4299957b01..242a2980bda 100644 --- a/gnu/home/services/shells.scm +++ b/gnu/home/services/shells.scm @@ -19,6 +19,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module contains shell related services like Zsh. +;;; +;;; Code: + (define-module (gnu home services shells) #:use-module (gnu services configuration) #:use-module ((gnu services) #:select (%default-bash-aliases)) @@ -52,12 +58,6 @@ home-inputrc-service-type home-inputrc-configuration)) -;;; Commentary: -;;; -;;; This module contains shell related services like Zsh. -;;; -;;; Code: - ;;; ;;; Shell profile. diff --git a/gnu/home/services/symlink-manager.scm b/gnu/home/services/symlink-manager.scm index 9f46f07e860..d11d3cdfe6f 100644 --- a/gnu/home/services/symlink-manager.scm +++ b/gnu/home/services/symlink-manager.scm @@ -19,13 +19,7 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . -(define-module (gnu home services symlink-manager) - #:use-module (gnu home services) - #:use-module (guix gexp) - #:use-module (guix modules) - #:export (home-symlink-manager-service-type)) - -;;; Comment: +;;; Commentary: ;;; ;;; symlink-manager cares about xdg configurations and other files: it backs ;;; up files created by user, removes symlinks and directories created by a @@ -35,6 +29,13 @@ ;;; ;;; Code: +(define-module (gnu home services symlink-manager) + #:use-module (gnu home services) + #:use-module (guix gexp) + #:use-module (guix modules) + #:export (home-symlink-manager-service-type)) + + (define (update-symlinks-script) (program-file "update-symlinks" diff --git a/gnu/home/services/xdg.scm b/gnu/home/services/xdg.scm index 04bf2ed4184..6342bb47297 100644 --- a/gnu/home/services/xdg.scm +++ b/gnu/home/services/xdg.scm @@ -19,6 +19,17 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;; +;; This module contains services related to XDG directories and +;; applications. +;; +;; - XDG base directories +;; - XDG user directories +;; - XDG MIME applications +;; +;;; Code: + (define-module (gnu home services xdg) #:use-module (gnu services configuration) #:use-module (gnu home services) @@ -62,17 +73,6 @@ home-xdg-mime-applications-service-type home-xdg-mime-applications-configuration)) -;;; Commentary: -;; -;; This module contains services related to XDG directories and -;; applications. -;; -;; - XDG base directories -;; - XDG user directories -;; - XDG MIME applications -;; -;;; Code: - ;;; ;;; XDG base directories. diff --git a/gnu/installer/connman.scm b/gnu/installer/connman.scm index d21272036f7..f1d631517f2 100644 --- a/gnu/installer/connman.scm +++ b/gnu/installer/connman.scm @@ -16,6 +16,14 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module provides procedures for talking with the connman daemon. +;;; The best approach would have been using connman dbus interface. +;;; However, as Guile dbus bindings are not available yet, the console client +;;; "connmanctl" is used to talk with the daemon. +;;; + (define-module (gnu installer connman) #:use-module (gnu installer utils) #:use-module (guix records) @@ -70,14 +78,6 @@ connman-online? connman-connect-with-auth)) -;;; Commentary: -;;; -;;; This module provides procedures for talking with the connman daemon. -;;; The best approach would have been using connman dbus interface. -;;; However, as Guile dbus bindings are not available yet, the console client -;;; "connmanctl" is used to talk with the daemon. -;;; - ;;; ;;; Technology record. diff --git a/gnu/installer/newt/page.scm b/gnu/installer/newt/page.scm index c4414fc97ab..e798f4dbcfa 100644 --- a/gnu/installer/newt/page.scm +++ b/gnu/installer/newt/page.scm @@ -19,6 +19,17 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Some helpers around guile-newt to draw or run generic pages. The +;;; difference between 'draw' and 'run' terms comes from newt library. A page +;;; is drawn when the form it contains does not expect any user +;;; interaction. In that case, it is necessary to call (newt-refresh) to force +;;; the page to be displayed. When a form is 'run', it is blocked waiting for +;;; any action from the user (press a button, input some text, ...). +;;; +;;; Code: + (define-module (gnu installer newt page) #:use-module (gnu installer steps) #:use-module (gnu installer utils) @@ -52,17 +63,6 @@ run-form-with-clients)) -;;; Commentary: -;;; -;;; Some helpers around guile-newt to draw or run generic pages. The -;;; difference between 'draw' and 'run' terms comes from newt library. A page -;;; is drawn when the form it contains does not expect any user -;;; interaction. In that case, it is necessary to call (newt-refresh) to force -;;; the page to be displayed. When a form is 'run', it is blocked waiting for -;;; any action from the user (press a button, input some text, ...). -;;; -;;; Code: - (define* (watch-clients! form #:optional (clients (current-clients))) "Have FORM watch the file descriptors corresponding to current client connections. Consequently, FORM may exit with the 'exit-fd-ready' reason." diff --git a/gnu/installer/tests.scm b/gnu/installer/tests.scm index a9a5d5d9880..b315176ff4c 100644 --- a/gnu/installer/tests.scm +++ b/gnu/installer/tests.scm @@ -18,6 +18,17 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module provides tools to test the guided "graphical" installer in a +;;; non-interactive fashion. The core of it is 'converse': it allows you to +;;; state Expect-style dialogues, which happen over the Unix-domain socket the +;;; installer listens to. Higher-level procedures such as +;;; 'choose-locale+keyboard' are provided to perform specific parts of the +;;; dialogue. +;;; +;;; Code: + (define-module (gnu installer tests) #:use-module (srfi srfi-1) #:use-module (srfi srfi-34) @@ -44,17 +55,6 @@ edit-configuration-file)) -;;; Commentary: -;;; -;;; This module provides tools to test the guided "graphical" installer in a -;;; non-interactive fashion. The core of it is 'converse': it allows you to -;;; state Expect-style dialogues, which happen over the Unix-domain socket the -;;; installer listens to. Higher-level procedures such as -;;; 'choose-locale+keyboard' are provided to perform specific parts of the -;;; dialogue. -;;; -;;; Code: - (define %installer-socket-file ;; Socket the installer listens to. "/var/guix/installer-socket") diff --git a/gnu/machine.scm b/gnu/machine.scm index 60be6749727..def1aacb55b 100644 --- a/gnu/machine.scm +++ b/gnu/machine.scm @@ -17,6 +17,15 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module provides the types used to declare individual machines in a +;;; heterogeneous Guix deployment. The interface allows users to specify system +;;; configurations and the means by which resources should be provisioned on a +;;; per-host basis. +;;; +;;; Code: + (define-module (gnu machine) #:use-module (gnu system) #:use-module (guix derivations) @@ -48,15 +57,6 @@ deploy-error-should-roll-back deploy-error-captured-args)) -;;; Commentary: -;;; -;;; This module provides the types used to declare individual machines in a -;;; heterogeneous Guix deployment. The interface allows users to specify system -;;; configurations and the means by which resources should be provisioned on a -;;; per-host basis. -;;; -;;; Code: - ;;; ;;; Declarations for resources that can be provisioned. diff --git a/gnu/machine/digital-ocean.scm b/gnu/machine/digital-ocean.scm index d0f0bbe4cb6..f88d140900c 100644 --- a/gnu/machine/digital-ocean.scm +++ b/gnu/machine/digital-ocean.scm @@ -19,6 +19,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module implements a high-level interface for provisioning "droplets" +;;; from the Digital Ocean virtual private server (VPS) service. +;;; +;;; Code: + (define-module (gnu machine digital-ocean) #:use-module (gnu machine ssh) #:use-module (gnu machine) @@ -63,13 +70,6 @@ digital-ocean-environment-type)) -;;; Commentary: -;;; -;;; This module implements a high-level interface for provisioning "droplets" -;;; from the Digital Ocean virtual private server (VPS) service. -;;; -;;; Code: - (define %api-base "https://api.digitalocean.com") (define %digital-ocean-token diff --git a/gnu/machine/hetzner.scm b/gnu/machine/hetzner.scm index b4858fa3d26..148e3139b19 100644 --- a/gnu/machine/hetzner.scm +++ b/gnu/machine/hetzner.scm @@ -19,6 +19,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module implements a high-level interface for provisioning machines on +;;; the Hetzner Cloud service https://docs.hetzner.cloud. +;;; + (define-module (gnu machine hetzner) #:use-module (gnu bootloader grub) #:use-module (gnu bootloader) @@ -91,12 +97,6 @@ hetzner-configuration? hetzner-environment-type)) -;;; Commentary: -;;; -;;; This module implements a high-level interface for provisioning machines on -;;; the Hetzner Cloud service https://docs.hetzner.cloud. -;;; - ;;; ;;; Hetzner operating systems. diff --git a/gnu/machine/hetzner/http.scm b/gnu/machine/hetzner/http.scm index f8580021a9e..6702a755351 100644 --- a/gnu/machine/hetzner/http.scm +++ b/gnu/machine/hetzner/http.scm @@ -17,6 +17,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module implements a lower-level interface for interacting with the +;;; Hetzner Cloud API https://docs.hetzner.cloud. +;;; + (define-module (gnu machine hetzner http) #:use-module (guix diagnostics) #:use-module (guix i18n) @@ -179,12 +185,6 @@ make-hetzner-server-type make-hetzner-ssh-key)) -;;; Commentary: -;;; -;;; This module implements a lower-level interface for interacting with the -;;; Hetzner Cloud API https://docs.hetzner.cloud. -;;; - (define %hetzner-default-api-token (make-parameter (getenv "GUIX_HETZNER_API_TOKEN"))) diff --git a/gnu/machine/ssh.scm b/gnu/machine/ssh.scm index 0ce28602363..d8c634000f7 100644 --- a/gnu/machine/ssh.scm +++ b/gnu/machine/ssh.scm @@ -19,6 +19,15 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module implements remote evaluation and system deployment for +;;; machines that are accessible over SSH and have a known host-name. In the +;;; sense of the broader "machine" interface, we describe the environment for +;;; such machines as 'managed-host. +;;; +;;; Code: + (define-module (gnu machine ssh) #:use-module (gnu bootloader) #:use-module (gnu machine) @@ -70,15 +79,6 @@ machine-ssh-configuration-host-key machine-ssh-configuration-session)) -;;; Commentary: -;;; -;;; This module implements remote evaluation and system deployment for -;;; machines that are accessible over SSH and have a known host-name. In the -;;; sense of the broader "machine" interface, we describe the environment for -;;; such machines as 'managed-host. -;;; -;;; Code: - ;;; ;;; Parameters for the SSH client. diff --git a/gnu/packages.scm b/gnu/packages.scm index 8d40e3e3352..b0283cade61 100644 --- a/gnu/packages.scm +++ b/gnu/packages.scm @@ -21,6 +21,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; General utilities for the software distribution---i.e., the modules under +;;; (gnu packages ...). +;;; +;;; Code: + (define-module (gnu packages) #:use-module (guix packages) #:use-module (guix ui) @@ -74,13 +81,6 @@ generate-package-cache)) -;;; Commentary: -;;; -;;; General utilities for the software distribution---i.e., the modules under -;;; (gnu packages ...). -;;; -;;; Code: - ;; By default, we store patches and auxiliary files ;; alongside Guile modules. This is so that these extra files can be ;; found without requiring a special setup, such as a specific diff --git a/gnu/packages/avr.scm b/gnu/packages/avr.scm index c445f3a83af..2c8c9486d1b 100644 --- a/gnu/packages/avr.scm +++ b/gnu/packages/avr.scm @@ -21,6 +21,17 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module defines a procedure that can be used to create a complete +;;; avr-toolchain package. The procedure must not be used at the top level, +;;; to avoid cyclic module dependencies caused by the (gnu packages +;;; cross-base) module referring to top level bindings from (gnu packages +;;; gcc). +;;; +;;; It also contains packages for working with or targeting the AVR system. +;;; + (define-module (gnu packages avr) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix gexp) @@ -36,17 +47,6 @@ #:export (make-avr-libc make-avr-toolchain)) -;;; Commentary: -;;; -;;; This module defines a procedure that can be used to create a complete -;;; avr-toolchain package. The procedure must not be used at the top level, -;;; to avoid cyclic module dependencies caused by the (gnu packages -;;; cross-base) module referring to top level bindings from (gnu packages -;;; gcc). -;;; -;;; It also contains packages for working with or targeting the AVR system. -;;; - (define make-avr-binutils (mlambda () (package diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index e7d0d2e406c..6fa024b2168 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -40,6 +40,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Base packages of the Guix-based GNU user-land software distribution. +;;; +;;; Code: + (define-module (gnu packages base) #:use-module ((guix licenses) #:select (gpl3+ lgpl2.0+ lgpl3+ public-domain)) @@ -90,12 +96,6 @@ canonical-package %final-inputs)) -;;; Commentary: -;;; -;;; Base packages of the Guix-based GNU user-land software distribution. -;;; -;;; Code: - (define-public hello (package (name "hello") diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm index 5555098973c..2fc70210635 100644 --- a/gnu/packages/bootstrap.scm +++ b/gnu/packages/bootstrap.scm @@ -23,6 +23,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Pre-built packages that are used to bootstrap the +;;; distribution--i.e., to build all the core packages from scratch. +;;; +;;; Code: + (define-module (gnu packages bootstrap) #:use-module (guix licenses) #:use-module (gnu packages) @@ -64,14 +71,6 @@ %bootstrap-inputs-for-tests)) -;;; Commentary: -;;; -;;; Pre-built packages that are used to bootstrap the -;;; distribution--i.e., to build all the core packages from scratch. -;;; -;;; Code: - - ;;; ;;; The bootstrap executables: 'bash', 'mkdir', 'tar', 'xz'. They allow us to diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 8ebcb405975..990930a0073 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -32,6 +32,28 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This is the commencement, this is where things start. Before the +;;; commencement, of course, there's the 'bootstrap' module, which provides us +;;; with the initial binaries. This module uses those bootstrap binaries to +;;; actually build up the whole tool chain that make up the implicit inputs of +;;; 'gnu-build-system'. +;;; +;;; To avoid circular dependencies, this module should not be imported +;;; directly from anywhere. +;;; +;;; Below, we frequently use "inherit" to create modified packages. The +;;; reason why we use "inherit" instead of "package/inherit" is because we do +;;; not want these commencement packages to inherit grafts. By definition, +;;; these packages are not depended on at run time by any of the packages we +;;; use. Thus it does not make sense to inherit grafts. Furthermore, those +;;; grafts would often lead to extra overhead for users who would end up +;;; downloading those "-boot0" packages just to build package replacements +;;; that are in fact not going to be used. +;;; +;;; Code: + (define-module (gnu packages commencement) #:use-module (gnu packages) #:use-module (gnu packages bootstrap) @@ -76,28 +98,6 @@ #:use-module (ice-9 vlist) #:use-module (ice-9 match)) -;;; Commentary: -;;; -;;; This is the commencement, this is where things start. Before the -;;; commencement, of course, there's the 'bootstrap' module, which provides us -;;; with the initial binaries. This module uses those bootstrap binaries to -;;; actually build up the whole tool chain that make up the implicit inputs of -;;; 'gnu-build-system'. -;;; -;;; To avoid circular dependencies, this module should not be imported -;;; directly from anywhere. -;;; -;;; Below, we frequently use "inherit" to create modified packages. The -;;; reason why we use "inherit" instead of "package/inherit" is because we do -;;; not want these commencement packages to inherit grafts. By definition, -;;; these packages are not depended on at run time by any of the packages we -;;; use. Thus it does not make sense to inherit grafts. Furthermore, those -;;; grafts would often lead to extra overhead for users who would end up -;;; downloading those "-boot0" packages just to build package replacements -;;; that are in fact not going to be used. -;;; -;;; Code: - (define built-in-builders* (store-lift built-in-builders)) diff --git a/gnu/packages/cross-toolchain.scm b/gnu/packages/cross-toolchain.scm index 733f7e601fe..9f3ecd87af0 100644 --- a/gnu/packages/cross-toolchain.scm +++ b/gnu/packages/cross-toolchain.scm @@ -16,11 +16,6 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . -(define-module (gnu packages cross-toolchain) - #:use-module (gnu packages cross-base) - #:use-module (gnu packages gcc) - #:use-module (guix packages)) - ;;; Commentary: ;;; ;;; This module provides packages for cross compilation toolchains. These @@ -33,6 +28,11 @@ ;;; compilation methods. For example, by using the `#:target' argument on ;;; packages or `--target' on the command line. +(define-module (gnu packages cross-toolchain) + #:use-module (gnu packages cross-base) + #:use-module (gnu packages gcc) + #:use-module (guix packages)) + (define-public gcc-cross-avr-toolchain (cross-gcc-toolchain "avr")) diff --git a/gnu/packages/dbm.scm b/gnu/packages/dbm.scm index e203d22e1ca..21af128411f 100644 --- a/gnu/packages/dbm.scm +++ b/gnu/packages/dbm.scm @@ -26,6 +26,11 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module has been separated from (gnu packages databases) to reduce the +;;; number of module references for core packages. + (define-module (gnu packages dbm) #:use-module (gnu packages) #:use-module (gnu packages autotools) @@ -37,11 +42,6 @@ #:use-module (guix utils) #:use-module (ice-9 match)) -;;; Commentary: -;;; -;;; This module has been separated from (gnu packages databases) to reduce the -;;; number of module references for core packages. - (define bdb-snippet ;; Remove some bundled and generated files. Some of the old ;; Autotools files are too old for some architectures diff --git a/gnu/packages/duckdb.scm b/gnu/packages/duckdb.scm index 4a3edf99f21..50da727239b 100644 --- a/gnu/packages/duckdb.scm +++ b/gnu/packages/duckdb.scm @@ -21,6 +21,14 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module contains DuckDB - an analytical in-process SQL database +;;; management system (https://www.duckdb.org/) and it's binding in different +;;; programming languages with other related to DuckDB packages. +;;; +;;; Code: + (define-module (gnu packages duckdb) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix build-system cmake) @@ -43,13 +51,6 @@ #:use-module (gnu packages statistics) #:use-module (gnu packages time)) -;;; Commentary: -;;; -;;; This module contains DuckDB - an analytical in-process SQL database -;;; management system (https://www.duckdb.org/) and it's binding in different -;;; programming languages with other related to DuckDB packages. -;;; -;;; Code: (define %duckdb-version "1.5.3") diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm index d163ac5a57f..43bb77ae022 100644 --- a/gnu/packages/embedded.scm +++ b/gnu/packages/embedded.scm @@ -32,6 +32,15 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This modules contains toolchain generators as well as packages for use in +;;; embedded contexts. Note: the toolchain and specialized packages are +;;; procedures, so as to delay their references to top level bindings such as +;;; 'gcc' or 'cross-gcc', etc. +;;; +;;; Code: + (define-module (gnu packages embedded) #:use-module (guix utils) #:use-module (guix packages) @@ -121,14 +130,6 @@ make-propeller-gcc-6 make-propeller-toolchain)) -;;; Commentary: -;;; -;;; This modules contains toolchain generators as well as packages for use in -;;; embedded contexts. Note: the toolchain and specialized packages are -;;; procedures, so as to delay their references to top level bindings such as -;;; 'gcc' or 'cross-gcc', etc. -;;; - ;; We must not use the released GCC sources here, because the cross-compiler ;; does not produce working binaries. Instead we take the very same SVN ;; revision from the branch that is used for a release of the "GCC ARM diff --git a/gnu/packages/gnome-circle.scm b/gnu/packages/gnome-circle.scm index 04f195180b5..1e294f55a24 100644 --- a/gnu/packages/gnome-circle.scm +++ b/gnu/packages/gnome-circle.scm @@ -25,7 +25,7 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . -;;; Comment: +;;; Commentary: ;;; This module is for packages that are part of GNOME Circle ;;; . diff --git a/gnu/packages/golang-apps.scm b/gnu/packages/golang-apps.scm index 9b856d23b5b..80ad63d8535 100644 --- a/gnu/packages/golang-apps.scm +++ b/gnu/packages/golang-apps.scm @@ -21,6 +21,18 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Golang (Go) specific applications which are not inherited from their +;;; source live here e.g linters, language servers, REPL implementations etc. +;;; +;;; If the is inherited from its source place it in corresponded +;;; golang-*.scm file in the end after the section "Executables". +;;; +;;; Please: Try to add new variable in alphabetical order. +;;; +;;; Code: + (define-module (gnu packages golang-apps) #:use-module (guix build-system go) #:use-module (guix gexp) @@ -34,17 +46,6 @@ #:use-module (gnu packages golang-web) #:use-module (gnu packages golang-xyz)) -;;; Commentary: -;;; -;;; Golang (Go) specific applications which are not inherited from their -;;; source live here e.g linters, language servers, REPL implementations etc. -;;; -;;; If the is inherited from its source place it in corresponded -;;; golang-*.scm file in the end after the section "Executables". -;;; -;;; Please: Try to add new variable in alphabetical order. -;;; -;;; Code: (define-public go-chroma (package diff --git a/gnu/packages/golang-build.scm b/gnu/packages/golang-build.scm index 9e744c50c3a..70d99a41a77 100644 --- a/gnu/packages/golang-build.scm +++ b/gnu/packages/golang-build.scm @@ -37,18 +37,6 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . -(define-module (gnu packages golang-build) - #:use-module ((guix licenses) #:prefix license:) - #:use-module (guix build-system go) - #:use-module (guix gexp) - #:use-module (guix git-download) - #:use-module (guix packages) - #:use-module (guix utils) - #:use-module (gnu packages) - #:use-module (gnu packages audio) - #:use-module (gnu packages gl) - #:use-module (gnu packages golang)) - ;;; Commentary: ;;; ;;; Modules (libraries) which are part of the Golang project but outside the @@ -61,6 +49,19 @@ ;;; Please: Try to add new module packages in alphabetic order. ;;; ;;; Code: + +(define-module (gnu packages golang-build) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix build-system go) + #:use-module (guix gexp) + #:use-module (guix git-download) + #:use-module (guix packages) + #:use-module (guix utils) + #:use-module (gnu packages) + #:use-module (gnu packages audio) + #:use-module (gnu packages gl) + #:use-module (gnu packages golang)) + (define-public go-cel-dev-expr (package diff --git a/gnu/packages/golang-check.scm b/gnu/packages/golang-check.scm index b3ef530bf22..d05e0ee2c59 100644 --- a/gnu/packages/golang-check.scm +++ b/gnu/packages/golang-check.scm @@ -45,6 +45,16 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Golang packages providing tools to unit-test, mock, assert, and lint +;;; processes for the Golang itself. They may provide executables and +;;; libraries, for which there are marked sections. +;;; +;;; Please: Try to add new module packages in alphabetic order. +;;; +;;; Code: + (define-module (gnu packages golang-check) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) @@ -59,15 +69,6 @@ #:use-module (gnu packages golang-xyz) #:use-module (gnu packages version-control)) -;;; Commentary: -;;; -;;; Golang packages providing tools to unit-test, mock, assert, and lint -;;; processes for the Golang itself. They may provide executables and -;;; libraries, for which there are marked sections. -;;; -;;; Please: Try to add new module packages in alphabetic order. -;;; -;;; Code: ;;; ;;; Libraries: diff --git a/gnu/packages/golang-compression.scm b/gnu/packages/golang-compression.scm index 2ea0b01110a..ee406036571 100644 --- a/gnu/packages/golang-compression.scm +++ b/gnu/packages/golang-compression.scm @@ -23,6 +23,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Please: Try to add new module packages in alphabetic order. +;;; +;;; Code: + (define-module (gnu packages golang-compression) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix build-system go) @@ -38,11 +44,6 @@ #:use-module (gnu packages golang-xyz) #:use-module (gnu packages pkg-config)) -;;; Commentary: -;;; -;;; Please: Try to add new module packages in alphabetic order. -;;; -;;; Code: (define-public go-code-forgejo-org-forgejo-go-rpmutils (package diff --git a/gnu/packages/golang-crypto.scm b/gnu/packages/golang-crypto.scm index 7e54b4d9818..d197029bfdf 100644 --- a/gnu/packages/golang-crypto.scm +++ b/gnu/packages/golang-crypto.scm @@ -48,6 +48,16 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Golang modules (libraries) related to Cryptography: encryption algorithms, +;;; hashing functions, TLS, key management, digital signatures, password +;;; hashing etc. +;;; +;;; Please: Try to add new module packages in alphabetic order. +;;; +;;; Code: + (define-module (gnu packages golang-crypto) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix build-system go) @@ -70,15 +80,6 @@ #:use-module (gnu packages specifications) #:use-module (gnu packages tls)) -;;; Commentary: -;;; -;;; Golang modules (libraries) related to Cryptography: encryption algorithms, -;;; hashing functions, TLS, key management, digital signatures, password -;;; hashing etc. -;;; -;;; Please: Try to add new module packages in alphabetic order. -;;; -;;; Code: ;;; ;;; Libraries: diff --git a/gnu/packages/golang-graphics.scm b/gnu/packages/golang-graphics.scm index 725ffad1b77..6dadb0e3746 100644 --- a/gnu/packages/golang-graphics.scm +++ b/gnu/packages/golang-graphics.scm @@ -18,6 +18,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Please: Try to add new module packages in alphabetic order. +;;; +;;; Code: + (define-module (gnu packages golang-graphics) #:use-module (guix build-system go) #:use-module (guix gexp) @@ -33,11 +39,6 @@ #:use-module (gnu packages pkg-config) #:use-module (gnu packages xorg)) -;;; Commentary: -;;; -;;; Please: Try to add new module packages in alphabetic order. -;;; -;;; Code: ;;; ;;; Libraries: diff --git a/gnu/packages/golang-maths.scm b/gnu/packages/golang-maths.scm index 71d3e3c6e52..895557a6dbb 100644 --- a/gnu/packages/golang-maths.scm +++ b/gnu/packages/golang-maths.scm @@ -20,6 +20,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Please: Try to add new module packages in alphabetic order. +;;; +;;; Code: + (define-module (gnu packages golang-maths) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix build-system go) @@ -33,11 +39,6 @@ #:use-module (gnu packages golang-check) #:use-module (gnu packages golang-compression)) -;;; Commentary: -;;; -;;; Please: Try to add new module packages in alphabetic order. -;;; -;;; Code: ;;; ;;; Libraries: diff --git a/gnu/packages/golang-vcs.scm b/gnu/packages/golang-vcs.scm index d74be58bf26..f1374c8d5dc 100644 --- a/gnu/packages/golang-vcs.scm +++ b/gnu/packages/golang-vcs.scm @@ -21,6 +21,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Please: Try to add new module packages in alphabetic order. +;;; +;;; Code: + (define-module (gnu packages golang-vcs) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix build-system go) @@ -43,11 +49,6 @@ #:use-module (gnu packages python-check) #:use-module (gnu packages version-control)) -;;; Commentary: -;;; -;;; Please: Try to add new module packages in alphabetic order. -;;; -;;; Code: ;;; ;;; Libraries: diff --git a/gnu/packages/golang-web.scm b/gnu/packages/golang-web.scm index 320e15dc863..a673448d5cf 100644 --- a/gnu/packages/golang-web.scm +++ b/gnu/packages/golang-web.scm @@ -68,6 +68,19 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Golang modules (libraries) for Web related projects: HTML, CSS, SCSS, +;;; JavaScript, JSON, Web-framework, REST-API or similar functionality; for +;;; Network related projects: OSI layers implementation algorithms, MIME, +;;; Email protocols implementations, and similar. They may provide +;;; executables and libraries, for which there are marked sections. + +;;; +;;; Please: Try to add new module packages in alphabetic order. +;;; +;;; Code: + (define-module (gnu packages golang-web) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) @@ -91,18 +104,6 @@ #:use-module (gnu packages tls) #:use-module (gnu packages web)) -;;; Commentary: -;;; -;;; Golang modules (libraries) for Web related projects: HTML, CSS, SCSS, -;;; JavaScript, JSON, Web-framework, REST-API or similar functionality; for -;;; Network related projects: OSI layers implementation algorithms, MIME, -;;; Email protocols implementations, and similar. They may provide -;;; executables and libraries, for which there are marked sections. - -;;; -;;; Please: Try to add new module packages in alphabetic order. -;;; -;;; Code: ;;; ;;; Libraries: diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm index d465888f8ac..eca17e73700 100644 --- a/gnu/packages/golang-xyz.scm +++ b/gnu/packages/golang-xyz.scm @@ -99,6 +99,20 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Nomad Golang modules (libraries) are welcome here. +;;; +;;; There are two sections her: Libraries - for any source only Golang +;;; libraries which are meant to be imported by other packages; Executables - +;;; should contain inherited packages where commands need to be built. +;;; +;;; Please: Try to add new module packages in alphabetic order and avoid stand +;;; alone final executables which are not inherited from sources presented in +;;; this module. +;;; +;;; Code: + (define-module (gnu packages golang-xyz) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix build-system go) @@ -140,19 +154,6 @@ #:use-module (gnu packages kubernetes) #:use-module (gnu packages prometheus)) -;;; Commentary: -;;; -;;; Nomad Golang modules (libraries) are welcome here. -;;; -;;; There are two sections her: Libraries - for any source only Golang -;;; libraries which are meant to be imported by other packages; Executables - -;;; should contain inherited packages where commands need to be built. -;;; -;;; Please: Try to add new module packages in alphabetic order and avoid stand -;;; alone final executables which are not inherited from sources presented in -;;; this module. -;;; -;;; Code: ;;; ;;; Libraries: diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm index ba46a34bd91..58c1598bb38 100644 --- a/gnu/packages/guile.scm +++ b/gnu/packages/guile.scm @@ -34,6 +34,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; GNU Guile, and modules and extensions. +;;; +;;; Code: + (define-module (gnu packages guile) #:use-module ((guix licenses) #:prefix license:) #:use-module (gnu packages) @@ -67,12 +73,6 @@ #:use-module (guix deprecation) #:use-module (guix utils)) -;;; Commentary: -;;; -;;; GNU Guile, and modules and extensions. -;;; -;;; Code: - (define-public guile-1.8 (package (name "guile") diff --git a/gnu/packages/ld-wrapper.in b/gnu/packages/ld-wrapper.in index c9bb235bca5..61d65b262d9 100644 --- a/gnu/packages/ld-wrapper.in +++ b/gnu/packages/ld-wrapper.in @@ -39,12 +39,6 @@ exec @GUILE@ -c "(load-compiled \"@SELF@.go\") ($main (command-line))" "$@" ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . -(define-module (gnu build-support ld-wrapper) - #:use-module (srfi srfi-1) - #:use-module (ice-9 match) - #:autoload (ice-9 rdelim) (read-delimited) - #:export (ld-wrapper)) - ;;; Commentary: ;;; ;;; This is a wrapper for the linker. Its purpose is to inspect the -L and @@ -70,6 +64,12 @@ exec @GUILE@ -c "(load-compiled \"@SELF@.go\") ($main (command-line))" "$@" ;;; ;;; Code: +(define-module (gnu build-support ld-wrapper) + #:use-module (srfi srfi-1) + #:use-module (ice-9 match) + #:autoload (ice-9 rdelim) (read-delimited) + #:export (ld-wrapper)) + (define %real-ld ;; Name of the linker that we wrap. "@LD@") diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm index de1dd6ebd22..71eedb138ac 100644 --- a/gnu/packages/make-bootstrap.scm +++ b/gnu/packages/make-bootstrap.scm @@ -23,6 +23,14 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module provides tools to build tarballs of the "bootstrap binaries" +;;; used in (gnu packages bootstrap). These statically-linked binaries are +;;; taken for granted and used as the root of the whole bootstrap procedure. +;;; +;;; Code: + (define-module (gnu packages make-bootstrap) #:use-module (guix gexp) #:use-module (guix utils) @@ -58,14 +66,6 @@ %guile-static-stripped %guile-static-initrd)) -;;; Commentary: -;;; -;;; This module provides tools to build tarballs of the "bootstrap binaries" -;;; used in (gnu packages bootstrap). These statically-linked binaries are -;;; taken for granted and used as the root of the whole bootstrap procedure. -;;; -;;; Code: - (define glibc-for-bootstrap (mlambdaq (base) "Return a libc deriving from BASE whose `system' and `popen' functions looks diff --git a/gnu/packages/prometheus.scm b/gnu/packages/prometheus.scm index 910ee9e3c9e..1ab3f367217 100644 --- a/gnu/packages/prometheus.scm +++ b/gnu/packages/prometheus.scm @@ -24,6 +24,15 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Libraries and commands related to, or provided by Prometheus project +;;; . +;;; +;;; Please: Try to add new module packages in alphabetic order. +;;; +;;; Code: + (define-module (gnu packages prometheus) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix build-system go) @@ -40,14 +49,6 @@ #:use-module (gnu packages golang-web) #:use-module (gnu packages golang-xyz)) -;;; Commentary: -;;; -;;; Libraries and commands related to, or provided by Prometheus project -;;; . -;;; -;;; Please: Try to add new module packages in alphabetic order. -;;; -;;; Code: ;;; ;;; Libraries: diff --git a/gnu/packages/python-build.scm b/gnu/packages/python-build.scm index 69da97a8bc4..433bee7bf71 100644 --- a/gnu/packages/python-build.scm +++ b/gnu/packages/python-build.scm @@ -38,6 +38,14 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Python packages to build... Python packages. Since they are bound to be +;;; relied on by many, their dependencies should be kept minimal, and this +;;; module should not depend on other modules containing Python packages. +;;; +;;; Code: + (define-module (gnu packages python-build) #:use-module (gnu packages) #:use-module (gnu packages bash) @@ -50,14 +58,6 @@ #:use-module (guix git-download) #:use-module (guix packages)) -;;; Commentary: -;;; -;;; Python packages to build... Python packages. Since they are bound to be -;;; relied on by many, their dependencies should be kept minimal, and this -;;; module should not depend on other modules containing Python packages. -;;; -;;; Code: - ;;; These are dependencies used by the build systems contained herein; they ;;; feel a bit out of place but are kept here to prevent circular module diff --git a/gnu/packages/python-graphics.scm b/gnu/packages/python-graphics.scm index e7e07302af8..57e35610c21 100644 --- a/gnu/packages/python-graphics.scm +++ b/gnu/packages/python-graphics.scm @@ -29,6 +29,15 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Python modules which are meant to be used in GUI creation or mainly are +;;; bindings to low level libraries such as Glue, Mesa, OpenGL, Xorg etc. +;;; +;;; Please: Try to add new module packages in alphabetic order. +;;; +;;; Code: + (define-module (gnu packages python-graphics) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix build-system pyproject) @@ -68,14 +77,6 @@ #:use-module (gnu packages video) #:use-module (gnu packages xorg)) -;;; Commentary: -;;; -;;; Python modules which are meant to be used in GUI creation or mainly are -;;; bindings to low level libraries such as Glue, Mesa, OpenGL, Xorg etc. -;;; -;;; Please: Try to add new module packages in alphabetic order. -;;; -;;; Code: (define-public python-asyncgui (package diff --git a/gnu/packages/quantum.scm b/gnu/packages/quantum.scm index 908a51773a4..5ca1846e353 100644 --- a/gnu/packages/quantum.scm +++ b/gnu/packages/quantum.scm @@ -18,6 +18,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Quantum computing and tensor operation module. For quantum mechanics +;;; select (gnu packages physics) module. +;;; +;;; Code: + (define-module (gnu packages quantum) #:use-module (gnu packages) #:use-module (gnu packages check) @@ -35,12 +42,6 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages)) -;;; Commentary: -;;; -;;; Quantum computing and tensor operation module. For quantum mechanics -;;; select (gnu packages physics) module. -;;; -;;; Code: (define %cirq-version "1.7.0") diff --git a/gnu/packages/ruby-check.scm b/gnu/packages/ruby-check.scm index 6535d8fd6e4..0406cf3fd2e 100644 --- a/gnu/packages/ruby-check.scm +++ b/gnu/packages/ruby-check.scm @@ -48,6 +48,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Please: Try to add new module packages in alphabetic order. +;;; +;;; Code: + (define-module (gnu packages ruby-check) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix build-system ruby) @@ -61,11 +67,6 @@ #:use-module (gnu packages ruby) #:use-module (gnu packages ruby-xyz)) -;;; Commentary: -;;; -;;; Please: Try to add new module packages in alphabetic order. -;;; -;;; Code: ;; Bundler is yet another source of circular dependencies, so we must disable diff --git a/gnu/packages/sqlite.scm b/gnu/packages/sqlite.scm index 24a5f741ed3..972e84a6c44 100644 --- a/gnu/packages/sqlite.scm +++ b/gnu/packages/sqlite.scm @@ -31,6 +31,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module has been separated from (gnu packages databases) to reduce the +;;; number of module references for core packages. +;;; +;;; Code: + (define-module (gnu packages sqlite) #:use-module (gnu packages) #:use-module (gnu packages hurd) @@ -45,11 +52,6 @@ #:use-module (ice-9 match) #:use-module (srfi srfi-26)) -;;; Commentary: -;;; -;;; This module has been separated from (gnu packages databases) to reduce the -;;; number of module references for core packages. - (define (sqlite-uri version year) (let ((numeric-version (match (string-split version #\.) diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm index b8b55242eb4..6d961151d54 100644 --- a/gnu/packages/tex.scm +++ b/gnu/packages/tex.scm @@ -48,76 +48,6 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . -(define-module (gnu packages tex) - #:use-module ((guix licenses) #:prefix license:) - #:use-module (guix gexp) - #:use-module (guix packages) - #:use-module (guix download) - #:use-module (guix build-system copy) - #:use-module (guix build-system gnu) - #:use-module (guix build-system perl) - #:use-module (guix build-system pyproject) - #:use-module (guix build-system qt) - #:use-module (guix build-system trivial) - #:use-module (guix build-system texlive) - #:use-module (guix utils) - #:use-module (guix deprecation) - #:use-module (guix gexp) - #:use-module (guix git-download) - #:use-module (guix svn-download) - #:use-module (gnu packages) - #:use-module (gnu packages algebra) - #:use-module (gnu packages aspell) - #:use-module (gnu packages autotools) - #:use-module (gnu packages bash) - #:use-module (gnu packages boost) - #:use-module (gnu packages check) - #:use-module (gnu packages compression) - #:use-module (gnu packages cmake) - #:use-module (gnu packages cpp) - #:use-module (gnu packages digest) - #:use-module (gnu packages lisp) - #:use-module (gnu packages fonts) - #:use-module (gnu packages fontutils) - #:use-module (gnu packages gd) - #:use-module (gnu packages ghostscript) - #:use-module (gnu packages graphviz) - #:use-module (gnu packages groff) - #:use-module (gnu packages gtk) - #:use-module (gnu packages icu4c) - #:use-module (gnu packages image) - #:use-module (gnu packages java) - #:use-module (gnu packages libreoffice) - #:use-module (gnu packages lua) - #:use-module (gnu packages maths) - #:use-module (gnu packages multiprecision) - #:use-module (gnu packages pdf) - #:use-module (gnu packages perl) - #:use-module (gnu packages perl-check) - #:use-module (gnu packages pkg-config) - #:use-module (gnu packages plotutils) - #:use-module (gnu packages python) - #:use-module (gnu packages python-build) - #:use-module (gnu packages python-xyz) - #:use-module (gnu packages qt) - #:use-module (gnu packages readline) - #:use-module (gnu packages ruby) - #:use-module (gnu packages ruby-xyz) - #:use-module (gnu packages shells) - #:use-module (gnu packages tcl) - #:use-module (gnu packages time) - #:use-module (gnu packages tls) - #:use-module (gnu packages base) - #:use-module (gnu packages gawk) - #:use-module (gnu packages web) - #:use-module (gnu packages xml) - #:use-module (gnu packages xorg) - #:use-module (gnu packages xdisorg) - #:use-module (gnu packages texinfo) - #:use-module (ice-9 ftw) - #:use-module (ice-9 match) - #:use-module ((srfi srfi-1) #:hide (zip))) - ;;; Commentary: ;;; ;;; Guix provides two different TeX Live systems: one monolithic, the TEXLIVE @@ -270,6 +200,76 @@ ;;; ;;; Code: +(define-module (gnu packages tex) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix gexp) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system copy) + #:use-module (guix build-system gnu) + #:use-module (guix build-system perl) + #:use-module (guix build-system pyproject) + #:use-module (guix build-system qt) + #:use-module (guix build-system trivial) + #:use-module (guix build-system texlive) + #:use-module (guix utils) + #:use-module (guix deprecation) + #:use-module (guix gexp) + #:use-module (guix git-download) + #:use-module (guix svn-download) + #:use-module (gnu packages) + #:use-module (gnu packages algebra) + #:use-module (gnu packages aspell) + #:use-module (gnu packages autotools) + #:use-module (gnu packages bash) + #:use-module (gnu packages boost) + #:use-module (gnu packages check) + #:use-module (gnu packages compression) + #:use-module (gnu packages cmake) + #:use-module (gnu packages cpp) + #:use-module (gnu packages digest) + #:use-module (gnu packages lisp) + #:use-module (gnu packages fonts) + #:use-module (gnu packages fontutils) + #:use-module (gnu packages gd) + #:use-module (gnu packages ghostscript) + #:use-module (gnu packages graphviz) + #:use-module (gnu packages groff) + #:use-module (gnu packages gtk) + #:use-module (gnu packages icu4c) + #:use-module (gnu packages image) + #:use-module (gnu packages java) + #:use-module (gnu packages libreoffice) + #:use-module (gnu packages lua) + #:use-module (gnu packages maths) + #:use-module (gnu packages multiprecision) + #:use-module (gnu packages pdf) + #:use-module (gnu packages perl) + #:use-module (gnu packages perl-check) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages plotutils) + #:use-module (gnu packages python) + #:use-module (gnu packages python-build) + #:use-module (gnu packages python-xyz) + #:use-module (gnu packages qt) + #:use-module (gnu packages readline) + #:use-module (gnu packages ruby) + #:use-module (gnu packages ruby-xyz) + #:use-module (gnu packages shells) + #:use-module (gnu packages tcl) + #:use-module (gnu packages time) + #:use-module (gnu packages tls) + #:use-module (gnu packages base) + #:use-module (gnu packages gawk) + #:use-module (gnu packages web) + #:use-module (gnu packages xml) + #:use-module (gnu packages xorg) + #:use-module (gnu packages xdisorg) + #:use-module (gnu packages texinfo) + #:use-module (ice-9 ftw) + #:use-module (ice-9 match) + #:use-module ((srfi srfi-1) #:hide (zip))) + (define-public texlive-source (package (name "texlive-source") diff --git a/gnu/packages/toys.scm b/gnu/packages/toys.scm index 96824438c17..0c35bd8015c 100644 --- a/gnu/packages/toys.scm +++ b/gnu/packages/toys.scm @@ -25,6 +25,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Please: Try to add new module packages in alphabetic order. +;;; +;;; Code: + (define-module (gnu packages toys) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix build-system copy) @@ -54,11 +60,6 @@ #:use-module (gnu packages xml) #:use-module (gnu packages xorg)) -;;; Commentary: -;;; -;;; Please: Try to add new module packages in alphabetic order. -;;; -;;; Code: (define-public cbonsai (package diff --git a/gnu/services.scm b/gnu/services.scm index 097bfed5f1b..5f987f55a52 100644 --- a/gnu/services.scm +++ b/gnu/services.scm @@ -26,6 +26,31 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module defines a broad notion of "service types" and "services." +;;; +;;; A service type describe how its instances extend instances of other +;;; service types. For instance, some services extend the instance of +;;; ACCOUNT-SERVICE-TYPE by providing it with accounts and groups to create; +;;; others extend SHEPHERD-ROOT-SERVICE-TYPE by passing it instances of +;;; . +;;; +;;; When applicable, the service type defines how it can itself be extended, +;;; by providing one procedure to compose extensions, and one procedure to +;;; extend itself. +;;; +;;; A notable service type is SYSTEM-SERVICE-TYPE, which has a single +;;; instance, which is the root of the service DAG. Its value is the +;;; derivation that produces the 'system' directory as returned by +;;; 'operating-system-derivation'. +;;; +;;; The 'fold-services' procedure can be passed a list of procedures, which it +;;; "folds" by propagating extensions down the graph; it returns the root +;;; service after the applying all its extensions. +;;; +;;; Code: + (define-module (gnu services) #:use-module (guix derivations) #:use-module (guix gexp) @@ -149,31 +174,6 @@ ;; . delete)) -;;; Comment: -;;; -;;; This module defines a broad notion of "service types" and "services." -;;; -;;; A service type describe how its instances extend instances of other -;;; service types. For instance, some services extend the instance of -;;; ACCOUNT-SERVICE-TYPE by providing it with accounts and groups to create; -;;; others extend SHEPHERD-ROOT-SERVICE-TYPE by passing it instances of -;;; . -;;; -;;; When applicable, the service type defines how it can itself be extended, -;;; by providing one procedure to compose extensions, and one procedure to -;;; extend itself. -;;; -;;; A notable service type is SYSTEM-SERVICE-TYPE, which has a single -;;; instance, which is the root of the service DAG. Its value is the -;;; derivation that produces the 'system' directory as returned by -;;; 'operating-system-derivation'. -;;; -;;; The 'fold-services' procedure can be passed a list of procedures, which it -;;; "folds" by propagating extensions down the graph; it returns the root -;;; service after the applying all its extensions. -;;; -;;; Code: - (define-record-type (service-extension target compute) service-extension? diff --git a/gnu/services/admin.scm b/gnu/services/admin.scm index 907f7d37f4a..bad9d38e369 100644 --- a/gnu/services/admin.scm +++ b/gnu/services/admin.scm @@ -21,6 +21,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module provides basic system administration tools: log rotation, +;;; unattended upgrades, etc. +;;; +;;; Code: + (define-module (gnu services admin) #:use-module (gnu system file-systems) #:use-module (gnu packages admin) @@ -102,13 +109,6 @@ resize-file-system-configuration-btrfs-progs resize-file-system-configuration-bcachefs-tools)) -;;; Commentary: -;;; -;;; This module provides basic system administration tools: log rotation, -;;; unattended upgrades, etc. -;;; -;;; Code: - ;;; ;;; Shepherd's log rotation service. diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index 2981b89ed8c..2e17c02513b 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -19,6 +19,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Audio related services +;;; +;;; Code: + (define-module (gnu services audio) #:use-module (guix gexp) #:use-module (guix deprecation) @@ -163,12 +169,6 @@ snapserver-configuration-extra-content snapserver-service-type)) -;;; Commentary: -;;; -;;; Audio related services -;;; -;;; Code: - (define (uglify-field-name field-name) (let ((str (symbol->string field-name))) (string-join (string-split (if (string-suffix? "?" str) diff --git a/gnu/services/avahi.scm b/gnu/services/avahi.scm index d0e6fedf59d..77d6f950b9f 100644 --- a/gnu/services/avahi.scm +++ b/gnu/services/avahi.scm @@ -16,6 +16,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module provides service definitions for the Avahi +;;; "zero-configuration" tool set. +;;; +;;; Code: + (define-module (gnu services avahi) #:use-module (gnu services) #:use-module (gnu services base) @@ -42,13 +49,6 @@ avahi-service-type)) -;;; Commentary: -;;; -;;; This module provides service definitions for the Avahi -;;; "zero-configuration" tool set. -;;; -;;; Code: - (define-record-type* avahi-configuration make-avahi-configuration avahi-configuration? diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 5108187d1ee..4bfc484b898 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -40,6 +40,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Base system services---i.e., services that 99% of the users will want to +;;; use. +;;; +;;; Code: + (define-module (gnu services base) #:use-module (guix store) #:use-module (guix deprecation) @@ -321,13 +328,6 @@ %base-services)) -;;; Commentary: -;;; -;;; Base system services---i.e., services that 99% of the users will want to -;;; use. -;;; -;;; Code: - ;;; diff --git a/gnu/services/certbot.scm b/gnu/services/certbot.scm index 7a7c2a9e00e..f1ab9149f6a 100644 --- a/gnu/services/certbot.scm +++ b/gnu/services/certbot.scm @@ -24,6 +24,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Automatically obtaining TLS certificates from Let's Encrypt. +;;; +;;; Code: + (define-module (gnu services certbot) #:use-module (gnu services) #:use-module (gnu services base) @@ -42,12 +48,6 @@ certbot-configuration? certificate-configuration)) -;;; Commentary: -;;; -;;; Automatically obtaining TLS certificates from Let's Encrypt. -;;; -;;; Code: - (define-record-type* certificate-configuration make-certificate-configuration diff --git a/gnu/services/cgit.scm b/gnu/services/cgit.scm index 684ab73f76d..f2d1be04f05 100644 --- a/gnu/services/cgit.scm +++ b/gnu/services/cgit.scm @@ -19,6 +19,16 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module provides a service definition for the Cgit a web frontend for +;;; Git repositories written in C. +;;; +;;; Note: fields of and +;;; should be specified in the specific order. +;;; +;;; Code: + (define-module (gnu services cgit) #:use-module (gnu packages admin) #:use-module (gnu packages version-control) @@ -42,16 +52,6 @@ opaque-cgit-configuration cgit-service-type)) -;;; Commentary: -;;; -;;; This module provides a service definition for the Cgit a web frontend for -;;; Git repositories written in C. -;;; -;;; Note: fields of and -;;; should be specified in the specific order. -;;; -;;; Code: - (define %cgit-configuration-nginx (nginx-server-configuration (root cgit) diff --git a/gnu/services/ci.scm b/gnu/services/ci.scm index 08416e99620..61c0166eed2 100644 --- a/gnu/services/ci.scm +++ b/gnu/services/ci.scm @@ -19,6 +19,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;;; Commentary: +;;; +;;; This module implements a service that to run instances of Laminar, a +;;; continuous integration tool. +;;; +;;;; Code: + (define-module (gnu services ci) #:use-module (guix gexp) #:use-module (guix records) @@ -59,13 +66,6 @@ forgejo-runner-service-type)) -;;;; Commentary: -;;; -;;; This module implements a service that to run instances of Laminar, a -;;; continuous integration tool. -;;; -;;;; Code: - (define-record-type* laminar-configuration make-laminar-configuration laminar-configuration? diff --git a/gnu/services/configuration.scm b/gnu/services/configuration.scm index d42f04f1161..956f4451fd1 100644 --- a/gnu/services/configuration.scm +++ b/gnu/services/configuration.scm @@ -24,6 +24,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Syntax for creating Scheme bindings to complex configuration files. +;;; +;;; Code: + (define-module (gnu services configuration) #:use-module (guix packages) #:use-module (guix records) @@ -92,12 +98,6 @@ generic-serialize-alist-entry generic-serialize-alist)) -;;; Commentary: -;;; -;;; Syntax for creating Scheme bindings to complex configuration files. -;;; -;;; Code: - (define-condition-type &configuration-error &error configuration-error?) diff --git a/gnu/services/cuirass.scm b/gnu/services/cuirass.scm index b594fe78d7a..77d7cab96ce 100644 --- a/gnu/services/cuirass.scm +++ b/gnu/services/cuirass.scm @@ -21,6 +21,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;;; Commentary: +;;; +;;; This module implements a service that to run instances of Cuirass, a +;;; continuous integration tool. +;;; +;;;; Code: + (define-module (gnu services cuirass) #:use-module (guix channels) #:use-module (guix gexp) @@ -50,13 +57,6 @@ cuirass-remote-worker-configuration? cuirass-remote-worker-service-type)) -;;;; Commentary: -;;; -;;; This module implements a service that to run instances of Cuirass, a -;;; continuous integration tool. -;;; -;;;; Code: - (define %cuirass-default-database "dbname=cuirass") diff --git a/gnu/services/cups.scm b/gnu/services/cups.scm index 27aac7a16ac..e2102a07f8b 100644 --- a/gnu/services/cups.scm +++ b/gnu/services/cups.scm @@ -22,6 +22,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Service defininition for the CUPS printing system. +;;; +;;; Code: + (define-module (gnu services cups) #:use-module (gnu services) #:use-module (gnu services shepherd) @@ -47,12 +53,6 @@ operation-access-control method-access-control)) -;;; Commentary: -;;; -;;; Service defininition for the CUPS printing system. -;;; -;;; Code: - (define %cups-accounts (list (or ;; The "lp" group should already exist; try to reuse it. diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm index 6742032f112..9ee30192eb5 100644 --- a/gnu/services/databases.scm +++ b/gnu/services/databases.scm @@ -28,6 +28,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Database services. +;;; +;;; Code: + (define-module (gnu services databases) #:use-module (gnu services) #:use-module (gnu services base) @@ -106,12 +112,6 @@ redis-configuration? redis-service-type)) -;;; Commentary: -;;; -;;; Database services. -;;; -;;; Code: - (define %default-postgres-hba (plain-file "pg_hba.conf" " diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index c9fe5024319..e481361b9e6 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -40,6 +40,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module contains service definitions for a "desktop" environment. +;;; +;;; Code: + (define-module (gnu services desktop) #:use-module ((gnu home services utils) #:select (object->camel-case-string)) #:use-module (gnu services) @@ -243,12 +249,6 @@ %desktop-services)) -;;; Commentary: -;;; -;;; This module contains service definitions for a "desktop" environment. -;;; -;;; Code: - ;;; ;;; Helpers. diff --git a/gnu/services/getmail.scm b/gnu/services/getmail.scm index b44ca2ae3de..bea61d21a00 100644 --- a/gnu/services/getmail.scm +++ b/gnu/services/getmail.scm @@ -16,6 +16,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Service for the getmail mail retriever. +;;; +;;; Code: + (define-module (gnu services getmail) #:use-module (gnu services) #:use-module (gnu services base) @@ -41,12 +47,6 @@ getmail-configuration getmail-service-type)) -;;; Commentary: -;;; -;;; Service for the getmail mail retriever. -;;; -;;; Code: - (define (uglify-field-name field-name) (let ((str (symbol->string field-name))) (string-join (string-split (if (string-suffix? "?" str) diff --git a/gnu/services/guix.scm b/gnu/services/guix.scm index adf4990fde4..93f526d1c08 100644 --- a/gnu/services/guix.scm +++ b/gnu/services/guix.scm @@ -19,6 +19,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;;; Commentary: +;;; +;;; Services specifically related to GNU Guix. +;;; +;;;; Code: + (define-module (gnu services guix) #:use-module (srfi srfi-1) #:use-module (ice-9 match) @@ -165,12 +171,6 @@ shared-cache-configuration user-cache)) -;;;; Commentary: -;;; -;;; Services specifically related to GNU Guix. -;;; -;;;; Code: - (define-record-type* guix-build-coordinator-configuration make-guix-build-coordinator-configuration guix-build-coordinator-configuration? diff --git a/gnu/services/herd.scm b/gnu/services/herd.scm index d276ba1b74c..777a8f8a3ae 100644 --- a/gnu/services/herd.scm +++ b/gnu/services/herd.scm @@ -18,6 +18,15 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module provides an interface to the GNU Shepherd, similar to the +;;; 'herd' command. Essentially it implements a subset of the (shepherd comm) +;;; module, but focusing only on the parts relevant to 'guix system +;;; reconfigure'. +;;; +;;; Code: + (define-module (gnu services herd) #:use-module (srfi srfi-1) #:use-module (srfi srfi-9) @@ -63,15 +72,6 @@ restart-service wait-for-service)) -;;; Commentary: -;;; -;;; This module provides an interface to the GNU Shepherd, similar to the -;;; 'herd' command. Essentially it implements a subset of the (shepherd comm) -;;; module, but focusing only on the parts relevant to 'guix system -;;; reconfigure'. -;;; -;;; Code: - (define %shepherd-socket-file (let ((uid (getuid))) (make-parameter (if (zero? uid) ;root diff --git a/gnu/services/hurd.scm b/gnu/services/hurd.scm index 1ee38e8cd01..53fdfb86043 100644 --- a/gnu/services/hurd.scm +++ b/gnu/services/hurd.scm @@ -16,6 +16,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module implements services for the Hurd. +;;; +;;; Code: + (define-module (gnu services hurd) #:use-module (gnu packages admin) #:use-module (gnu packages hurd) @@ -33,12 +39,6 @@ hurd-login-configuration hurd-login-service-type)) -;;; Commentary: -;;; -;;; This module implements services for the Hurd. -;;; -;;; Code: - ;;; ;;; The Hurd VGA console service. ;;; diff --git a/gnu/services/lirc.scm b/gnu/services/lirc.scm index 92784b65ca6..923cf83137a 100644 --- a/gnu/services/lirc.scm +++ b/gnu/services/lirc.scm @@ -17,6 +17,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; LIRC service. +;;; +;;; Code: + (define-module (gnu services lirc) #:use-module (gnu services) #:use-module (gnu services shepherd) @@ -30,12 +36,6 @@ lirc-service ; deprecated lirc-service-type)) -;;; Commentary: -;;; -;;; LIRC service. -;;; -;;; Code: - (define-record-type* lirc-configuration make-lirc-configuration lirc-configuation? diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm index d31cad5645d..93eea095853 100644 --- a/gnu/services/mail.scm +++ b/gnu/services/mail.scm @@ -27,6 +27,13 @@ ;;; ;;; Some of the help text was taken from the default dovecot.conf files. +;;; Commentary: +;;; +;;; This module provides service definitions for the Dovecot POP3 and IMAP +;;; mail server. +;;; +;;; Code: + (define-module (gnu services mail) #:use-module (gnu services) #:use-module (gnu services base) @@ -105,13 +112,6 @@ %default-rspamd-config-file %default-rspamd-group)) -;;; Commentary: -;;; -;;; This module provides service definitions for the Dovecot POP3 and IMAP -;;; mail server. -;;; -;;; Code: - (define (uglify-field-name field-name) (let ((str (symbol->string field-name))) (string-join (string-split (if (string-suffix? "?" str) diff --git a/gnu/services/mcron.scm b/gnu/services/mcron.scm index 68d02ef4d7c..c8099480b84 100644 --- a/gnu/services/mcron.scm +++ b/gnu/services/mcron.scm @@ -18,6 +18,21 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module implements a service that to run instances of GNU mcron, a +;;; periodic job execution daemon. Example of a service: +;; +;; (service mcron-service-type +;; (mcron-configuration +;; (jobs (list #~(job next-second-from +;; (lambda () +;; (call-with-output-file "/dev/console" +;; (lambda (port) +;; (display "hello!\n" port))))))))) +;;; +;;; Code: + (define-module (gnu services mcron) #:use-module (gnu services) #:use-module (gnu services shepherd) @@ -39,21 +54,6 @@ mcron-service-type)) -;;; Commentary: -;;; -;;; This module implements a service that to run instances of GNU mcron, a -;;; periodic job execution daemon. Example of a service: -;; -;; (service mcron-service-type -;; (mcron-configuration -;; (jobs (list #~(job next-second-from -;; (lambda () -;; (call-with-output-file "/dev/console" -;; (lambda (port) -;; (display "hello!\n" port))))))))) -;;; -;;; Code: - ;; Configuration of mcron. ;; XXX: 'define-configuration' cannot be used here due to the need for ;; 'thunked' and 'innate' fields as well as 'this-mcron-configuration'. diff --git a/gnu/services/messaging.scm b/gnu/services/messaging.scm index 0be175d8af2..79c8d2a312c 100644 --- a/gnu/services/messaging.scm +++ b/gnu/services/messaging.scm @@ -22,6 +22,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Messaging services. +;;; +;;; Code: + (define-module (gnu services messaging) #:use-module ((gnu home services utils) #:select (object->camel-case-string)) #:use-module (gnu packages admin) @@ -254,12 +260,6 @@ zulip-irc-bridge-configuration zulip-irc-bridge-service-type)) -;;; Commentary: -;;; -;;; Messaging services. -;;; -;;; Code: - (define-syntax define-all-configurations (lambda (stx) (define-syntax-rule (id ctx parts ...) diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index 752f3e3e890..5cce50010dd 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -41,6 +41,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Networking services. +;;; +;;; Code: + (define-module (gnu services networking) #:use-module (gnu home services utils) #:use-module (gnu services) @@ -308,12 +314,6 @@ keepalived-configuration? keepalived-service-type)) -;;; Commentary: -;;; -;;; Networking services. -;;; -;;; Code: - (define %unroutable-ipv4 ;; Unroutable address, as per . "203.0.113.1") diff --git a/gnu/services/nix.scm b/gnu/services/nix.scm index 83ba78ce7e6..46f5c975056 100644 --- a/gnu/services/nix.scm +++ b/gnu/services/nix.scm @@ -17,6 +17,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module provides a service definition for the Nix daemon. +;;; +;;; Code: + (define-module (gnu services nix) #:use-module (gnu packages admin) #:use-module (gnu packages bash) @@ -42,12 +48,6 @@ nix-configuration nix-configuration?)) -;;; Commentary: -;;; -;;; This module provides a service definition for the Nix daemon. -;;; -;;; Code: - (define-record-type* nix-configuration make-nix-configuration nix-configuration? diff --git a/gnu/services/rsync.scm b/gnu/services/rsync.scm index c9de8e710c0..fcdfed34db2 100644 --- a/gnu/services/rsync.scm +++ b/gnu/services/rsync.scm @@ -18,6 +18,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;;; Commentary: +;;; +;;; This module implements a service that to run instance of Rsync, +;;; files synchronization tool. +;;; +;;;; Code: + (define-module (gnu services rsync) #:use-module ((gnu build linux-container) #:select (%namespaces)) #:use-module (gnu services) @@ -50,13 +57,6 @@ rsync-service-type)) -;;;; Commentary: -;;; -;;; This module implements a service that to run instance of Rsync, -;;; files synchronization tool. -;;; -;;;; Code: - (define-record-type* rsync-configuration make-rsync-configuration diff --git a/gnu/services/shepherd.scm b/gnu/services/shepherd.scm index b1e8b040375..1a8eea67757 100644 --- a/gnu/services/shepherd.scm +++ b/gnu/services/shepherd.scm @@ -20,6 +20,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Instantiating system services as a shepherd configuration file. +;;; +;;; Code: + (define-module (gnu services shepherd) #:use-module (guix ui) #:use-module (guix sets) @@ -101,13 +107,6 @@ assert-valid-graph)) -;;; Commentary: -;;; -;;; Instantiating system services as a shepherd configuration file. -;;; -;;; Code: - - (define-record-type* shepherd-configuration make-shepherd-configuration shepherd-configuration? diff --git a/gnu/services/sound.scm b/gnu/services/sound.scm index 4c319153448..cf535eb6e18 100644 --- a/gnu/services/sound.scm +++ b/gnu/services/sound.scm @@ -20,6 +20,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Sound services. +;;; +;;; Code: + (define-module (gnu services sound) #:use-module (gnu services base) #:use-module (gnu services configuration) @@ -79,12 +85,6 @@ speakersafetyd-configuration? speakersafetyd-service-type)) -;;; Commentary: -;;; -;;; Sound services. -;;; -;;; Code: - ;;; ;;; ALSA diff --git a/gnu/services/ssh.scm b/gnu/services/ssh.scm index e167d2f689f..a6ecd06d35a 100644 --- a/gnu/services/ssh.scm +++ b/gnu/services/ssh.scm @@ -24,6 +24,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module implements secure shell (SSH) services. +;;; +;;; OpenSSH. +;;; + (define-module (gnu services ssh) #:use-module (gnu packages ssh) #:use-module (gnu packages admin) @@ -90,13 +97,6 @@ webssh-service-type %webssh-configuration-nginx)) -;;; Commentary: -;;; -;;; This module implements secure shell (SSH) services. -;;; -;;; OpenSSH. -;;; - (define-record-type* openssh-configuration make-openssh-configuration openssh-configuration? diff --git a/gnu/services/syncthing.scm b/gnu/services/syncthing.scm index 577672ab0c5..0d5e7cc8a94 100644 --- a/gnu/services/syncthing.scm +++ b/gnu/services/syncthing.scm @@ -18,6 +18,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module provides a service definition for the syncthing service. +;;; +;;; Code: + (define-module (gnu services syncthing) #:use-module (gnu packages syncthing) #:use-module (gnu services) @@ -41,12 +47,6 @@ syncthing-shepherd-service syncthing-files-service)) -;;; Commentary: -;;; -;;; This module provides a service definition for the syncthing service. -;;; -;;; Code: - (define (bool->xml-string bool) ;; add compatibility for the short duration where #f was specified as ;; "false" diff --git a/gnu/services/upnp.scm b/gnu/services/upnp.scm index 16c32463534..70b242e5980 100644 --- a/gnu/services/upnp.scm +++ b/gnu/services/upnp.scm @@ -16,6 +16,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; UPnP services. +;;; +;;; Code: + (define-module (gnu services upnp) #:use-module (gnu build linux-container) #:use-module (gnu packages admin) @@ -54,12 +60,6 @@ readymedia-activation readymedia-shepherd-service)) -;;; Commentary: -;;; -;;; UPnP services. -;;; -;;; Code: - (define* (%readymedia-default-cache-directory #:key (home-service? #f)) (if home-service? ".cache/readymedia" diff --git a/gnu/services/version-control.scm b/gnu/services/version-control.scm index 55af92c9f5a..8efa4996c5b 100644 --- a/gnu/services/version-control.scm +++ b/gnu/services/version-control.scm @@ -24,6 +24,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Version Control related services. +;;; +;;; Code: + (define-module (gnu services version-control) #:use-module (gnu services) #:use-module (gnu services base) @@ -135,12 +141,6 @@ fossil-service-type)) -;;; Commentary: -;;; -;;; Version Control related services. -;;; -;;; Code: - ;;; ;;; Git daemon. diff --git a/gnu/services/web.scm b/gnu/services/web.scm index 4a323dbd96e..351a7daf6dd 100644 --- a/gnu/services/web.scm +++ b/gnu/services/web.scm @@ -37,6 +37,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Web services. +;;; +;;; Code: + (define-module (gnu services web) #:use-module (gnu services) #:use-module (gnu services shepherd) @@ -390,12 +396,6 @@ miniflux-service-type)) -;;; Commentary: -;;; -;;; Web services. -;;; -;;; Code: - (define-record-type* httpd-module make-httpd-module httpd-module? diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm index a65dc20244c..5f8065b06d5 100644 --- a/gnu/services/xorg.scm +++ b/gnu/services/xorg.scm @@ -33,6 +33,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Services that relate to the X Window System. +;;; +;;; Code: + (define-module (gnu services xorg) #:autoload (gnu services sddm) (sddm-service-type) #:use-module (gnu artwork) @@ -144,12 +150,6 @@ handle-xorg-configuration set-xorg-configuration)) -;;; Commentary: -;;; -;;; Services that relate to the X Window System. -;;; -;;; Code: - (define* (default-xorg-modules #:optional (system (or (and=> diff --git a/gnu/system.scm b/gnu/system.scm index bfcb4025a75..72f690a4050 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -32,6 +32,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module supports whole-system configuration. +;;; +;;; Code: + (define-module (gnu system) #:use-module (guix inferior) #:use-module (guix store) @@ -190,12 +196,6 @@ %base-firmware %default-kernel-arguments)) -;;; Commentary: -;;; -;;; This module supports whole-system configuration. -;;; -;;; Code: - (define* (bootable-kernel-arguments system root-device version) "Return a list of kernel arguments (gexps) to boot SYSTEM from ROOT-DEVICE. VERSION is the target version of the boot-parameters record." diff --git a/gnu/system/accounts.scm b/gnu/system/accounts.scm index 52dbbbf3a33..de91efe669a 100644 --- a/gnu/system/accounts.scm +++ b/gnu/system/accounts.scm @@ -17,6 +17,14 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Data structures representing user accounts and user groups. This is meant +;;; to be used both on the host side and at run time--e.g., in activation +;;; snippets. +;;; +;;; Code: + (define-module (gnu system accounts) #:use-module (guix records) #:use-module (ice-9 match) @@ -55,15 +63,6 @@ default-shell)) - -;;; Commentary: -;;; -;;; Data structures representing user accounts and user groups. This is meant -;;; to be used both on the host side and at run time--e.g., in activation -;;; snippets. -;;; -;;; Code: - (define default-shell ;; Default shell for user accounts (a string or string-valued gexp). (make-parameter "/bin/sh")) diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm index fd9065d2f6d..7ec2cd02594 100644 --- a/gnu/system/file-systems.scm +++ b/gnu/system/file-systems.scm @@ -21,6 +21,15 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Declaring file systems to be mounted. +;;; +;;; Note: this file system is used both in the Shepherd and on the "host +;;; side", so it must not include (gnu packages …) modules. +;;; +;;; Code: + (define-module (gnu system file-systems) #:use-module (ice-9 match) #:use-module (rnrs bytevectors) @@ -109,15 +118,6 @@ swap-space-priority swap-space-discard?)) -;;; Commentary: -;;; -;;; Declaring file systems to be mounted. -;;; -;;; Note: this file system is used both in the Shepherd and on the "host -;;; side", so it must not include (gnu packages …) modules. -;;; -;;; Code: - (eval-when (expand load eval) (define invalid-file-system-flags ;; Note: Keep in sync with 'mount-flags->bit-mask'. diff --git a/gnu/system/hurd.scm b/gnu/system/hurd.scm index 4d5a3d6799b..b57526f93c2 100644 --- a/gnu/system/hurd.scm +++ b/gnu/system/hurd.scm @@ -17,6 +17,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module provides system-specifics for the GNU/Hurd operating system +;;; and virtual machine. +;;; +;;; Code: + (define-module (gnu system hurd) #:use-module (ice-9 match) #:use-module (guix gexp) @@ -55,13 +62,6 @@ %hurd-default-operating-system-kernel %setuid-programs/hurd)) -;;; Commentary: -;;; -;;; This module provides system-specifics for the GNU/Hurd operating system -;;; and virtual machine. -;;; -;;; Code: - (define %hurd-default-operating-system-kernel gnumach) diff --git a/gnu/system/images/visionfive2.scm b/gnu/system/images/visionfive2.scm index ee0682b6fcd..22f6545db12 100644 --- a/gnu/system/images/visionfive2.scm +++ b/gnu/system/images/visionfive2.scm @@ -17,6 +17,18 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; With this image, VisionFive2 can boot from MMC1 (MicroSD card) with +;;; SDIO3.0 boot mode (RPIO_1:L, RGPIO_0:H -- see [1]), in this case the +;;; board will use U-Boot from Guix System instead of the vendor U-Boot. +;;; Booting from eMMC and NVME is still work-in-progress. +;;; +;;; References: +;;; 1. +;;; +;;; Code: + (define-module (gnu system images visionfive2) #:use-module (gnu bootloader) #:use-module (gnu bootloader u-boot) @@ -46,18 +58,6 @@ visionfive2-image-type visionfive2-barebones-raw-image)) -;;; Commentary: -;;; -;;; With this image, VisionFive2 can boot from MMC1 (MicroSD card) with -;;; SDIO3.0 boot mode (RPIO_1:L, RGPIO_0:H -- see [1]), in this case the -;;; board will use U-Boot from Guix System instead of the vendor U-Boot. -;;; Booting from eMMC and NVME is still work-in-progress. -;;; -;;; References: -;;; 1. -;;; -;;; Code: - (define visionfive2-barebones-os (operating-system (host-name "visionfive2") diff --git a/gnu/system/install.scm b/gnu/system/install.scm index 2f5d5d4b1c9..80f5a51fdae 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm @@ -24,6 +24,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module provides an 'operating-system' definition for use on images +;;; for USB sticks etc., for the installation of the GNU system. +;;; +;;; Code: + (define-module (gnu system install) #:use-module ((guix licenses) #:prefix license:) #:use-module (gnu) @@ -88,13 +95,6 @@ wandboard-installation-os os-with-u-boot)) -;;; Commentary: -;;; -;;; This module provides an 'operating-system' definition for use on images -;;; for USB sticks etc., for the installation of the GNU system. -;;; -;;; Code: - ;;; ;;; Documentation service. diff --git a/gnu/system/keyboard.scm b/gnu/system/keyboard.scm index 5bd13a44be4..672fbcde8c6 100644 --- a/gnu/system/keyboard.scm +++ b/gnu/system/keyboard.scm @@ -16,6 +16,14 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module provides a data structure to represent keyboard layouts +;;; according to the XKB naming and classification (see the 'xkeyboard-config' +;;; package). +;;; +;;; Code: + (define-module (gnu system keyboard) #:use-module (guix gexp) #:use-module ((gnu packages xorg) @@ -31,14 +39,6 @@ keyboard-layout->console-keymap)) -;;; Commentary: -;;; -;;; This module provides a data structure to represent keyboard layouts -;;; according to the XKB naming and classification (see the 'xkeyboard-config' -;;; package). -;;; -;;; Code: - (define-immutable-record-type (%keyboard-layout name variant model options) keyboard-layout? diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm index b56e6cf5d42..4ea0a59e935 100644 --- a/gnu/system/linux-initrd.scm +++ b/gnu/system/linux-initrd.scm @@ -20,6 +20,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Tools to build initial RAM disks (initrd's) for Linux-Libre, and in +;;; particular initrd's that run Guile. +;;; +;;; Code: + (define-module (gnu system linux-initrd) #:use-module (guix deprecation) #:use-module (guix gexp) @@ -56,14 +63,6 @@ base-initrd)) -;;; Commentary: -;;; -;;; Tools to build initial RAM disks (initrd's) for Linux-Libre, and in -;;; particular initrd's that run Guile. -;;; -;;; Code: - - (define* (expression->initrd exp #:key (guile %guile-static-initrd) diff --git a/gnu/system/locale.scm b/gnu/system/locale.scm index 37f6456e673..866e198b2f6 100644 --- a/gnu/system/locale.scm +++ b/gnu/system/locale.scm @@ -18,6 +18,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Locale definitions, and compilation thereof. +;;; +;;; Code: + (define-module (gnu system locale) #:use-module (guix gexp) #:use-module (guix store) @@ -43,12 +49,6 @@ glibc-supported-locales)) -;;; Commentary: -;;; -;;; Locale definitions, and compilation thereof. -;;; -;;; Code: - (define-record-type* locale-definition make-locale-definition locale-definition? diff --git a/gnu/system/mapped-devices.scm b/gnu/system/mapped-devices.scm index 8c32c3d3d4d..e7bb3eae726 100644 --- a/gnu/system/mapped-devices.scm +++ b/gnu/system/mapped-devices.scm @@ -19,6 +19,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module supports "device mapping", a concept implemented by Linux's +;;; device-mapper. +;;; +;;; Code: + (define-module (gnu system mapped-devices) #:use-module (guix gexp) #:use-module (guix records) @@ -72,13 +79,6 @@ raid-device-mapping lvm-device-mapping)) -;;; Commentary: -;;; -;;; This module supports "device mapping", a concept implemented by Linux's -;;; device-mapper. -;;; -;;; Code: - (define-record-type* %mapped-device make-mapped-device mapped-device? diff --git a/gnu/system/nss.scm b/gnu/system/nss.scm index 930f556e5e5..9beadf05cab 100644 --- a/gnu/system/nss.scm +++ b/gnu/system/nss.scm @@ -16,6 +16,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Bindings for libc's name service switch (NSS) configuration. +;;; +;;; Code: + (define-module (gnu system nss) #:use-module (rnrs enums) #:use-module (guix records) @@ -38,12 +44,6 @@ name-service-switch->string)) -;;; Commentary: -;;; -;;; Bindings for libc's name service switch (NSS) configuration. -;;; -;;; Code: - (define-record-type* name-service make-name-service name-service? diff --git a/gnu/system/pam.scm b/gnu/system/pam.scm index 83cf74d58ce..935419544a8 100644 --- a/gnu/system/pam.scm +++ b/gnu/system/pam.scm @@ -17,6 +17,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Configuration of the pluggable authentication modules (PAM). +;;; +;;; Code: + (define-module (gnu system pam) #:use-module (guix records) #:use-module (guix derivations) @@ -69,12 +75,6 @@ pam-root-service-type pam-root-service)) -;;; Commentary: -;;; -;;; Configuration of the pluggable authentication modules (PAM). -;;; -;;; Code: - ;; PAM services (see ;; .) (define-record-type* pam-service diff --git a/gnu/system/privilege.scm b/gnu/system/privilege.scm index fe6e60ad7c4..26d9b2fe289 100644 --- a/gnu/system/privilege.scm +++ b/gnu/system/privilege.scm @@ -17,6 +17,14 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Data structures representing privileged programs: binaries with additional +;;; permissions such as setuid/setgid, or POSIX capabilities. This is meant to +;;; be used both on the host side and at run time--e.g., in activation snippets. +;;; +;;; Code: + (define-module (gnu system privilege) #:use-module (guix records) #:export (privileged-program @@ -30,14 +38,6 @@ file-like->setuid-program)) -;;; Commentary: -;;; -;;; Data structures representing privileged programs: binaries with additional -;;; permissions such as setuid/setgid, or POSIX capabilities. This is meant to -;;; be used both on the host side and at run time--e.g., in activation snippets. -;;; -;;; Code: - (define-record-type* privileged-program make-privileged-program privileged-program? diff --git a/gnu/system/setuid.scm b/gnu/system/setuid.scm index 097797ce8d7..dab31dad5d2 100644 --- a/gnu/system/setuid.scm +++ b/gnu/system/setuid.scm @@ -17,6 +17,14 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Do not use this module in new code. It used to define data structures +;;; representing setuid/setgid programs, but is now a mere compatibility shim +;;; wrapping a subset of (gnu system privilege). +;;; +;;; Code: + (define-module (gnu system setuid) #:use-module (gnu system privilege) #:use-module (ice-9 match) @@ -30,14 +38,6 @@ setuid-program-user setuid-program-group)) -;;; Commentary: -;;; -;;; Do not use this module in new code. It used to define data structures -;;; representing setuid/setgid programs, but is now a mere compatibility shim -;;; wrapping a subset of (gnu system privilege). -;;; -;;; Code: - (define-syntax setuid-program (lambda (fields) (syntax-case fields () diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm index f864a4f692e..2cce6e828f6 100644 --- a/gnu/system/shadow.scm +++ b/gnu/system/shadow.scm @@ -21,6 +21,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Utilities for configuring the Shadow tool suite ('login', 'passwd', etc.) +;;; +;;; Code: + (define-module (gnu system shadow) #:use-module ((guix diagnostics) #:select (formatted-message)) #:use-module (guix records) @@ -97,12 +103,6 @@ subids-service-type)) -;;; Commentary: -;;; -;;; Utilities for configuring the Shadow tool suite ('login', 'passwd', etc.) -;;; -;;; Code: - ;; Change the default shell used by new records. (default-shell (file-append bash "/bin/bash")) diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index a6a05862a5c..c4fc3e84745 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -22,6 +22,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Tools to evaluate build expressions within virtual machines. +;;; +;;; Code: + (define-module (gnu system vm) #:use-module (guix config) #:use-module (guix store) @@ -91,12 +97,6 @@ common-qemu-options)) -;;; Commentary: -;;; -;;; Tools to evaluate build expressions within virtual machines. -;;; -;;; Code: - ;; By default, the msize value is 8 KiB, which according to QEMU is ;; insufficient and would degrade performance. The msize value should roughly ;; match the bandwidth of the system's IO (see: diff --git a/gnu/tests.scm b/gnu/tests.scm index 3b12726de82..ab74ed5874e 100644 --- a/gnu/tests.scm +++ b/gnu/tests.scm @@ -19,6 +19,15 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module provides the infrastructure to run operating system tests. +;;; The most important part of that is tools to instrument the OS under test, +;;; essentially allowing it to run in a virtual machine controlled by the host +;;; system--hence the name "marionette". +;;; +;;; Code: + (define-module (gnu tests) #:use-module (guix gexp) #:use-module (guix diagnostics) @@ -65,15 +74,6 @@ fold-system-tests all-system-tests)) -;;; Commentary: -;;; -;;; This module provides the infrastructure to run operating system tests. -;;; The most important part of that is tools to instrument the OS under test, -;;; essentially allowing it to run in a virtual machine controlled by the host -;;; system--hence the name "marionette". -;;; -;;; Code: - (define %default-marionette-device ;; Default marionette device in the guest. "/dev/virtio-ports/org.gnu.guix.port.0") diff --git a/gnu/tests/image.scm b/gnu/tests/image.scm index be6852cae0a..3e7629c3b68 100644 --- a/gnu/tests/image.scm +++ b/gnu/tests/image.scm @@ -16,6 +16,17 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module provides tests for the image creation process that is +;;; performed by "genimage" under the hood. +;;; +;;; The image partitionment is checked using Guile-Parted. The content of the +;;; images is out of the scope of this module. Other test modules such as +;;; (gnu tests installation) make sure that the produced images are viable. +;;; +;;; Code: + (define-module (gnu tests image) #:use-module (gnu) #:use-module (gnu image) @@ -30,17 +41,6 @@ #:use-module (ice-9 format) #:export (%test-images)) -;;; Commentary: -;;; -;;; This module provides tests for the image creation process that is -;;; performed by "genimage" under the hood. -;;; -;;; The image partitionment is checked using Guile-Parted. The content of the -;;; images is out of the scope of this module. Other test modules such as -;;; (gnu tests installation) make sure that the produced images are viable. -;;; -;;; Code: - ;; A dummy initializer creating a simple file in the partition. (define dummy-initializer #~(lambda* (root . rest) diff --git a/gnu/tests/install.scm b/gnu/tests/install.scm index 91ab59ce8d2..2c336ce4e94 100644 --- a/gnu/tests/install.scm +++ b/gnu/tests/install.scm @@ -21,6 +21,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Test the installation of Guix using the documented approach at the +;;; command line. +;;; +;;; Code: + (define-module (gnu tests install) #:use-module (gnu) #:use-module (gnu bootloader extlinux) @@ -89,13 +96,6 @@ %test-gui-installed-os-encrypted %test-gui-installed-desktop-os-encrypted)) -;;; Commentary: -;;; -;;; Test the installation of Guix using the documented approach at the -;;; command line. -;;; -;;; Code: - (define-os-with-source (%minimal-os %minimal-os-source) ;; The OS we want to install. (use-modules (gnu) (gnu tests) (srfi srfi-1)) diff --git a/gnu/tests/linux-modules.scm b/gnu/tests/linux-modules.scm index 69cb0132670..8f4d79445bd 100644 --- a/gnu/tests/linux-modules.scm +++ b/gnu/tests/linux-modules.scm @@ -19,6 +19,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Test kernel-loadable-modules. +;;; +;;; Code: + (define-module (gnu tests linux-modules) #:use-module (gnu packages linux) #:use-module (gnu services) @@ -40,12 +46,6 @@ %test-loadable-kernel-modules-service-1 %test-loadable-kernel-modules-service-2)) -;;; Commentary: -;;; -;;; Test kernel-loadable-modules. -;;; -;;; Code: - (define* (modules-loaded?-program os modules) "Return an executable store item that, upon being evaluated, will verify that MODULES are actually loaded." diff --git a/gnu/tests/package-management.scm b/gnu/tests/package-management.scm index c5102fff74d..869494b7e11 100644 --- a/gnu/tests/package-management.scm +++ b/gnu/tests/package-management.scm @@ -16,6 +16,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module provides a test definition for the nix-daemon +;;; +;;; Code: + (define-module (gnu tests package-management) #:use-module (gnu packages base) #:use-module (gnu packages package-management) @@ -29,12 +35,6 @@ #:use-module (guix packages) #:export (%test-nix)) -;;; Commentary: -;;; -;;; This module provides a test definition for the nix-daemon -;;; -;;; Code: - (define* (run-nix-test name test-os) "Run tests in TEST-OS, which has nix-daemon running." (define os diff --git a/gnu/tests/reconfigure.scm b/gnu/tests/reconfigure.scm index 77cbe16a9ca..1ffb75ad2ac 100644 --- a/gnu/tests/reconfigure.scm +++ b/gnu/tests/reconfigure.scm @@ -17,6 +17,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Test in-place system reconfiguration: advancing the system generation on a +;;; running instance of the Guix System. +;;; +;;; Code: + (define-module (gnu tests reconfigure) #:use-module (gnu bootloader) #:use-module (gnu services) @@ -38,13 +45,6 @@ %test-upgrade-kexec %test-install-bootloader)) -;;; Commentary: -;;; -;;; Test in-place system reconfiguration: advancing the system generation on a -;;; running instance of the Guix System. -;;; -;;; Code: - (define* (run-switch-to-system-test) "Run a test of an OS running SWITCH-SYSTEM-PROGRAM, which creates a new generation of the system profile." diff --git a/guix/amd-gpu.scm b/guix/amd-gpu.scm index d16fea2a053..65d1882ef59 100644 --- a/guix/amd-gpu.scm +++ b/guix/amd-gpu.scm @@ -17,18 +17,18 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . -(define-module (guix amd-gpu) - #:autoload (guix packages) (this-package package-properties) - #:export (%default-amd-gpu-targets - current-amd-gpu-targets - current-amd-gpu-targets-string)) - ;;; Commentary: ;;; ;;; This module provides helpers for packages targeting AMD GPUs. ;;; ;;; Code: +(define-module (guix amd-gpu) + #:autoload (guix packages) (this-package package-properties) + #:export (%default-amd-gpu-targets + current-amd-gpu-targets + current-amd-gpu-targets-string)) + (define %default-amd-gpu-targets '("gfx908" "gfx90a" "gfx942" "gfx1030" "gfx1100" "gfx1101" "gfx1200" "gfx1201")) diff --git a/guix/android-repo-download.scm b/guix/android-repo-download.scm index 7b63d388fce..2af88fefd30 100644 --- a/guix/android-repo-download.scm +++ b/guix/android-repo-download.scm @@ -20,6 +20,15 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; An method that fetches a specific commit from an Android repo +;;; repository. +;;; The repository's manifest (URL and revision) can be specified with a +;;; object. +;;; +;;; Code: + (define-module (guix android-repo-download) #:use-module (guix gexp) #:use-module (guix store) @@ -39,15 +48,6 @@ android-repo-version android-repo-file-name)) -;;; Commentary: -;;; -;;; An method that fetches a specific commit from an Android repo -;;; repository. -;;; The repository's manifest (URL and revision) can be specified with a -;;; object. -;;; -;;; Code: - (define-record-type* android-repo-reference make-android-repo-reference android-repo-reference? diff --git a/guix/base32.scm b/guix/base32.scm index dd18a796f23..543d1cbca77 100644 --- a/guix/base32.scm +++ b/guix/base32.scm @@ -16,6 +16,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; A generic, customizable to convert bytevectors to/from a base32 +;;; representation. +;;; +;;; Code: + (define-module (guix base32) #:use-module (srfi srfi-34) #:use-module (srfi srfi-35) @@ -34,13 +41,6 @@ invalid-base32-character-value invalid-base32-character-string)) -;;; Commentary: -;;; -;;; A generic, customizable to convert bytevectors to/from a base32 -;;; representation. -;;; -;;; Code: - (define-syntax bit-field (lambda (s) ;; This inline version of 'bit-field' assumes that START and END are diff --git a/guix/build-system/channel.scm b/guix/build-system/channel.scm index 7b906dea28b..fe59520d1cc 100644 --- a/guix/build-system/channel.scm +++ b/guix/build-system/channel.scm @@ -16,14 +16,6 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . -(define-module (guix build-system channel) - #:use-module ((guix store) #:select (%store-monad store-lift)) - #:use-module ((guix gexp) #:select (lower-object)) - #:use-module (guix monads) - #:use-module (guix channels) - #:use-module (guix build-system) - #:export (channel-build-system)) - ;;; Commentary: ;;; ;;; The "channel" build system lets you build Guix instances from channel @@ -32,6 +24,14 @@ ;;; ;;; Code: +(define-module (guix build-system channel) + #:use-module ((guix store) #:select (%store-monad store-lift)) + #:use-module ((guix gexp) #:select (lower-object)) + #:use-module (guix monads) + #:use-module (guix channels) + #:use-module (guix build-system) + #:export (channel-build-system)) + (define latest-channel-instances* (store-lift latest-channel-instances)) diff --git a/guix/build/android-repo.scm b/guix/build/android-repo.scm index db8c4d127ba..531f5e8c40b 100644 --- a/guix/build/android-repo.scm +++ b/guix/build/android-repo.scm @@ -17,12 +17,6 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . -(define-module (guix build android-repo) - #:use-module (guix build utils) - #:use-module (srfi srfi-34) - #:use-module (ice-9 format) - #:export (android-repo-fetch)) - ;;; Commentary: ;;; ;;; This is the build-side support code of (guix android-repo-download). @@ -31,6 +25,12 @@ ;;; ;;; Code: +(define-module (guix build android-repo) + #:use-module (guix build utils) + #:use-module (srfi srfi-34) + #:use-module (ice-9 format) + #:export (android-repo-fetch)) + (define* (android-repo-fetch manifest-url manifest-revision directory #:key (git-repo-command "git-repo")) "Fetch packages according to the manifest at MANIFEST-URL with diff --git a/guix/build/bournish.scm b/guix/build/bournish.scm index 31fc493b09b..9ec76a0378d 100644 --- a/guix/build/bournish.scm +++ b/guix/build/bournish.scm @@ -18,6 +18,14 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This is a super minimal Bourne-like shell language for Guile. It is meant +;;; to be used at the REPL as a rescue shell. In a way, this is to Guile what +;;; eshell is to Emacs. +;;; +;;; Code: + (define-module (guix build bournish) #:use-module (system base language) #:use-module (system base compile) @@ -31,14 +39,6 @@ #:use-module (srfi srfi-26) #:export (%bournish-language)) -;;; Commentary: -;;; -;;; This is a super minimal Bourne-like shell language for Guile. It is meant -;;; to be used at the REPL as a rescue shell. In a way, this is to Guile what -;;; eshell is to Emacs. -;;; -;;; Code: - (define (expand-variable str) "Return STR or code to obtain the value of the environment variable STR refers to." diff --git a/guix/build/bzr.scm b/guix/build/bzr.scm index dede5e031ab..1dcaa7b61f8 100644 --- a/guix/build/bzr.scm +++ b/guix/build/bzr.scm @@ -16,10 +16,6 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . -(define-module (guix build bzr) - #:use-module (guix build utils) - #:export (bzr-fetch)) - ;;; Commentary: ;;; ;;; This is the build-side support code of (guix bzr-download). It allows a @@ -27,6 +23,10 @@ ;;; ;;; Code: +(define-module (guix build bzr) + #:use-module (guix build utils) + #:export (bzr-fetch)) + (define* (bzr-fetch url revision directory #:key (bzr-command "brz")) "Fetch REVISION from URL into DIRECTORY. REVISION must be a valid Bazaar diff --git a/guix/build/compile.scm b/guix/build/compile.scm index f90016b9ae8..03d6b5396bb 100644 --- a/guix/build/compile.scm +++ b/guix/build/compile.scm @@ -17,6 +17,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Support code to compile Guile code as efficiently as possible (with 2.2). +;;; +;;; Code: + (define-module (guix build compile) #:use-module (srfi srfi-1) #:use-module (ice-9 match) @@ -31,12 +37,6 @@ #:use-module (language cps optimize) #:export (compile-files)) -;;; Commentary: -;;; -;;; Support code to compile Guile code as efficiently as possible (with 2.2). -;;; -;;; Code: - (define (clear-keyword-arguments keywords args) "Set to #f the value associated with each of the KEYWORDS in ARGS." (let loop ((args args) diff --git a/guix/build/cvs.scm b/guix/build/cvs.scm index 71110437475..2ad0beb0b6d 100644 --- a/guix/build/cvs.scm +++ b/guix/build/cvs.scm @@ -17,12 +17,6 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . -(define-module (guix build cvs) - #:use-module (guix build utils) - #:use-module (ice-9 regex) - #:use-module (ice-9 ftw) - #:export (cvs-fetch)) - ;;; Commentary: ;;; ;;; This is the build-side support code of (guix cvs-download). It allows a @@ -30,6 +24,12 @@ ;;; ;;; Code: +(define-module (guix build cvs) + #:use-module (guix build utils) + #:use-module (ice-9 regex) + #:use-module (ice-9 ftw) + #:export (cvs-fetch)) + (define (find-cvs-directories) (define (enter? path st result) (not (string-suffix? "/CVS" path))) diff --git a/guix/build/debug-link.scm b/guix/build/debug-link.scm index 80941df2fc7..4ea1f587ef1 100644 --- a/guix/build/debug-link.scm +++ b/guix/build/debug-link.scm @@ -16,6 +16,20 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module provides tools to deal with '.gnu_debuglink' sections in ELF +;;; files. These sections are created by 'objcopy --add-gnu-debuglink' to +;;; create separate debug files (info "(gdb) Separate Debug Files"). +;;; +;;; The main facility of this module is 'graft-debug-links', which allows us +;;; to update the cyclic redundancy check (CRC) that appears in +;;; '.gnu_debuglink' sections when grafting, such that separate debug files +;;; remain usable after grafting. Failing to do that, GDB would complain +;;; about CRC mismatch---see . +;;; +;;; Code: + (define-module (guix build debug-link) #:use-module (guix elf) #:use-module ((guix build utils) @@ -31,20 +45,6 @@ graft-debug-links)) -;;; Commentary: -;;; -;;; This module provides tools to deal with '.gnu_debuglink' sections in ELF -;;; files. These sections are created by 'objcopy --add-gnu-debuglink' to -;;; create separate debug files (info "(gdb) Separate Debug Files"). -;;; -;;; The main facility of this module is 'graft-debug-links', which allows us -;;; to update the cyclic redundancy check (CRC) that appears in -;;; '.gnu_debuglink' sections when grafting, such that separate debug files -;;; remain usable after grafting. Failing to do that, GDB would complain -;;; about CRC mismatch---see . -;;; -;;; Code: - (define %crc32-table ;; CRC table taken from "(gdb) Separate Debug Files". ;; TODO: Wouldn't it be nice to generate it "from source" with a macro? diff --git a/guix/build/download-nar.scm b/guix/build/download-nar.scm index e1153e20275..796bc957a4e 100644 --- a/guix/build/download-nar.scm +++ b/guix/build/download-nar.scm @@ -16,6 +16,15 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Download a normalized archive or "nar", similar to what 'guix substitute' +;;; does. The intent here is to use substitute servers as content-addressed +;;; mirrors of VCS checkouts. This is mostly useful for users who have +;;; disabled substitutes. +;;; +;;; Code: + (define-module (guix build download-nar) #:use-module (guix build download) #:use-module ((guix serialization) #:hide (dump-port*)) @@ -28,15 +37,6 @@ #:use-module (ice-9 match) #:export (download-nar)) -;;; Commentary: -;;; -;;; Download a normalized archive or "nar", similar to what 'guix substitute' -;;; does. The intent here is to use substitute servers as content-addressed -;;; mirrors of VCS checkouts. This is mostly useful for users who have -;;; disabled substitutes. -;;; -;;; Code: - (define (urls-for-item item) "Return the fallback nar URL for ITEM--e.g., \"/gnu/store/cabbag3…-foo-1.2-checkout\"." diff --git a/guix/build/download.scm b/guix/build/download.scm index 8cf1814ea11..bf3f330b744 100644 --- a/guix/build/download.scm +++ b/guix/build/download.scm @@ -19,6 +19,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Fetch data such as tarballs over HTTP or FTP (builder-side code). +;;; +;;; Code: + (define-module (guix build download) #:use-module (web uri) #:use-module (web http) @@ -56,12 +62,6 @@ nar-uri-abbreviation store-path-abbreviation)) -;;; Commentary: -;;; -;;; Fetch data such as tarballs over HTTP or FTP (builder-side code). -;;; -;;; Code: - (define %http-receive-buffer-size ;; Size of the HTTP receive buffer. 65536) diff --git a/guix/build/elm-build-system.scm b/guix/build/elm-build-system.scm index a2a54ab28c3..34c561452c5 100644 --- a/guix/build/elm-build-system.scm +++ b/guix/build/elm-build-system.scm @@ -16,26 +16,6 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . -(define-module (guix build elm-build-system) - #:use-module ((guix build gnu-build-system) #:prefix gnu:) - #:use-module (guix build utils) - #:use-module (guix build union) - #:use-module (ice-9 ftw) - #:use-module (ice-9 rdelim) - #:use-module (ice-9 regex) - #:use-module (ice-9 match) - #:use-module (ice-9 popen) - #:use-module (ice-9 vlist) - #:use-module (json) - #:use-module (srfi srfi-1) - #:use-module (srfi srfi-26) - #:use-module (srfi srfi-71) - #:export (%standard-phases - patch-application-dependencies - patch-json-string-escapes - read-offline-registry->vhash - elm-build)) - ;;; Commentary: ;;; ;;; Elm draws a sharp distinction between "projects" with `{"type":"package"}` @@ -90,6 +70,26 @@ ;;; Code: ;;; +(define-module (guix build elm-build-system) + #:use-module ((guix build gnu-build-system) #:prefix gnu:) + #:use-module (guix build utils) + #:use-module (guix build union) + #:use-module (ice-9 ftw) + #:use-module (ice-9 rdelim) + #:use-module (ice-9 regex) + #:use-module (ice-9 match) + #:use-module (ice-9 popen) + #:use-module (ice-9 vlist) + #:use-module (json) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-26) + #:use-module (srfi srfi-71) + #:export (%standard-phases + patch-application-dependencies + patch-json-string-escapes + read-offline-registry->vhash + elm-build)) + (define %essential-elm-packages ;; elm/json isn't essential in a fundamental sense, ;; but it's required for a {"type":"application"}, diff --git a/guix/build/emacs-utils.scm b/guix/build/emacs-utils.scm index 41914e7dcb0..e7763658da8 100644 --- a/guix/build/emacs-utils.scm +++ b/guix/build/emacs-utils.scm @@ -20,6 +20,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Tools to programmatically edit files using Emacs, +;;; e.g. to replace entire s-expressions in elisp files. +;;; +;;; Code: + (define-module (guix build emacs-utils) #:use-module (guix build utils) #:use-module (ice-9 format) @@ -47,13 +54,6 @@ emacs-substitute-sexps emacs-substitute-variables)) -;;; Commentary: -;;; -;;; Tools to programmatically edit files using Emacs, -;;; e.g. to replace entire s-expressions in elisp files. -;;; -;;; Code: - (define %emacs ;; The `emacs' command. (make-parameter "emacs")) diff --git a/guix/build/git.scm b/guix/build/git.scm index 98077fe8be3..d74364d0a69 100644 --- a/guix/build/git.scm +++ b/guix/build/git.scm @@ -17,6 +17,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This is the build-side support code of (guix git-download). It allows a +;;; Git repository to be cloned and checked out at a specific commit. +;;; +;;; Code: + (define-module (guix build git) #:use-module (guix build utils) #:use-module ((guix build download) @@ -30,13 +37,6 @@ #:export (git-fetch git-fetch-with-fallback)) -;;; Commentary: -;;; -;;; This is the build-side support code of (guix git-download). It allows a -;;; Git repository to be cloned and checked out at a specific commit. -;;; -;;; Code: - (define* (git-fetch url commit directory #:key (git-command "git") lfs? recursive?) diff --git a/guix/build/gnu-dist.scm b/guix/build/gnu-dist.scm index 59ac0012b80..4d6b19d3358 100644 --- a/guix/build/gnu-dist.scm +++ b/guix/build/gnu-dist.scm @@ -18,12 +18,6 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . -(define-module (guix build gnu-dist) - #:use-module (guix build utils) - #:use-module (guix build gnu-build-system) - #:use-module (srfi srfi-1) - #:export (%dist-phases)) - ;;; Commentary: ;;; ;;; Build phases to build a source tarball with the GNU build system, as with @@ -31,6 +25,12 @@ ;;; ;;; Code: +(define-module (guix build gnu-dist) + #:use-module (guix build utils) + #:use-module (guix build gnu-build-system) + #:use-module (srfi srfi-1) + #:export (%dist-phases)) + (define* (build #:key build-before-dist? make-flags (dist-target "distcheck") #:allow-other-keys #:rest args) diff --git a/guix/build/graft.scm b/guix/build/graft.scm index 49fabfea174..77ae9a4b294 100644 --- a/guix/build/graft.scm +++ b/guix/build/graft.scm @@ -17,20 +17,6 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . -(define-module (guix build graft) - #:use-module (guix build utils) - #:use-module (guix build debug-link) - #:use-module (rnrs bytevectors) - #:use-module (ice-9 vlist) - #:use-module (ice-9 match) - #:use-module (ice-9 threads) - #:use-module (ice-9 binary-ports) - #:use-module (srfi srfi-1) ; list library - #:use-module (srfi srfi-26) ; cut and cute - #:export (replace-store-references - rewrite-directory - graft)) - ;;; Commentary: ;;; ;;; This module supports "grafts". Grafting a directory means rewriting it, @@ -44,6 +30,20 @@ ;;; ;;; Code: +(define-module (guix build graft) + #:use-module (guix build utils) + #:use-module (guix build debug-link) + #:use-module (rnrs bytevectors) + #:use-module (ice-9 vlist) + #:use-module (ice-9 match) + #:use-module (ice-9 threads) + #:use-module (ice-9 binary-ports) + #:use-module (srfi srfi-1) ; list library + #:use-module (srfi srfi-26) ; cut and cute + #:export (replace-store-references + rewrite-directory + graft)) + (define-constant hash-length %store-hash-string-length) (define nix-base32-char? diff --git a/guix/build/gremlin.scm b/guix/build/gremlin.scm index 2a74d51dd91..bd56cf83030 100644 --- a/guix/build/gremlin.scm +++ b/guix/build/gremlin.scm @@ -16,6 +16,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; A gremlin is sort-of like an elf, you know, and this module provides tools +;;; to deal with dynamic-link information from ELF files. +;;; +;;; Code: + (define-module (guix build gremlin) #:use-module (guix elf) #:use-module ((guix build utils) #:select (store-file-name?)) @@ -55,13 +62,6 @@ validate-needed-in-runpath strip-runpath)) -;;; Commentary: -;;; -;;; A gremlin is sort-of like an elf, you know, and this module provides tools -;;; to deal with dynamic-link information from ELF files. -;;; -;;; Code: - (define-condition-type &elf-error &error elf-error? (elf elf-error-elf)) diff --git a/guix/build/hg.scm b/guix/build/hg.scm index 0ffad7fa2dc..d0f71d0fd47 100644 --- a/guix/build/hg.scm +++ b/guix/build/hg.scm @@ -19,12 +19,6 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . -(define-module (guix build hg) - #:use-module (guix build utils) - #:use-module (srfi srfi-34) - #:use-module (ice-9 format) - #:export (hg-fetch)) - ;;; Commentary: ;;; ;;; This is the build-side support code of (guix hg-download). It allows a @@ -33,6 +27,12 @@ ;;; ;;; Code: +(define-module (guix build hg) + #:use-module (guix build utils) + #:use-module (srfi srfi-34) + #:use-module (ice-9 format) + #:export (hg-fetch)) + (define* (hg-fetch url changeset directory #:key (hg-command "hg")) "Fetch CHANGESET from URL into DIRECTORY. CHANGESET must be a valid diff --git a/guix/build/lisp-utils.scm b/guix/build/lisp-utils.scm index 09965c598e8..6c2d55e45b7 100644 --- a/guix/build/lisp-utils.scm +++ b/guix/build/lisp-utils.scm @@ -18,6 +18,14 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Tools to evaluate lisp programs within a lisp session, generate wrapper +;;; systems for executables. Compile, test, and produce images for systems and +;;; programs, and link them with their dependencies. +;;; +;;; Code: + (define-module (guix build lisp-utils) #:use-module (ice-9 format) #:use-module (ice-9 hash-table) @@ -45,14 +53,6 @@ normalize-string library-output)) -;;; Commentary: -;;; -;;; Tools to evaluate lisp programs within a lisp session, generate wrapper -;;; systems for executables. Compile, test, and produce images for systems and -;;; programs, and link them with their dependencies. -;;; -;;; Code: - (define %lisp ;; File name of the Lisp compiler. (make-parameter "lisp")) diff --git a/guix/build/pack.scm b/guix/build/pack.scm index 1b281014698..c68f2bffcdc 100644 --- a/guix/build/pack.scm +++ b/guix/build/pack.scm @@ -16,6 +16,15 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module contains build-side common procedures used by the host-side +;;; (guix scripts pack) module, mostly to allow for code reuse. Due to making +;;; use of the (guix build store-copy) module, it transitively requires the +;;; sqlite and gcrypt extensions to be available. +;;; +;;; Code: + (define-module (guix build pack) #:use-module (gnu build install) #:use-module (guix build utils) @@ -28,15 +37,6 @@ populate-profile-root build-self-contained-tarball)) -;;; Commentary: - -;;; This module contains build-side common procedures used by the host-side -;;; (guix scripts pack) module, mostly to allow for code reuse. Due to making -;;; use of the (guix build store-copy) module, it transitively requires the -;;; sqlite and gcrypt extensions to be available. - -;;; Code: - (define* (tar-base-options #:key tar compressor) "Return the base GNU tar options required to produce deterministic archives deterministically. When TAR, a GNU tar command file name, is provided, the diff --git a/guix/build/profiles.scm b/guix/build/profiles.scm index b19d93f9714..bde78bfd024 100644 --- a/guix/build/profiles.scm +++ b/guix/build/profiles.scm @@ -16,6 +16,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Build a user profile (essentially the union of all the installed packages) +;;; with its associated meta-data. +;;; +;;; Code: + (define-module (guix build profiles) #:use-module (guix build union) #:use-module (guix build utils) @@ -30,13 +37,6 @@ #:export (ensure-writable-directory build-profile)) -;;; Commentary: -;;; -;;; Build a user profile (essentially the union of all the installed packages) -;;; with its associated meta-data. -;;; -;;; Code: - (define (abstract-profile profile) "Return a procedure that replaces PROFILE in VALUE with a reference to the 'GUIX_PROFILE' environment variable. This allows users to specify what the diff --git a/guix/build/pyproject-build-system.scm b/guix/build/pyproject-build-system.scm index f611afada24..3effdc61600 100644 --- a/guix/build/pyproject-build-system.scm +++ b/guix/build/pyproject-build-system.scm @@ -20,29 +20,6 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . -(define-module (guix build pyproject-build-system) - #:autoload (json builder) (scm->json scm->json-string) - #:use-module ((guix build gnu-build-system) #:prefix gnu:) - #:use-module (guix build utils) - #:use-module (guix build toml) - #:use-module (ice-9 match) - #:use-module (ice-9 ftw) - #:use-module (ice-9 format) - #:use-module (ice-9 rdelim) - #:use-module (ice-9 regex) - #:use-module (srfi srfi-1) - #:use-module (srfi srfi-2) - #:use-module (srfi srfi-26) - #:use-module (srfi srfi-34) - #:use-module (srfi srfi-35) - #:use-module (srfi srfi-71) - #:export (%standard-phases - add-installed-pythonpath - ensure-no-mtimes-pre-1980 - site-packages - python-version - pyproject-build)) - ;;; Commentary: ;;; ;;; PEP 517-compatible build system for Python packages. @@ -71,7 +48,29 @@ ;;; overridden by #:backend-path. ;;; ;;; Code: -;;; + +(define-module (guix build pyproject-build-system) + #:autoload (json builder) (scm->json scm->json-string) + #:use-module ((guix build gnu-build-system) #:prefix gnu:) + #:use-module (guix build utils) + #:use-module (guix build toml) + #:use-module (ice-9 match) + #:use-module (ice-9 ftw) + #:use-module (ice-9 format) + #:use-module (ice-9 rdelim) + #:use-module (ice-9 regex) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-2) + #:use-module (srfi srfi-26) + #:use-module (srfi srfi-34) + #:use-module (srfi srfi-35) + #:use-module (srfi srfi-71) + #:export (%standard-phases + add-installed-pythonpath + ensure-no-mtimes-pre-1980 + site-packages + python-version + pyproject-build)) ;; Copy these procedures from python-build-system as many packages ;; rely on these. diff --git a/guix/build/store-copy.scm b/guix/build/store-copy.scm index 657a91f324a..1abb1a5b01a 100644 --- a/guix/build/store-copy.scm +++ b/guix/build/store-copy.scm @@ -16,6 +16,15 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module provides the tools to copy store items and their dependencies +;;; to another store. It relies on the availability of "reference graph" +;;; files as produced by 'gexp->derivation' et al. with the +;;; #:references-graphs parameter. +;;; +;;; Code: + (define-module (guix build store-copy) #:use-module ((guix build utils) #:hide (copy-recursively)) #:use-module (guix sets) @@ -41,15 +50,6 @@ copy-store-item populate-store)) -;;; Commentary: -;;; -;;; This module provides the tools to copy store items and their dependencies -;;; to another store. It relies on the availability of "reference graph" -;;; files as produced by 'gexp->derivation' et al. with the -;;; #:references-graphs parameter. -;;; -;;; Code: - ;; Information about a store item as produced by #:references-graphs. (define-record-type (store-info item deriver references) diff --git a/guix/build/svn.scm b/guix/build/svn.scm index ea01e7ee650..9b974792184 100644 --- a/guix/build/svn.scm +++ b/guix/build/svn.scm @@ -19,11 +19,6 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . -(define-module (guix build svn) - #:use-module (guix build utils) - #:use-module (srfi srfi-34) - #:export (svn-fetch)) - ;;; Commentary: ;;; ;;; This is the build-side support code of (guix svn-download). It allows a @@ -31,6 +26,11 @@ ;;; ;;; Code: +(define-module (guix build svn) + #:use-module (guix build utils) + #:use-module (srfi srfi-34) + #:export (svn-fetch)) + (define* (svn-fetch url revision directory #:key (svn-command "svn") (recursive? #t) diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm index da3f56350f2..ee9711f41e3 100644 --- a/guix/build/syscalls.scm +++ b/guix/build/syscalls.scm @@ -27,6 +27,25 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module provides bindings to libc's syscall wrappers. It uses the +;;; FFI, and thus requires a dynamically-linked Guile. +;;; +;;; Some syscalls are already defined in statically-linked Guile by applying +;;; 'guile-linux-syscalls.patch'. +;;; +;;; Visibility of syscall's symbols shared between this module and static Guile +;;; is a bit delicate. It is handled by 'define-as-needed' macro. +;;; +;;; This macro is used to export symbols in dynamic Guile context, and to +;;; re-export them in static Guile context. +;;; +;;; This way, even if they don't appear in #:export list, it is safe to use +;;; syscalls from this module in static or dynamic Guile context. +;;; +;;; Code: + (define-module (guix build syscalls) #:use-module (system foreign) #:use-module (system base target) @@ -228,25 +247,6 @@ utmpx-entries (read-utmpx-from-port . read-utmpx))) -;;; Commentary: -;;; -;;; This module provides bindings to libc's syscall wrappers. It uses the -;;; FFI, and thus requires a dynamically-linked Guile. -;;; -;;; Some syscalls are already defined in statically-linked Guile by applying -;;; 'guile-linux-syscalls.patch'. -;;; -;;; Visibility of syscall's symbols shared between this module and static Guile -;;; is a bit delicate. It is handled by 'define-as-needed' macro. -;;; -;;; This macro is used to export symbols in dynamic Guile context, and to -;;; re-export them in static Guile context. -;;; -;;; This way, even if they don't appear in #:export list, it is safe to use -;;; syscalls from this module in static or dynamic Guile context. -;;; -;;; Code: - ;;; ;;; Packed structures. diff --git a/guix/build/union.scm b/guix/build/union.scm index ce6d030109b..bccdb00ce72 100644 --- a/guix/build/union.scm +++ b/guix/build/union.scm @@ -18,6 +18,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Build a directory that is the union of a set of directories, using +;;; symbolic links. +;;; +;;; Code: + (define-module (guix build union) #:use-module (ice-9 match) #:use-module (ice-9 format) @@ -32,13 +39,6 @@ relative-file-name symlink-relative)) -;;; Commentary: -;;; -;;; Build a directory that is the union of a set of directories, using -;;; symbolic links. -;;; -;;; Code: - ;; This code can be used with the bootstrap Guile, which is Guile 2.0, so ;; provide a compatibility layer. (cond-expand diff --git a/guix/bzr-download.scm b/guix/bzr-download.scm index cdd7f431397..ba812a9065c 100644 --- a/guix/bzr-download.scm +++ b/guix/bzr-download.scm @@ -17,6 +17,14 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; An method that fetches a specific revision from a Bazaar +;;; repository. The repository URL and revision identifier are specified with +;;; a object. +;;; +;;; Code: + (define-module (guix bzr-download) #:use-module (guix gexp) #:use-module (guix modules) ;for 'source-module-closure' @@ -32,14 +40,6 @@ bzr-fetch)) -;;; Commentary: -;;; -;;; An method that fetches a specific revision from a Bazaar -;;; repository. The repository URL and revision identifier are specified with -;;; a object. -;;; -;;; Code: - (define-record-type* bzr-reference make-bzr-reference bzr-reference? diff --git a/guix/cache.scm b/guix/cache.scm index c1a12b17620..f3e5612a8e3 100644 --- a/guix/cache.scm +++ b/guix/cache.scm @@ -17,6 +17,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module provides tools to manage a simple on-disk cache consisting of +;;; individual files. +;;; +;;; Code: + (define-module (guix cache) #:autoload (guix build syscalls) (lock-file unlock-file) #:use-module (srfi srfi-19) @@ -29,13 +36,6 @@ remove-expired-cache-entries maybe-remove-expired-cache-entries)) -;;; Commentary: -;;; -;;; This module provides tools to manage a simple on-disk cache consisting of -;;; individual files. -;;; -;;; Code: - (define (obsolete? date now ttl) "Return #t if DATE is obsolete compared to NOW + TTL seconds." (time>? (subtract-duration now (make-time time-duration 0 ttl)) diff --git a/guix/channels.scm b/guix/channels.scm index f216e201570..04cd2b8a2ed 100644 --- a/guix/channels.scm +++ b/guix/channels.scm @@ -22,6 +22,19 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module implements "channels." A channel is usually a source of +;;; package definitions. There's a special channel, the 'guix' channel, that +;;; provides all of Guix, including its commands and its documentation. +;;; User-defined channels are expected to typically provide a bunch of .scm +;;; files meant to be added to the '%package-search-path'. +;;; +;;; This module provides tools to fetch and update channels from a Git +;;; repository and to build them. +;;; +;;; Code: + (define-module (guix channels) #:autoload (git commit) (commit-lookup commit-id) @@ -119,19 +132,6 @@ channel-news-for-commit)) -;;; Commentary: -;;; -;;; This module implements "channels." A channel is usually a source of -;;; package definitions. There's a special channel, the 'guix' channel, that -;;; provides all of Guix, including its commands and its documentation. -;;; User-defined channels are expected to typically provide a bunch of .scm -;;; files meant to be added to the '%package-search-path'. -;;; -;;; This module provides tools to fetch and update channels from a Git -;;; repository and to build them. -;;; -;;; Code: - (define-record-type* channel make-channel channel? (name channel-name) diff --git a/guix/ci.scm b/guix/ci.scm index b2077448b02..9a1f0c144a0 100644 --- a/guix/ci.scm +++ b/guix/ci.scm @@ -17,6 +17,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module provides a client to the HTTP interface of the Hydra and +;;; Cuirass continuous integration (CI) tools. +;;; +;;; Code: + (define-module (guix ci) #:use-module (guix http-client) #:use-module (guix utils) @@ -84,13 +91,6 @@ channel-with-substitutes-available)) -;;; Commentary: -;;; -;;; This module provides a client to the HTTP interface of the Hydra and -;;; Cuirass continuous integration (CI) tools. -;;; -;;; Code: - (define (seconds->date seconds) "Given SECONDS, a number of seconds since 1970-01-01, return the corresponding date object." diff --git a/guix/colors.scm b/guix/colors.scm index 09bc7c60cc2..10cacfd1726 100644 --- a/guix/colors.scm +++ b/guix/colors.scm @@ -19,6 +19,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module provides tools to produce colored output using ANSI escapes. +;;; +;;; Code: + (define-module (guix colors) #:use-module (guix memoization) #:use-module (srfi srfi-1) @@ -45,12 +51,6 @@ file-hyperlink hyperlink)) -;;; Commentary: -;;; -;;; This module provides tools to produce colored output using ANSI escapes. -;;; -;;; Code: - ;; Record type for "colors", which are actually lists of color attributes. (define-record-type (make-color symbols ansi) diff --git a/guix/combinators.scm b/guix/combinators.scm index 261d6bb57e6..3f18b264e59 100644 --- a/guix/combinators.scm +++ b/guix/combinators.scm @@ -18,6 +18,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module provides useful combinators that complement SRFI-1 and +;;; friends. +;;; +;;; Code: + (define-module (guix combinators) #:use-module (ice-9 match) #:use-module (ice-9 vlist) @@ -28,13 +35,6 @@ procedure-call-location define-compile-time-procedure)) -;;; Commentary: -;;; -;;; This module provides useful combinators that complement SRFI-1 and -;;; friends. -;;; -;;; Code: - (define fold2 (case-lambda ((proc seed1 seed2 lst) diff --git a/guix/config.scm.in b/guix/config.scm.in index 62e15dd713f..89946ed9e9a 100644 --- a/guix/config.scm.in +++ b/guix/config.scm.in @@ -17,6 +17,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Compile-time configuration of Guix. When adding a substitution variable +;;; here, make sure to equip (guix scripts pull) to substitute it. +;;; +;;; Code: + (define-module (guix config) #:export (%guix-package-name %guix-version @@ -40,13 +47,6 @@ %bzip2 %xz)) -;;; Commentary: -;;; -;;; Compile-time configuration of Guix. When adding a substitution variable -;;; here, make sure to equip (guix scripts pull) to substitute it. -;;; -;;; Code: - (define %guix-package-name "@PACKAGE_NAME@") diff --git a/guix/cpio.scm b/guix/cpio.scm index 876f61ea3c6..6361ea55fc9 100644 --- a/guix/cpio.scm +++ b/guix/cpio.scm @@ -17,6 +17,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module implements the cpio "new ASCII" format, bit-for-bit identical +;;; to GNU cpio with the '-H newc' option. +;;; +;;; Code: + (define-module (guix cpio) #:use-module ((guix build syscalls) #:select (device-number device-number->major+minor)) @@ -36,13 +43,6 @@ write-cpio-archive)) -;;; Commentary: -;;; -;;; This module implements the cpio "new ASCII" format, bit-for-bit identical -;;; to GNU cpio with the '-H newc' option. -;;; -;;; Code: - ;; Values for 'mode', OR'd together. (define C_IRUSR #o000400) diff --git a/guix/cpu.scm b/guix/cpu.scm index 39766f8e9dc..aad06e46e8b 100644 --- a/guix/cpu.scm +++ b/guix/cpu.scm @@ -17,6 +17,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module provides tools to determine the micro-architecture supported +;;; by the CPU and to map it to a name known to GCC's '-march'. +;;; +;;; Code: + (define-module (guix cpu) #:use-module (guix sets) #:use-module (guix memoization) @@ -35,13 +42,6 @@ cpu->gcc-architecture gcc-architecture->micro-architecture-level)) -;;; Commentary: -;;; -;;; This module provides tools to determine the micro-architecture supported -;;; by the CPU and to map it to a name known to GCC's '-march'. -;;; -;;; Code: - ;; CPU description. (define-record-type (cpu architecture vendor family model flags) diff --git a/guix/cve.scm b/guix/cve.scm index 5c14b068b17..83f137dba36 100644 --- a/guix/cve.scm +++ b/guix/cve.scm @@ -17,6 +17,14 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module provides the tools to fetch, parse, and digest part of the +;;; Common Vulnerabilities and Exposures (CVE) feeds provided by the US NIST +;;; at . +;;; +;;; Code: + (define-module (guix cve) #:use-module (guix utils) #:use-module (guix http-client) @@ -54,14 +62,6 @@ current-vulnerabilities vulnerabilities->lookup-proc)) -;;; Commentary: -;;; -;;; This module provides the tools to fetch, parse, and digest part of the -;;; Common Vulnerabilities and Exposures (CVE) feeds provided by the US NIST -;;; at . -;;; -;;; Code: - (define (string->date* str) (string->date str "~Y-~m-~dT~H:~M:~S")) diff --git a/guix/cvs-download.scm b/guix/cvs-download.scm index 7d7d741b71c..4957e87557a 100644 --- a/guix/cvs-download.scm +++ b/guix/cvs-download.scm @@ -18,6 +18,15 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; An method that fetches a specific revision or date from a CVS +;;; repository. The CVS-ROOT-DIRECTORY, MODULE and REVISION are specified +;;; with a object. REVISION should be specified as either a +;;; date string in ISO-8601 format (e.g. "2012-12-21") or a CVS tag. +;;; +;;; Code: + (define-module (guix cvs-download) #:use-module (guix records) #:use-module (guix gexp) @@ -34,15 +43,6 @@ cvs-reference-revision cvs-fetch)) -;;; Commentary: -;;; -;;; An method that fetches a specific revision or date from a CVS -;;; repository. The CVS-ROOT-DIRECTORY, MODULE and REVISION are specified -;;; with a object. REVISION should be specified as either a -;;; date string in ISO-8601 format (e.g. "2012-12-21") or a CVS tag. -;;; -;;; Code: - (define-record-type* cvs-reference make-cvs-reference cvs-reference? diff --git a/guix/deprecation.scm b/guix/deprecation.scm index 47e653dfb2d..82be14c8c87 100644 --- a/guix/deprecation.scm +++ b/guix/deprecation.scm @@ -17,6 +17,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Provide a mechanism to mark bindings as deprecated. +;;; +;;; Code: + (define-module (guix deprecation) #:use-module (guix i18n) #:use-module (guix diagnostics) @@ -30,12 +36,6 @@ warn-about-old-daemon warn-about-deprecation)) -;;; Commentary: -;;; -;;; Provide a mechanism to mark bindings as deprecated. -;;; -;;; Code: - (define (warn-about-old-daemon) (warning (G_ "Your Guix daemon is severely outdated, and will soon cease to be able to download binary substitutes. To upgrade it, refer to the diff --git a/guix/describe.scm b/guix/describe.scm index 120a97ab052..40eb6430443 100644 --- a/guix/describe.scm +++ b/guix/describe.scm @@ -16,6 +16,16 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module provides supporting code to allow a Guix instance to find, at +;;; run time, which profile it's in (profiles created by 'guix pull'). That +;;; allows it to read meta-information about itself (e.g., repository URL and +;;; commit ID) and to find other channels available in the same profile. It's +;;; a bit like ELPA's pkg-info.el. +;;; +;;; Code: + (define-module (guix describe) #:use-module (guix memoization) #:use-module (guix profiles) @@ -44,16 +54,6 @@ manifest-entry-with-provenance manifest-entry-provenance)) -;;; Commentary: -;;; -;;; This module provides supporting code to allow a Guix instance to find, at -;;; run time, which profile it's in (profiles created by 'guix pull'). That -;;; allows it to read meta-information about itself (e.g., repository URL and -;;; commit ID) and to find other channels available in the same profile. It's -;;; a bit like ELPA's pkg-info.el. -;;; -;;; Code: - (define initial-program-arguments ;; Save the initial program arguments. This allows us to see the "real" ;; 'guix' program, even if 'guix repl -s' calls 'set-program-arguments' diff --git a/guix/diagnostics.scm b/guix/diagnostics.scm index 3f1f527b437..602b9f6c4ee 100644 --- a/guix/diagnostics.scm +++ b/guix/diagnostics.scm @@ -16,6 +16,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module provides the tools to report diagnostics to the user in a +;;; consistent way: errors, warnings, and notes. +;;; +;;; Code: + (define-module (guix diagnostics) #:use-module (guix colors) #:use-module (guix i18n) @@ -60,13 +67,6 @@ define-with-syntax-properties)) -;;; Commentary: -;;; -;;; This module provides the tools to report diagnostics to the user in a -;;; consistent way: errors, warnings, and notes. -;;; -;;; Code: - (define (trivial-format-string? fmt) (define len (string-length fmt)) diff --git a/guix/discovery.scm b/guix/discovery.scm index 2febfcdcb71..5a1847b9440 100644 --- a/guix/discovery.scm +++ b/guix/discovery.scm @@ -16,6 +16,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module provides tools to discover Guile modules and the variables +;;; they export. +;;; +;;; Code: + (define-module (guix discovery) #:use-module (guix i18n) #:use-module (guix modules) @@ -32,13 +39,6 @@ fold-module-public-variables fold-module-public-variables*)) -;;; Commentary: -;;; -;;; This module provides tools to discover Guile modules and the variables -;;; they export. -;;; -;;; Code: - (define* (scheme-files directory) "Return the list of Scheme files found under DIRECTORY, recursively. The returned list is sorted in alphabetical order. Return the empty list if diff --git a/guix/download.scm b/guix/download.scm index 0a34e00a852..d76fe10ace1 100644 --- a/guix/download.scm +++ b/guix/download.scm @@ -23,6 +23,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Produce fixed-output derivations with data fetched over HTTP or FTP. +;;; +;;; Code: + (define-module (guix download) #:use-module (ice-9 match) #:use-module (guix derivations) @@ -44,12 +50,6 @@ url-fetch/zipbomb download-to-store)) -;;; Commentary: -;;; -;;; Produce fixed-output derivations with data fetched over HTTP or FTP. -;;; -;;; Code: - (define %mirrors ;; Mirror lists used when `mirror://' URLs are passed. The first mirror ;; entry of each set should ideally be the most authoritative one, as that's diff --git a/guix/ftp-client.scm b/guix/ftp-client.scm index 24b18a8033b..37c83bc7db6 100644 --- a/guix/ftp-client.scm +++ b/guix/ftp-client.scm @@ -16,6 +16,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Simple FTP client (RFC 959). +;;; +;;; Code: + (define-module (guix ftp-client) #:use-module (srfi srfi-1) #:use-module (srfi srfi-9) @@ -36,12 +42,6 @@ ftp-list ftp-retr)) -;;; Commentary: -;;; -;;; Simple FTP client (RFC 959). -;;; -;;; Code: - ;; TODO: Use SRFI-3{4,5} error conditions. (define-record-type diff --git a/guix/gexp.scm b/guix/gexp.scm index 02b05fb95eb..c53c7f0f38a 100644 --- a/guix/gexp.scm +++ b/guix/gexp.scm @@ -23,6 +23,23 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module implements "G-expressions", or "gexps". Gexps are like +;;; S-expressions (sexps), with two differences: +;;; +;;; 1. References (un-quotations) to derivations or packages in a gexp are +;;; replaced by the corresponding output file name; in addition, the +;;; 'ungexp-native' unquote-like form allows code to explicitly refer to +;;; the native code of a given package, in case of cross-compilation; +;;; +;;; 2. Gexps embed information about the derivations they refer to. +;;; +;;; Gexps make it easy to write to files Scheme code that refers to store +;;; items, or to write Scheme code to build derivations. +;;; +;;; Code: + (define-module (guix gexp) #:use-module (guix store) #:use-module (guix monads) @@ -142,23 +159,6 @@ gexp-input-error? gexp-error-invalid-input)) -;;; Commentary: -;;; -;;; This module implements "G-expressions", or "gexps". Gexps are like -;;; S-expressions (sexps), with two differences: -;;; -;;; 1. References (un-quotations) to derivations or packages in a gexp are -;;; replaced by the corresponding output file name; in addition, the -;;; 'ungexp-native' unquote-like form allows code to explicitly refer to -;;; the native code of a given package, in case of cross-compilation; -;;; -;;; 2. Gexps embed information about the derivations they refer to. -;;; -;;; Gexps make it easy to write to files Scheme code that refers to store -;;; items, or to write Scheme code to build derivations. -;;; -;;; Code: - ;; "G expressions". (define-record-type (make-gexp references modules extensions proc location) diff --git a/guix/git-authenticate.scm b/guix/git-authenticate.scm index 5cf92b422ac..c7a26217236 100644 --- a/guix/git-authenticate.scm +++ b/guix/git-authenticate.scm @@ -17,6 +17,15 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module provides tools to authenticate a range of Git commits. A +;;; commit is considered "authentic" if and only if it is signed by an +;;; authorized party. Parties authorized to sign a commit are listed in the +;;; '.guix-authorizations' file of the parent commit. +;;; +;;; Code: + (define-module (guix git-authenticate) #:autoload (git oid) (oid->string string->oid) @@ -81,15 +90,6 @@ missing-key-error? missing-key-error-signature)) -;;; Commentary: -;;; -;;; This module provides tools to authenticate a range of Git commits. A -;;; commit is considered "authentic" if and only if it is signed by an -;;; authorized party. Parties authorized to sign a commit are listed in the -;;; '.guix-authorizations' file of the parent commit. -;;; -;;; Code: - (define-condition-type &git-authentication-error &error git-authentication-error? (commit git-authentication-error-commit)) diff --git a/guix/git-download.scm b/guix/git-download.scm index 609382eba11..a636a36bb47 100644 --- a/guix/git-download.scm +++ b/guix/git-download.scm @@ -21,6 +21,14 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; An method that fetches a specific commit from a Git repository. +;;; The repository URL and commit hash are specified with a +;;; object. +;;; +;;; Code: + (define-module (guix git-download) #:use-module (guix gexp) #:use-module (guix store) @@ -61,14 +69,6 @@ git-file-name git-predicate)) -;;; Commentary: -;;; -;;; An method that fetches a specific commit from a Git repository. -;;; The repository URL and commit hash are specified with a -;;; object. -;;; -;;; Code: - (define-record-type* git-reference make-git-reference git-reference? diff --git a/guix/glob.scm b/guix/glob.scm index 13fa99f511d..fbd6eda65ce 100644 --- a/guix/glob.scm +++ b/guix/glob.scm @@ -17,13 +17,6 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . -(define-module (guix glob) - #:use-module (ice-9 match) - #:export (string->sglob - compile-sglob - string->compiled-sglob - glob-match?)) - ;;; Commentary: ;;; ;;; This is a minimal implementation of "glob patterns" (info "(libc) @@ -32,6 +25,13 @@ ;;; ;;; Code: +(define-module (guix glob) + #:use-module (ice-9 match) + #:export (string->sglob + compile-sglob + string->compiled-sglob + glob-match?)) + (define (parse-bracket chars) "Parse CHARS, a list of characters that extracted from a '[...]' sequence." (match chars diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm index 95594bc839f..1e76d0dfdb5 100644 --- a/guix/gnu-maintenance.scm +++ b/guix/gnu-maintenance.scm @@ -20,6 +20,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Code for dealing with the maintenance of GNU packages, such as +;;; auto-updates. +;;; +;;; Code: + (define-module (guix gnu-maintenance) #:use-module (web uri) #:use-module (web client) @@ -82,13 +89,6 @@ %kernel.org-updater %generic-html-updater)) -;;; Commentary: -;;; -;;; Code for dealing with the maintenance of GNU packages, such as -;;; auto-updates. -;;; -;;; Code: - ;;; ;;; List of GNU packages. diff --git a/guix/gnupg.scm b/guix/gnupg.scm index 498f8b34a92..03ba6d5c6e0 100644 --- a/guix/gnupg.scm +++ b/guix/gnupg.scm @@ -19,6 +19,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; GnuPG interface. +;;; +;;; Code: + (define-module (guix gnupg) #:use-module (ice-9 popen) #:use-module (ice-9 match) @@ -39,12 +45,6 @@ gnupg-status-good-signature? gnupg-status-missing-key?)) -;;; Commentary: -;;; -;;; GnuPG interface. -;;; -;;; Code: - (define %gpg-command ;; The GnuPG 2.x command-line program name. (make-parameter (or (getenv "GUIX_GPG_COMMAND") "gpg"))) diff --git a/guix/graph.scm b/guix/graph.scm index 208560bd6a8..97ac950a406 100644 --- a/guix/graph.scm +++ b/guix/graph.scm @@ -17,6 +17,16 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module provides an abstract way to represent graphs and to manipulate +;;; them. It comes with several such representations for packages, +;;; derivations, and store items. It also provides a generic interface for +;;; exporting graphs in an external format, including a Graphviz +;;; implementation thereof. +;;; +;;; Code: + (define-module (guix graph) #:use-module (guix store) #:use-module (guix monads) @@ -61,16 +71,6 @@ export-graph)) -;;; Commentary: -;;; -;;; This module provides an abstract way to represent graphs and to manipulate -;;; them. It comes with several such representations for packages, -;;; derivations, and store items. It also provides a generic interface for -;;; exporting graphs in an external format, including a Graphviz -;;; implementation thereof. -;;; -;;; Code: - ;;; ;;; Node types. diff --git a/guix/hg-download.scm b/guix/hg-download.scm index ce13a158c04..f661cba223f 100644 --- a/guix/hg-download.scm +++ b/guix/hg-download.scm @@ -18,6 +18,14 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; An method that fetches a specific changeset from a Mercurial +;;; repository. The repository URL and changeset ID are specified with a +;;; object. +;;; +;;; Code: + (define-module (guix hg-download) #:use-module (guix gexp) #:use-module (guix store) @@ -40,14 +48,6 @@ hg-version hg-file-name)) -;;; Commentary: -;;; -;;; An method that fetches a specific changeset from a Mercurial -;;; repository. The repository URL and changeset ID are specified with a -;;; object. -;;; -;;; Code: - (define-record-type* hg-reference make-hg-reference hg-reference? diff --git a/guix/http-client.scm b/guix/http-client.scm index 0656a8a563d..7660a90eadc 100644 --- a/guix/http-client.scm +++ b/guix/http-client.scm @@ -19,6 +19,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; HTTP client portable among Guile versions, and with proper error condition +;;; reporting. +;;; +;;; Code: + (define-module (guix http-client) #:use-module (web uri) #:use-module (web http) @@ -65,13 +72,6 @@ %http-cache-ttl http-fetch/cached)) -;;; Commentary: -;;; -;;; HTTP client portable among Guile versions, and with proper error condition -;;; reporting. -;;; -;;; Code: - ;; HTTP GET error. (define-condition-type &http-get-error &error http-get-error? diff --git a/guix/i18n.scm b/guix/i18n.scm index f81e6b38ece..c5974ea4cb8 100644 --- a/guix/i18n.scm +++ b/guix/i18n.scm @@ -16,6 +16,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Internationalization support. +;;; +;;; Code: + (define-module (guix i18n) #:use-module (srfi srfi-26) #:export (G_ @@ -24,12 +30,6 @@ %gettext-domain %package-text-domain)) -;;; Commentary: -;;; -;;; Internationalization support. -;;; -;;; Code: - (define %gettext-domain ;; Text domain for strings used in the tools. "guix") diff --git a/guix/import/apache.scm b/guix/import/apache.scm index c17139cc39e..095d7284b22 100644 --- a/guix/import/apache.scm +++ b/guix/import/apache.scm @@ -19,6 +19,14 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This package provides not an actual importer but simply an updater for +;;; ASF packages. It grabs available files from the 'find-ls2.txt.gz' file +;;; available on dlcdn.apache.org. +;;; +;;; Code: + (define-module (guix import apache) #:use-module ((guix import utils) #:select (find-version)) #:use-module (guix http-client) @@ -35,14 +43,6 @@ #:export (%apache-updater)) -;;; Commentary: -;;; -;;; This package provides not an actual importer but simply an updater for -;;; ASF packages. It grabs available files from the 'find-ls2.txt.gz' file -;;; available on dlcdn.apache.org. -;;; -;;; Code: - (define (tarball->version tarball) "Return the version TARBALL corresponds to. TARBALL is a file name like \"coreutils-8.23.tar.xz\"." diff --git a/guix/import/cpan.scm b/guix/import/cpan.scm index 3d4508b11e6..0bfe4ed35f0 100644 --- a/guix/import/cpan.scm +++ b/guix/import/cpan.scm @@ -21,6 +21,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Generate a package declaration template for the latest version of a CPAN +;;; module, using meta-data from metacpan.org. +;;; +;;; Code: + (define-module (guix import cpan) #:use-module (ice-9 match) #:use-module (ice-9 regex) @@ -48,13 +55,6 @@ %metacpan-base-url)) -;;; Commentary: -;;; -;;; Generate a package declaration template for the latest version of a CPAN -;;; module, using meta-data from metacpan.org. -;;; -;;; Code: - (define %metacpan-base-url ;; Base URL of the MetaCPAN API. (make-parameter "https://fastapi.metacpan.org/v1/")) diff --git a/guix/import/cran.scm b/guix/import/cran.scm index 6681380c474..f49b3586dd8 100644 --- a/guix/import/cran.scm +++ b/guix/import/cran.scm @@ -23,6 +23,14 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Generate a package declaration template for the latest version of an R +;;; package on CRAN, using the DESCRIPTION file downloaded from +;;; cran.r-project.org. +;;; +;;; Code: + (define-module (guix import cran) #:use-module (ice-9 ftw) #:use-module (ice-9 match) @@ -78,14 +86,6 @@ description->alist description->package)) -;;; Commentary: -;;; -;;; Generate a package declaration template for the latest version of an R -;;; package on CRAN, using the DESCRIPTION file downloaded from -;;; cran.r-project.org. -;;; -;;; Code: - (define %input-style (make-parameter 'variable)) ; or 'specification diff --git a/guix/import/egg.scm b/guix/import/egg.scm index c9606ff8391..b1dc52cfa8c 100644 --- a/guix/import/egg.scm +++ b/guix/import/egg.scm @@ -21,29 +21,6 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . -(define-module (guix import egg) - #:use-module (ice-9 ftw) - #:use-module (ice-9 match) - #:use-module (srfi srfi-1) - #:use-module (srfi srfi-26) - #:use-module (srfi srfi-71) - #:use-module (gcrypt hash) - #:use-module (guix git) - #:use-module (guix base32) - #:use-module (guix memoization) - #:use-module (guix packages) - #:use-module (guix upstream) - #:use-module (guix build-system chicken) - #:use-module (guix store) - #:use-module ((guix download) #:select (download-to-store url-fetch)) - #:use-module (guix import utils) - #:export (egg->guix-package - egg-recursive-import - %egg-updater - - ;; For tests. - guix-package->egg-name)) - ;;; Commentary: ;;; ;;; (guix import egg) provides package importer for CHICKEN eggs. See the @@ -72,6 +49,29 @@ ;;; ;;; Code: +(define-module (guix import egg) + #:use-module (ice-9 ftw) + #:use-module (ice-9 match) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-26) + #:use-module (srfi srfi-71) + #:use-module (gcrypt hash) + #:use-module (guix git) + #:use-module (guix base32) + #:use-module (guix memoization) + #:use-module (guix packages) + #:use-module (guix upstream) + #:use-module (guix build-system chicken) + #:use-module (guix store) + #:use-module ((guix download) #:select (download-to-store url-fetch)) + #:use-module (guix import utils) + #:export (egg->guix-package + egg-recursive-import + %egg-updater + + ;; For tests. + guix-package->egg-name)) + ;;; ;;; Egg metadata fetcher and helper functions. diff --git a/guix/import/git.scm b/guix/import/git.scm index e6dab7f25fa..4000c349bee 100644 --- a/guix/import/git.scm +++ b/guix/import/git.scm @@ -19,24 +19,6 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . -(define-module (guix import git) - #:use-module (guix i18n) - #:use-module (guix diagnostics) - #:use-module (guix git) - #:use-module (guix git-download) - #:use-module (guix packages) - #:use-module (guix upstream) - #:use-module ((guix import utils) #:select (find-version)) - #:use-module (ice-9 match) - #:use-module (ice-9 regex) - #:use-module (srfi srfi-1) - #:use-module (srfi srfi-26) - #:use-module (srfi srfi-34) - #:use-module (srfi srfi-35) - #:use-module (srfi srfi-71) - #:export (%generic-git-updater - get-tags)) - ;;; Commentary: ;;; ;;; This module provides a generic package updater for packages hosted on Git @@ -57,6 +39,24 @@ ;;; ;;; Code: +(define-module (guix import git) + #:use-module (guix i18n) + #:use-module (guix diagnostics) + #:use-module (guix git) + #:use-module (guix git-download) + #:use-module (guix packages) + #:use-module (guix upstream) + #:use-module ((guix import utils) #:select (find-version)) + #:use-module (ice-9 match) + #:use-module (ice-9 regex) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-26) + #:use-module (srfi srfi-34) + #:use-module (srfi srfi-35) + #:use-module (srfi srfi-71) + #:export (%generic-git-updater + get-tags)) + ;;; Errors & warnings (define-condition-type &git-no-valid-tags-error &error diff --git a/guix/import/gnome.scm b/guix/import/gnome.scm index 211352ac3aa..2db80986291 100644 --- a/guix/import/gnome.scm +++ b/guix/import/gnome.scm @@ -18,6 +18,14 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This package provides not an actual importer but simply an updater for +;;; GNOME packages. It grabs package meta-data from 'cache.json' files +;;; available on ftp.gnome.org. +;;; +;;; Code: + (define-module (guix import gnome) #:use-module ((guix import utils) #:select (find-version)) #:use-module (guix upstream) @@ -34,14 +42,6 @@ #:use-module (ice-9 regex) #:export (%gnome-updater)) -;;; Commentary: -;;; -;;; This package provides not an actual importer but simply an updater for -;;; GNOME packages. It grabs package meta-data from 'cache.json' files -;;; available on ftp.gnome.org. -;;; -;;; Code: - (define (jsonish->upstream-source name jsonish) "Return an object for package NAME, using JSONISH as the source for metadata." diff --git a/guix/import/gnu.scm b/guix/import/gnu.scm index ee7f2f61b98..c373fd2eb19 100644 --- a/guix/import/gnu.scm +++ b/guix/import/gnu.scm @@ -18,6 +18,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Generate a package declaration template for the latest version of a GNU +;;; package, using meta-data available upstream for the package. +;;; +;;; Code: + (define-module (guix import gnu) #:use-module ((guix diagnostics) #:select (formatted-message)) #:use-module (guix gnu-maintenance) @@ -33,13 +40,6 @@ #:use-module (ice-9 match) #:export (gnu->guix-package)) -;;; Commentary: -;;; -;;; Generate a package declaration template for the latest version of a GNU -;;; package, using meta-data available upstream for the package. -;;; -;;; Code: - (define (qualified-url url) "Return a fully-qualified URL based on URL." (if (string-prefix? "/" url) diff --git a/guix/import/go.scm b/guix/import/go.scm index 0e65994d0ea..3a75f8e60c5 100644 --- a/guix/import/go.scm +++ b/guix/import/go.scm @@ -26,6 +26,41 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; (guix import go) attempts to make it easier to create Guix package +;;; declarations for Go modules. +;;; +;;; Modules in Go are a "collection of related Go packages" which are "the +;;; unit of source code interchange and versioning". Modules are generally +;;; hosted in a repository. +;;; +;;; Monorepo is a collection of modules within the same VCS source. Each +;;; module of monorepo may be released individually by assigning +;;; "/v" tag (see: https://go.dev/ref/mod#modules-overview). +;;; +;;; At this point it should handle correctly modules which have only Go +;;; dependencies and are accessible from proxy.golang.org (or configured via +;;; GOPROXY). +;;; +;;; We want it to work more or less this way: +;;; - get latest version for the module from GOPROXY +;;; - infer VCS root repo from which we will check-out source by +;;; + recognising known patterns (like github.com) +;;; + or recognizing .vcs suffix +;;; + or parsing meta tag in HTML served at the URL +;;; + or (TODO) if nothing else works by using zip file served by GOPROXY +;;; - get go.mod from GOPROXY (which is able to synthesize one if needed) +;;; - extract list of dependencies from this go.mod +;;; +;;; The Go module paths are translated to a Guix package name under the +;;; assumption that there will be no collision. +;;; +;;; TODO list +;;; - get correct hash in vcs->origin for Mercurial and Subversion +;;; +;;; Code: + (define-module (guix import go) #:use-module (guix build-system go) #:use-module (guix git) @@ -38,7 +73,7 @@ #:use-module (guix packages) #:use-module (guix http-client) #:use-module (guix memoization) - #:autoload (htmlprag) (html->sxml) ;from Guile-Lib + #:autoload (htmlprag) (html->sxml) ;from Guile-Lib #:autoload (guix ui) (warning) #:autoload (git structs) (git-error-message) #:use-module (ice-9 format) @@ -64,41 +99,6 @@ go-module->guix-package* go-module-recursive-import)) -;;; Commentary: -;;; -;;; (guix import go) attempts to make it easier to create Guix package -;;; declarations for Go modules. -;;; -;;; Modules in Go are a "collection of related Go packages" which are "the -;;; unit of source code interchange and versioning". Modules are generally -;;; hosted in a repository. -;;; -;;; Monorepo is a collection of modules within the same VCS source. Each -;;; module of monorepo may be released individually by assigning -;;; "/v" tag (see: https://go.dev/ref/mod#modules-overview). -;;; -;;; At this point it should handle correctly modules which have only Go -;;; dependencies and are accessible from proxy.golang.org (or configured via -;;; GOPROXY). -;;; -;;; We want it to work more or less this way: -;;; - get latest version for the module from GOPROXY -;;; - infer VCS root repo from which we will check-out source by -;;; + recognising known patterns (like github.com) -;;; + or recognizing .vcs suffix -;;; + or parsing meta tag in HTML served at the URL -;;; + or (TODO) if nothing else works by using zip file served by GOPROXY -;;; - get go.mod from GOPROXY (which is able to synthesize one if needed) -;;; - extract list of dependencies from this go.mod -;;; -;;; The Go module paths are translated to a Guix package name under the -;;; assumption that there will be no collision. - -;;; TODO list -;;; - get correct hash in vcs->origin for Mercurial and Subversion - -;;; Code: - (define (go-package) "Return the 'go' package. This is a lazy reference so that we don't depend on (gnu packages golang)." diff --git a/guix/import/kde.scm b/guix/import/kde.scm index 64e2182e879..d7a3e378425 100644 --- a/guix/import/kde.scm +++ b/guix/import/kde.scm @@ -19,6 +19,14 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This package provides not an actual importer but simply an updater for +;;; KDE packages. It grabs available files from the 'ls-lR.bz2' file +;;; available on download.kde.org. +;;; +;;; Code: + (define-module (guix import kde) #:use-module ((guix import utils) #:select (find-version)) #:use-module (guix http-client) @@ -35,14 +43,6 @@ #:export (%kde-updater)) -;;; Commentary: -;;; -;;; This package provides not an actual importer but simply an updater for -;;; KDE packages. It grabs available files from the 'ls-lR.bz2' file -;;; available on download.kde.org. -;;; -;;; Code: - (define (tarball->version tarball) "Return the version TARBALL corresponds to. TARBALL is a file name like \"coreutils-8.23.tar.xz\"." diff --git a/guix/import/test.scm b/guix/import/test.scm index 7414cf5253f..997b4fd5ab8 100644 --- a/guix/import/test.scm +++ b/guix/import/test.scm @@ -16,6 +16,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module defines a pseudo updater whose sole purpose is to allow +;;; testing of the whole 'guix refresh' command. +;;; +;;; Code: + (define-module (guix import test) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) @@ -27,13 +34,6 @@ #:use-module (ice-9 match) #:export (%test-updater)) -;;; Commentary: -;;; -;;; This module defines a pseudo updater whose sole purpose is to allow -;;; testing of the whole 'guix refresh' command. -;;; -;;; Code: - (define test-target-version ;; VHash that maps package names to version/URL tuples. (make-parameter diff --git a/guix/import/texlive.scm b/guix/import/texlive.scm index 2b36251f44c..23ec3c00fda 100644 --- a/guix/import/texlive.scm +++ b/guix/import/texlive.scm @@ -18,6 +18,14 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Generate a package declaration template for corresponding package in the +;;; Tex Live Package Database (tlpdb). We fetch all sources from different +;;; locations in the SVN repository of the Texlive project. +;;; +;;; Code: + (define-module (guix import texlive) #:use-module (gcrypt hash) #:use-module (guix base32) @@ -51,14 +59,6 @@ texlive-recursive-import %texlive-updater)) -;;; Commentary: -;;; -;;; Generate a package declaration template for corresponding package in the -;;; Tex Live Package Database (tlpdb). We fetch all sources from different -;;; locations in the SVN repository of the Texlive project. -;;; -;;; Code: - ;; Generic locations are parts of the tree shared by multiple packages. ;; Package definitions should single out files stored there, or all files in ;; the directory from all involved packages would be downloaded. diff --git a/guix/inferior.scm b/guix/inferior.scm index 57490afc484..2a490ae6320 100644 --- a/guix/inferior.scm +++ b/guix/inferior.scm @@ -16,6 +16,14 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module provides a way to spawn Guix "inferior" processes and to talk +;;; to them. It allows us, from one instance of Guix, to interact with +;;; another instance of Guix coming from a different commit. +;;; +;;; Code: + (define-module (guix inferior) #:use-module (srfi srfi-9) #:use-module (srfi srfi-9 gnu) @@ -103,14 +111,6 @@ cached-channel-instance inferior-for-channels)) -;;; Commentary: -;;; -;;; This module provides a way to spawn Guix "inferior" processes and to talk -;;; to them. It allows us, from one instance of Guix, to interact with -;;; another instance of Guix coming from a different commit. -;;; -;;; Code: - ;; Inferior Guix process. (define-record-type (inferior pid socket close version packages table diff --git a/guix/ipfs.scm b/guix/ipfs.scm index 3c25f2a4991..669943df842 100644 --- a/guix/ipfs.scm +++ b/guix/ipfs.scm @@ -16,6 +16,14 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module implements bindings for the HTTP interface of the IPFS +;;; gateway, documented here: . It +;;; allows you to add and retrieve files over IPFS, and a few other things. +;;; +;;; Code: + (define-module (guix ipfs) #:use-module (json) #:use-module (srfi srfi-1) @@ -39,14 +47,6 @@ read-contents publish-name)) -;;; Commentary: -;;; -;;; This module implements bindings for the HTTP interface of the IPFS -;;; gateway, documented here: . It -;;; allows you to add and retrieve files over IPFS, and a few other things. -;;; -;;; Code: - (define %ipfs-base-url ;; URL of the IPFS gateway. (make-parameter "http://localhost:5001")) diff --git a/guix/least-authority.scm b/guix/least-authority.scm index 68dc7e68e8c..62ab632d1b1 100644 --- a/guix/least-authority.scm +++ b/guix/least-authority.scm @@ -16,6 +16,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module provides tools to execute programs with the least authority +;;; necessary, using Linux namespaces. +;;; +;;; Code: + (define-module (guix least-authority) #:use-module (guix gexp) #:use-module (guix modules) @@ -29,13 +36,6 @@ #:export (least-authority-wrapper %default-preserved-environment-variables)) -;;; Commentary: -;;; -;;; This module provides tools to execute programs with the least authority -;;; necessary, using Linux namespaces. -;;; -;;; Code: - (define %default-preserved-environment-variables ;; Environment variables preserved by the wrapper by default. '("HOME" "USER" "LOGNAME" "DISPLAY" "XAUTHORITY" "TERM" "TZ" "PAGER" diff --git a/guix/licenses.scm b/guix/licenses.scm index bccfbbedee1..24b86adabea 100644 --- a/guix/licenses.scm +++ b/guix/licenses.scm @@ -37,6 +37,19 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Available licenses. +;;; +;;; This list is based on these links: +;;; https://github.com/NixOS/nixpkgs/blob/master/lib/licenses.nix +;;; https://www.gnu.org/licenses/license-list +;;; +;;; Please update spdx-string->license from guix/import/utils.scm +;;; when modifying this list to avoid mismatches. +;;; +;;; Code: + (define-module (guix licenses) #:use-module (srfi srfi-9) #:export (license license? license-name license-uri license-comment @@ -118,19 +131,6 @@ hpnd fsdg-compatible)) -;;; Commentary: -;;; -;;; Available licenses. -;;; -;;; This list is based on these links: -;;; https://github.com/NixOS/nixpkgs/blob/master/lib/licenses.nix -;;; https://www.gnu.org/licenses/license-list -;;; -;;; Please update spdx-string->license from guix/import/utils.scm -;;; when modifying this list to avoid mismatches. -;;; -;;; Code: - (define-record-type (license name uri comment) actual-license? diff --git a/guix/man-db.scm b/guix/man-db.scm index d6241480f7e..94798a40db9 100644 --- a/guix/man-db.scm +++ b/guix/man-db.scm @@ -17,6 +17,16 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Scan gzipped man pages and create a man-db database. The database is +;;; meant to be used by 'man -k KEYWORD'. +;;; +;;; The implementation here aims to be simpler than that of 'man-db', and to +;;; produce deterministic output. See . +;;; +;;; Code: + (define-module (guix man-db) #:autoload (zlib) (call-with-gzip-input-port) #:autoload (zstd) (call-with-zstd-input-port) @@ -37,16 +47,6 @@ mandb-entries write-mandb-database)) -;;; Comment: -;;; -;;; Scan gzipped man pages and create a man-db database. The database is -;;; meant to be used by 'man -k KEYWORD'. -;;; -;;; The implementation here aims to be simpler than that of 'man-db', and to -;;; produce deterministic output. See . -;;; -;;; Code: - (define-record-type (mandb-entry file-name name section synopsis kind) mandb-entry? diff --git a/guix/modules.scm b/guix/modules.scm index 74400ffacc8..e60c18603a0 100644 --- a/guix/modules.scm +++ b/guix/modules.scm @@ -16,6 +16,16 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module provides introspection tools for Guile modules at the source +;;; level. Namely, it allows you to determine the closure of a module; it +;;; does so just by reading the 'define-module' clause of the module and its +;;; dependencies. This is primarily useful as an argument to +;;; 'with-imported-modules'. +;;; +;;; Code: + (define-module (guix modules) #:use-module (guix memoization) #:use-module (guix sets) @@ -35,16 +45,6 @@ live-module-closure guix-module-name?)) -;;; Commentary: -;;; -;;; This module provides introspection tools for Guile modules at the source -;;; level. Namely, it allows you to determine the closure of a module; it -;;; does so just by reading the 'define-module' clause of the module and its -;;; dependencies. This is primarily useful as an argument to -;;; 'with-imported-modules'. -;;; -;;; Code: - ;; The error corresponding to a missing module. (define-condition-type &missing-dependency-error &error missing-dependency-error? diff --git a/guix/monad-repl.scm b/guix/monad-repl.scm index fc9654ce9ed..6d8cb1c8b8d 100644 --- a/guix/monad-repl.scm +++ b/guix/monad-repl.scm @@ -17,6 +17,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This modules provides a couple of REPL meta-commands that make it easier +;;; to work with monadic procedures in the store monad. +;;; +;;; Code: + (define-module (guix monad-repl) #:use-module (guix store) #:use-module (guix monads) @@ -40,13 +47,6 @@ #:export (run-in-store enter-store-monad)) -;;; Comment: -;;; -;;; This modules provides a couple of REPL meta-commands that make it easier -;;; to work with monadic procedures in the store monad. -;;; -;;; Code: - (define* (monad-language monad run #:optional (name 'monad)) "Return a language with a special evaluator that causes monadic values to be \"run\" in MONAD using procedure RUN." diff --git a/guix/monads.scm b/guix/monads.scm index e1b056dc95f..5af7ca67f2d 100644 --- a/guix/monads.scm +++ b/guix/monads.scm @@ -17,6 +17,18 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module implements the general mechanism of monads, and provides in +;;; particular an instance of the "state" monad. The API was inspired by that +;;; of Racket's "better-monads" module (see +;;; ). +;;; The implementation and use case were influenced by Oleg Kysielov's +;;; "Monadic Programming in Scheme" (see +;;; ). +;;; +;;; Code: + (define-module (guix monads) #:use-module ((system syntax) #:select (syntax-local-binding)) @@ -63,18 +75,6 @@ state-parameterize mparameterize)) -;;; Commentary: -;;; -;;; This module implements the general mechanism of monads, and provides in -;;; particular an instance of the "state" monad. The API was inspired by that -;;; of Racket's "better-monads" module (see -;;; ). -;;; The implementation and use case were influenced by Oleg Kysielov's -;;; "Monadic Programming in Scheme" (see -;;; ). -;;; -;;; Code: - ;; Record type for monads manipulated at run time. (define-record-type (make-monad bind return) diff --git a/guix/nar.scm b/guix/nar.scm index c7842399dcd..fb71e846e83 100644 --- a/guix/nar.scm +++ b/guix/nar.scm @@ -17,6 +17,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Read and write Nix archives, aka. ‘nar’. +;;; +;;; Code: + (define-module (guix nar) #:use-module (guix serialization) #:autoload (guix build syscalls) (lock-file unlock-file) @@ -48,12 +54,6 @@ restore-file-set)) -;;; Comment: -;;; -;;; Read and write Nix archives, aka. ‘nar’. -;;; -;;; Code: - (define-condition-type &nar-signature-error &nar-error nar-signature-error? (signature nar-signature-error-signature)) ; faulty signature or #f diff --git a/guix/openpgp.scm b/guix/openpgp.scm index d99624911b6..ee1c196eb10 100644 --- a/guix/openpgp.scm +++ b/guix/openpgp.scm @@ -25,6 +25,20 @@ ;;; Ludovic Courtès for use in GNU Guix: turned into a native Guile module, ;;; ported to Guile-Gcrypt, and extended and simplified in other ways. +;;; Commentary: +;;; +;;; This module contains code to read OpenPGP messages as described in +;;; , with extensions from +;;; (notably +;;; EdDSA support and extra signature sub-packets). +;;; +;;; Currently this module does enough to verify detached signatures of binary +;;; data. It does _not_ perform sanity checks on self-signatures, subkey +;;; binding signatures, etc., among others. Use only in a context where this +;;; limitations are acceptable! +;;; +;;; Code: + (define-module (guix openpgp) #:export (get-openpgp-detached-signature/ascii (get-packet . get-openpgp-packet) @@ -85,20 +99,6 @@ #:use-module (gcrypt base16) #:use-module ((guix build utils) #:select (dump-port))) -;;; Commentary: -;;; -;;; This module contains code to read OpenPGP messages as described in -;;; , with extensions from -;;; (notably -;;; EdDSA support and extra signature sub-packets). -;;; -;;; Currently this module does enough to verify detached signatures of binary -;;; data. It does _not_ perform sanity checks on self-signatures, subkey -;;; binding signatures, etc., among others. Use only in a context where this -;;; limitations are acceptable! -;;; -;;; Code: - (define-syntax print (syntax-rules () ;; ((_ args ...) (pk 'openpgp args)) diff --git a/guix/packages.scm b/guix/packages.scm index 5f656e6441d..e43ab37f1f4 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -28,6 +28,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module provides a high-level mechanism to define packages in a +;;; Guix-based distribution. +;;; +;;; Code: + (define-module (guix packages) #:autoload (guix build utils) (compressor tarball? strip-store-file-name) #:use-module (guix utils) @@ -219,13 +226,6 @@ (module-re-export! (current-module) '(delete) #:replace? #t) (module-re-export! (current-module) '(delete)))) -;;; Commentary: -;;; -;;; This module provides a high-level mechanism to define packages in a -;;; Guix-based distribution. -;;; -;;; Code: - (define-syntax-rule (define-compile-time-decoder name string->bytevector) "Define NAME as a macro that runs STRING->BYTEVECTOR at macro expansion time if possible." diff --git a/guix/pki.scm b/guix/pki.scm index 91c1be531a9..7b3d1bd0462 100644 --- a/guix/pki.scm +++ b/guix/pki.scm @@ -16,6 +16,15 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Public key infrastructure for the authentication and authorization of +;;; archive imports. This is essentially a subset of SPKI for our own +;;; purposes (see and +;;; .) +;;; +;;; Code: + (define-module (guix pki) #:use-module (guix config) #:use-module (gcrypt pk-crypto) @@ -39,15 +48,6 @@ valid-signature? signature-case)) -;;; Commentary: -;;; -;;; Public key infrastructure for the authentication and authorization of -;;; archive imports. This is essentially a subset of SPKI for our own -;;; purposes (see and -;;; .) -;;; -;;; Code: - (define (public-keys->acl keys) "Return an ACL that lists all of KEYS with a '(guix import)' tag---meaning that all of KEYS are authorized for archive imports. Each diff --git a/guix/profiles.scm b/guix/profiles.scm index fb2edbfab34..5e07dc107e1 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -29,6 +29,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Tools to create and manipulate profiles---i.e., the representation of a +;;; set of installed packages. +;;; +;;; Code: + (define-module (guix profiles) #:use-module ((guix config) #:select (%state-directory)) #:use-module ((guix utils) #:hide (package-name->name+version)) @@ -167,13 +174,6 @@ linux-module-database)) -;;; Commentary: -;;; -;;; Tools to create and manipulate profiles---i.e., the representation of a -;;; set of installed packages. -;;; -;;; Code: - ;;; ;;; Condition types. diff --git a/guix/profiling.scm b/guix/profiling.scm index e1c205a5438..8c8d5125fff 100644 --- a/guix/profiling.scm +++ b/guix/profiling.scm @@ -16,18 +16,18 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . -(define-module (guix profiling) - #:use-module (ice-9 match) - #:autoload (ice-9 format) (format) - #:export (profiled? - register-profiling-hook!)) - ;;; Commentary: ;;; ;;; Basic support for Guix-specific profiling. ;;; ;;; Code: +(define-module (guix profiling) + #:use-module (ice-9 match) + #:autoload (ice-9 format) (format) + #:export (profiled? + register-profiling-hook!)) + (define profiled? (let ((profiled (or (and=> (getenv "GUIX_PROFILING") string-tokenize) diff --git a/guix/progress.scm b/guix/progress.scm index e1b35094e11..98ee3bc3c2f 100644 --- a/guix/progress.scm +++ b/guix/progress.scm @@ -19,6 +19,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Helper to write progress report code for downloads, etc. +;;; +;;; Code: + (define-module (guix progress) #:use-module (guix records) #:autoload (guix build syscalls) (terminal-string-width) @@ -51,12 +57,6 @@ dump-port*)) -;;; Commentary: -;;; -;;; Helper to write progress report code for downloads, etc. -;;; -;;; Code: - (define-record-type* progress-reporter make-progress-reporter progress-reporter? (start progress-reporter-start) ; thunk diff --git a/guix/quirks.scm b/guix/quirks.scm index 1cffe971fc7..fe8c001bc4b 100644 --- a/guix/quirks.scm +++ b/guix/quirks.scm @@ -16,6 +16,15 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Time traveling is a challenge! Sometimes, going back to the past requires +;;; adjusting the old source code so it can be evaluated with our modern day +;;; Guile and against our modern Guix APIs. This file describes quirks found +;;; in old Guix revisions, along with ways to address them or patch them. +;;; +;;; Code: + (define-module (guix quirks) #:use-module ((guix build utils) #:select (substitute*)) #:use-module (srfi srfi-9) @@ -29,15 +38,6 @@ %patches)) -;;; Commentary: -;;; -;;; Time traveling is a challenge! Sometimes, going back to the past requires -;;; adjusting the old source code so it can be evaluated with our modern day -;;; Guile and against our modern Guix APIs. This file describes quirks found -;;; in old Guix revisions, along with ways to address them or patch them. -;;; -;;; Code: - (define (syscalls-reexports-local-variables? source) "Return true if (guix build syscalls) contains the bug described at ." diff --git a/guix/read-print.scm b/guix/read-print.scm index 9b3a98c8ee3..6c57f0e94b7 100644 --- a/guix/read-print.scm +++ b/guix/read-print.scm @@ -16,6 +16,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module provides a comment-preserving reader and a comment-preserving +;;; pretty-printer smarter than (ice-9 pretty-print). +;;; +;;; Code: + (define-module (guix read-print) #:use-module (ice-9 control) #:use-module (ice-9 match) @@ -53,13 +60,6 @@ comment-margin? canonicalize-comment)) -;;; Commentary: -;;; -;;; This module provides a comment-preserving reader and a comment-preserving -;;; pretty-printer smarter than (ice-9 pretty-print). -;;; -;;; Code: - ;;; ;;; Comment-preserving reader. diff --git a/guix/records.scm b/guix/records.scm index 52d03f73942..fc83d975189 100644 --- a/guix/records.scm +++ b/guix/records.scm @@ -17,6 +17,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Utilities for dealing with Scheme records. +;;; +;;; Code: + (define-module (guix records) #:use-module (srfi srfi-1) #:use-module (srfi srfi-9) @@ -34,12 +40,6 @@ match-record match-record-lambda)) -;;; Commentary: -;;; -;;; Utilities for dealing with Scheme records. -;;; -;;; Code: - (define-syntax record-error (syntax-rules () "Report a syntactic error in use of CONSTRUCTOR." diff --git a/guix/remote-procedures.scm b/guix/remote-procedures.scm index dca491a76d3..48424f7e8bb 100644 --- a/guix/remote-procedures.scm +++ b/guix/remote-procedures.scm @@ -16,6 +16,15 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module defines the remote procedure interface between the build +;;; daemon and clients (also known as "remote procedure calls" or RPCs). It +;;; is used to generate client stubs in (guix store) and can also be used to +;;; generate server stubs. +;;; +;;; Code: + (define-module (guix remote-procedures) #:use-module (guix serialization) #:export (%protocol-version @@ -35,15 +44,6 @@ build-mode gc-action)) -;;; Comment: -;;; -;;; This module defines the remote procedure interface between the build -;;; daemon and clients (also known as "remote procedure calls" or RPCs). It -;;; is used to generate client stubs in (guix store) and can also be used to -;;; generate server stubs. -;;; -;;; Code: - (define %protocol-version ;; Version of the currently-implemented protocol. #x164) diff --git a/guix/remote.scm b/guix/remote.scm index 6a122724936..16a94aef7f8 100644 --- a/guix/remote.scm +++ b/guix/remote.scm @@ -16,6 +16,17 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Note: This API is experimental and subject to change! +;;; +;;; Evaluate a gexp on a remote machine, over SSH, ensuring that all the +;;; elements the gexp refers to are deployed beforehand. This is useful for +;;; expressions that have side effects; for pure expressions, you would rather +;;; build a derivation remotely or offload it. +;;; +;;; Code: + (define-module (guix remote) #:use-module (guix ssh) #:use-module (guix gexp) @@ -36,17 +47,6 @@ #:use-module (srfi srfi-71) #:export (remote-eval)) -;;; Commentary: -;;; -;;; Note: This API is experimental and subject to change! -;;; -;;; Evaluate a gexp on a remote machine, over SSH, ensuring that all the -;;; elements the gexp refers to are deployed beforehand. This is useful for -;;; expressions that have side effects; for pure expressions, you would rather -;;; build a derivation remotely or offload it. -;;; -;;; Code: - (define* (remote-pipe-for-gexp lowered session #:optional become-command) "Return a remote pipe for the given SESSION to evaluate LOWERED. If BECOME-COMMAND is given, use that to invoke the remote Guile REPL." diff --git a/guix/repl.scm b/guix/repl.scm index 94d85815ef4..0cfcee9ac60 100644 --- a/guix/repl.scm +++ b/guix/repl.scm @@ -16,13 +16,6 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . -(define-module (guix repl) - #:use-module (srfi srfi-1) - #:use-module (srfi srfi-26) - #:use-module (ice-9 match) - #:export (send-repl-response - machine-repl)) - ;;; Commentary: ;;; ;;; This module implements the "machine-readable" REPL provided by @@ -31,6 +24,13 @@ ;;; ;;; Code: +(define-module (guix repl) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-26) + #:use-module (ice-9 match) + #:export (send-repl-response + machine-repl)) + (define (self-quoting? x) "Return #t if X is self-quoting." (letrec-syntax ((one-of (syntax-rules () diff --git a/guix/rpm.scm b/guix/rpm.scm index 34ecab89566..54b444ffdd7 100644 --- a/guix/rpm.scm +++ b/guix/rpm.scm @@ -16,6 +16,14 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module provides the building blocks required to construct RPM +;;; archives. It is intended to be importable on the build side, so shouldn't +;;; depend on (guix diagnostics) or other host-side-only modules. +;;; +;;; Code: + (define-module (guix rpm) #:autoload (gcrypt hash) (hash-algorithm file-hash md5) #:use-module (guix build utils) @@ -45,14 +53,6 @@ fhs-directory?)) -;;; Commentary: -;;; -;;; This module provides the building blocks required to construct RPM -;;; archives. It is intended to be importable on the build side, so shouldn't -;;; depend on (guix diagnostics) or other host-side-only modules. -;;; -;;; Code: - (define (gnu-system-triplet->machine-type triplet) "Return the machine component of TRIPLET, a GNU system triplet." (first (string-split triplet #\-))) diff --git a/guix/scripts.scm b/guix/scripts.scm index c4849816ea9..2151acf2a54 100644 --- a/guix/scripts.scm +++ b/guix/scripts.scm @@ -21,6 +21,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; General code for Guix scripts. +;;; +;;; Code: + (define-module (guix scripts) #:use-module (guix utils) #:use-module (guix ui) @@ -52,12 +58,6 @@ %disk-space-warning warn-about-disk-space)) -;;; Commentary: -;;; -;;; General code for Guix scripts. -;;; -;;; Code: - ;; Syntactic keywords. (define synopsis 'command-synopsis) (define category 'command-category) diff --git a/guix/scripts/authenticate.scm b/guix/scripts/authenticate.scm index f90eeeec8de..41540036b31 100644 --- a/guix/scripts/authenticate.scm +++ b/guix/scripts/authenticate.scm @@ -16,6 +16,14 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This program is used internally by the daemon to sign exported archive +;;; (the 'export-paths' RPC), and to authenticate imported archives (the +;;; 'import-paths' RPC.) +;;; +;;; Code: + (define-module (guix scripts authenticate) #:use-module (guix scripts) #:use-module (guix base16) @@ -34,14 +42,6 @@ #:use-module (ice-9 iconv) #:export (guix-authenticate)) -;;; Commentary: -;;; -;;; This program is used internally by the daemon to sign exported archive -;;; (the 'export-paths' RPC), and to authenticate imported archives (the -;;; 'import-paths' RPC.) -;;; -;;; Code: - (define read-canonical-sexp ;; Read a gcrypt sexp from a port and return it. (compose string->canonical-sexp read-string)) diff --git a/guix/scripts/challenge.scm b/guix/scripts/challenge.scm index a1f90b78446..1b98b3d66a4 100644 --- a/guix/scripts/challenge.scm +++ b/guix/scripts/challenge.scm @@ -16,6 +16,18 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Challenge substitute servers, checking whether they provide the same +;;; binaries as those built locally. +;;; +;;; Here we completely bypass the daemon to access substitutes. This is +;;; because we want to be able to report fine-grain information about +;;; discrepancies: We need to show the URL of the offending nar, its hash, and +;;; so on. +;;; +;;; Code: + (define-module (guix scripts challenge) #:use-module (guix ui) #:use-module (guix colors) @@ -62,18 +74,6 @@ guix-challenge)) -;;; Commentary: -;;; -;;; Challenge substitute servers, checking whether they provide the same -;;; binaries as those built locally. -;;; -;;; Here we completely bypass the daemon to access substitutes. This is -;;; because we want to be able to report fine-grain information about -;;; discrepancies: We need to show the URL of the offending nar, its hash, and -;;; so on. -;;; -;;; Code: - (define ensure-store-item ;XXX: move to (guix ui)? (@@ (guix scripts size) ensure-store-item)) diff --git a/guix/scripts/deploy.scm b/guix/scripts/deploy.scm index f1df8bd5e9e..9cad49b857b 100644 --- a/guix/scripts/deploy.scm +++ b/guix/scripts/deploy.scm @@ -20,6 +20,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This program provides a command-line interface to (gnu machine), allowing +;;; users to perform remote deployments through specification files. +;;; +;;; Code: + (define-module (guix scripts deploy) #:use-module (gnu machine) #:use-module (guix discovery) @@ -41,13 +48,6 @@ #:use-module (srfi srfi-71) #:export (guix-deploy)) -;;; Commentary: -;;; -;;; This program provides a command-line interface to (gnu machine), allowing -;;; users to perform remote deployments through specification files. -;;; -;;; Code: - (define (show-help) diff --git a/guix/scripts/git/authenticate.scm b/guix/scripts/git/authenticate.scm index 4809e49c7bf..6ff1afe4606 100644 --- a/guix/scripts/git/authenticate.scm +++ b/guix/scripts/git/authenticate.scm @@ -17,6 +17,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Authenticate a Git checkout by reading '.guix-authorizations' files and +;;; following the "authorizations invariant" also used by (guix channels). +;;; +;;; Code: + (define-module (guix scripts git authenticate) #:use-module (git) #:use-module (guix build utils) @@ -40,13 +47,6 @@ #:use-module (ice-9 match) #:export (guix-git-authenticate)) -;;; Commentary: -;;; -;;; Authenticate a Git checkout by reading '.guix-authorizations' files and -;;; following the "authorizations invariant" also used by (guix channels). -;;; -;;; Code: - (define %options ;; Specifications of the command-line options. (list (option '(#\h "help") #f #f diff --git a/guix/scripts/home/import.scm b/guix/scripts/home/import.scm index 15b4bc97982..0d6c73ebd39 100644 --- a/guix/scripts/home/import.scm +++ b/guix/scripts/home/import.scm @@ -20,6 +20,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module provides utilities for generating home service +;;; configurations from existing "dotfiles". +;;; +;;; Code: + (define-module (guix scripts home import) #:use-module (guix profiles) #:use-module (guix ui) @@ -39,13 +46,6 @@ ;; For tests. manifest+configuration-files->code)) -;;; Commentary: -;;; -;;; This module provides utilities for generating home service -;;; configurations from existing "dotfiles". -;;; -;;; Code: - (define (basename+remove-dots file-name) "Remove the dot from the dotfile FILE-NAME; replace the other dots in FILE-NAME with \"-\", and return the basename of it." diff --git a/guix/scripts/offload.scm b/guix/scripts/offload.scm index 462c3dfc0c0..1b694084b31 100644 --- a/guix/scripts/offload.scm +++ b/guix/scripts/offload.scm @@ -19,6 +19,18 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Attempt to offload builds to the machines listed in +;;; /etc/guix/machines.scm, transferring missing dependencies over SSH, and +;;; retrieving the build output(s) over SSH upon success. +;;; +;;; This command should not be used directly; instead, it is called on-demand +;;; by the daemon, unless it was started with '--no-offload' or a client +;;; inhibited build hooks. +;;; +;;; Code: + (define-module (guix scripts offload) #:autoload (ssh key) (private-key-from-file public-key-from-file) @@ -76,18 +88,6 @@ guix-offload)) -;;; Commentary: -;;; -;;; Attempt to offload builds to the machines listed in -;;; /etc/guix/machines.scm, transferring missing dependencies over SSH, and -;;; retrieving the build output(s) over SSH upon success. -;;; -;;; This command should not be used directly; instead, it is called on-demand -;;; by the daemon, unless it was started with '--no-offload' or a client -;;; inhibited build hooks. -;;; -;;; Code: - (define-record-type* build-machine make-build-machine build-machine? diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm index dbaff4a89c0..cf89cde31bc 100644 --- a/guix/scripts/pack.scm +++ b/guix/scripts/pack.scm @@ -28,6 +28,14 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module implements the 'guix pack' command and the various supported +;;; formats. Where feasible, the builders of the packs should be implemented +;;; as single derivations to minimize storage requirements. +;;; +;;; Code: + (define-module (guix scripts pack) #:use-module (guix scripts) #:autoload (guix import json) (json->scheme-file) @@ -85,14 +93,6 @@ wrapped-manifest)) -;;; Commentary: - -;;; This module implements the 'guix pack' command and the various supported -;;; formats. Where feasible, the builders of the packs should be implemented -;;; as single derivations to minimize storage requirements. - -;;; Code: - ;; This one is only for use in this module, so don't put it in %compressors. (define (bootstrap-xz) (compressor "bootstrap-xz" ".xz" diff --git a/guix/scripts/repl.scm b/guix/scripts/repl.scm index cb71e59b05f..8bfc5ed1bc1 100644 --- a/guix/scripts/repl.scm +++ b/guix/scripts/repl.scm @@ -18,6 +18,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This command provides a Guile script runner and REPL in an environment +;;; that contains all the modules comprising Guix. +;;; +;;; Code: + (define-module (guix scripts repl) #:use-module (guix ui) #:use-module (guix scripts) @@ -31,11 +38,6 @@ (make-tcp-server-socket make-unix-domain-server-socket) #:export (guix-repl)) -;;; Commentary: -;;; -;;; This command provides a Guile script runner and REPL in an environment -;;; that contains all the modules comprising Guix. - (define %default-options `((type . guile))) diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm index 96d8c13ac2c..019269102b2 100755 --- a/guix/scripts/substitute.scm +++ b/guix/scripts/substitute.scm @@ -19,6 +19,17 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This is the "binary substituter". It is invoked by the daemon do check +;;; for the existence of available "substitutes" (pre-built binaries), and to +;;; actually use them as a substitute to building things locally. +;;; +;;; If possible, substitute a binary for the requested store path, using a Nix +;;; "binary cache". This program implements the Nix "substituter" protocol. +;;; +;;; Code: + (define-module (guix scripts substitute) #:use-module (guix ui) #:use-module (guix scripts) @@ -64,17 +75,6 @@ substitute-urls guix-substitute)) -;;; Comment: -;;; -;;; This is the "binary substituter". It is invoked by the daemon do check -;;; for the existence of available "substitutes" (pre-built binaries), and to -;;; actually use them as a substitute to building things locally. -;;; -;;; If possible, substitute a binary for the requested store path, using a Nix -;;; "binary cache". This program implements the Nix "substituter" protocol. -;;; -;;; Code: - (define %narinfo-expired-cache-entry-removal-delay ;; How often we want to remove files corresponding to expired cache entries. (* 5 24 3600)) diff --git a/guix/scripts/system/installer.scm b/guix/scripts/system/installer.scm index 7a26896a872..5ea38043320 100644 --- a/guix/scripts/system/installer.scm +++ b/guix/scripts/system/installer.scm @@ -16,6 +16,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Implement the 'guix system installer' command, which runs the installer, +;;; directly as a Guix command, also in dry-run mode. +;;; +;;; Code: + (define-module (guix scripts system installer) #:use-module (srfi srfi-1) #:use-module (srfi srfi-37) @@ -25,13 +32,6 @@ #:use-module (guix utils) #:export (guix-system-installer)) -;;; Commentary: -;;; -;;; Implement the 'guix system installer' command, which runs the installer, -;;; directly as a Guix command, also in dry-run mode. -;;; -;;; Code: - (define %options (list (option '(#\n "dry-run") #f #f (lambda (opt name arg result) diff --git a/guix/scripts/system/reconfigure.scm b/guix/scripts/system/reconfigure.scm index 402e6d30fc1..74430991862 100644 --- a/guix/scripts/system/reconfigure.scm +++ b/guix/scripts/system/reconfigure.scm @@ -24,6 +24,16 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module implements the "effectful" parts of system +;;; reconfiguration. Although building a system derivation is a pure +;;; operation, a number of impure operations must be carried out for the +;;; system configuration to be realized -- chiefly, creation of generation +;;; symlinks and invocation of activation scripts. +;;; +;;; Code: + (define-module (guix scripts system reconfigure) #:autoload (gnu packages gnupg) (guile-gcrypt) #:use-module (gnu bootloader) @@ -64,16 +74,6 @@ ensure-forward-reconfigure warn-about-backward-reconfigure)) -;;; Commentary: -;;; -;;; This module implements the "effectful" parts of system -;;; reconfiguration. Although building a system derivation is a pure -;;; operation, a number of impure operations must be carried out for the -;;; system configuration to be realized -- chiefly, creation of generation -;;; symlinks and invocation of activation scripts. -;;; -;;; Code: - ;;; ;;; Profile creation. diff --git a/guix/scripts/system/search.scm b/guix/scripts/system/search.scm index d978884518e..626fbdb8430 100644 --- a/guix/scripts/system/search.scm +++ b/guix/scripts/system/search.scm @@ -17,6 +17,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Implement the 'guix system search' command, which searches among the +;;; available service types. +;;; +;;; Code: + (define-module (guix scripts system search) #:use-module (guix ui) #:use-module (guix utils) @@ -35,13 +42,6 @@ find-service-types guix-system-search)) -;;; Commentary: -;;; -;;; Implement the 'guix system search' command, which searches among the -;;; available service types. -;;; -;;; Code: - (define service-type-name* (compose symbol->string service-type-name)) diff --git a/guix/search-paths.scm b/guix/search-paths.scm index 90939d6aca6..1e72a2708b5 100644 --- a/guix/search-paths.scm +++ b/guix/search-paths.scm @@ -18,6 +18,15 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module defines "search path specifications", which allow packages to +;;; declare environment variables that they use to define search paths. For +;;; instance, GCC has the 'CPATH' variable, Guile has the 'GUILE_LOAD_PATH' +;;; variable, etc. +;;; +;;; Code: + (define-module (guix search-paths) #:use-module (guix records) #:use-module (guix build utils) @@ -59,15 +68,6 @@ search-path-definition set-search-paths)) -;;; Commentary: -;;; -;;; This module defines "search path specifications", which allow packages to -;;; declare environment variables that they use to define search paths. For -;;; instance, GCC has the 'CPATH' variable, Guile has the 'GUILE_LOAD_PATH' -;;; variable, etc. -;;; -;;; Code: - ;; The specification of a search path. (define-record-type* search-path-specification make-search-path-specification diff --git a/guix/serialization.scm b/guix/serialization.scm index 54ff5da03d9..480dc04182e 100644 --- a/guix/serialization.scm +++ b/guix/serialization.scm @@ -16,6 +16,14 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . + +;;; Commentary: +;;; +;;; Serialization procedures used by the RPCs and the Nar format. This module +;;; is for internal consumption. +;;; +;;; Code: + (define-module (guix serialization) #:autoload (guix base16) (base16-string->bytevector bytevector->base16-string) @@ -78,13 +86,6 @@ restore-file dump-file)) -;;; Comment: -;;; -;;; Serialization procedures used by the RPCs and the Nar format. This module -;;; is for internal consumption. -;;; -;;; Code: - ;; Similar to serialize.cc in Nix. (define-condition-type &nar-error &error ; XXX: inherit from &store-error ? diff --git a/guix/sets.scm b/guix/sets.scm index 017b79ca31d..de94f327230 100644 --- a/guix/sets.scm +++ b/guix/sets.scm @@ -16,6 +16,17 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; A simple (simplistic?) implementation of unordered persistent sets based +;;; on vhashes that seems to be good enough so far. +;;; +;;; Another option would be to use "bounded balance trees" (Adams 1992) as +;;; implemented by Ian Price in 'pfds', which has faster union etc. but needs +;;; an order on the objects of the set. +;;; +;;; Code: + (define-module (guix sets) #:use-module (srfi srfi-1) #:use-module (srfi srfi-9) @@ -32,17 +43,6 @@ list->set list->setq)) -;;; Commentary: -;;; -;;; A simple (simplistic?) implementation of unordered persistent sets based -;;; on vhashes that seems to be good enough so far. -;;; -;;; Another option would be to use "bounded balance trees" (Adams 1992) as -;;; implemented by Ian Price in 'pfds', which has faster union etc. but needs -;;; an order on the objects of the set. -;;; -;;; Code: - (define-record-type (%make-set vhash insert ref) set? diff --git a/guix/ssh.scm b/guix/ssh.scm index 4a28432dcee..e91d1c19c55 100644 --- a/guix/ssh.scm +++ b/guix/ssh.scm @@ -16,6 +16,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module provides tools to support communication with remote stores +;;; over SSH, using Guile-SSH. +;;; +;;; Code: + (define-module (guix ssh) #:use-module (guix store) #:use-module (guix inferior) @@ -56,13 +63,6 @@ report-guile-error)) -;;; Commentary: -;;; -;;; This module provides tools to support communication with remote stores -;;; over SSH, using Guile-SSH. -;;; -;;; Code: - (define %compression "zlib@openssh.com,zlib,none") diff --git a/guix/status.scm b/guix/status.scm index d3e926912c5..1404e40c56f 100644 --- a/guix/status.scm +++ b/guix/status.scm @@ -19,6 +19,16 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module provides facilities to track the status of ongoing builds and +;;; downloads in a given session, as well as tools to report about the current +;;; status to user interfaces. It does so by analyzing the output of +;;; 'current-build-output-port'. The build status is maintained in a +;;; record. +;;; +;;; Code: + (define-module (guix status) #:use-module (guix records) #:use-module (guix i18n) @@ -77,16 +87,6 @@ with-status-report with-status-verbosity)) -;;; Commentary: -;;; -;;; This module provides facilities to track the status of ongoing builds and -;;; downloads in a given session, as well as tools to report about the current -;;; status to user interfaces. It does so by analyzing the output of -;;; 'current-build-output-port'. The build status is maintained in a -;;; record. -;;; -;;; Code: - ;;; ;;; Build status tracking. diff --git a/guix/store/roots.scm b/guix/store/roots.scm index 6b949b5a86e..1fc366fc843 100644 --- a/guix/store/roots.scm +++ b/guix/store/roots.scm @@ -16,6 +16,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module provides tools to list and access garbage collector roots ("GC +;;; roots"). +;;; +;;; Code: + (define-module (guix store roots) #:use-module (guix config) #:use-module ((guix store) #:select (store-path? %gc-roots-directory)) @@ -34,13 +41,6 @@ user-owned? busy-store-items)) -;;; Commentary: -;;; -;;; This module provides tools to list and access garbage collector roots ("GC -;;; roots"). -;;; -;;; Code: - (define %profile-directory ;; Directory where user profiles are stored. ;; XXX: This is redundant with the definition in (guix profiles) and not diff --git a/guix/store/ssh.scm b/guix/store/ssh.scm index 7e6371acbca..7a09a3b0fe4 100644 --- a/guix/store/ssh.scm +++ b/guix/store/ssh.scm @@ -16,18 +16,18 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . -(define-module (guix store ssh) - #:use-module (guix ssh) - #:use-module (web uri) - #:export (connect-to-daemon)) - ;;; Commentary: ;;; ;;; This modules provides the entry point for 'open-connection' in (guix ;;; store). Passing an 'ssh://' URI to 'open-connection' triggers the use of ;;; the code in this module. ;;; -;;; End: +;;; Code: + +(define-module (guix store ssh) + #:use-module (guix ssh) + #:use-module (web uri) + #:export (connect-to-daemon)) (define (connect-to-daemon uri) "Connect to the SSH daemon at URI, a URI object with the 'ssh' scheme." diff --git a/guix/svn-download.scm b/guix/svn-download.scm index 81a98b11214..893c140ca0a 100644 --- a/guix/svn-download.scm +++ b/guix/svn-download.scm @@ -18,6 +18,14 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; An method that fetches a specific revision from a Subversion +;;; repository. The repository URL and REVISION are specified with a +;;; object. REVISION should be specified as a number. +;;; +;;; Code: + (define-module (guix svn-download) #:use-module (guix records) #:use-module (guix gexp) @@ -52,14 +60,6 @@ svn-multi-fetch download-multi-svn-to-store)) -;;; Commentary: -;;; -;;; An method that fetches a specific revision from a Subversion -;;; repository. The repository URL and REVISION are specified with a -;;; object. REVISION should be specified as a number. -;;; -;;; Code: - (define-record-type* svn-reference make-svn-reference svn-reference? diff --git a/guix/swh.scm b/guix/swh.scm index 0999314707d..98e7dbb230f 100644 --- a/guix/swh.scm +++ b/guix/swh.scm @@ -19,6 +19,18 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module provides bindings to the HTTP interface of Software Heritage. +;;; It allows you to browse the archive, look up revisions (such as SHA1 +;;; commit IDs), "origins" (code hosting URLs), content (files), etc. See +;;; for more information. +;;; +;;; The high-level 'swh-download' procedure allows you to download a Git +;;; revision from Software Heritage, provided it is available. +;;; +;;; Code: + (define-module (guix swh) #:use-module (guix base16) #:use-module (guix build utils) @@ -128,18 +140,6 @@ swh-download-directory-by-nar-hash swh-download)) -;;; Commentary: -;;; -;;; This module provides bindings to the HTTP interface of Software Heritage. -;;; It allows you to browse the archive, look up revisions (such as SHA1 -;;; commit IDs), "origins" (code hosting URLs), content (files), etc. See -;;; for more information. -;;; -;;; The high-level 'swh-download' procedure allows you to download a Git -;;; revision from Software Heritage, provided it is available. -;;; -;;; Code: - (define %swh-base-url ;; Presumably we won't need to change it. (make-parameter "https://archive.softwareheritage.org")) diff --git a/guix/tests.scm b/guix/tests.scm index 00787ced20c..4be360a7798 100644 --- a/guix/tests.scm +++ b/guix/tests.scm @@ -16,6 +16,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module provide shared infrastructure for the test suite. For +;;; internal use only. +;;; +;;; Code: + (define-module (guix tests) #:use-module ((guix config) #:select (%storedir %localstatedir)) #:use-module (guix store) @@ -66,13 +73,6 @@ test-file)) -;;; Commentary: -;;; -;;; This module provide shared infrastructure for the test suite. For -;;; internal use only. -;;; -;;; Code: - (define %tests-build-timeout ;; Timeout limit for guix unit tests (default: 5 minutes) (let ((default (if (string=? "riscv64-linux" (%current-system)) diff --git a/guix/tests/http.scm b/guix/tests/http.scm index 17485df9efd..ac026ba9d56 100644 --- a/guix/tests/http.scm +++ b/guix/tests/http.scm @@ -17,6 +17,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Code to spawn a Web server for testing purposes. +;;; +;;; Code: + (define-module (guix tests http) #:use-module (ice-9 threads) #:use-module (web server) @@ -32,12 +38,6 @@ %http-server-port %local-url)) -;;; Commentary: -;;; -;;; Code to spawn a Web server for testing purposes. -;;; -;;; Code: - (define %http-server-port ;; TCP port to use for the stub HTTP server. ;; If 0, the OS will automatically choose diff --git a/guix/transformations.scm b/guix/transformations.scm index 236527330f6..d0e4e88822a 100644 --- a/guix/transformations.scm +++ b/guix/transformations.scm @@ -20,6 +20,14 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module implements "package transformation options"---tools for +;;; package graph rewriting. It contains the graph rewriting logic, but also +;;; the tip of its user interface: command-line option handling. +;;; +;;; Code: + (define-module (guix transformations) #:use-module ((guix config) #:select (%system)) #:use-module (guix i18n) @@ -75,14 +83,6 @@ cacheable-transformation-option-key? %transformation-options)) -;;; Commentary: -;;; -;;; This module implements "package transformation options"---tools for -;;; package graph rewriting. It contains the graph rewriting logic, but also -;;; the tip of its user interface: command-line option handling. -;;; -;;; Code: - (module-autoload! (current-module) '(gnu packages) '(specification->package)) diff --git a/guix/ui.scm b/guix/ui.scm index dafc04b20f7..9235c4f4016 100644 --- a/guix/ui.scm +++ b/guix/ui.scm @@ -36,6 +36,16 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; User interface facilities for command-line tools. +;;; +;;; Note: This module is meant to be imported by user interfaces only and not +;;; be "regular" modules. It depends on lots of modules that may be +;;; relatively heavyweight dependencies for non-UI modules. +;;; +;;; Code: + (define-module (guix ui) ;import in user interfaces only #:use-module (guix i18n) #:use-module (guix colors) @@ -152,16 +162,6 @@ run-guix guix-main)) -;;; Commentary: -;;; -;;; User interface facilities for command-line tools. -;;; -;;; Note: This module is meant to be imported by user interfaces only and not -;;; be "regular" modules. It depends on lots of modules that may be -;;; relatively heavyweight dependencies for non-UI modules. -;;; -;;; Code: - (define (print-unbound-variable-error port key args default-printer) ;; Print unbound variable errors more nicely, and in the right language. (match args diff --git a/guix/upstream.scm b/guix/upstream.scm index 972f674d350..bacba8a8b19 100644 --- a/guix/upstream.scm +++ b/guix/upstream.scm @@ -21,6 +21,13 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; This module provides tools to represent and manipulate a upstream source +;;; code, and to auto-update package recipes. +;;; +;;; Code: + (define-module (guix upstream) #:use-module (guix records) #:use-module (guix utils) @@ -96,13 +103,6 @@ package-update update-package-source)) -;;; Commentary: -;;; -;;; This module provides tools to represent and manipulate a upstream source -;;; code, and to auto-update package recipes. -;;; -;;; Code: - ;; Representation of upstream's source. There can be several URLs--e.g., ;; tar.gz, tar.gz, etc. There can be correspond signature URLs, one per ;; source URL. diff --git a/guix/workers.scm b/guix/workers.scm index 3cd683c96d7..8e315a35222 100644 --- a/guix/workers.scm +++ b/guix/workers.scm @@ -16,20 +16,6 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . -(define-module (guix workers) - #:use-module (ice-9 threads) - #:use-module (ice-9 match) - #:use-module (ice-9 q) - #:use-module (srfi srfi-1) - #:use-module (srfi srfi-9) - #:use-module (srfi srfi-26) - #:use-module ((guix build syscalls) #:select (set-thread-name)) - #:export (pool? - make-pool - pool-enqueue! - pool-idle? - eventually)) - ;;; Commentary: ;;; ;;; This module implements "worker pools". Worker pools are the low-level @@ -44,6 +30,20 @@ ;;; ;;; Code: +(define-module (guix workers) + #:use-module (ice-9 threads) + #:use-module (ice-9 match) + #:use-module (ice-9 q) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-9) + #:use-module (srfi srfi-26) + #:use-module ((guix build syscalls) #:select (set-thread-name)) + #:export (pool? + make-pool + pool-enqueue! + pool-idle? + eventually)) + (define-record-type (%make-pool queue mutex condvar workers busy) pool? diff --git a/tests/services/vpn.scm b/tests/services/vpn.scm index 484eefec80d..b7a347df200 100644 --- a/tests/services/vpn.scm +++ b/tests/services/vpn.scm @@ -16,6 +16,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;;; Commentary: +;;; +;;; Unit tests for the (gnu services vpn) module. +;;; +;;; Code: + (define-module (tests services vpn) #:use-module (gnu packages vpn) #:use-module (gnu services vpn) @@ -24,12 +30,6 @@ #:use-module (srfi srfi-1) #:use-module (srfi srfi-64)) -;;; Commentary: -;;; -;;; Unit tests for the (gnu services vpn) module. -;;; -;;; Code: - ;;; Access some internals for whitebox testing. (define ipv4-address? (@@ (gnu services vpn) ipv4-address?)) (define ipv6-address? (@@ (gnu services vpn) ipv6-address?)) -- cgit v1.2.3