~ruther/guix-local

8292d0d4779f9ab19c5e11fb096b2f425650f9d6 — Hilton Chain 1 year, 2 months ago 5494343
build/cargo: Set default value of arguments for build phases.

This will make it easier to use these phases in other bulid systems.

* guix/build/cargo-build-system.scm (unpack-rust-crates, configure, build)
(package, install): Set default value for arguments specific to this build
system.

Change-Id: I1dde1b063d8eee57967903abd2fce94574211a0a
1 files changed, 9 insertions(+), 8 deletions(-)

M guix/build/cargo-build-system.scm
M guix/build/cargo-build-system.scm => guix/build/cargo-build-system.scm +9 -8
@@ 77,7 77,8 @@ Cargo.toml file present at its root."
                                            " | cut -d/ -f2"
                                            " | grep -q '^Cargo.toml$'")))))

(define* (unpack-rust-crates #:key inputs vendor-dir #:allow-other-keys)
(define* (unpack-rust-crates #:key inputs (vendor-dir "guix-vendor")
                             #:allow-other-keys)
  (define (inputs->rust-inputs inputs)
    "Filter using the label part from INPUTS."
    (filter (lambda (input)


@@ 141,7 142,7 @@ libraries or executables."

(define* (configure #:key inputs
                    target system
                    cargo-target
                    (cargo-target #f)
                    (vendor-dir "guix-vendor")
                    #:allow-other-keys)
  "Vendor Cargo.toml dependencies as guix inputs."


@@ 260,7 261,7 @@ directory = '" vendor-dir "'") port)

(define* (build #:key
                parallel-build?
                skip-build?
                (skip-build? #f)
                (features '())
                (cargo-build-flags '("--release"))
                #:allow-other-keys)


@@ 300,8 301,8 @@ directory = '" vendor-dir "'") port)

(define* (package #:key
                  source
                  skip-build?
                  install-source?
                  (skip-build? #f)
                  (install-source? #t)
                  (cargo-package-crates '())
                  (cargo-package-flags '("--no-metadata" "--no-verify"))
                  (vendor-dir "guix-vendor")


@@ 376,9 377,9 @@ directory = '" vendor-dir "'") port)
(define* (install #:key
                  inputs
                  outputs
                  skip-build?
                  install-source?
                  features
                  (skip-build? #f)
                  (install-source? #t)
                  (features '())
                  (cargo-install-paths '())
                  #:allow-other-keys)
  "Install a given Cargo package."