Commit Graph

30 Commits

Author SHA1 Message Date
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 52bda18abf packages: Add missing export.
* guix/packages.scm: Export `package-home-page'.
2012-11-25 16:55:35 +01:00
Ludovic Courtès ddc29a782e Move base32 code to (guix base32).
* guix/utils.scm (bytevector-quintet-ref, bytevector-quintet-ref-right,
  bytevector-quintet-length, bytevector-quintet-fold,
  bytevector-quintet-fold-right, make-bytevector->base32-string,
  %nix-base32-chars, %rfc4648-base32-chars, bytevector->base32-string,
  bytevector->nix-base32-string, bytevector-quintet-set!,
  bytevector-quintet-set-right!, base32-string-unfold,
  base32-string-unfold-right, make-base32-string->bytevector,
  base32-string->bytevector, nix-base32-string->bytevector): Move to...
* guix/base32.scm: ... here.  New file.

* tests/utils.scm (%nix-hash, "bytevector->base32-string",
  "base32-string->bytevector", "nix-base32-string->bytevector", "sha256
  & bytevector->base32-string"): Move to...
* tests/base32.scm: ... here.  New file

* guix-download.in, guix/derivations.scm, guix/packages.scm,
  guix/snix.scm, tests/builders.scm, tests/derivations.scm: Adjust
  accordingly.
* guix.scm (%public-modules): Add `base32'.
2012-11-11 22:33:28 +01:00
Ludovic Courtès d45122f537 packages: `description' → `synopsis', `long-description' → `description'.
* guix/packages.scm (<package>): Rename `description' to `synopsis', and
  `long-description' to `description'.
* tests/packages.scm, distro/packages/base.scm,
  distro/packages/databases.scm, distro/packages/guile.scm,
  distro/packages/typesetting.scm:  Update accordingly.
* po/Makevars (XGETTEXT_OPTIONS): Update `--keyword' flags accordingly.
2012-11-04 13:48:35 +01: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 b642e4b853 packages: Pass `system' around.
* guix/packages.scm (package-source-derivation): Add `system'
  parameter.  Pass it to METHOD.
  (package-derivation)[expand-input]: Pass SYSTEM to
  `package-derivation' and `package-source-derivation'.

* distro/packages/base.scm (package-with-bootstrap-guile)[boot]: Pass
  SYSTEM to FETCH.
2012-10-25 23:41:15 +02:00
Ludovic Courtès 592ef6c88f packages: Add support for system-dependent inputs.
* guix/packages.scm (package-derivation)[intern]: New procedure.  Pass
  #t as the `recursive?' argument, instead of #f.
  [expand-input]: New procedure, with code formerly in the body.
  Support inputs where the input is a procedure returning a file name or
  an <origin>.
  Use `expand-input' in the body.

* tests/packages.scm ("trivial with system-dependent input"): New test.
2012-10-21 17:52:16 +02:00
Ludovic Courtès e4588af969 packages: Fix and optimize memoization of `package-derivation'.
* guix/packages.scm (%derivation-cache): Pass an initial size of 100.
  (cache): Use `hashq-set!', and use a SYSTEM/DRV pair as the value.
  (cached-derivation): Update accordingly.
2012-10-08 22:07:19 +02:00
Ludovic Courtès ead1f1086d packages: Micro-optimize `package-derivation'.
* guix/packages.scm (package-derivation): Move `cache' call before the
  traversal of PACKAGE's inputs.
2012-10-08 21:57:14 +02:00
Ludovic Courtès be13fbfa83 Add (guix build-system trivial).
* guix/build-system/trivial.scm: New file.
* Makefile.am (MODULES): Add it.
* tests/packages.scm ("trivial"): New test.

* guix/packages.scm (package-derivation): Allow SOURCE to be #f.
2012-09-10 22:47:10 +02:00
Ludovic Courtès dc1045be7d packages: Accept <origin> as package inputs.
* guix/packages.scm (package-derivation): Accept use of an <origin> as
  an input.
2012-09-06 00:00:00 +02:00
Ludovic Courtès 2847050a61 packages: Add `package-full-name'.
* guix/packages.scm (package-full-name): New procedure.
  (package-derivation): Use it.
2012-09-05 19:01:47 +02:00
Ludovic Courtès ff352cfb97 Move <location> to (guix utils).
* guix/packages.scm (<location>, location): Move to...
* guix/utils.scm: ... here.
2012-09-03 01:07:01 +02:00
Ludovic Courtès 113aef68fb packages: Add `package-transitive-propagated-inputs'.
* guix/packages.scm (transitive-inputs): New procedure.
  (package-transitive-inputs): Rewrite in terms of `transitive-inputs'.
  (package-transitive-propagated-inputs): New procedure.
2012-09-02 19:58:03 +02:00
Ludovic Courtès a2ebaddda7 packages: Cache the result of `package-derivation'.
* guix/packages.scm (%derivation-cache): New variable.
  (cache, cached-derivation): New procedures.
  (package-derivation): Use them.
2012-09-02 19:40:08 +02:00
Ludovic Courtès 946b72c924 packages: Add a printer for <package>.
* guix/packages.scm (<package>): Add record printer.
2012-09-02 15:41:52 +02:00
Ludovic Courtès d36622dc44 packages: Raise an error condition upon invalid input.
* guix/packages.scm (&package-error, &package-input-error): New
  condition types.
  (package-derivation): Raise a `&package-input-error' when no match is
  made.
2012-08-23 23:09:13 +02:00
Ludovic Courtès 93a0a8b3fd packages: Add all non-derivation paths to the store.
* guix/packages.scm (package-derivation): Add all non-derivation paths
  to the store.
2012-08-16 19:00:49 +02:00
Ludovic Courtès cf56996046 packages: Allow store paths as inputs.
* guix/packages.scm (package-derivation): Allow non-derivation store
  paths as inputs.
2012-08-16 18:48:03 +02:00
Ludovic Courtès a3d73f59e3 Add `package-transitive-inputs'; use it to honor propagated inputs.
* guix/packages.scm (package-transitive-inputs): New procedure.
  (package-derivation): Use it to compute INPUTS.

* tests/packages.scm (dummy-package): New macro.
  ("package-transitive-inputs"): New test.
2012-07-07 20:14:31 +02:00
Ludovic Courtès e67ac6e668 packages: Allow inputs that are local files.
* guix/packages.scm (package-derivation): Add to the store inputs that
  are local files.
2012-07-05 01:20:05 +02:00
Ludovic Courtès c9d01150c0 packages: Add a `self-native-input?' field.
* guix/packages.scm (<package>)[self-native-input?]: New field.
  (package-derivation): Update/fix pattern.
2012-07-05 00:09:17 +02:00
Ludovic Courtès 90c68be883 Rename <package-source> to <origin>; use the `letrec*' behavior in packages.
* guix/packages.scm (<package-source>): Rename to...
  (<origin>): ... this.  Update users.

* distro/base.scm (libsigsegv, gawk, hello): Adjust to renaming; refer
  to VERSION to build the URL.
2012-07-03 23:50:29 +02:00
Ludovic Courtès e4c245f8a5 Add a `base32' macro, for convenience.
* guix/packages.scm (base32): New macro.

* distro/base.scm (libsigsegv, gawk, hello): Use it.
2012-07-02 16:07:26 +02:00
Ludovic Courtès 03671375b6 packages: Allow the `arguments' field to be a procedure.
* guix/packages.scm (package-derivation): When ARGS is a procedure, call
  (ARGS SYSTEM).

* distro/base.scm (gawk)[arguments]: Turn into a procedure, to disable
  tests on Cygwin.
2012-07-02 15:59:30 +02:00
Ludovic Courtès 062c6927ad Add `propagated-inputs' and `properties' to <package>.
* guix/packages.scm (<package>)[propagated-inputs, properties]: New
  fields.
  (package-derivation): Update `match' clause.
2012-07-02 01:35:34 +02:00
Ludovic Courtès 64fddd74f0 distro: Add libsigsegv and GNU Awk.
* guix/packages.scm (<package>)[arguments]: Default to '().

* distro/base.scm (libsigsegv, gawk): New packages.
  (hello): Use GAWK instead of (nixpkgs-derivation "gawk").
2012-06-29 00:28:57 +02:00
Ludovic Courtès 45753b6552 packages: Add a `home-page' field.
* guix/packages.scm (<package>)[home-page]: New field.

* distro/base.scm (hello)[home-page]: Initialize.
2012-06-28 23:44:43 +02:00
Ludovic Courtès 35f3c5f5ad Track the source location of packages.
* guix/packages.scm (<location>): New record type.
  (location, source-properties->location): New procedures.
  (<package>)[location]: New field.

* tests/packages.scm ("GNU Hello"): Test `package-location'.
2012-06-28 23:15:24 +02:00
Ludovic Courtès e3ce5d709f Add a declarative packaging layer.
* Makefile.am (MODULES): Add `guix/packages.scm' and `distro/base.scm'.
  (TESTS): Add `tests/packages.scm'.
  (EXTRA_DIST): New variable.

* guix/packages.scm, distro/base.scm, tests/packages.scm: New files.

* guix/http.scm (http-fetch): Make `name' an optional argument, to match
  the expectations of `package-source-derivation'.
2012-06-28 01:24:34 +02:00