diff options
author | Chris Marusich <cmmarusich@gmail.com> | 2018-04-08 16:51:42 -0700 |
---|---|---|
committer | Chris Marusich <cmmarusich@gmail.com> | 2018-05-08 21:55:46 -0700 |
commit | ede121de426f9c56820852888a0b370f0ccbce49 (patch) | |
tree | cddd5c464c259d03dd97a021922950f161cfcb13 /guix | |
parent | b61cb24492c150b5eebb5227f2a7c32e4d42e1d4 (diff) |
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>.
Diffstat (limited to 'guix')
-rw-r--r-- | guix/packages.go.134WZR | 0 | ||||
-rw-r--r-- | guix/packages.scm | 13 |
2 files changed, 9 insertions, 4 deletions
diff --git a/guix/packages.go.134WZR b/guix/packages.go.134WZR new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/guix/packages.go.134WZR diff --git a/guix/packages.scm b/guix/packages.scm index b5c0b60440..e0ab72086c 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -388,10 +388,11 @@ object." (define-condition-type &package-cross-build-system-error &package-error package-cross-build-system-error?) - -(define (package-full-name package) - "Return the full name of PACKAGE--i.e., `NAME-VERSION'." - (string-append (package-name package) "-" (package-version package))) +(define* (package-full-name package #:optional (delimiter "@")) + "Return the full name of PACKAGE--i.e., `NAME@VERSION'. By specifying +DELIMITER (a string), you can customize what will appear between the name and +the version. By default, DELIMITER is \"@\"." + (string-append (package-name package) delimiter (package-version package))) (define (%standard-patch-inputs) (let* ((canonical (module-ref (resolve-interface '(gnu packages base)) @@ -935,6 +936,10 @@ and return it." (($ <package> name version source build-system args inputs propagated-inputs native-inputs 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) #:system system #:target target |