diff options
author | Hartmut Goebel <h.goebel@crazy-compilers.com> | 2020-11-14 19:47:32 +0100 |
---|---|---|
committer | Hartmut Goebel <h.goebel@crazy-compilers.com> | 2020-12-02 22:09:23 +0100 |
commit | 9a48e35be853e10ba9b21bb91ef52a66b4264c84 (patch) | |
tree | 3aac9ceebe68a5f47a9ddf7fe5fec6da88701fdf /guix | |
parent | 50fbb3f032b46a565ca225daddf4eeb7c8edfab4 (diff) |
import: utils: Trim patch version from names.
This remove the patch version from generated package names. For example
'rust-my-crate-1.1.2' now becomes 'rust-my-crate-1.1'.
* guix/import/utils.scm (package->definition): Trim patch version from
generated package names.
* tests/crate.scm: (cargo>guix-package, cargo-recursive-import): Likewise.
Diffstat (limited to 'guix')
-rw-r--r-- | guix/import/crate.scm | 3 | ||||
-rw-r--r-- | guix/import/utils.scm | 7 |
2 files changed, 6 insertions, 4 deletions
diff --git a/guix/import/crate.scm b/guix/import/crate.scm index 9704b3087b..20efa131d5 100644 --- a/guix/import/crate.scm +++ b/guix/import/crate.scm @@ -159,7 +159,8 @@ and LICENSE." (map (match-lambda ((name version) - (list (crate-name->package-name name) version))) + (list (crate-name->package-name name) + (version-major+minor version)))) inputs)) (let* ((port (http-fetch (crate-uri name version))) diff --git a/guix/import/utils.scm b/guix/import/utils.scm index 10eb030188..b74393e617 100644 --- a/guix/import/utils.scm +++ b/guix/import/utils.scm @@ -269,9 +269,10 @@ package definition." ('package ('name name) ('version version) . rest) ('let _ ('package ('name name) ('version version) . rest))) - `(define-public ,(string->symbol (if append-version? - (string-append name "-" version) - version)) + `(define-public ,(string->symbol + (if append-version? + (string-append name "-" (version-major+minor version)) + version)) ,guix-package)))) (define (build-system-modules) |