Skip to content
Snippets Groups Projects
  • Ludovic Courtès's avatar
    667b2508
    gexp: Add 'ungexp-native' and 'ungexp-native-splicing'. · 667b2508
    Ludovic Courtès authored
    * guix/gexp.scm (<gexp>)[natives]: New field.
      (write-gexp): Use both 'gexp-references' and
      'gexp-native-references'.
      (gexp->derivation): Use both 'gexp-inputs' and 'gexp-native-inputs',
      and append them.
      (gexp-inputs): Add 'references' parameter and honor it.
      (gexp-native-inputs): New procedure.
      (gexp->sexp)[reference->sexp]: Add 'native?' parameter and honor it.
      Use it, and use 'gexp-native-references'.
      (gexp)[collect-native-escapes]: New procedure.
      [escape->ref]: Handle 'ungexp-native' and 'ungexp-native-splicing'.
      [substitute-ungexp, substitute-ungexp-splicing]: New procedures.
      [substitute-references]: Use them, and handle 'ungexp-native' and
      'ungexp-native-splicing'.
      Adjust generated 'make-gexp' call to provide both normal references
      and native references.
      [read-ungexp]: Support 'ungexp-native' and
      'ungexp-native-splicing'.
      Add reader extension for #+.
    * tests/gexp.scm (gexp-native-inputs): New procedure.
      (gexp->sexp*): Add 'target' parameter.
      ("ungexp + ungexp-native",
      "input list + ungexp-native",
      "input list splicing + ungexp-native-splicing",
      "gexp->derivation, ungexp-native",
      "gexp->derivation, ungexp + ungexp-native"): New tests.
      ("sugar"): Add tests for #+ and #+@.
    * doc/guix.texi (G-Expressions): Document 'ungexp-native' et al.
    667b2508
    History
    gexp: Add 'ungexp-native' and 'ungexp-native-splicing'.
    Ludovic Courtès authored
    * guix/gexp.scm (<gexp>)[natives]: New field.
      (write-gexp): Use both 'gexp-references' and
      'gexp-native-references'.
      (gexp->derivation): Use both 'gexp-inputs' and 'gexp-native-inputs',
      and append them.
      (gexp-inputs): Add 'references' parameter and honor it.
      (gexp-native-inputs): New procedure.
      (gexp->sexp)[reference->sexp]: Add 'native?' parameter and honor it.
      Use it, and use 'gexp-native-references'.
      (gexp)[collect-native-escapes]: New procedure.
      [escape->ref]: Handle 'ungexp-native' and 'ungexp-native-splicing'.
      [substitute-ungexp, substitute-ungexp-splicing]: New procedures.
      [substitute-references]: Use them, and handle 'ungexp-native' and
      'ungexp-native-splicing'.
      Adjust generated 'make-gexp' call to provide both normal references
      and native references.
      [read-ungexp]: Support 'ungexp-native' and
      'ungexp-native-splicing'.
      Add reader extension for #+.
    * tests/gexp.scm (gexp-native-inputs): New procedure.
      (gexp->sexp*): Add 'target' parameter.
      ("ungexp + ungexp-native",
      "input list + ungexp-native",
      "input list splicing + ungexp-native-splicing",
      "gexp->derivation, ungexp-native",
      "gexp->derivation, ungexp + ungexp-native"): New tests.
      ("sugar"): Add tests for #+ and #+@.
    * doc/guix.texi (G-Expressions): Document 'ungexp-native' et al.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
guix.texi 163.51 KiB