summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2017-02-27 12:42:22 +0100
committerMarius Bakke <mbakke@fastmail.com>2017-02-27 12:42:22 +0100
commit8779987bba029535d3dc00f1aacf59281fdd34f0 (patch)
tree7a6d616d45367d508f94c3593b1ce5c7053c33f5 /guix
parent1885bb0c08e943a2e0e37c5c0a83473c8af904d0 (diff)
parenta6d9f8837b118e2126e4b8a19bf48b524229a15c (diff)
Merge branch 'master' into python-tests
Diffstat (limited to 'guix')
-rw-r--r--guix/build/dub-build-system.scm4
-rw-r--r--guix/download.scm5
-rw-r--r--guix/import/stackage.scm10
-rw-r--r--guix/scripts/import/stackage.scm19
4 files changed, 22 insertions, 16 deletions
diff --git a/guix/build/dub-build-system.scm b/guix/build/dub-build-system.scm
index 7c7cd8803c..b2cb02e639 100644
--- a/guix/build/dub-build-system.scm
+++ b/guix/build/dub-build-system.scm
@@ -91,9 +91,7 @@
(grep* "sourceLibrary" "dub.sdl") ; note: format is different!
(grep* "sourceLibrary" "dub.json"))
#t
- (let ((status (zero? (apply system* `("dub" "build" ,@dub-build-flags)))))
- (system* "dub" "run") ; might fail for "targetType": "library"
- status)))
+ (zero? (apply system* `("dub" "build" ,@dub-build-flags)))))
(define* (check #:key tests? #:allow-other-keys)
(if tests?
diff --git a/guix/download.scm b/guix/download.scm
index 813f51f489..86f8598812 100644
--- a/guix/download.scm
+++ b/guix/download.scm
@@ -418,7 +418,10 @@ GnuTLS itself and its dependencies. See <http://bugs.gnu.org/22774>."
;; hash of the expected result.
#:verify-certificate? #f)))))
- (mlet %store-monad ((guile (package->derivation guile system)))
+ (mlet %store-monad ((guile (package->derivation
+ (or guile
+ (@@ (gnu packages bootstrap) %bootstrap-guile))
+ system)))
(gexp->derivation file-name builder
#:guile-for-build guile
#:system system
diff --git a/guix/import/stackage.scm b/guix/import/stackage.scm
index 542b718083..5b25adc674 100644
--- a/guix/import/stackage.scm
+++ b/guix/import/stackage.scm
@@ -21,12 +21,13 @@
#:use-module (ice-9 regex)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
+ #:use-module (srfi srfi-34)
+ #:use-module (srfi srfi-35)
#:use-module (guix import json)
#:use-module (guix import hackage)
#:use-module (guix memoization)
#:use-module (guix packages)
#:use-module (guix upstream)
- #:use-module (guix ui)
#:export (stackage->guix-package
%stackage-updater))
@@ -49,6 +50,9 @@
((_ ("packages" pkg ...)) pkg)
(_ '())))
+(define (leave-with-message fmt . args)
+ (raise (condition (&message (message (apply format #f fmt args))))))
+
(define stackage-lts-info-fetch
;; "Retrieve the information about the LTS Stackage release VERSION."
(memoize
@@ -59,7 +63,7 @@
(lts-info (json-fetch url)))
(if lts-info
(reverse lts-info)
- (leave (_ "LTS release version not found: ~A~%") version))))))
+ (leave-with-message "LTS release version not found: ~a" version))))))
(define (stackage-package-name pkg-info)
(assoc-ref pkg-info "name"))
@@ -99,7 +103,7 @@ included in the Stackage LTS release."
(hackage->guix-package name-version
#:include-test-dependencies?
include-test-dependencies?)
- (leave (_ "package not found: ~A~%") package-name))))
+ (leave-with-message "~a: Stackage package not found" package-name))))
;;;
diff --git a/guix/scripts/import/stackage.scm b/guix/scripts/import/stackage.scm
index cf47bff259..f91b496d24 100644
--- a/guix/scripts/import/stackage.scm
+++ b/guix/scripts/import/stackage.scm
@@ -98,15 +98,16 @@ Import and convert the LTS Stackage package for PACKAGE-NAME.\n"))
(reverse opts))))
(match args
((package-name)
- (let ((sexp (stackage->guix-package
- package-name
- #:include-test-dependencies?
- (assoc-ref opts 'include-test-dependencies?)
- #:lts-version (assoc-ref opts 'lts-version))))
- (unless sexp
- (leave (_ "failed to download cabal file for package '~a'~%")
- package-name))
- sexp))
+ (with-error-handling
+ (let ((sexp (stackage->guix-package
+ package-name
+ #:include-test-dependencies?
+ (assoc-ref opts 'include-test-dependencies?)
+ #:lts-version (assoc-ref opts 'lts-version))))
+ (unless sexp
+ (leave (_ "failed to download cabal file for package '~a'~%")
+ package-name))
+ sexp)))
(()
(leave (_ "too few arguments~%")))
((many ...)