~ruther/guix-local

ref: 30db6af1de2066430ac59cec7dbf0105c3230ff0 guix-local/guix/build/utils.scm -rw-r--r-- 27.4 KiB
30db6af1 — Nikita Karetnikov 13 years ago
utils: Add 'wrap-program'.

* guix/build/utils.scm (wrap-program): New procedure.
12761f48 — Ludovic Courtès 13 years ago
utils: Add a #:follow-symlinks? parameter to `copy-recursively'.

* guix/build/utils.scm (copy-recursively): Turn `log' into a keyword
  parameter.  Add the `follow-symlinks?' parameter and honor it.
e65df6a6 — Ludovic Courtès 13 years ago
utils: Add `delete-file-recursively'.

* guix/build/utils.scm (delete-file-recursively): New procedure.
ca8def6e — Andreas Enge 13 years ago
Patch-shebang: Do not add space after interpreter without argument.

* guix/build/utils.scm (patch-shebang): Do not add a space after a command
  interpreter not followed by an argument; this made two tests of
  coreutils fail.
11996d85 — Andreas Enge 13 years ago
Patch-shebang: Handle "#!/usr/bin/env command"

* guix/build/utils.scm (patch-shebang): Handle replacement of
   "#!.*/env CMD ARGS" by "#!/nix/store/path/.../to/CMD ARGS".
01e354eb — Ludovic Courtès 13 years ago
Merge branch 'core-updates'

Conflicts:
	guix/build/union.scm
4155e2a9 — Ludovic Courtès 13 years ago
Update license headers of builder-side code.

Change license headers with this script:

  (use-modules (guix build utils))

  (fluid-set! %default-port-encoding "UTF-8")

  (substitute* (cons "distro/packages/ld-wrapper.scm"
		     (find-files "guix/build" "\\.scm$"))
    (("^([[:graph:]]+) This file is part of Guix." _ comment-start)
     (string-append comment-start " This file is part of GNU Guix."))
    (("^([[:graph:]]+) Guix --- Nix package management.*" _ comment-start)
     (string-append comment-start
		    " GNU Guix --- Functional package management for GNU\n"))
    (("^([[:graph:]]+) Guix is " _ comment-start)
     (string-append comment-start " GNU Guix is "))
    (("^([[:graph:]]+) along with Guix." _ comment-start)
     (string-append comment-start " along with GNU Guix."))
    (("^([[:graph:]]+) Copyright \\(C\\)" _ comment-start)
     (string-append comment-start " Copyright ©")))

* distro/packages/ld-wrapper.scm, guix/build/download.scm,
  guix/build/gnu-build-system.scm, guix/build/union.scm,
  guix/build/utils.scm: Update license headers.
7584f822 — Ludovic Courtès 13 years ago
utils: Add `which'.

* guix/build/utils.scm (which): New procedure.

* distro/packages/lsh.scm (lsh): Use `which' instead of `search-path'.
* distro/packages/perl.scm (perl): Likewise.
* distro/packages/attr.scm (attr): Likewise.
93b03575 — Ludovic Courtès 13 years ago
utils: Use binary I/O primitives for `remove-store-references'.

* guix/build/utils.scm (fold-port-matches)[get-char]: New procedure.
  (remove-store-references): Use `put-u8' and `put-bytevector'.
bc5bf85f — Ludovic Courtès 13 years ago
utils: Restore the mtime/atime of patched files.

* guix/build/utils.scm (set-file-time): New procedure.
  (patch-shebang): New `keep-mtime?' parameter; call `set-file-time'
  when it's true.
  (patch-makefile-SHELL): Likewise.
c0895112 — Ludovic Courtès 13 years ago
build-system/gnu: Patch shebangs in all the source; patch SHELL in makefiles.

* guix/build/utils.scm (call-with-ascii-input-file): New procedure.
  (patch-shebang): Use it.
  (patch-makefile-SHELL): New procedure.
* guix/build/gnu-build-system.scm (patch-source-shebangs): Patch all the
  files, not just executables; remove `po/Makefile.in.in' patching.
  (patch-generated-files): Rename to...
  (patch-generated-file-shebangs): ... this.  Patch executables and
  makefiles.
  (%standard-phases): Adjust accordingly.

* distro/packages/autotools.scm (libtool): Remove call to `patch-shebang'.
* distro/packages/base.scm (gcc-4.7): Likewise.
  (guile-final): Remove hack to skip `test-command-line-encoding2'.
* distro/packages/bash.scm (bash): Remove `pre-configure-phase'.
* distro/packages/readline.scm (readline): Likewise.
* distro/packages/ncurses.scm (ncurses): Remove `pre-install-phase'.
a18b4d08 — Ludovic Courtès 13 years ago
utils: Add a `progress' parameter to `dump-port'.

* guix/build/utils.scm (dump-port): Add a `progress' keyword parameter.
  Call it after each transfer.
d0084152 — Ludovic Courtès 13 years ago
build-system/gnu: Patch shebangs in executable source files.

This allows many packages to build in a chroot that lacks /bin and
thus /bin/sh.

* guix/build/gnu-build-system.scm (patch-source-shebangs): New
  procedure.
  (%standard-phases): Add it.
* guix/build/utils.scm (executable-file?): New procedure.
* distro/packages/perl.scm (perl): Don't use /bin/sh to run `Configure'.
74baf333 — Ludovic Courtès 13 years ago
utils: Make the buffer size of `dump-port' a parameter.

* guix/build/utils.scm (dump-port): Make `buffer-size' a keyword
  parameter.
20d83444 — Ludovic Courtès 13 years ago
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.
4c261f41 — Ludovic Courtès 13 years ago
utils: Add `find-files'.

* guix/build/utils.scm (find-files): New procedure.
c0746cc9 — Ludovic Courtès 13 years ago
utils: Add `copy-recursively'; use it.

* guix/build/utils.scm (copy-recursively): New procedure.

* distro/packages/base.scm (%guile-static-stripped): Use it.
7da95264 — Ludovic Courtès 13 years ago
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.
91133c2d — Ludovic Courtès 13 years ago
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.
dcd72906 — Ludovic Courtès 13 years ago
utils: Add `with-atomic-file-replacement'.

* guix/build/utils.scm (with-atomic-file-replacement): New procedure.
  (substitute): Use it.
Next