Ludovic Courtès [Sat, 3 Nov 2012 20:43:30 +0000 (21:43 +0100)]
build: Require GNU libgcrypt.
* guix/utils.scm (sha256): Remove Coreutils- and libchop-based
implementations.
* README: Update accordingly.
* m4/guix.m4: New file.
* configure.ac: Use `GUIX_ASSERT_LIBGCRYPT_USABLE'. Set and substitute
`LIBGCRYPT_PREFIX'.
* Makefile.am (AM_DISTCHECK_CONFIGURE_FLAGS): Pass
`--with-libgcrypt-prefix=$(LIBGCRYPT_PREFIX)'.
Ludovic Courtès [Sat, 3 Nov 2012 20:23:16 +0000 (21:23 +0100)]
guix-package: Use more (guix ui) features.
* guix-package.in (leave): Remove.
(guix-package): Wrap body in `with-error-handling'.
Ludovic Courtès [Sat, 3 Nov 2012 20:19:43 +0000 (21:19 +0100)]
ui: Factorize `--version'.
* guix/ui.scm (show-version-and-exit): New procedure.
* guix-build.in (show-version): Remove.
(%options)["version"]: Use `show-version-and-exit'.
* guix-download.in: Likewise.
* guix-package.in: Likewise.
Ludovic Courtès [Sat, 3 Nov 2012 20:07:52 +0000 (21:07 +0100)]
build: Produce (guix config) instead of using compile-time tricks.
* guix/config.scm.in: New file.
* guix/utils.scm: Use it.
(%libgcrypt): Remove.
(%nixpkgs-directory): Don't capture the compile-time $NIXPKGS; use
%NIXPKGS instead.
(nixpkgs-derivation): Use %NIX-INSTANTIATE.
* pre-inst-env.in (NIX_INSTANTIATE, NIXPKGS, LIBGCRYPT): Remove.
* configure.ac: Emit `guix/config.scm'.
* Makefile.am (GOBJECTS): Add `guix/config.go'.
(nobase_nodist_guilemodule_DATA): Add `guix/config.scm'.
Ludovic Courtès [Sat, 3 Nov 2012 20:11:02 +0000 (21:11 +0100)]
build: Clearly mark Nixpkgs as optional.
* configure.ac: Always show the result of checking for Nixpkgs. Don't
warn when Nixpkgs is not found.
* Makefile.am (AM_DISTCHECK_CONFIGURE_FLAGS): Remove `--with-nixpkgs'
flag.
* guix/utils.scm (%nixpkgs-directory): Use either the compile-time or
the run-time `NIXPKGS' environment variable.
* release.nix (jobs.tarball, jobs.build): Remove `--with-nixpkgs'
configure flag.
* README: Mark Nixpkgs as optional.
* distro/packages/databases.scm, distro/packages/guile.scm,
distro/packages/typesetting.scm: Change uses of `nixpkgs-derivation*'
to `nixpkgs-derivation', to avoid failing at compile-time.
Ludovic Courtès [Fri, 2 Nov 2012 21:38:52 +0000 (22:38 +0100)]
tests: Run without substitutes.
* tests/builders.scm, tests/derivations.scm, tests/packages.scm: Set
#:use-substitutes? #f for %STORE.
Ludovic Courtès [Thu, 1 Nov 2012 00:46:15 +0000 (01:46 +0100)]
Add a preliminary `guix-package' command-line tool.
* guix-package.in, tests/guix-package.sh: New files.
* configure.ac: Output `guix-package'.
* Makefile.am (TESTS): Add `tests/guix-package.sh'.
(bin_SCRIPTS): Add `guix-package'.
Ludovic Courtès [Thu, 1 Nov 2012 00:39:23 +0000 (01:39 +0100)]
store: Add `store-path-package-name'.
* guix/store.scm (store-path-package-name): New procedure.
* tests/utils.scm ("store-path-package-name"): New test.
Ludovic Courtès [Thu, 1 Nov 2012 00:35:00 +0000 (01:35 +0100)]
utils: Remove stuff committed by error.
This was wrongfully committed in
df1fab58.
* guix/utils.scm (hash-set-proc, hash-ref*, memoizing-lambda): Remove.
Ludovic Courtès [Wed, 31 Oct 2012 22:27:51 +0000 (23:27 +0100)]
build: Add unit test for the `guix-build' command.
* tests/guix-build.sh: New file.
* Makefile.am (TESTS): Add it.
(LOG_COMPILER): Rename to...
(SCM_LOG_COMPILER): ... this. Move flags to...
(AM_SCM_LOG_FLAGS): ... this.
(TEST_EXTENSIONS, SH_LOG_COMPILER, AM_SH_LOG_FLAGS): New variables.
Ludovic Courtès [Wed, 31 Oct 2012 23:50:01 +0000 (00:50 +0100)]
Add (guix ui).
* guix/ui.scm: New file.
* Makefile.am (MODULES): Add it.
* po/POTFILES.in: Add it.
* guix-build.in: Use it.
(_, N_, leave): Remove.
(guix-build): Use `with-error-handling' instead of the `guard' form.
* guix-download.in: Use it.
(_, N_, leave): Remove.
Ludovic Courtès [Wed, 31 Oct 2012 16:53:59 +0000 (17:53 +0100)]
build-system/gnu: Distinguish between imported modules and used modules.
* guix/build-system/gnu.scm (gnu-build): Add the `imported-modules'
keyword parameter. Pass it to `build-expression->derivation'.
Ludovic Courtès [Tue, 30 Oct 2012 23:22:39 +0000 (00:22 +0100)]
release.nix: Use `--no-substitutes' in `distro.hello'.
* release.nix (distro.hello): Use `guix-build --no-substitutes', to
avoid failures due to unavailable stale substitutes on
hydra.nixos.org.
Ludovic Courtès [Mon, 29 Oct 2012 23:20:53 +0000 (00:20 +0100)]
guix-build: Add `--root'.
* guix/store.scm (add-indirect-root): New operation.
* guix-build.in (show-help): Document `--root'.
(%options): Add `--root'.
(guix-build)[register-root]: New procedure. Call it when `--root' is
passed.
Ludovic Courtès [Mon, 29 Oct 2012 21:39:46 +0000 (22:39 +0100)]
Add (guix build union).
* guix/build/union.scm, tests/union.scm: New files.
* Makefile.am (MODULES): Add `guix/build/union.scm'.
(TESTS): Add `tests/union.scm'.
Ludovic Courtès [Sun, 28 Oct 2012 00:02:04 +0000 (02:02 +0200)]
release.nix: Change `distro.hello' to produce something.
* release.nix (distro.hello)[buildPhase]: Tee the log to $out. Add a
`name' attribute; remove `buildInputs' and instead use the full path
to `guix-build'.
Ludovic Courtès [Sat, 27 Oct 2012 23:59:33 +0000 (01:59 +0200)]
distro: Build Bash sequentially.
* distro/packages/base.scm (bash): Set `#:parallel-build?' and
`#:parallel-tests?' to #f.
Ludovic Courtès [Sat, 27 Oct 2012 23:58:39 +0000 (01:58 +0200)]
tests: Use our own bootstrap tools.
* tests/builders.scm (%bootstrap-inputs): Use %BOOT0-INPUTS from the distro.
* tests/packages.scm (%bootstrap-inputs): Likewise.
* tests/derivations.scm (%coreutils): Alias for %BOOTSTRAP-COREUTILS&CO.
Ludovic Courtès [Sat, 27 Oct 2012 21:19:46 +0000 (23:19 +0200)]
release.nix: Add a `distro.hello' job.
* release.nix (distro.hello): New job.
Ludovic Courtès [Sat, 27 Oct 2012 21:18:08 +0000 (23:18 +0200)]
build: Preserve the executable bit of bootstrap binaries.
* Makefile.am (install-data-hook): New target.
Ludovic Courtès [Sat, 27 Oct 2012 20:52:13 +0000 (22:52 +0200)]
build: Make sure scripts know where to find their modules.
* guix-build.in, guix-download.in: Define `prefix' and `datarootdir', so
that `guilemoduledir' expands to something meaningful.
Ludovic Courtès [Sat, 27 Oct 2012 20:45:18 +0000 (22:45 +0200)]
release.nix: Pre-download the Guile bootstrap tarball.
* release.nix (bootstrap_guile): New variable.
(build)[preBuild]: New attribute.
Ludovic Courtès [Sat, 27 Oct 2012 20:37:49 +0000 (22:37 +0200)]
build: Fix out-of-source-tree builds.
* Makefile.am (distro/packages/bootstrap/x86_64-linux/guile-bootstrap-2.0.6.tar.xz,
distro/packages/bootstrap/i686-linux/guile-bootstrap-2.0.6.tar.xz):
Make the target's parent directory.
* pre-inst-env.in (DISTRO_BOOTSTRAP_PATH): Add the builddir-relative
directory.
Ludovic Courtès [Sat, 27 Oct 2012 20:30:42 +0000 (22:30 +0200)]
distro: Change $DISTRO_{PATCH,BOOTSTRAP}_DIRECTORY to search paths.
* distro.scm (not-colon): New variable.
(%patch-directory): Rename to...
(%patch-path): ... this. Turn into a list. Expect $DISTRO_PATCH_PATH
to be a colon-separated search path.
(%bootstrap-binaries-directory): Rename to...
(%bootstrap-binaries-path): ... this. Likewise.
(search-patch, search-bootstrap-binary): Adjust accordingly.
* pre-inst-env.in: Change to use `DISTRO_PATCH_PATH' and
`DISTRO_BOOTSTRAP_PATH'.
Ludovic Courtès [Sat, 27 Oct 2012 13:31:48 +0000 (15:31 +0200)]
release.nix: Set succeed-on-failure and build-out-source-tree.
* release.nix: Define `succeedOnFailure', `keepBuildDirectory', and
`buildOutOfSourceTree'.
(build): Inherit them.
Ludovic Courtès [Sat, 27 Oct 2012 13:30:08 +0000 (15:30 +0200)]
build: Move `distro/patches' to `distro/packages/patches'.
* distro/patches: Move directory to...
* distro/packages/patches: ... here.
* Makefile.am (dist_patch_DATA): Adjust accordingly.
* pre-inst-env.in (DISTRO_PATCH_DIRECTORY): Likewise.
Ludovic Courtès [Sat, 27 Oct 2012 13:30:20 +0000 (15:30 +0200)]
build: Use `pre-inst-env' to compile the source.
* Makefile.am (.scm.go): Use `pre-inst-env' instead of re-defining the
environment variables, except for `DISTRO_INSTALLED_PATCH_DIRECTORY'
and `DISTRO_INSTALLED_BOOTSTRAP_DIRECTORY'.
Ludovic Courtès [Sat, 27 Oct 2012 12:56:38 +0000 (14:56 +0200)]
guix-build: Gracefully handle `&package-input-error' conditions.
* guix/packages.scm: Export `package-error?' and `package-input-error?'.
* guix-build.in (guix-build): Catch `&package-input-error' conditions,
print a human-readable message, and exit.
Ludovic Courtès [Sat, 27 Oct 2012 12:53:47 +0000 (14:53 +0200)]
location: Start column numbers at 1.
* guix/utils.scm (source-properties->location): Use COL + 1.
Ludovic Courtès [Fri, 26 Oct 2012 17:10:37 +0000 (19:10 +0200)]
distro: Add i686-linux port.
* distro/packages/bootstrap/i686-linux/bash,
distro/packages/bootstrap/i686-linux/mkdir,
distro/packages/bootstrap/i686-linux/tar,
distro/packages/bootstrap/i686-linux/xz: New files.
* distro/packages/base.scm (%bootstrap-coreutils&co,
%bootstrap-binutils, %bootstrap-glibc, %bootstrap-gcc): Add hashes of
the i686-linux tarballs.
* Makefile.am (bootstrap_i686_linuxdir, dist_bootstrap_i686_linux_DATA,
nodist_bootstrap_i686_linux_DATA): New variables
(DISTCLEANFILES): Add $(nodist_bootstrap_i686_linux_DATA).
(distro/packages/bootstrap/i686-linux/guile-bootstrap-2.0.6.tar.xz):
New rule.
Ludovic Courtès [Fri, 26 Oct 2012 16:51:22 +0000 (18:51 +0200)]
distro: gcc: Adjust to support non-x86_64 architectures.
* distro/packages/base.scm (gcc-4.7)[arguments]: In the `pre-configure'
phase, patch all the relevant gcc/config files, not just those for
x86_64-linux-gnu.
Ludovic Courtès [Fri, 26 Oct 2012 07:07:37 +0000 (09:07 +0200)]
utils: Remove special `substitute*' syntax for lists of files.
* guix/build/utils.scm (substitute*): Remove special syntax for
list-of-files; instead, check whether FILE is `list?' at run time.
* distro/packages/base.scm (gcc-4.7, %binutils-static): Adjust
accordingly.
Ludovic Courtès [Thu, 25 Oct 2012 21:44:27 +0000 (23:44 +0200)]
doc: Add `HACKING'.
* HACKING: New file.
* Makefile.am (EXTRA_DIST): Add it.
Ludovic Courtès [Thu, 25 Oct 2012 21:42:06 +0000 (23:42 +0200)]
Add a `system' parameter to `nixpkgs-derivation'.
* guix/utils.scm (nixpkgs-derivation): Add a `system' parameter. Pass
it in the `nix-instantiate' invocation.
Ludovic Courtès [Thu, 25 Oct 2012 21:41:15 +0000 (23:41 +0200)]
packages: Pass `system' around.
* guix/packages.scm (package-source-derivation): Add `system'
parameter. Pass it to METHOD.
(package-derivation)[expand-input]: Pass SYSTEM to
`package-derivation' and `package-source-derivation'.
* distro/packages/base.scm (package-with-bootstrap-guile)[boot]: Pass
SYSTEM to FETCH.
Ludovic Courtès [Thu, 25 Oct 2012 21:14:27 +0000 (23:14 +0200)]
derivations: Make sure `build-expression->derivation' & co. pass `system'.
* guix/derivations.scm (imported-files): Call
`build-expression->derivation' with SYSTEM, not (%current-system).
(build-expression->derivation): Pass SYSTEM to `imported-modules' and
`compiled-modules'.
Ludovic Courtès [Thu, 25 Oct 2012 16:03:48 +0000 (18:03 +0200)]
derivations: Pass the derivation of guile-for-build to `imported-files' & co.
* guix/derivations.scm (%guile-for-build): Initialize to #f.
(imported-files, imported-modules, compiled-modules): Add `guile'
keyword parameter. Pass it down to `build-expression->derivation'.
(build-expression->derivation)[guile-drv]: New variable. Pass it as
the #:guile parameter for `imported-modules' and `compiled-modules'.
* tests/derivations.scm: Set %GUILE-FOR-BUILD to the derivation of
%BOOTSTRAP-GUILE.
Ludovic Courtès [Thu, 25 Oct 2012 15:55:45 +0000 (17:55 +0200)]
distro: Build the final inputs against the final Bash, not the bootstrap Bash.
* distro/packages/base.scm (%boot4-inputs): New variable.
(guile-final): Use it.
(%final-inputs): Build with %BOOT4-INPUTS, not %BOOT3-INPUTS.
Ludovic Courtès [Thu, 25 Oct 2012 15:54:17 +0000 (17:54 +0200)]
distro: ncurses: Don't patch shebangs.
* distro/packages/base.scm (ncurses): Pass #:patch-shebangs? #f.
Ludovic Courtès [Thu, 25 Oct 2012 15:41:18 +0000 (17:41 +0200)]
distro: Bootstrap using our own binaries instead of those from Nixpkgs.
* distro/packages/base.scm (%bootstrap-inputs): Switch to using our own
bootstrap binaries instead of those from Nixpkgs.
Ludovic Courtès [Thu, 25 Oct 2012 15:36:46 +0000 (17:36 +0200)]
distro: Build glibc with `--enable-obsolete-rpc'.
* distro/packages/base.scm (glibc-final): Pass `--enable-obsolete-rpc'.
(%bootstrap-glibc): Update hash accordingly.
Ludovic Courtès [Wed, 24 Oct 2012 19:18:37 +0000 (21:18 +0200)]
distro: Add missing Linux-Libre headers to the bootstrap glibc.
* distro/packages/base.scm (%glibc-stripped): Copy all of Linux-Libre's
`include/asm' directory; copy a few linux/ headers too.
(%bootstrap-glibc): Update tarball hash.
Ludovic Courtès [Wed, 24 Oct 2012 19:07:52 +0000 (21:07 +0200)]
distro: Add a bootstrap GCC that uses binaries from the tarball.
* distro/packages/base.scm (%bootstrap-gcc): New variable.
Ludovic Courtès [Wed, 24 Oct 2012 21:10:09 +0000 (23:10 +0200)]
Add `guix-download'.
* guix-download.in: New file.
* configure.ac: Emit `guix-download' and make it executable.
* Makefile.am (bin_SCRIPTS): Add `guix-download'.
* po/POTFILES.in: Add `guix-download.in'.
Ludovic Courtès [Wed, 24 Oct 2012 15:03:45 +0000 (17:03 +0200)]
store: Add `query-path-hash'.
* guix/store.scm (write-arg, read-arg): Add `base16' literal and
corresponding rule.
(query-path-hash): New operation.
* tests/derivations.scm ("fixed-output derivation"): Check whether
`query-path-hash' returns a bytevector.
Ludovic Courtès [Wed, 24 Oct 2012 21:10:09 +0000 (23:10 +0200)]
distro: Add missing commands in the bootstrap binaries.
* distro/packages/base.scm (%static-inputs): Add an `awk' -> `gawk', and
`sh' -> `bash' symlinks. Add `fgrep' and `egrep'.
(%bootstrap-coreutils&co): Use new tarball that contains that
symlink.
* distro/packages/bootstrap/x86_64-linux/bash,
distro/packages/bootstrap/x86_64-linux/mkdir,
distro/packages/bootstrap/x86_64-linux/tar,
distro/packages/bootstrap/x86_64-linux/xz: Use binaries from that
tarball (the previous binaries hadn't gone through
`remove-store-references', which is fixed now.)
Ludovic Courtès [Wed, 24 Oct 2012 13:01:16 +0000 (15:01 +0200)]
guix-build: Change `--local-build' to `--no-substitutes'.
* guix-build.in (%default-options): Add `substitutes?'.
(show-help): Change `--local-build' to `--no-substitutes'.
(guix-build): Adjust accordingly.
Ludovic Courtès [Tue, 23 Oct 2012 22:21:30 +0000 (00:21 +0200)]
distro: Update file name of initial Binutils tarball.
* distro/packages/base.scm (%bootstrap-binutils): Update remote file
name.
Ludovic Courtès [Mon, 22 Oct 2012 21:30:35 +0000 (23:30 +0200)]
derivations: Compile the #:modules passed to `build-expression->derivation'.
* guix/derivations.scm (imported-files)[parent-dirs]: Move to...
(parent-directories): ... here. New procedure.
(compiled-modules): New procedure.
(build-expression->derivation): Use it.
* tests/derivations.scm ("build-expression->derivation with modules"):
New test.
Ludovic Courtès [Tue, 23 Oct 2012 22:09:01 +0000 (00:09 +0200)]
distro: Update bootstrap glibc package.
* distro/packages/base.scm (%bootstrap-glibc): Update initial regexp to
make it less Nixish. Update hash to new tarball.
Ludovic Courtès [Tue, 23 Oct 2012 22:07:12 +0000 (00:07 +0200)]
distro: Add required Linux-Libre headers to the glibc tarball.
* distro/packages/base.scm (%glibc-stripped): Include required headers
from Linux-Libre.
Ludovic Courtès [Tue, 23 Oct 2012 21:38:02 +0000 (23:38 +0200)]
distro: gcc: No longer store the absolute path of crt files.
* distro/packages/base.scm (gcc-4.7): Define
STANDARD_STARTFILE_PREFIX_[12] instead of storing the absolute path of
crt files.
Ludovic Courtès [Tue, 23 Oct 2012 20:00:06 +0000 (22:00 +0200)]
distro: Fix GCC tarball to include the `libexec' directory.
* distro/packages/base.scm (%gcc-stripped): Copy $gcc/libexec to $out.
Ludovic Courtès [Tue, 23 Oct 2012 19:59:09 +0000 (21:59 +0200)]
distro: Fix glibc tarball to include *.so.*.
* distro/packages/base.scm (%glibc-stripped): Fix regexp to
include *.so.* in the output.
Ludovic Courtès [Mon, 22 Oct 2012 20:22:37 +0000 (22:22 +0200)]
distro: Add a statically-linked GCC for bootstrapping.
* distro/packages/base.scm (%gcc-static): New variable.
(%gcc-stripped): Use it.
Ludovic Courtès [Sun, 21 Oct 2012 20:01:49 +0000 (22:01 +0200)]
distro: Add a package that gets the bootstrap glibc from a tarball.
* distro/packages/base.scm (%bootstrap-glibc): New variable.
Ludovic Courtès [Sun, 21 Oct 2012 15:52:56 +0000 (17:52 +0200)]
distro: Add packages that get Coreutils, Binutils & co. from tarballs.
* distro/packages/base.scm (package-from-tarball): New procedure.
(%bootstrap-base-url, %bootstrap-coreutils&co, %bootstrap-binutils):
New variables.
Ludovic Courtès [Sun, 21 Oct 2012 14:57:50 +0000 (16:57 +0200)]
packages: Add support for system-dependent inputs.
* guix/packages.scm (package-derivation)[intern]: New procedure. Pass
#t as the `recursive?' argument, instead of #f.
[expand-input]: New procedure, with code formerly in the body.
Support inputs where the input is a procedure returning a file name or
an <origin>.
Use `expand-input' in the body.
* tests/packages.scm ("trivial with system-dependent input"): New test.
Ludovic Courtès [Sun, 21 Oct 2012 13:57:04 +0000 (15:57 +0200)]
distro: Add a bootstrap GCC tarball.
* distro/packages/base.scm (%gcc-stripped, %gcc-bootstrap-tarball): New
variables.
Ludovic Courtès [Sun, 21 Oct 2012 13:00:44 +0000 (15:00 +0200)]
distro: Add a bootstrap glibc tarball.
* distro/packages/base.scm (%glibc-stripped, %glibc-bootstrap-tarball):
New variables.
Ludovic Courtès [Sat, 20 Oct 2012 14:12:26 +0000 (16:12 +0200)]
distro: Add tools to build a tarball of statically-linked Binutils programs.
* distro/packages/base.scm (%binutils-static, %binutils-static-stripped,
%binutils-bootstrap-tarball): New variables.
Ludovic Courtès [Fri, 19 Oct 2012 21:02:07 +0000 (23:02 +0200)]
distro: Add a package to build a tarball of the bootstrap binaries.
* distro/packages/base.scm (tarball-package): New procedure.
(%bootstrap-binaries-tarball): New variable.
(%guile-bootstrap-tarball): Define in terms of `tarball-package'.
Ludovic Courtès [Thu, 18 Oct 2012 21:46:10 +0000 (23:46 +0200)]
guix-build: Add `--system'.
* guix-build.in (derivations-from-package-expressions): New `system'
parameter. Pass it to `package-derivation'.
(%default-options): Add `system' pair.
(show-help): Describe `--system'.
(%options): Add it.
(guix-build): Check the `system' pair in OPTS; pass it to
`derivations-from-package-expressions' and `package-derivation'.
Ludovic Courtès [Thu, 18 Oct 2012 21:36:29 +0000 (23:36 +0200)]
distro: Provide a more descriptive report when a bootstrap binary is missing.
* distro/packages/base.scm (%bootstrap-guile): Error out when
`search-bootstrap-binary' returns #f.
Ludovic Courtès [Wed, 17 Oct 2012 21:55:38 +0000 (23:55 +0200)]
distro: Use the bootstrap Guile for the derivation of sources.
* distro/packages/base.scm (bootstrap-origin,
package-with-bootstrap-guile): New procedures.
(gnu-make-boot0, diffutils-boot0, findutils-boot0, binutils-boot0,
gcc-boot0, linux-libre-headers-boot0, glibc-final, bash-final,
guile-final): Use `package-with-bootstrap-guile'.
(gcc-boot0-wrapped): Clear `source'.
* guix/ftp.scm (ftp-fetch): Add a #:guile keyword parameter. Honor it.
* guix/http.scm (http-fetch): Likewise.
Ludovic Courtès [Thu, 18 Oct 2012 20:21:26 +0000 (22:21 +0200)]
http/ftp: Tweak to avoid depending on libc's NSS.
* guix/build/http.scm (open-connection-for-uri): New procedure.
(http-fetch): Use it. Pass the result as a #:port argument to
`http-get'.
Add hack to modify the `set-port-encoding!' binding in (web response).
* guix/ftp-client.scm (ftp-open): Add optional `port' parameter,
defaulting to 21. When calling `getaddrinfo', convert PORT to a
string and pass AI_NUMERICSERV when PORT is a number.
Ludovic Courtès [Thu, 18 Oct 2012 20:24:49 +0000 (22:24 +0200)]
guix-build: Add `--local-build'.
* guix-build.in (show-help): Add `--local-build'.
(%options): Likewise.
(guix-build): Pass `set-build-options' the #:use-substitutes? argument
accordingly.
Ludovic Courtès [Thu, 18 Oct 2012 19:43:35 +0000 (21:43 +0200)]
distro: bzip2: Simplify installation phase with `find-files'.
* distro/packages/base.scm (bzip2): Use `find-files' instead of rolling
our own with `file-system-fold'.
Ludovic Courtès [Thu, 18 Oct 2012 19:42:19 +0000 (21:42 +0200)]
distro: %static-binaries: Use (guix build utils).
* distro/packages/base.scm (%static-binaries): Add missing
use of (guix build utils).
Ludovic Courtès [Thu, 18 Oct 2012 09:41:12 +0000 (11:41 +0200)]
distro: Fix bootstrapping regression recently introduced.
* distro/packages/base.scm (gcc-boot0-wrapped): Fix typo introduced in
a52e429f76282080c58444ce2ac82a1968d5f29d ("distro: Add i686 support.")
Ludovic Courtès [Wed, 17 Oct 2012 21:34:05 +0000 (23:34 +0200)]
distro: Clear references to the store in static binaries.
* distro/packages/base.scm (%static-binaries): Clear references to the
store path for files in $out/bin.
Ludovic Courtès [Wed, 17 Oct 2012 21:17:15 +0000 (23:17 +0200)]
utils: Add `find-files'.
* guix/build/utils.scm (find-files): New procedure.
Ludovic Courtès [Wed, 17 Oct 2012 21:06:17 +0000 (23:06 +0200)]
utils: Add `copy-recursively'; use it.
* guix/build/utils.scm (copy-recursively): New procedure.
* distro/packages/base.scm (%guile-static-stripped): Use it.
Ludovic Courtès [Wed, 17 Oct 2012 20:51:08 +0000 (22:51 +0200)]
utils: Add `mkdir-p'; use it.
* guix/build/utils.scm (mkdir-p): New procedure.
* distro/packages/base.scm (gnu-make-boot0, gcc-boot0-wrapped,
ld-wrapper-boot3, %static-binaries, %guile-static-stripped): Use it.
* distro/packages/typesetting.scm (lout): Likewise.
Ludovic Courtès [Wed, 17 Oct 2012 20:40:05 +0000 (22:40 +0200)]
build-system/gnu: Pass the system type to the builder.
* guix/build-system/gnu.scm (gnu-build)[builder]: Pass SYSTEM to
`gnu-build' as a keyword argument.
Nikita Karetnikov [Tue, 16 Oct 2012 23:24:58 +0000 (23:24 +0000)]
distro: Add i686 support.
* distro/packages/base.scm (gcc-4.7): Turn `arguments' into a lambda.
Use `glibc-dynamic-linker' instead of the hard-coded linker name.
Ludovic Courtès [Wed, 17 Oct 2012 20:17:03 +0000 (22:17 +0200)]
distro: Switch to Linux-Libre.
* distro/packages/base.scm (linux-headers): Rename to...
(linux-libre-headers): ... this. Change `name', `source', and
`description', and `home-page' accordingly. Update users.
(linux-headers-boot0): Rename to...
(linux-libre-headers-boot0): ... this. Update users.
Ludovic Courtès [Wed, 17 Oct 2012 19:44:25 +0000 (21:44 +0200)]
distro: Use our own pre-built Guile to bootstrap.
* distro/packages/base.scm (%bootstrap-guile): Build from a tarball
containing a pre-built Guile.
* distro.scm (%bootstrap-binaries-directory): New variable.
(search-bootstrap-binary): New procedure.
* Makefile.am (bootstrapdir, bootstrap_x86_64_linuxdir,
dist_bootstrap_x86_64_linux_DATA, DISTCLEANFILES, DOWNLOAD_FILE): New
variables.
(distro/packages/bootstrap/x86_64-linux/guile-bootstrap-2.0.6.tar.xz):
New rule.
(EXTRA_DIST): Add `build-aux/download.scm'.
(.scm.go): Define the `DISTRO_BOOTSTRAP_DIRECTORY' and
`DISTRO_INSTALLED_BOOTSTRAP_DIRECTORY' environment variables.
* pre-inst-env.in: Define `DISTRO_BOOTSTRAP_DIRECTORY'.
* build-aux/download.scm: New file.
* distro/packages/bootstrap/x86_64-linux/{bash, mkdir, tar, xz}: New
files.
Ludovic Courtès [Wed, 17 Oct 2012 15:52:12 +0000 (17:52 +0200)]
distro: Add package that builds a tarball of the bootstrap Guile.
* distro/packages/base.scm (%guile-static-stripped): New variable.
Ludovic Courtès [Wed, 17 Oct 2012 15:51:33 +0000 (17:51 +0200)]
distro: Add patch to allow the bootstrap Guile to work without iconv.
* distro/patches/guile-default-utf8.patch: New file.
* Makefile.am (dist_patch_DATA): Add it.
* distro/packages/base.scm (%guile-static): Use it.
(%guile-static-stripped): Add call to `remove-store-references'.
Ludovic Courtès [Wed, 17 Oct 2012 15:47:23 +0000 (17:47 +0200)]
distro: Change relocatable-Guile patch to work around broken argv[0].
* distro/patches/guile-relocatable.patch: Change to use /proc/self/exe
instead of PROGRAM_INVOCATION_NAME. Useful because Nix itself passes
just the basename of builders that it executes.
Ludovic Courtès [Wed, 17 Oct 2012 21:25:03 +0000 (23:25 +0200)]
build: Use `pre-inst-env' to run tests.
* Makefile.am (TESTS_ENVIRONMENT): Remove.
(LOG_COMPILER): Use `pre-inst-env'.
Ludovic Courtès [Wed, 17 Oct 2012 14:16:45 +0000 (16:16 +0200)]
release.nix: Add dependency on GNU Texinfo.
* release.nix (tarball)[buildNativeInputs]: Add `texinfo'.
Ludovic Courtès [Tue, 16 Oct 2012 21:01:01 +0000 (23:01 +0200)]
utils: Add `fold-port-matches' and `remove-store-references'.
* guix/build/utils.scm (fold-port-matches, remove-store-references): New
procedures.
* tests/build-utils.scm ("fold-port-matches", "fold-port-matches,
trickier", "fold-port-matches, with unmatched chars"): New tests.
Ludovic Courtès [Tue, 16 Oct 2012 15:28:11 +0000 (17:28 +0200)]
utils: Add `with-atomic-file-replacement'.
* guix/build/utils.scm (with-atomic-file-replacement): New procedure.
(substitute): Use it.
Ludovic Courtès [Sat, 13 Oct 2012 20:36:39 +0000 (22:36 +0200)]
distro: Add a statically-linked, relocatable Guile 2.0 package.
* distro/packages/base.scm (%guile-static, %guile-static-stripped): New
variables.
* distro/patches/guile-relocatable.patch: New file.
* Makefile.am (dist_patch_DATA): Add it.
Ludovic Courtès [Sat, 13 Oct 2012 19:18:16 +0000 (21:18 +0200)]
ftp-client: Try all the addresses returned by `getaddrinfo'.
* guix/ftp-client.scm (ftp-open): Upon connection failure, try the other
addresses returned by `getaddrinfo'.
Ludovic Courtès [Sat, 13 Oct 2012 14:05:01 +0000 (16:05 +0200)]
doc: Add the stub of a manual.
* doc/guix.texi: New file.
* doc/fdl-1.3.texi: New file, copied from Gnulib.
* Makefile.am (info_TEXINFOS): New variable.
(EXTRA_DIST): Add `doc/fdl-1.3.texi'.
Ludovic Courtès [Wed, 10 Oct 2012 22:32:17 +0000 (00:32 +0200)]
distro: Add missing bits from previous commit.
* distro/packages/base.scm (default-keyword-arguments): New procedure.
Ludovic Courtès [Wed, 10 Oct 2012 22:03:31 +0000 (00:03 +0200)]
distro: First stab at building statically-linked bootstrap binaries.
* distro/packages/base.scm (static-package): New procedure.
(%bash-static, %static-inputs, %static-binaries): New variables.
Ludovic Courtès [Mon, 8 Oct 2012 21:13:51 +0000 (23:13 +0200)]
Remove non-existent module from (guix).
* guix.scm (%public-modules): Remove `snix', since that modules doesn't
exist yet.
Ludovic Courtès [Mon, 8 Oct 2012 20:07:19 +0000 (22:07 +0200)]
packages: Fix and optimize memoization of `package-derivation'.
* guix/packages.scm (%derivation-cache): Pass an initial size of 100.
(cache): Use `hashq-set!', and use a SYSTEM/DRV pair as the value.
(cached-derivation): Update accordingly.
Ludovic Courtès [Mon, 8 Oct 2012 19:57:14 +0000 (21:57 +0200)]
packages: Micro-optimize `package-derivation'.
* guix/packages.scm (package-derivation): Move `cache' call before the
traversal of PACKAGE's inputs.
Ludovic Courtès [Fri, 5 Oct 2012 23:24:46 +0000 (01:24 +0200)]
derivations: Set input port to UTF-8 in `read-derivation'.
* guix/derivations.scm (read-derivation): Set DRV-PORT's encoding to
UTF-8.
Ludovic Courtès [Fri, 5 Oct 2012 23:24:46 +0000 (01:24 +0200)]
Update the (guix) module.
* guix.scm (%public-modules): Update list of current second-level
modules.
Ludovic Courtès [Fri, 5 Oct 2012 23:24:46 +0000 (01:24 +0200)]
tests: Use bootstrap and Nixpkgs inputs to be less costly.
* tests/builders.scm (%bootstrap-inputs, %bootstrap-guile): New
variables.
("gnu-build"): Use them, by setting `#:implicit-inputs? #f' and `#:guile'.
* tests/packages.scm (%bootstrap-inputs, %bootstrap-guile): New
variables.
("trivial"): Pass `#:guile %bootstrap-guile'.
("GNU Hello"): Use `package-with-explicit-inputs' to use
%BOOTSTRAP-GUILE and %BOOTSTRAP-INPUTS.
Ludovic Courtès [Fri, 5 Oct 2012 23:24:46 +0000 (01:24 +0200)]
build-system/{gnu,trivial-build}: Fix handling of #:guile argument.
* guix/build-system/gnu.scm (gnu-build)[guile-for-build]: Check whether
GUILE matches string? before checking whether it matches
derivation-path?.
* guix/build-system/trivial.scm (trivial-build)[guile-for-build]:
Likewise.
Ludovic Courtès [Fri, 5 Oct 2012 23:10:21 +0000 (01:10 +0200)]
distro: Specify use of the bootstrap Guile for the initial derivations.
* distro/packages/base.scm (%bootstrap-guile): New variable.
(gnu-make-boot0, diffutils-boot0, findutils-boot0, binutils-boot0,
gcc-boot0, linux-headers-boot0, glibc-final, gcc-boot0-wrapped,
gcc-final, ld-wrapper-boot3, bash-final, guile-final): Add
`#:guile %bootstrap-guile' to the builder's arguments.
Ludovic Courtès [Fri, 5 Oct 2012 23:24:46 +0000 (01:24 +0200)]
build-system/{gnu,trivial}: Add a `#:guile' keyword parameter.
* guix/build-system/gnu.scm (package-with-explicit-inputs): New `guile'
keyword parameter. Add it to P's arguments, and pass it in recursive
calls.
(gnu-build): New `guile' keyword parameter; new `guile-for-build'
variable. Pass it as the `#:guile-for-build' parameter of
`build-expression->derivation'.
* guix/build-system/trivial.scm (trivial-build): Likewise.
Ludovic Courtès [Fri, 5 Oct 2012 21:21:09 +0000 (23:21 +0200)]
Support build-cores = 0; change `guix-build' to default to 0.
* guix/build/gnu-build-system.scm (%parallel-job-count): New variable.
(build, check): Use it instead of $NIX_BUILD_CORES.
* guix-build.in (guix-build): Default to 0 for the #:build-cores option.