diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2012-06-13 17:03:34 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2012-06-13 17:03:34 +0200 |
| commit | c36db98c8eaeded5243ecfa1c66e06f38da10692 (patch) | |
| tree | 2d2fa5ebede4f7f08065e20f07e15bd88e946db4 /tests/builders.scm | |
| parent | bcdd83ec69cb818c0a809ca03b1297e9725ad95b (diff) | |
Add supporting tools for the GNU Build System.
* guix/derivations.scm (build-expression->derivation): Add all of INPUTS
as inputs to the final derivation.
* guix/build/gnu-build-system.scm, guix/build/utils.scm,
guix/gnu-build-system.scm: New files.
* tests/builders.scm ("gnu-build"): New test.
Diffstat (limited to 'tests/builders.scm')
| -rw-r--r-- | tests/builders.scm | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/builders.scm b/tests/builders.scm index a70959db6c7..c68f1ffe8de 100644 --- a/tests/builders.scm +++ b/tests/builders.scm | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | 19 | ||
| 20 | (define-module (test-builders) | 20 | (define-module (test-builders) |
| 21 | #:use-module (guix http) | 21 | #:use-module (guix http) |
| 22 | #:use-module (guix gnu-build-system) | ||
| 22 | #:use-module (guix store) | 23 | #:use-module (guix store) |
| 23 | #:use-module (guix utils) | 24 | #:use-module (guix utils) |
| 24 | #:use-module (guix derivations) | 25 | #:use-module (guix derivations) |
| @@ -40,6 +41,17 @@ | |||
| 40 | (and (build-derivations %store (list drv-path)) | 41 | (and (build-derivations %store (list drv-path)) |
| 41 | (file-exists? (derivation-path->output-path drv-path))))) | 42 | (file-exists? (derivation-path->output-path drv-path))))) |
| 42 | 43 | ||
| 44 | (test-assert "gnu-build" | ||
| 45 | (let* ((url "http://ftp.gnu.org/gnu/hello/hello-2.8.tar.gz") | ||
| 46 | (hash (nix-base32-string->bytevector | ||
| 47 | "0wqd8sjmxfskrflaxywc7gqw7sfawrfvdxd9skxawzfgyy0pzdz6")) | ||
| 48 | (tarball (http-fetch %store url 'sha256 hash)) | ||
| 49 | (build (gnu-build %store "hello-2.8" tarball | ||
| 50 | `(("gawk" . ,(nixpkgs-derivation "gawk")))))) | ||
| 51 | (and (build-derivations %store (list (pk 'hello-drv build))) | ||
| 52 | (file-exists? (string-append (derivation-path->output-path build) | ||
| 53 | "/bin/hello"))))) | ||
| 54 | |||
| 43 | (test-end "builders") | 55 | (test-end "builders") |
| 44 | 56 | ||
| 45 | 57 | ||
