guix build: error: invalid character `~' in name

  • Done
  • quality assurance status badge
Details
2 participants
  • Tobias Geerinckx-Rice
  • nigko
Owner
unassigned
Submitted by
nigko
Severity
normal
N
(address . bug-guix@gnu.org)
66fa2e59-3b8b-d489-f247-f90a4b960f1f@gmail.com
Hello,

When running "guix build -f alps.scm" where alps.scm uses url-fetch with
(uri
the following error occurs

guix build: error: invalid character `~' in name
'alps_20220304~r7871.orig.tar.gz.drv'

Bug was noted at
commit: c173819c8e5235ce02d60b79bd88b10023a7c614
branch: master
(define-module (alps) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system cmake) ;; #:use-module (gnu packages cmake) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix build utils) #:use-module (guix gexp) #:use-module (gnu packages boost) #:use-module (gnu packages algebra) #:use-module (gnu packages maths) ) (define-public alps (package (name "alps") (version "7871") (source (origin (method url-fetch) (uri (string-append "https://exa.phys.s.u-tokyo.ac.jp/archive/" "MateriApps/src/alps_20220304~r7871.orig.tar.gz")) (sha256 (base32 "09klx0samxz9lap2j9q19264bdpydbrfqq1wmwwi9y01cwavkg3l")))) (build-system cmake-build-system) (arguments (list #:tests? #t #:configure-flags #~(list "-DALPS_BUILD_PYTHON=OFF"))) (native-inputs (list)) (inputs (list boost fftw openblas hdf5)) (propagated-inputs (list)) (synopsis "Algorithms and Libraries for Physics Simulations") (description "The ALPS project (Algorithms and Libraries for Physics Simulations) is an open source effort aiming at providing high-end simulation codes for strongly correlated quantum mechanical systems as well as C++ libraries for simplifying the development of such code. ALPS strives to increase software reuse in the physics community.") (home-page (string-append "https://web.archive.org/web/20210508050408/" "https://alps.comp-phys.org/mediawiki/index.php/Main_Page")) (license (license:non-copyleft "file://LICENSE" "See README in the deistribution.")))) alps
T
T
Tobias Geerinckx-Rice wrote on 4 Aug 2023 21:55
(address . 64976-done@debbugs.gnu.org)
831ad95ae0f539a4f791bca40f557939@tobias.gr
Certain characters are not allowed in store item[0] names. This
restriction was inherited verbatim[1] from Nix.

As such there's no bug here, although you could start a separate
discussion about relaxing these restrictions if you like.

So what to do? url-fetch defaults to the URL's basename as file name,
but you can specify a different one. For example:

(source
(method …)
(uri …)
(file-name (string-append name "-" version ".tar.gz"))
(sha256 …))

Kind regards,

T G-R

Sent from a Web browser. Excuse or enjoy my brevity.

[0]: Top-level file names under /gnu/store.
[1]:
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 64976@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 64976
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch