~ruther/guix-local

ref: b49ffe2d678b5df4192fb9be4ad50bed9d6d5b7f guix-local/guix/utils.scm -rw-r--r-- 14.6 KiB
64fc89b6 — Ludovic Courtès 13 years ago
guix-package: Add `--list-available'.

* guix-package.in (show-help, %options): Add `--list-available'.
  (guix-package)[process-query]: Add support for `--list-available'.
* doc/guix.texi (Invoking guix-package): Document it.
* tests/guix-package.sh: Add test.

* guix/ui.scm (location->string): New procedure.
* guix/utils.scm: Export <location>.
ddc29a78 — Ludovic Courtès 13 years ago
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'.
0af2c24e — Ludovic Courtès 13 years ago
utils: Add `default-keyword-arguments' and `substitute-keyword-arguments'.

* distro/packages/base.scm (default-keyword-arguments,
  substitute-keyword-arguments): Move to...
* guix/utils.scm: ... here.
9b48fb88 — Ludovic Courtès 13 years ago
utils: Add `package-name->name+version'.

* guix/utils.scm (package-name->name+version): New procedure.
* guix-package.in (guix-package)[find-package]: Use it.
* tests/utils.scm ("package-name->name+version"): New test.
d388c2c4 — Ludovic Courtès 13 years ago
build: Require GNU libgcrypt.

* guix/utils.scm (sha256): Remove Coreutils- and libchop-based
  implementations.
* README: Update accordingly.

* m4/guix.m4: New file.
* configure.ac: Use `GUIX_ASSERT_LIBGCRYPT_USABLE'.  Set and substitute
  `LIBGCRYPT_PREFIX'.
* Makefile.am (AM_DISTCHECK_CONFIGURE_FLAGS): Pass
  `--with-libgcrypt-prefix=$(LIBGCRYPT_PREFIX)'.
00e219d1 — Ludovic Courtès 13 years ago
build: Produce (guix config) instead of using compile-time tricks.

* guix/config.scm.in: New file.
* guix/utils.scm: Use it.
  (%libgcrypt): Remove.
  (%nixpkgs-directory): Don't capture the compile-time $NIXPKGS; use
  %NIXPKGS instead.
  (nixpkgs-derivation): Use %NIX-INSTANTIATE.
* pre-inst-env.in (NIX_INSTANTIATE, NIXPKGS, LIBGCRYPT): Remove.

* configure.ac: Emit `guix/config.scm'.
* Makefile.am (GOBJECTS): Add `guix/config.go'.
  (nobase_nodist_guilemodule_DATA): Add `guix/config.scm'.
e76bdf8b — Ludovic Courtès 13 years ago
build: Clearly mark Nixpkgs as optional.

* configure.ac: Always show the result of checking for Nixpkgs.  Don't
  warn when Nixpkgs is not found.
* Makefile.am (AM_DISTCHECK_CONFIGURE_FLAGS): Remove `--with-nixpkgs'
  flag.
* guix/utils.scm (%nixpkgs-directory): Use either the compile-time or
  the run-time `NIXPKGS' environment variable.
* release.nix (jobs.tarball, jobs.build): Remove `--with-nixpkgs'
  configure flag.
* README: Mark Nixpkgs as optional.

* distro/packages/databases.scm, distro/packages/guile.scm,
  distro/packages/typesetting.scm: Change uses of `nixpkgs-derivation*'
  to `nixpkgs-derivation', to avoid failing at compile-time.
07d18f39 — Ludovic Courtès 13 years ago
utils: Remove stuff committed by error.

This was wrongfully committed in df1fab58.

* guix/utils.scm (hash-set-proc, hash-ref*, memoizing-lambda): Remove.
5e6c9012 — Ludovic Courtès 13 years ago
location: Start column numbers at 1.

* guix/utils.scm (source-properties->location): Use COL + 1.
fbc93bed — Ludovic Courtès 13 years ago
Add a `system' parameter to `nixpkgs-derivation'.

* guix/utils.scm (nixpkgs-derivation): Add a `system' parameter.  Pass
  it in the `nix-instantiate' invocation.
df1fab58 — Ludovic Courtès 13 years ago
distro: Add a statically-linked, relocatable Guile 2.0 package.

* distro/packages/base.scm (%guile-static, %guile-static-stripped): New
  variables.

* distro/patches/guile-relocatable.patch: New file.
* Makefile.am (dist_patch_DATA): Add it.
ff352cfb — Ludovic Courtès 13 years ago
Move <location> to (guix utils).

* guix/packages.scm (<location>, location): Move to...
* guix/utils.scm: ... here.
dcd60f43 — Ludovic Courtès 13 years ago
define-record-type*: Add the `inherit' syntactic constructor keyword.

* guix/utils.scm (define-record-type*)[make-syntactic-constructor]: New
  `type' parameter.  Add the `inherit' keyword and corresponding support
  code.

* tests/utils.scm ("define-record-type* & inherit", "define-record-type*
  & inherit & letrec* behavior"): New tests.
3a310cc0 — Ludovic Courtès 13 years ago
build: Add `--with-libgcrypt-prefix'; capture the path to libgcrypt.

* configure.ac: Add `--with-libgcrypt-prefix'.  Substitute `LIBGCRYPT'.

* Makefile.am (.scm.go): Pass $(LIBGCRYPT).

* guix/utils.scm (%libgcrypt): New variable.
  (sha256): Use it.
b86b0056 — Ludovic Courtès 13 years ago
build: Pass $(NIX_INSTANTIATE) to the build and test environments.

* Makefile.am (.scm.go): Define $NIX_INSTANTIATE.
  (TESTS_ENVIRONMENT): Likewise, and define $NIX_HASH.
* guix/utils.scm (nixpkgs-derivation): Use $NIX_INSTANTIATE when
  defined.

* tests/utils.scm (%nix-hash): New variable.
  ("sha256 & bytevector->nix-base32-string"): Use it.
ce5d658c — Ludovic Courtès 13 years ago
Add `nixpkgs-derivation*'; use it in the distro.

* guix/utils.scm (nixpkgs-derivation*): New macro.

* distro/base.scm: Use it instead of `nixpkgs-derivation'.
8fd5bd2b — Ludovic Courtès 13 years ago
define-record-type*: Add `letrec*' behavior.

* guix/utils.scm (define-record-type*)[make-syntactic-constructor]: Bind
  all the ((FIELD VALUE) ...) in a `letrec*'.  Adjust `field-value'
  accordingly.

* tests/utils.scm ("define-record-type* with letrec* behavior"): New
  test.
8ef3401f — Ludovic Courtès 13 years ago
Make `define-record-type*' error messages more informative.

* guix/utils.scm (define-record-type*): In case of missing or extra
  field initializers, raise a descriptive `syntax-error'.
39b9372c — Ludovic Courtès 13 years ago
Add a libgcrypt-based implementation of `sha256'.

* guix/utils.scm (sha256): Add a libgcrypt-based implementation using
  the FFI.
dba6b34b — Ludovic Courtès 13 years ago
Add a sha256 fallback that uses Coreutils instead of libchop.

* guix/utils.scm (compile-time-value): Move to the top.
  (sha256): Add an implementation that uses Coreutils, for when libchop
  is unavailable.
Next