~ruther/guix-local

ref: bf4af30bb2bce9dd5baf91f313ea35c55893eb10 guix-local/guix/gexp.scm -rw-r--r-- 35.4 KiB
bf4af30b — Ludovic Courtès 11 years ago
Merge branch 'master' into core-updates
c0468155 — Ludovic Courtès 11 years ago
derivations: Add #:leaked-env-vars parameter.

Suggested by Joshua Randall <jcrandall@alum.mit.edu>
in <http://bugs.gnu.org/20402>.

* guix/derivations.scm (derivation): Add #:leaked-env-vars parameter.
  [user+system-env-vars]: Honor it.
* guix/gexp.scm (gexp->derivation): Add #:leaked-env-vars and pass it to
  'raw-derivation'.
* doc/guix.texi (Derivations, G-Expressions): Adjust accordingly.
f7328634 — Ludovic Courtès 11 years ago
gexp: Add printers for <gexp-input> and <gexp-output>.

* guix/gexp.scm (write-gexp-input, write-gexp-output): New procedures.
  (<gexp-input>, <gexp-output>): Use them as printers.
023dd28a — Ludovic Courtès 11 years ago
Merge branch 'master' into core-updates
2242ff45 — Ludovic Courtès 11 years ago
gexp: Slightly simplify 'lower-inputs'.

* guix/gexp.scm (lower-inputs): Simplify first case by removing the
  'input' binding.
d9ae938f — Ludovic Courtès 11 years ago
gexp: Add 'local-file'.

* guix/gexp.scm (<local-file>): New record type.
  (local-file): New procedure.
  (local-file-compiler): New compiler.
  (gexp->sexp) <struct? thing>: Handle the case where 'lower' returns a
  file name.
  (text-file*): Update docstring.local-file doc
* tests/gexp.scm ("one local file", "gexp->derivation, local-file"): New
  tests.
* doc/guix.texi (G-Expressions): Mention local files early.  Document
  'local-file'.  Update 'text-file*' documentation.
25d5b708 — Ludovic Courtès 11 years ago
Merge branch 'master' into core-updates
1123759b — Ludovic Courtès 11 years ago
gexp: Fix handling of nativeness in nested gexps.

* guix/gexp.scm (gexp-inputs): Remove 'references' parameter; add
  #:native? and honor it.
  [add-reference-inputs]: Distinguish between native gexp inputs, and
  non-native gexp inputs.  Honor 'native?' field of list inputs.
* tests/gexp.scm ("ungexp + ungexp-native, nested"): New test.
607e1b51 — Ludovic Courtès 11 years ago
gexp: Ignore nested gexps in macro expansion.

Before that, the 'references' and 'natives' or the outer gexp in an
expression like #~#+#~#$coreutils would include those of the inner
gexp.

* guix/gexp.scm (gexp)[collect-escapes]: Ignore everything below
  'ungexp-native' or 'ungexp-native-splicing'.
  [collect-native-escapes]: Ignore everything below 'ungexp' or
  'ungexp-splicing'.
accb682c — Ludovic Courtès 11 years ago
gexp: Allow <gexp-input> objects in #:allowed-references.

* guix/gexp.scm (lower-references): Add <gexp-input> case.
* tests/gexp.scm ("gexp->derivation #:allowed-references, specific
  output"): New test.
2924f0d6 — Ludovic Courtès 11 years ago
gexp: Add identity compiler for derivations.

* guix/gexp.scm (derivation-compiler): New procedure.
  (lower-inputs): Remove 'derivation?' case.
  (gexp-inputs)[add-reference-inputs]: Likewise.
  (gexp->sexp)[reference->sexp]: Likewise.
381c540b — Ludovic Courtès 11 years ago
Merge branch 'master' into core-updates
ff40e9b7 — Ludovic Courtès 11 years ago
gexp: Move the package and origin compilers to (guix packages).

From now own, (guix packages) depends on (guix gexps); it was the other
way around now.  This means that (guix packages) code can use gexps.

* guix/gexp.scm (origin-compiler, package-compiler): Remove.
  (default-guile-derivation): New procedure.
  (gexp->derivation): Use it instead of 'default-guile' +
  'package->derivation'.
* guix/packages.scm (default-guile-derivation): New procedure.
  (package-compiler, origin-compiler): New variables.
* doc/guix.texi (G-Expressions): Mention extensibility.
bcb13287 — Ludovic Courtès 11 years ago
gexp: Separate "compilers" for origins and packages from the core.

* guix/gexp.scm (<gexp-compiler>): New record type.
  (%gexp-compilers): New variable.
  (register-compiler!, lookup-compiler): New procedures.
  (define-gexp-compiler): New macro.
  (origin-compiler, package-compiler): New compilers.
  (lower-inputs): Remove clauses for 'origin?' and 'package?'.  Add
  clause with 'lookup-compiler' instead.
  (lower-references): Likewise.
  (gexp-inputs)[add-reference-inputs]: Likewise.
  (gexp->sexp)[reference->sexp]: Likewise.
a482cfdc — Ludovic Courtès 11 years ago
gexp: Remove special meaning of forms (PACKAGE OUTPUT) in ungexp.

* guix/gexp.scm (gexp-inputs)[add-reference-inputs]: Remove clause for
  inputs of the form (PACKAGE OUTPUT).
  (gexp->sexp)[reference->sexp]: Likewise.
* tests/gexp.scm ("input list splicing"): Change 'list' to 'gexp-input'
  for glibc:debug.
  ("text-file*"): Likewise for %bootstrap-guile:out.
  ("input list splicing + gexp-input + ungexp-native-splicing"): Remove,
  now redundant.
0dbea56b — Ludovic Courtès 11 years ago
gexp: Export 'gexp-input' constructor.

* guix/gexp.scm (<gexp-input>)[gexp-input]: Rename to...
  [%gexp-input]: ... this.  Adjust callers accordingly.
  (gexp-input): New procedure.
  (gexp-inputs)[add-reference-inputs]: When the input is a list, check
  whether each item is already 'gexp-input?' and to not rewrap those.
  (gexp-outputs)[add-reference-output]: Likewise.
  (gexp->sexp): Likewise.
* tests/gexp.scm ("input list splicing + gexp-input +
  ungexp-native-splicing"): New test.
e39d1461 — Ludovic Courtès 11 years ago
gexp: Add <gexp-input>.

* guix/gexp.scm (<gexp-input>): New record type.
  (gexp-inputs)[add-reference-inputs]: Adjust clauses to expect
  <gexp-input> objects.
  (gexp-outputs)[add-reference-output]: Likewise.
  (gexp->sexp)[reference->sexp]: Likewise.
  (canonicalize-reference): Remove.
  (gexp)[escape->ref]: Use 'gexp-input' for all the references.
  Remove use of 'canonicalize-reference'.
1e87da58 — Ludovic Courtès 11 years ago
gexp: Rename <output-ref> to <gexp-output>.

* guix/gexp.scm (<output-ref>): Rename to...
  (<gexp-output>): ... this.  Adjust constructor/accessor names and
  users accordingly.
12890625 — Ludovic Courtès 11 years ago
Merge branch 'core-updates'.
7e75a673 — Ludovic Courtès 11 years ago
gexp: Make sure 'gexp-outputs' removes duplicate outputs.

Fixes a regression introduced in f9efe56.

* guix/gexp.scm (gexp-outputs): Add call to 'delete-duplicates'.
* tests/gexp.scm ("output list, combined gexps, duplicate output"): New
  test.
Next