diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2020-01-24 12:38:43 +0200 |
---|---|---|
committer | Guix Patches Tester <> | 2020-01-24 10:41:12 +0000 |
commit | a68c04f4235214fa9e290d156f2731a0c9f56f1d (patch) | |
tree | b2447b69b6d3b8c2506e95972e369f75790572b1 | |
parent | 5b98473a1ffa84b27df292b3190b31e07441cb67 (diff) | |
download | patches-a68c04f4235214fa9e290d156f2731a0c9f56f1d.tar patches-a68c04f4235214fa9e290d156f2731a0c9f56f1d.tar.gz |
guix: import/crate: Move build-dependencies to cargo-inputs.series-2714
* guix/import/crate.scm (crate->guix-package): Add definition for
'dev-dependency?' and 'build-dependency?'. Adjust dep-crates to take
normal- and build- dependencies.
-rw-r--r-- | guix/import/crate.scm | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/guix/import/crate.scm b/guix/import/crate.scm index 57823c3639..0fece81c55 100644 --- a/guix/import/crate.scm +++ b/guix/import/crate.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2016 David Craven <david@craven.ch> ;;; Copyright © 2019, 2020 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2019 Martin Becze <mjbecze@riseup.net> +;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il> ;;; ;;; This file is part of GNU Guix. ;;; @@ -86,7 +87,7 @@ crate-dependency? json->crate-dependency (id crate-dependency-id "crate_id") ;string - (kind crate-dependency-kind "kind" ;'normal | 'dev + (kind crate-dependency-kind "kind" ;'normal | 'dev | 'build string->symbol) (requirement crate-dependency-requirement "req")) ;string @@ -197,6 +198,12 @@ latest version of CRATE-NAME." (define (normal-dependency? dependency) (eq? (crate-dependency-kind dependency) 'normal)) + (define (dev-dependency? dependency) + (eq? (crate-dependency-kind dependency) 'dev)) + + (define (build-dependency? dependency) + (eq? (crate-dependency-kind dependency) 'build)) + (define crate (lookup-crate crate-name)) @@ -212,8 +219,9 @@ latest version of CRATE-NAME." (and crate version* (let* ((dependencies (crate-version-dependencies version*)) - (dep-crates (filter normal-dependency? dependencies)) - (dev-dep-crates (remove normal-dependency? dependencies)) + (dep-crates (append (filter normal-dependency? dependencies) + (filter build-dependency? dependencies))) + (dev-dep-crates (filter dev-dependency? dependencies)) (cargo-inputs (sort (map crate-dependency-id dep-crates) string-ci<?)) (cargo-development-inputs |