build-system/gnu: Have `configure-flags' and `make-flags' evaluated.
* guix/build-system/gnu.scm (gnu-build): Double-quote the default value
of MAKE-FLAGS and CONFIGURE-FLAGS. Don't quote them in BUILDER.
build: Define $NIXPKGS when compiling.
* Makefile.am (.scm.go): Define $NIXPKGS.
Abstract build systems.
* Makefile.am (MODULES): Add `guix/build-system.scm' and
`guix/build-system/gnu.scm'. Remove `guix/gnu-build-system.scm'.
* guix/build-system.scm: New file.
* guix/gnu-build-system.scm: Rename to...
* guix/build-system/gnu.scm: ... this.
(gnu-build-system): New variable.
* tests/builders.scm: Adjust `use-module' clauses.
("gnu-build-system"): New test.
Add `define-record-type*'.
* guix/utils.scm (define-record-type*): New macro.
* tests/utils.scm ("define-record-type*"): New test.
build-expression->derivation: Move module forms at the top-level.
* guix/derivations.scm (build-expression->derivation)[module-form?]: New
procedure.
[prologue]: Add any form of EXP that matches MODULE-FORM?.
[builder]: Remove any MODULE-FORM? from EXP.
gnu-build-system: Structure as a customizable sequence of phases.
* guix/build/gnu-build-system.scm (set-paths, build, check, install):
New procedures.
(unpack): Make `source' a keyword arg; add `#:allow-other-keys'.
(configure): Likewise.
(%standard-phases): New variable.
(gnu-build): Make `source', `outputs', and `inputs' keyword arguments;
add `phases' keyword argument; #:allow-other-keys; add rest arguments
`args'. Invoke each of PHASES in order within `every'.
* guix/gnu-build-system.scm (gnu-build): Add `make-flags' and `phases'
keyword arguments. Update builder's `gnu-build' call to match the new
convention.
gnu-build-system: Add GNU Diffutils and GNU Path to the standard inputs.
* guix/gnu-build-system.scm (%standard-inputs): Add Diffutils and Patch.
build-expression->derivation: Have the build fail when EXP returns #f.
* guix/derivations.scm (build-expression->derivation)[builder]: Pass the
result of EXP to `exit'.
* tests/derivations.scm ("build-expression->derivation with expression
returning #f"): New test.
Remove leftover debugging expressions.
* guix/build/utils.scm (directory-exists?): Remove leftover debugging
expressions.
store: Wait for the server to be done sending output.
* guix/store.scm (current-build-output-port): New variable.
(process-stderr): Add docstring. Always return #f, except upon
%STDERR-LAST. Upon %STDERR-NEXT, write to
`current-build-output-port', not `current-error-port'.
(set-build-options): Loop until `process-stderr' returns true.
(define-operation): Likewise.
(build-derivations): Update docstring to mention that it's
synchronous.
build: Be cross-compilation-ready.
* Makefile.am (.scm.go): Pass `--target=$(host)'.
* configure.ac: Use `AC_CANONICAL_HOST'.
build: Provide the right include path when building modules.
* Makefile.am (.scm.go): Add missing `-L $(top_srcdir)'.
Build (guix) last.
* Makefile.am (MODULES): Move `guix.scm' last.
Add a build system.
* configure.ac, Makefile.am: New files.
Change `build-expression->derivation' to support sub-derivation inputs.
* guix/derivations.scm (build-expression->derivation): Change to expect
INPUTS to have the form (NAME DRV-PATH SUB-DRV) or (NAME DRV-PATH),
instead of (NAME . DRV-PATH). Update callers accordingly.
* guix/gnu-build-system.scm, tests/builders.scm, tests/derivations.scm:
Update accordingly.
Add supporting tools for the GNU Build System.
* guix/derivations.scm (build-expression->derivation): Add all of INPUTS
as inputs to the final derivation.
* guix/build/gnu-build-system.scm, guix/build/utils.scm,
guix/gnu-build-system.scm: New files.
* tests/builders.scm ("gnu-build"): New test.
Fix the order of the derivation's sources in `derivation-hash'.
* guix/derivations.scm (derivation-hash): Sort SOURCES alphabetically as
well.
Fix `imported-files' for files with a common prefix.
* guix/derivations.scm (imported-files)[builder]: For TAIL, check
whether it exists before (mkdir TAIL).
* tests/derivations.scm ("imported-files"): Add file with a common
prefix.
Add `add-to-store' test for flat files.
* tests/derivations.scm ("add-to-store, flat"): New test.
Augment `build-expression->derivation' with #:modules; add `http-fetch'.
* guix/derivations.scm (imported-modules): New procedure.
(build-expression->derivation): New keyword argument `modules'.
Use `imported-modules' when MODULES is non-empty, and pass it with
`-L' to GUILE.
* guix/build/http.scm, guix/http.scm, tests/builders.scm: New files.