guix: Separate the package name and version with "@", not "-".
* guix/packages.scm (package-full-name): By default, use "@" to separate the package name and package version. Add an optional delimiter argument so that there is still a way to explicitly use a different delimiter. * gnu/packages/commencement.scm (gcc-boot0) <unpack-gmp&co>: Adjust accordingly. * tests/graph.scm: Adjust accordingly. * tests/profiles.scm: Adjust accordingly. * NEWS: Mention the change. Fixes: <https://bugs.gnu.org/31088>. Reported by Pierre Neidhardt <ambrevar@gmail.com>.
This commit is contained in:
parent
b61cb24492
commit
ede121de42
5
NEWS
5
NEWS
|
@ -10,6 +10,11 @@ Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
|
||||||
|
|
||||||
Please send Guix bug reports to bug-guix@gnu.org.
|
Please send Guix bug reports to bug-guix@gnu.org.
|
||||||
|
|
||||||
|
* Changes in 0.15.0 (since 0.14.0)
|
||||||
|
** Programming interfaces
|
||||||
|
|
||||||
|
*** package-full-name (guix packages) now uses "@" as its delimiter.
|
||||||
|
(<https://bugs.gnu.org/31088>)
|
||||||
* Changes in 0.14.0 (since 0.13.0)
|
* Changes in 0.14.0 (since 0.13.0)
|
||||||
|
|
||||||
** Package management
|
** Package management
|
||||||
|
|
|
@ -282,7 +282,7 @@
|
||||||
;; Drop trailing letters, as gmp-6.0.0a unpacks
|
;; Drop trailing letters, as gmp-6.0.0a unpacks
|
||||||
;; into gmp-6.0.0.
|
;; into gmp-6.0.0.
|
||||||
`(symlink ,(string-trim-right
|
`(symlink ,(string-trim-right
|
||||||
(package-full-name lib)
|
(package-full-name lib "-")
|
||||||
char-set:letter)
|
char-set:letter)
|
||||||
,(package-name lib)))
|
,(package-name lib)))
|
||||||
(list gmp-6.0 mpfr mpc))))
|
(list gmp-6.0 mpfr mpc))))
|
||||||
|
|
|
@ -388,10 +388,11 @@ object."
|
||||||
(define-condition-type &package-cross-build-system-error &package-error
|
(define-condition-type &package-cross-build-system-error &package-error
|
||||||
package-cross-build-system-error?)
|
package-cross-build-system-error?)
|
||||||
|
|
||||||
|
(define* (package-full-name package #:optional (delimiter "@"))
|
||||||
(define (package-full-name package)
|
"Return the full name of PACKAGE--i.e., `NAME@VERSION'. By specifying
|
||||||
"Return the full name of PACKAGE--i.e., `NAME-VERSION'."
|
DELIMITER (a string), you can customize what will appear between the name and
|
||||||
(string-append (package-name package) "-" (package-version package)))
|
the version. By default, DELIMITER is \"@\"."
|
||||||
|
(string-append (package-name package) delimiter (package-version package)))
|
||||||
|
|
||||||
(define (%standard-patch-inputs)
|
(define (%standard-patch-inputs)
|
||||||
(let* ((canonical (module-ref (resolve-interface '(gnu packages base))
|
(let* ((canonical (module-ref (resolve-interface '(gnu packages base))
|
||||||
|
@ -935,6 +936,10 @@ and return it."
|
||||||
(($ <package> name version source build-system
|
(($ <package> name version source build-system
|
||||||
args inputs propagated-inputs native-inputs
|
args inputs propagated-inputs native-inputs
|
||||||
self-native-input? outputs)
|
self-native-input? outputs)
|
||||||
|
;; Even though we prefer to use "@" to separate the package
|
||||||
|
;; name from the package version in various user-facing parts
|
||||||
|
;; of Guix, checkStoreName (in nix/libstore/store-api.cc)
|
||||||
|
;; prohibits the use of "@", so use "-" instead.
|
||||||
(or (make-bag build-system (string-append name "-" version)
|
(or (make-bag build-system (string-append name "-" version)
|
||||||
#:system system
|
#:system system
|
||||||
#:target target
|
#:target target
|
||||||
|
|
|
@ -134,7 +134,7 @@ edges."
|
||||||
(map (lambda (destination)
|
(map (lambda (destination)
|
||||||
(list "p-0.drv"
|
(list "p-0.drv"
|
||||||
(string-append
|
(string-append
|
||||||
(package-full-name destination)
|
(package-full-name destination "-")
|
||||||
".drv")))
|
".drv")))
|
||||||
implicit)))))))
|
implicit)))))))
|
||||||
|
|
||||||
|
|
|
@ -242,8 +242,8 @@
|
||||||
#:hooks '()
|
#:hooks '()
|
||||||
#:locales? #t
|
#:locales? #t
|
||||||
#:target target)))
|
#:target target)))
|
||||||
(define (find-input name)
|
(define (find-input package)
|
||||||
(let ((name (string-append name ".drv")))
|
(let ((name (string-append (package-full-name package "-") ".drv")))
|
||||||
(any (lambda (input)
|
(any (lambda (input)
|
||||||
(let ((input (derivation-input-path input)))
|
(let ((input (derivation-input-path input)))
|
||||||
(and (string-suffix? name input) input)))
|
(and (string-suffix? name input) input)))
|
||||||
|
@ -252,12 +252,11 @@
|
||||||
;; The inputs for grep and sed should be cross-build derivations, but that
|
;; The inputs for grep and sed should be cross-build derivations, but that
|
||||||
;; for the glibc-utf8-locales should be a native build.
|
;; for the glibc-utf8-locales should be a native build.
|
||||||
(return (and (string=? (derivation-system drv) (%current-system))
|
(return (and (string=? (derivation-system drv) (%current-system))
|
||||||
(string=? (find-input (package-full-name packages:grep))
|
(string=? (find-input packages:grep)
|
||||||
(derivation-file-name grep))
|
(derivation-file-name grep))
|
||||||
(string=? (find-input (package-full-name packages:sed))
|
(string=? (find-input packages:sed)
|
||||||
(derivation-file-name sed))
|
(derivation-file-name sed))
|
||||||
(string=? (find-input
|
(string=? (find-input packages:glibc-utf8-locales)
|
||||||
(package-full-name packages:glibc-utf8-locales))
|
|
||||||
(derivation-file-name locales))))))
|
(derivation-file-name locales))))))
|
||||||
|
|
||||||
(test-assert "package->manifest-entry defaults to \"out\""
|
(test-assert "package->manifest-entry defaults to \"out\""
|
||||||
|
|
Loading…
Reference in New Issue