summaryrefslogtreecommitdiff
path: root/guix/build/utils.scm
Commit message (Collapse)AuthorAge
* utils: Remove special `substitute*' syntax for lists of files.Ludovic Courtès2012-10-26
| | | | | | | | * 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.
* utils: Add `find-files'.Ludovic Courtès2012-10-17
| | | | * guix/build/utils.scm (find-files): New procedure.
* utils: Add `copy-recursively'; use it.Ludovic Courtès2012-10-17
| | | | | | * guix/build/utils.scm (copy-recursively): New procedure. * distro/packages/base.scm (%guile-static-stripped): Use it.
* utils: Add `mkdir-p'; use it.Ludovic Courtès2012-10-17
| | | | | | | | * 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.
* utils: Add `fold-port-matches' and `remove-store-references'.Ludovic Courtès2012-10-16
| | | | | | | | * 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.
* utils: Add `with-atomic-file-replacement'.Ludovic Courtès2012-10-16
| | | | | * guix/build/utils.scm (with-atomic-file-replacement): New procedure. (substitute): Use it.
* utils: Make `set-path-environment-variable' verbose.Ludovic Courtès2012-09-06
| | | | | * guix/build/utils.scm (set-path-environment-variable): Print ENV-VAR and its value.
* utils: Change `substitute*' to allow iteration over several matches.Ludovic Courtès2012-09-01
| | | | | | | | | | | | | | * guix/build/utils.scm (substitute): Do not pass the OUT to PROC; use `list-matches' instead of `regexp-exec' and pass a list of matches to PROC. Expect PROC to return a string, and output that. Fold over RX+PROC in order. Use `(read-line p 'concat)' to include the trailing delimiter in LINE. (substitute*): Produce code to iterate over the matches, and return a string, which includes anything from the original line that's in between matches. * distro/base.scm (gcc-4.7, glibc): Adjust accordingly: remove use of (ice-9 regex) and `regexp-substitute/global'; return a string.
* utils: Change `substitute*' to accept a list of files to patch.Ludovic Courtès2012-08-25
| | | | | * guix/build/utils.scm (substitute*): Support a list of files as the first argument.
* utils: Add a `path' argument to `patch-shebang'.Ludovic Courtès2012-08-19
| | | | | | * guix/build/utils.scm (patch-shebang): Add an optional `path' parameter. Change SHEBANG-RX to match the whole interpreter file name. Don't patch when BIN and CMD are the same. Add docstring.
* utils: Add `patch-shebang'.Ludovic Courtès2012-08-19
| | | | | * guix/build/utils.scm (search-path-as-string->list): New procedure. (dump-port, patch-shebang): New procedures.
* utils: Have `substitute' restore the file's permission bits.Ludovic Courtès2012-07-07
| | | | | * guix/build/utils.scm (substitute): Restore FILE's mode before renaming TEMPLATE.
* utils: Change `substitute' and `substitute*' to work with several regexps.Ludovic Courtès2012-07-07
| | | | | | | | * guix/build/utils.scm (substitute): Change to accept a `pattern+procs' parameter. Iterate over it. (substitute*): Adjust accordingly. * distro/base.scm (guile-1.8): Adjust accordingly.
* utils: Introduce `substitute*', for easier sed-like syntax.Ludovic Courtès2012-07-07
| | | | | | | * guix/build/utils.scm (let-matches, substitute*): New macros. * distro/base.scm (guile-1.8): Use `substitute*' instead of `substitute'. Remove the #:modules argument.
* utils: Make sure `substitute' writes all its output.Ludovic Courtès2012-07-06
| | | | * guix/build/utils.scm (substitute): Close OUT before renaming it.
* Add builder-side utilities for phases, stream editing, & co.Ludovic Courtès2012-07-05
| | | | | | | | | | * guix/build/utils.scm (with-directory-excursion): New macro. (alist-cons-before, alist-cons-after, alist-replace): New procedures. (substitute): New procedure. * tests/build-utils.scm: New file. * Makefile.am (TESTS): Add `tests/build-utils.scm'.
* Remove leftover debugging expressions.Ludovic Courtès2012-06-16
| | | | | * guix/build/utils.scm (directory-exists?): Remove leftover debugging expressions.
* Add supporting tools for the GNU Build System.Ludovic Courtès2012-06-13
* 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.