* gnu/services/networking.scm (tor-service): New procedure.
* doc/guix.texi (Networking Services): Document it.
* build-aux/hydra/demo-os.scm: Use it. Add TOR and TORSOCKS to
'packages'.
* doc/guix.texi (Using the Configuration System): Remove details about
'%base-services', and link to "Services".
(Services): Add introductory text.
(Base Services, Networking Services, X Window): New nodes.
* doc/guix.texi (Using the Configuration System): Change 'guix system
boot' to 'guix system reconfigure'.
(File Systems, User Accounts, Services): New nodes.
* doc/guix.texi (Using the Configuration System): Make the intro more
user-oriented. Change example to return an operating system. Fix
typos. Mention mandatory/optional fields.
* guix/ui.scm (%guix-user-module): New variable.
(read/eval): Pass it as the second argument to 'eval'.
* guix/scripts/build.scm (options/resolve-packages): Add case for
'gexp?'.
* tests/guix-build.sh: Add tests.
* doc/guix.texi (Invoking guix build): Document '-e gexp'.
guxi build: Allow gexps to be passed to '-e'.
* guix/ui.scm (%guix-user-module): New variable.
(read/eval): Pass it as the second argument to 'eval'.
* guix/scripts/build.scm (options/resolve-packages): Add case for
'gexp?'.
* tests/guix-build.sh: Add tests.
* doc/guix.texi (Invoking guix build): Document '-e gexp'.
* guix/derivations.scm (build-expression->derivation): Add
#:allowed-references and pass it to 'derivation.
* doc/guix.texi (Derivations): Adjust accordingly.
* gnu/system.scm (<operating-system>)[packages]: Change default value to
%BASE-PACKAGES.
(%base-packages): New variable.
* gnu/system/install.scm (installation-os): Use it when defining the
'packages' field.
* doc/guix.texi (Using the Configuration System): Use %BASE-PACKAGES in
example. Remove now unneeded module imports. Explain this.
* gnu.scm: New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it.
* build-aux/hydra/demo-os.scm: Use (gnu) and strip import list
accordingly.
* doc/guix.texi (Using the Configuration System): Adjust example
accordingly.
* doc/guix.texi (Installing Debugging Files): Add @cindex. Remove
unneeded '-i' in example. Mention source code an 'directory'. Link
to "Build Systems" instead of "Defining Packages".
* doc/guix.texi (G-Expressions): Show coreutils version number in store
file name. Add xref to "Derivations", in documentation of
'gexp->derivation'. Fix typo.
* gnu/system.scm (<operating-system>)[initrd]: Default to
'qemu-initrd'.
(<file-system>): New record type.
(operating-system-root-file-system): New procedure.
(operating-system-derivation): Take the device name for GRUB from
'operating-system-root-file-system'. Pass the
'operating-system-initrd' procedure the list of boot file systems.
* gnu/system/linux-initrd.scm (file-system->spec): New procedure.
(qemu-initrd): Add 'file-systems' parameter, and remove #:mounts
parameter.
[file-system-type-predicate]: New procedure.
[linux-modules]: Use it.
Adjust #:mounts argument in 'boot-system' call.
(gnu-system-initrd): Remove.
* gnu/system/vm.scm (%linux-vm-file-systems): New variable.
(expression->derivation-in-linux-vm): Adjust call to 'qemu-initrd'.
(virtualized-operating-system): New procedure.
(system-qemu-image/shared-store-script)[initrd]: Remove. Use
'virtualized-operating-system'. Get the 'initrd' file from OS-DRV.
* guix/build/linux-initrd.scm (mount-qemu-smb-share, mount-qemu-9p):
Remove.
(MS_RDONLY, MS_BIND): New global variables.
(bind-mount): Remove local 'MS_BIND' definition.
(mount-root-file-system): New procedure, with code formerly in
'boot-system'.
(mount-file-system): New procedure.
(boot-system): Add #:root-fs-type parameter. Remove 'MS_RDONLY' local
variable. Use 'mount-root-file-system' and 'mount-file-system'.
* doc/guix.texi (Using the Configuration System): Add 'file-system'
declaration.
* guix/monads.scm: Unexport 'lower-inputs' and 'derivation-expression'.
(text-file*): Add comment about the switch to 'gexp->derivation'.
(lower-inputs): Add comment about its doom.
(derivation-expression): Likewise.
* guix/gexp.scm (lower-inputs*): Rename to...
(lower-inputs): ... this. Update callers.
* tests/monads.scm (derivation-expression): New procedure.
* doc/guix.texi (The Store Monad): Use 'gexp->derivation' instead of
'derivation-expression'. Remove documentation of
'derivation-expression'.
* guix/ui.scm (read/eval): Use THE-ROOT-MODULE so that macros are
properly expanded.
* tests/guix-build.sh: Use 'gexp->derivation' instead of
'derivation-expression'.monads: Hide 'derivation-expression' and 'lower-inputs'.
* gnu/services.scm (<service>)[inputs]: Remove.
* gnu/system.scm (links): Remove.
(etc-directory): Add PASSWD and SHADOW to #:inputs.
(operating-system-boot-script): Pass ETC to 'dmd-configuration-file'.
(operating-system-derivation): Remove EXTRAS from the union.
* gnu/system/linux.scm (pam-service->configuration): Rewrite in terms of
'gexp->derivation'. Compute the contents on the build side. Expect
'arguments' to contain a list of gexps.
(pam-services->directory): Rewrite in terms of 'gexp->derivation'.
(unix-pam-service): Change 'arguments' to a list of one gexp.
* gnu/system/shadow.scm (<user-account>)[inputs]: Remove.
[shell]: Change default value to a gexp.
(passwd-file): Rewrite in terms of 'gexp->derivation'. Compute
contents on the build side.
* gnu/services/base.scm (host-name-service, mingetty-service,
nscd-service, syslog-service, guix-service): Change 'start' and 'stop'
to gexps; remove 'inputs' field.
(guix-build-accounts): Change 'shell' field to a gexp.
* gnu/services/networking.scm (static-networking-service): Change
'start' and 'stop' to gexps; remove 'inputs' field.
* gnu/services/xorg.scm (slim-service): Likewise.
* gnu/services/dmd.scm (dmd-configuration-file): Expect ETC to be a
derivation. Change 'config' to a gexp. Use 'gexp->file' instead of
'text-file'.
* doc/guix.texi (Defining Services): Update nscd example with gexps, and
without 'inputs'. Add xref to "G-Expressions".
* guix/gexp.scm: New file.
* tests/gexp.scm: New file.
* Makefile.am (MODULES): Add guix/gexp.scm.
(SCM_TESTS): Add tests/gexp.scm.
* doc/guix.texi (Derivations): Add #:inputs in 'derivation' example.
Mark 'build-expression->derivation' as deprecated, refer to
"G-Expressions". Remove paragraph about code strata.
(G-Expressions): New node.
* doc/guix.texi (Defining Packages): Add 'arguments' field in the
example; update 'synopsis' and 'description'. Remove most of the
description of 'build-system', and instead reference to the "Build
Systems" node. Briefly describe 'arguments' field, and remove more
elaborate description. Add cross-reference to "Packaging Guidelines".
(Build Systems): New node.
(Packaging Guidelines): Mention '--log-file'.
* doc/guix.texi (Invoking guix-daemon): Add cross-reference to
"Substitutes".
(Features): Remove footnote about unauthenticated substitutes. Link
to "Substitutes".
(Substitutes): New node.
(Invoking guix build): Link to "Substitutes".
(Packaging Guidelines): Likewise.
* HACKING (Submitting Patches): Mention 'git send-mail'.
* doc/guix.texi (Packaging Guidelines): More details on how to prepare a
package module.
(Contributing): Add reference to #guix channel on Freenode.
Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* doc/guix.texi (Invoking guix package): Explain where packages are
searched for and link to "Package Modules".
(Defining Packages) <example>: Use 'define-module' clause instead of
'use-modules'. Explain why and link to "Package Modules".
(Invoking guix build): Explain where packages aer searched for and
link to "Package Modules".
(Package Modules): Explain that (gnu packages ...) is scanned.
* doc/guix.texi (Invoking guix package): Remove documentation for
--dry-run, --fallback, --no-substitutes, and --max-silent-time. Add a
cross-ref to "Invoking guix build".
(Invoking guix archive): Add "common build options" as the cross-ref
topic for "Invoking guix build".
(Invoking guix build): Move common build options separately. Add a
paragraph to explain.
* guix/derivations.scm (<derivation-output>): Add 'recursive?' field.
Adjust 'make-derivation-output' callers.
(%read-derivation) <fixed-output>: When HASH-ALGO starts with 'r:',
set the 'recursive?' field and drop 'r:' from the hash algo name.
(write-derivation)[write-output]: Write the algo as 'r:HASH-ALGO' when
the RECURSIVE? field is set.
(derivation-hash) <fixed-output>: Prepend "r:" when RECURSIVE? is set.
(fixed-output-path): New procedure.
(derivation): Add #:recursive? parameter. Use 'fixed-output-path' to
compute the output file name of a fixed output derivation.
(build-expression->derivation): Add #:recursive? parameter. Pass it
to 'derivation'.
* tests/derivations.scm ("fixed-output derivation, recursive",
"build-expression->derivation produces recursive fixed-output",
"build-expression->derivation uses recursive fixed-output"): New
tests.
* doc/guix.texi (Derivations): Document #:recursive? for 'derivation'.
Add #:recursive? for 'build-expression->derivation'.
* guix/scripts/hash.scm (show-help): Add --recursive.
(%options): Likewise.
(guix-hash)[file-hash]: New procedure. Honor --recursive.
Use it.
* guix/nar.scm (write-file): Add missing field to the &nar-error
condition raised upon unsupported file type; change its message to be
more descriptive.
* tests/guix-hash.sh: Add tests with -r.
* doc/guix.texi (Invoking guix hash): Document --recursive.
* gnu/services/base.scm (%base-services): New variable.
* gnu/system.scm (<operating-system>)[services]: Change the default
value to %BASE-SERVICES.
* doc/guix.texi (Using the Configuration System): Change
'%standard-services' to '%base-services'.