Commit Graph

24 Commits

Author SHA1 Message Date
Ludovic Courtès
59a43334a9 distro: Rename (distro) to (gnu packages).
* distro.scm: Rename to...
* gnu/packages.scm: ... this.  Update all users accordingly.
* Makefile.am (MODULES): Adjust accordingly.
* po/POTFILES.in: Likewise.
2013-01-18 01:07:53 +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
2646c55b03 guix-build: Make `--root' effective for .drv files too.
* guix-build.in (guix-build)[register-root]: Change first argument to
  `paths', which should be a list of store paths.  Update caller to call
  `derivation-path->output-paths' on DRV.  When `derivations-only?',
  also register root for .drv files.
2013-01-06 00:18:43 +01:00
Ludovic Courtès
3441e16497 ui: Factorize bug-report information in `--help'.
* guix/config.scm.in (%guix-home-page-url): New variable.
* guix/ui.scm (show-bug-report-information): New procedure.
* guix-build.in (show-help): Use it.
* guix-download.in (show-help): Likewise.
* guix-import.in (show-help): Likewise.
* guix-package.in (show-help): Likewise.
2013-01-05 15:55:47 +01:00
Ludovic Courtès
07ab4bf1fc guix-build: Add `--verbosity'.
* guix-build.in (%default-options): Add `verbosity'.
  (%options): Add `--verbosity'.
  (guix-build): Pass it to `set-build-options'.
  (show-help): Update accordingly.
* doc/guix.texi (Invoking guix-build): Document `--verbosity'.
2012-12-15 15:21:38 +01:00
Ludovic Courtès
c7bdb1b9d1 guix-build: Don't connect to the daemon when run with --version' or --help'.
* guix-build.in (%store): Turn into a SRFI-39 parameter.  Update users.
  (guix-build): Set %STORE and call `open-connection' only after
  `parse-options' has been called.
2012-12-04 23:50:20 +01:00
Ludovic Courtès
ef1ee6b221 guix-build: Use `location->string'.
* guix-build.in (derivations-from-package-expressions): Use
  `location->string'.
2012-11-19 23:41:17 +01:00
Ludovic Courtès
912209ee61 guix-build: Error out when `-S' used for source-less package.
* guix-build.in (derivations-from-package-expressions): Leave with an
  error message when SOURCE? is #t and P has no source.

* tests/guix-build.sh: Add test.
2012-11-07 23:44:38 +01:00
Ludovic Courtès
cdd5d6f95f ui: Factorize `--version'.
* guix/ui.scm (show-version-and-exit): New procedure.
* guix-build.in (show-version): Remove.
  (%options)["version"]: Use `show-version-and-exit'.
* guix-download.in: Likewise.
* guix-package.in: Likewise.
2012-11-03 21:19:43 +01:00
Ludovic Courtès
073c34d72f Add (guix ui).
* guix/ui.scm: New file.
* Makefile.am (MODULES): Add it.
* po/POTFILES.in: Add it.

* guix-build.in: Use it.
  (_, N_, leave): Remove.
  (guix-build): Use `with-error-handling' instead of the `guard' form.
* guix-download.in: Use it.
  (_, N_, leave): Remove.
2012-11-01 00:52:44 +01:00
Ludovic Courtès
34811f02bf guix-build: Add `--root'.
* guix/store.scm (add-indirect-root): New operation.
* guix-build.in (show-help): Document `--root'.
  (%options): Add `--root'.
  (guix-build)[register-root]: New procedure.  Call it when `--root' is
  passed.
2012-10-30 00:20:53 +01:00
Ludovic Courtès
b8605698b8 build: Make sure scripts know where to find their modules.
* guix-build.in, guix-download.in: Define `prefix' and `datarootdir', so
  that `guilemoduledir' expands to something meaningful.
2012-10-27 22:52:13 +02:00
Ludovic Courtès
0778385802 guix-build: Gracefully handle `&package-input-error' conditions.
* guix/packages.scm: Export `package-error?' and `package-input-error?'.
* guix-build.in (guix-build): Catch `&package-input-error' conditions,
  print a human-readable message, and exit.
2012-10-27 14:56:46 +02:00
Ludovic Courtès
692c6c1576 guix-build: Change --local-build' to --no-substitutes'.
* guix-build.in (%default-options): Add `substitutes?'.
  (show-help): Change `--local-build' to `--no-substitutes'.
  (guix-build): Adjust accordingly.
2012-10-24 15:01:16 +02:00
Ludovic Courtès
5cc3061673 guix-build: Add `--system'.
* guix-build.in (derivations-from-package-expressions): New `system'
  parameter.  Pass it to `package-derivation'.
  (%default-options): Add `system' pair.
  (show-help): Describe `--system'.
  (%options): Add it.
  (guix-build): Check the `system' pair in OPTS; pass it to
  `derivations-from-package-expressions' and `package-derivation'.
2012-10-18 23:46:10 +02:00
Ludovic Courtès
1c3972daa8 guix-build: Add `--local-build'.
* guix-build.in (show-help): Add `--local-build'.
  (%options): Likewise.
  (guix-build): Pass `set-build-options' the #:use-substitutes? argument
  accordingly.
2012-10-18 22:32:21 +02:00
Ludovic Courtès
db1a15314d Support build-cores = 0; change `guix-build' to default to 0.
* guix/build/gnu-build-system.scm (%parallel-job-count): New variable.
  (build, check): Use it instead of $NIX_BUILD_CORES.

* guix-build.in (guix-build): Default to 0 for the #:build-cores option.
2012-10-05 23:21:09 +02:00
Ludovic Courtès
609354bf0a guix-build: Add `--derivations'.
* guix-build.in (show-help): Add `--derivations'.
  (%options): Likewise.
  (guix-build): Handle it.
2012-09-04 23:43:24 +02:00
Ludovic Courtès
5dba31494e guix-build: Add `--source'.
* guix-build.in (derivations-from-package-expressions): Add `source?'
  parameter.  Honor it.
  (show-help): Add `--source'.
  (%options): Likewise.
  (guix-build): Honor `--source'.
2012-09-04 23:42:06 +02:00
Ludovic Courtès
8759a648ba guix-build: Fix the "unrecognized option" error message.
* guix-build.in (guix-build): Show the option name when an unrecognized
  option is passed.
2012-08-31 17:05:34 +02:00
Ludovic Courtès
7e2255e6c1 guix-build: Default the number of build cores to (current-processor-count).
* guix-build.in (guix-build): Use (current-processor-count) build cores
  by default.
2012-07-12 16:52:52 +02:00
Ludovic Courtès
fa14d96e6f guix-build: Add `--cores'.
* guix-build.in (leave): New macro, formerly in `guix-build'.
  (show-help): Document `--cores'.
  (%options): Add `--cores'.
  (guix-build): Remove `leave' macro from here.  Pass the `cores' option
  value to `set-build-options'.
2012-07-07 16:50:40 +02:00
Ludovic Courtès
9336b5ab55 guix-build: Display multiple outputs when needed.
* guix-build.in (guix-build): Display multiple outputs when there's more
  than one.
2012-07-02 01:35:39 +02:00
Ludovic Courtès
14a1c3197c Add `guix-build'.
* guix-build.in: New file.

* configure.ac: Emit `guix-build'.  Add `commands-exec'.
* Makefile.am (bin_SCRIPTS): New variable.
* po/POTFILES.in: Add `guix-build.in'.
2012-07-01 00:56:24 +02:00