Commit Graph

5 Commits

Author SHA1 Message Date
Eric Bavier
de61113857 utils: Allow wrap-program to be called multiple times.
* guix/build/utils.scm (wrap-program): Multiple invocations of
  wrap-program for the same file create successive wrappers.  Adjust
  docstring.
* tests/build-utils.scm: Test new wrap-program behavior.
  (%store): New variable.
2014-09-13 21:53:21 -05:00
Ludovic Courtès
0bdba772ca Augment `.dir-locals.el'.
* .dir-locals.el: Add more Scheme settings.
* guix-build.in, tests/base32.scm, tests/build-utils.scm,
  tests/builders.scm, tests/derivations.scm, tests/packages.scm,
  tests/snix.scm, tests/store.scm, tests/union.scm, tests/utils.scm:
  Remove redundant Emacs local variable settings.
2013-02-01 13:16:45 +01:00
Ludovic Courtès
233e76769a Update license headers.
Change all license headers, except guix/build/* and ld-wrapper.scm, with
this code:

  (use-modules (guix build utils)
	       (srfi srfi-1))

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

  (substitute* (remove (lambda (f)
			 (or (string-contains f ".tar.")
			     (string-contains f ".git/")
			     (string-contains f ".so")
			     (string-suffix? ".o" f)
			     (string-suffix? ".a" f)
			     (string-suffix? ".go" f)
			     (string-suffix? ".pdf" f)
			     (string-suffix? ".png" f)
			     (string-suffix? ".info" f)
			     (equal? (basename f) "guix-daemon")
			     (equal? (basename f) "nix-setuid-helper")
			     (string-contains f "nix-upstream/")
			     (string-contains f "distro/packages/bootstrap/")))
		       (find-files "." "\\.[a-z]+$"))
    (("^([[: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 ©")))

Change headers using C-style comments manually.
2013-01-06 00:47:50 +01:00
Ludovic Courtès
91133c2d71 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.
2012-10-16 23:01:01 +02:00
Ludovic Courtès
b0e0d0e99f Add builder-side utilities for phases, stream editing, & co.
* 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'.
2012-07-05 00:13:30 +02:00