diff --git a/guix/build/cargo-build-system.scm b/guix/build/cargo-build-system.scm index 117c8da66c..73493af551 100644 --- a/guix/build/cargo-build-system.scm +++ b/guix/build/cargo-build-system.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2019 Ivan Petkov ;;; Copyright © 2019, 2020 Efraim Flashner ;;; Copyright © 2020 Jakub Kądziołka +;;; Copyright © 2020 Marius Bakke ;;; ;;; This file is part of GNU Guix. ;;; @@ -141,14 +142,17 @@ (define* (patch-cargo-checksums #:key (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?