build-system/dub: Let all phases return #T unconditionally.
* guix/build/dub-build-system.scm (configure, build, check): Return #T unconditionally; use INVOKE.
This commit is contained in:
parent
1767581fb5
commit
05a5721f06
|
@ -67,7 +67,8 @@
|
||||||
(symlink (string-append path "/lib/dub/" d-basename)
|
(symlink (string-append path "/lib/dub/" d-basename)
|
||||||
(string-append vendor-dir "/" d-basename))))))))
|
(string-append vendor-dir "/" d-basename))))))))
|
||||||
inputs)
|
inputs)
|
||||||
(zero? (system* "dub" "add-path" vendor-dir))))
|
(invoke "dub" "add-path" vendor-dir)
|
||||||
|
#t))
|
||||||
|
|
||||||
(define (grep string file-name)
|
(define (grep string file-name)
|
||||||
"Find the first occurrence of STRING in the file named FILE-NAME.
|
"Find the first occurrence of STRING in the file named FILE-NAME.
|
||||||
|
@ -88,24 +89,22 @@
|
||||||
(define* (build #:key (dub-build-flags '())
|
(define* (build #:key (dub-build-flags '())
|
||||||
#:allow-other-keys)
|
#:allow-other-keys)
|
||||||
"Build a given DUB package."
|
"Build a given DUB package."
|
||||||
(if (or (grep* "sourceLibrary" "package.json")
|
(unless (or (grep* "sourceLibrary" "package.json")
|
||||||
(grep* "sourceLibrary" "dub.sdl") ; note: format is different!
|
(grep* "sourceLibrary" "dub.sdl") ; note: format is different!
|
||||||
(grep* "sourceLibrary" "dub.json"))
|
(grep* "sourceLibrary" "dub.json"))
|
||||||
#t
|
(apply invoke `("dub" "build" ,@dub-build-flags))
|
||||||
(let ((status (zero? (apply system* `("dub" "build" ,@dub-build-flags)))))
|
|
||||||
(substitute* ".dub/dub.json"
|
(substitute* ".dub/dub.json"
|
||||||
(("\"lastUpgrade\": \"[^\"]*\"")
|
(("\"lastUpgrade\": \"[^\"]*\"")
|
||||||
"\"lastUpgrade\": \"1970-01-01T00:00:00.0000000\""))
|
"\"lastUpgrade\": \"1970-01-01T00:00:00.0000000\"")))
|
||||||
status)))
|
#t)
|
||||||
|
|
||||||
(define* (check #:key tests? #:allow-other-keys)
|
(define* (check #:key tests? #:allow-other-keys)
|
||||||
(if tests?
|
(when tests?
|
||||||
(let ((status (zero? (system* "dub" "test"))))
|
(invoke "dub" "test")
|
||||||
(substitute* ".dub/dub.json"
|
(substitute* ".dub/dub.json"
|
||||||
(("\"lastUpgrade\": \"[^\"]*\"")
|
(("\"lastUpgrade\": \"[^\"]*\"")
|
||||||
"\"lastUpgrade\": \"1970-01-01T00:00:00.0000000\""))
|
"\"lastUpgrade\": \"1970-01-01T00:00:00.0000000\"")))
|
||||||
status)
|
#t)
|
||||||
#t))
|
|
||||||
|
|
||||||
(define* (install #:key inputs outputs #:allow-other-keys)
|
(define* (install #:key inputs outputs #:allow-other-keys)
|
||||||
"Install a given DUB package."
|
"Install a given DUB package."
|
||||||
|
|
Loading…
Reference in New Issue