summaryrefslogtreecommitdiff
path: root/guix/build
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-11-29 14:19:55 +0000
committerChristopher Baines <mail@cbaines.net>2020-11-29 17:34:18 +0000
commitff01206345e2306cc633db48e0b29eab9077091a (patch)
tree25c7ee17005dadc9bf4fae3f0873e03a4704f782 /guix/build
parented2545f0fa0e2ad99d5a0c45f532c539b299b9fb (diff)
parent7c2e67400ffaef8eb6f30ef7126c976ee3d7e36c (diff)
downloadguix-patches-ff01206345e2306cc633db48e0b29eab9077091a.tar
guix-patches-ff01206345e2306cc633db48e0b29eab9077091a.tar.gz
Merge remote-tracking branch 'origin/master' into core-updates
Diffstat (limited to 'guix/build')
-rw-r--r--guix/build/cargo-build-system.scm19
-rw-r--r--guix/build/maven-build-system.scm3
2 files changed, 17 insertions, 5 deletions
diff --git a/guix/build/cargo-build-system.scm b/guix/build/cargo-build-system.scm
index 117c8da66c..c7beffc6e4 100644
--- a/guix/build/cargo-build-system.scm
+++ b/guix/build/cargo-build-system.scm
@@ -4,6 +4,7 @@
;;; Copyright © 2019 Ivan Petkov <ivanppetkov@gmail.com>
;;; Copyright © 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
+;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -122,6 +123,13 @@ directory = '" port)
(setenv "CC" (string-append (assoc-ref inputs "gcc") "/bin/gcc"))
(setenv "LIBGIT2_SYS_USE_PKG_CONFIG" "1")
(setenv "LIBSSH2_SYS_USE_PKG_CONFIG" "1")
+ (when (assoc-ref inputs "openssl")
+ (setenv "OPENSSL_DIR" (assoc-ref inputs "openssl")))
+ (when (assoc-ref inputs "gettext")
+ (setenv "GETTEXT_SYSTEM" (assoc-ref inputs "gettext")))
+ (when (assoc-ref inputs "clang")
+ (setenv "LIBCLANG_PATH"
+ (string-append (assoc-ref inputs "clang") "/lib")))
;; We don't use the Cargo.lock file to determine the package versions we use
;; during building, and in any case if one is not present it is created
@@ -141,14 +149,17 @@ directory = '" port)
(define* (build #:key
skip-build?
- features
+ (features '())
(cargo-build-flags '("--release"))
#:allow-other-keys)
"Build a given Cargo package."
(or skip-build?
- (apply invoke "cargo" "build"
- "--features" (string-join features)
- cargo-build-flags)))
+ (apply invoke
+ `("cargo" "build"
+ ,@(if (null? features)
+ '()
+ `("--features" ,(string-join features)))
+ ,@cargo-build-flags))))
(define* (check #:key
tests?
diff --git a/guix/build/maven-build-system.scm b/guix/build/maven-build-system.scm
index 914298d584..534b4ebcee 100644
--- a/guix/build/maven-build-system.scm
+++ b/guix/build/maven-build-system.scm
@@ -100,7 +100,8 @@
inputs local-packages excludes)))))))
(define* (fix-pom-files #:key inputs local-packages exclude #:allow-other-keys)
- (fix-pom "pom.xml" inputs local-packages exclude))
+ (fix-pom "pom.xml" inputs local-packages exclude)
+ #t)
(define* (build #:key outputs #:allow-other-keys)
"Build the given package."