From c36db98c8eaeded5243ecfa1c66e06f38da10692 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 13 Jun 2012 17:03:34 +0200 Subject: 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. --- tests/builders.scm | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests') diff --git a/tests/builders.scm b/tests/builders.scm index a70959db6c..c68f1ffe8d 100644 --- a/tests/builders.scm +++ b/tests/builders.scm @@ -19,6 +19,7 @@ (define-module (test-builders) #:use-module (guix http) + #:use-module (guix gnu-build-system) #:use-module (guix store) #:use-module (guix utils) #:use-module (guix derivations) @@ -40,6 +41,17 @@ (and (build-derivations %store (list drv-path)) (file-exists? (derivation-path->output-path drv-path))))) +(test-assert "gnu-build" + (let* ((url "http://ftp.gnu.org/gnu/hello/hello-2.8.tar.gz") + (hash (nix-base32-string->bytevector + "0wqd8sjmxfskrflaxywc7gqw7sfawrfvdxd9skxawzfgyy0pzdz6")) + (tarball (http-fetch %store url 'sha256 hash)) + (build (gnu-build %store "hello-2.8" tarball + `(("gawk" . ,(nixpkgs-derivation "gawk")))))) + (and (build-derivations %store (list (pk 'hello-drv build))) + (file-exists? (string-append (derivation-path->output-path build) + "/bin/hello"))))) + (test-end "builders") -- cgit v1.2.3