Hi, On Mon, 28 Nov 2022 at 11:49, Ludovic Courtès <l...@gnu.org> wrote: > Hi, > > zimoun <zimon.touto...@gmail.com> skribis: > >> On Sat, 26 Nov 2022 at 12:11, Ludovic Courtès <l...@gnu.org> wrote: > > [...] > >>> Now, if you really want to extend the set of things recognized, you >>> could write variant of ‘url-fetch’ that passes a different #:mirrors >>> argument to ‘built-in-download’. Maybe ‘url-fetch’ could have a >>> #:mirrors parameter to simplify it. >> >> Why is it not possible to extend ’%mirrors? > > What I described above is one way to extend it, just not via ‘set!’.
Just to be sure, one way is this extension mechanism, --8<---------------cut here---------------start------------->8--- (define (qt-urls component version) "Return a list of URLs for VERSION of the Qt5 COMPONENT." ;; We can't use a mirror:// scheme because these URLs are not exact copies: ;; the layout differs between them. (list (string-append "https://download.qt.io/official_releases/qt/" (version-major+minor version) "/" version "/submodules/" component "-everywhere-opensource-src-" version ".tar.xz") (string-append "https://download.qt.io/official_releases/qt/" (version-major+minor version) "/" version "/submodules/" component "-everywhere-src-" version ".tar.xz") (string-append "https://download.qt.io/archive/qt/" (version-major+minor version) "/" version "/submodules/" component "-everywhere-opensource-src-" version ".tar.xz") (let ((directory (string-append "qt5" (string-drop component 2)))) (string-append "http://sources.buildroot.net/" directory "/" component "-everywhere-opensource-src-" version ".tar.xz")) (string-append "https://distfiles.macports.org/qt5/" component "-everywhere-opensource-src-" version ".tar.xz"))) --8<---------------cut here---------------end--------------->8--- then, (uri (qt-urls name version)) Right? Well, for what it is worth, it does not appear to me consistent with the rest. We could do the same for everything, and remove "mirror://" after all. :-) The other one way is to implement a variant of url-fetch method. What would be the interface? Where the extended list of mirrors would be provided? Cheers, simon