2013-01-06 00:47:50 +01:00
|
|
|
;;; GNU Guix --- Functional package management for GNU
|
2018-04-23 14:33:11 +02:00
|
|
|
;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
|
2015-07-05 19:11:04 +02:00
|
|
|
;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
|
2016-02-22 00:29:54 +01:00
|
|
|
;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
|
2016-07-22 19:55:47 +02:00
|
|
|
;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
|
2016-08-01 11:05:28 +02:00
|
|
|
;;; Copyright © 2016 David Craven <david@craven.ch>
|
2017-01-27 20:48:37 +01:00
|
|
|
;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
|
2012-11-12 23:10:26 +01:00
|
|
|
;;;
|
2013-01-06 00:47:50 +01:00
|
|
|
;;; This file is part of GNU Guix.
|
2012-11-12 23:10:26 +01:00
|
|
|
;;;
|
2013-01-06 00:47:50 +01:00
|
|
|
;;; GNU Guix is free software; you can redistribute it and/or modify it
|
2012-11-12 23:10:26 +01:00
|
|
|
;;; under the terms of the GNU General Public License as published by
|
|
|
|
;;; the Free Software Foundation; either version 3 of the License, or (at
|
|
|
|
;;; your option) any later version.
|
|
|
|
;;;
|
2013-01-06 00:47:50 +01:00
|
|
|
;;; GNU Guix is distributed in the hope that it will be useful, but
|
2012-11-12 23:10:26 +01:00
|
|
|
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
;;; GNU General Public License for more details.
|
|
|
|
;;;
|
|
|
|
;;; You should have received a copy of the GNU General Public License
|
2013-01-06 00:47:50 +01:00
|
|
|
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
2012-11-12 23:10:26 +01:00
|
|
|
|
|
|
|
(define-module (guix download)
|
|
|
|
#:use-module (ice-9 match)
|
|
|
|
#:use-module (guix derivations)
|
|
|
|
#:use-module (guix packages)
|
monads: Move '%store-monad' and related procedures where they belong.
This turns (guix monads) into a generic module for monads, and moves the
store monad and related monadic procedures in their corresponding
module.
* guix/monads.scm (store-return, store-bind, %store-monad, store-lift,
text-file, interned-file, package-file, package->derivation,
package->cross-derivation, origin->derivation, imported-modules,
compiled, modules, built-derivations, run-with-store): Move to...
* guix/store.scm (store-return, store-bind, %store-monad, store-lift,
text-file, interned-file): ... here.
(%guile-for-build): New variable.
(run-with-store): Moved from monads.scm. Remove default value for
#:guile-for-build.
* guix/packages.scm (default-guile): Export.
(set-guile-for-build): New procedure.
(package-file, package->derivation, package->cross-derivation,
origin->derivation): Moved from monads.scm.
* guix/derivations.scm (%guile-for-build): Remove.
(imported-modules): Rename to...
(%imported-modules): ... this.
(compiled-modules): Rename to...
(%compiled-modules): ... this.
(built-derivations, imported-modules, compiled-modules): New
procedures.
* gnu/services/avahi.scm, gnu/services/base.scm, gnu/services/dbus.scm,
gnu/services/dmd.scm, gnu/services/networking.scm,
gnu/services/ssh.scm, gnu/services/xorg.scm, gnu/system/install.scm,
gnu/system/linux-initrd.scm, gnu/system/shadow.scm, guix/download.scm,
guix/gexp.scm, guix/git-download.scm, guix/profiles.scm,
guix/svn-download.scm, tests/monads.scm: Adjust imports accordingly.
* guix/monad-repl.scm (default-guile-derivation): New procedure.
(store-monad-language, run-in-store): Use it.
* build-aux/hydra/gnu-system.scm (qemu-jobs): Add explicit
'set-guile-for-build' call.
* guix/scripts/archive.scm (derivation-from-expression): Likewise.
* guix/scripts/build.scm (options/resolve-packages): Likewise.
* guix/scripts/environment.scm (guix-environment): Likewise.
* guix/scripts/system.scm (guix-system): Likewise.
* doc/guix.texi (The Store Monad): Adjust module names accordingly.
2015-01-14 13:34:52 +01:00
|
|
|
#:use-module (guix store)
|
Use #:prefix instead of #:renamer with 'symbol-prefix-proc'.
* gnu/packages/abiword.scm, gnu/packages/admin.scm, gnu/packages/aidc.scm,
gnu/packages/backup.scm, gnu/packages/bittorrent.scm,
gnu/packages/boost.scm, gnu/packages/compression.scm,
gnu/packages/cryptsetup.scm, gnu/packages/curl.scm,
gnu/packages/cyrus-sasl.scm, gnu/packages/dc.scm, gnu/packages/emacs.scm,
gnu/packages/fonts.scm, gnu/packages/fontutils.scm, gnu/packages/geeqie.scm,
gnu/packages/ghostscript.scm, gnu/packages/gimp.scm,
gnu/packages/gkrellm.scm, gnu/packages/gl.scm, gnu/packages/glib.scm,
gnu/packages/gnome.scm, gnu/packages/gnunet.scm, gnu/packages/gnupg.scm,
gnu/packages/gnutls.scm, gnu/packages/gnuzilla.scm, gnu/packages/gsasl.scm,
gnu/packages/gtk.scm, gnu/packages/gv.scm, gnu/packages/image.scm,
gnu/packages/indent.scm, gnu/packages/inkscape.scm,
gnu/packages/lesstif.scm, gnu/packages/links.scm, gnu/packages/lisp.scm,
gnu/packages/lsh.scm, gnu/packages/lsof.scm, gnu/packages/maths.scm,
gnu/packages/mp3.scm, gnu/packages/openssl.scm, gnu/packages/ots.scm,
gnu/packages/pciutils.scm, gnu/packages/pcre.scm, gnu/packages/pdf.scm,
gnu/packages/pulseaudio.scm, gnu/packages/python.scm, gnu/packages/slim.scm,
gnu/packages/ssh.scm, gnu/packages/texlive.scm, gnu/packages/vim.scm,
gnu/packages/vpn.scm, gnu/packages/web.scm, gnu/packages/wv.scm,
gnu/packages/xiph.scm, gnu/packages/xml.scm, gnu/packages/xorg.scm,
gnu/packages/yasm.scm, gnu/packages/zip.scm,
guix/build/cmake-build-system.scm, guix/build/perl-build-system.scm,
guix/build/python-build-system.scm, guix/download.scm: Replaces uses of
#:renamer and 'symbol-prefix-proc' with #:prefix.
2014-09-23 22:44:22 +02:00
|
|
|
#:use-module ((guix build download) #:prefix build:)
|
2014-05-01 21:07:52 +02:00
|
|
|
#:use-module (guix monads)
|
|
|
|
#:use-module (guix gexp)
|
2012-11-12 23:10:26 +01:00
|
|
|
#:use-module (guix utils)
|
2013-10-12 16:39:10 +02:00
|
|
|
#:use-module (web uri)
|
2013-01-20 22:28:38 +01:00
|
|
|
#:use-module (srfi srfi-1)
|
2012-11-12 23:20:06 +01:00
|
|
|
#:use-module (srfi srfi-26)
|
2012-11-13 22:57:36 +01:00
|
|
|
#:export (%mirrors
|
2013-04-21 22:40:23 +02:00
|
|
|
url-fetch
|
2016-02-22 00:29:54 +01:00
|
|
|
url-fetch/tarbomb
|
2017-01-25 13:16:00 +01:00
|
|
|
url-fetch/zipbomb
|
2013-04-21 22:40:23 +02:00
|
|
|
download-to-store))
|
2012-11-12 23:10:26 +01:00
|
|
|
|
|
|
|
;;; Commentary:
|
|
|
|
;;;
|
|
|
|
;;; Produce fixed-output derivations with data fetched over HTTP or FTP.
|
|
|
|
;;;
|
|
|
|
;;; Code:
|
|
|
|
|
2012-11-12 23:20:06 +01:00
|
|
|
(define %mirrors
|
|
|
|
;; Mirror lists used when `mirror://' URLs are passed.
|
|
|
|
(let* ((gnu-mirrors
|
|
|
|
'(;; This one redirects to a (supposedly) nearby and (supposedly)
|
|
|
|
;; up-to-date mirror.
|
2017-09-11 11:51:50 +02:00
|
|
|
"https://ftpmirror.gnu.org/gnu/"
|
2012-11-12 23:20:06 +01:00
|
|
|
|
|
|
|
"ftp://ftp.cs.tu-berlin.de/pub/gnu/"
|
|
|
|
"ftp://ftp.funet.fi/pub/mirrors/ftp.gnu.org/gnu/"
|
|
|
|
|
|
|
|
;; This one is the master repository, and thus it's always
|
|
|
|
;; up-to-date.
|
|
|
|
"http://ftp.gnu.org/pub/gnu/")))
|
|
|
|
`((gnu ,@gnu-mirrors)
|
|
|
|
(gcc
|
|
|
|
"ftp://ftp.nluug.nl/mirror/languages/gcc/"
|
|
|
|
"ftp://ftp.fu-berlin.de/unix/languages/gcc/"
|
|
|
|
"ftp://ftp.irisa.fr/pub/mirrors/gcc.gnu.org/gcc/"
|
|
|
|
"ftp://gcc.gnu.org/pub/gcc/"
|
|
|
|
,@(map (cut string-append <> "/gcc") gnu-mirrors))
|
|
|
|
(gnupg
|
2017-08-09 21:53:24 +02:00
|
|
|
"http://artfiles.org/gnupg.org"
|
|
|
|
"http://www.crysys.hu/"
|
|
|
|
"https://gnupg.org/ftp/gcrypt/"
|
2014-11-26 19:52:11 +01:00
|
|
|
"ftp://mirrors.dotsrc.org/gcrypt/"
|
2012-11-12 23:20:06 +01:00
|
|
|
"ftp://mirror.cict.fr/gnupg/"
|
2014-11-26 19:52:11 +01:00
|
|
|
"ftp://ftp.franken.de/pub/crypt/mirror/ftp.gnupg.org/gcrypt/"
|
|
|
|
"ftp://ftp.freenet.de/pub/ftp.gnupg.org/gcrypt/"
|
|
|
|
"ftp://ftp.hi.is/pub/mirrors/gnupg/"
|
|
|
|
"ftp://ftp.heanet.ie/mirrors/ftp.gnupg.org/gcrypt/"
|
|
|
|
"ftp://ftp.bit.nl/mirror/gnupg/"
|
|
|
|
"ftp://ftp.surfnet.nl/pub/security/gnupg/"
|
|
|
|
"ftp://ftp.iasi.roedu.net/pub/mirrors/ftp.gnupg.org/"
|
|
|
|
"ftp://ftp.sunet.se/pub/security/gnupg/"
|
|
|
|
"ftp://mirror.switch.ch/mirror/gnupg/"
|
|
|
|
"ftp://mirror.tje.me.uk/pub/mirrors/ftp.gnupg.org/"
|
|
|
|
"ftp://ftp.mirrorservice.org/sites/ftp.gnupg.org/gcrypt/"
|
|
|
|
"ftp://ftp.ring.gr.jp/pub/net/gnupg/"
|
|
|
|
"ftp://ftp.gnupg.org/gcrypt/")
|
2013-03-05 10:16:17 +01:00
|
|
|
(gnome
|
|
|
|
"http://ftp.belnet.be/ftp.gnome.org/"
|
|
|
|
"http://ftp.linux.org.uk/mirrors/ftp.gnome.org/"
|
|
|
|
"http://ftp.gnome.org/pub/GNOME/"
|
2017-02-01 23:41:12 +01:00
|
|
|
"https://download.gnome.org/"
|
2013-03-05 10:16:17 +01:00
|
|
|
"http://mirror.yandex.ru/mirrors/ftp.gnome.org/")
|
2016-10-29 18:30:58 +02:00
|
|
|
(hackage
|
2016-11-01 09:28:24 +01:00
|
|
|
"http://hackage.haskell.org/")
|
2012-11-12 23:20:06 +01:00
|
|
|
(savannah
|
2012-12-07 21:06:03 +01:00
|
|
|
"http://download.savannah.gnu.org/releases/"
|
2012-11-12 23:20:06 +01:00
|
|
|
"http://ftp.cc.uoc.gr/mirrors/nongnu.org/"
|
|
|
|
"http://ftp.twaren.net/Unix/NonGNU/"
|
|
|
|
"http://mirror.csclub.uwaterloo.ca/nongnu/"
|
|
|
|
"http://nongnu.askapache.com/"
|
|
|
|
"http://savannah.c3sl.ufpr.br/"
|
2017-03-08 21:30:55 +01:00
|
|
|
"http://download.savannah.gnu.org/releases-noredirect/"
|
2017-11-12 23:40:52 +01:00
|
|
|
"http://download-mirror.savannah.gnu.org/releases/"
|
|
|
|
"ftp://ftp.twaren.net/Unix/NonGNU/"
|
|
|
|
"ftp://mirror.csclub.uwaterloo.ca/nongnu/"
|
|
|
|
"ftp://mirror.publicns.net/pub/nongnu/"
|
|
|
|
"ftp://savannah.c3sl.ufpr.br/")
|
2016-05-30 10:37:03 +02:00
|
|
|
(sourceforge ; https://sourceforge.net/p/forge/documentation/Mirrors/
|
2016-07-22 19:55:47 +02:00
|
|
|
"http://downloads.sourceforge.net/project/"
|
2016-07-13 00:32:36 +02:00
|
|
|
"http://ufpr.dl.sourceforge.net/project/"
|
|
|
|
"http://heanet.dl.sourceforge.net/project/"
|
|
|
|
"http://freefr.dl.sourceforge.net/project/"
|
|
|
|
"http://internode.dl.sourceforge.net/project/"
|
|
|
|
"http://jaist.dl.sourceforge.net/project/"
|
|
|
|
"http://kent.dl.sourceforge.net/project/"
|
|
|
|
"http://liquidtelecom.dl.sourceforge.net/project/"
|
2017-08-25 07:53:51 +02:00
|
|
|
;; "http://nbtelecom.dl.sourceforge.net/project/" ;never returns 404s
|
2016-07-13 00:32:36 +02:00
|
|
|
"http://nchc.dl.sourceforge.net/project/"
|
|
|
|
"http://ncu.dl.sourceforge.net/project/"
|
|
|
|
"http://netcologne.dl.sourceforge.net/project/"
|
|
|
|
"http://netix.dl.sourceforge.net/project/"
|
|
|
|
"http://pilotfiber.dl.sourceforge.net/project/"
|
|
|
|
"http://superb-sea2.dl.sourceforge.net/project/"
|
|
|
|
"http://tenet.dl.sourceforge.net/project/"
|
|
|
|
"http://vorboss.dl.sourceforge.net/project/"
|
|
|
|
"http://netassist.dl.sourceforge.net/project/")
|
2017-02-27 01:32:22 +01:00
|
|
|
(netfilter.org ; https://www.netfilter.org/mirrors.html
|
|
|
|
"http://ftp.netfilter.org/pub/"
|
|
|
|
"ftp://ftp.es.netfilter.org/mirrors/netfilter/"
|
|
|
|
"ftp://ftp.hu.netfilter.org/"
|
|
|
|
"ftp://www.lt.netfilter.org/pub/")
|
2012-11-27 21:55:53 +01:00
|
|
|
(kernel.org
|
|
|
|
"http://ramses.wh2.tu-dresden.de/pub/mirrors/kernel.org/"
|
|
|
|
"http://linux-kernel.uio.no/pub/"
|
|
|
|
"http://kernel.osuosl.org/pub/"
|
2013-08-25 20:49:03 +02:00
|
|
|
"http://ftp.be.debian.org/pub/"
|
2017-11-12 23:40:52 +01:00
|
|
|
"http://mirror.linux.org.au/"
|
|
|
|
"ftp://ftp.funet.fi/pub/mirrors/ftp.kernel.org/pub/")
|
2013-01-25 21:49:49 +01:00
|
|
|
(apache ; from http://www.apache.org/mirrors/dist.html
|
|
|
|
"http://www.eu.apache.org/dist/"
|
|
|
|
"http://www.us.apache.org/dist/"
|
|
|
|
"http://apache.belnet.be/"
|
|
|
|
"http://mirrors.ircam.fr/pub/apache/"
|
2014-01-27 23:31:28 +01:00
|
|
|
"http://apache-mirror.rbc.ru/pub/apache/"
|
|
|
|
|
|
|
|
;; As a last resort, try the archive.
|
|
|
|
"http://archive.apache.org/dist/")
|
2013-02-23 18:59:43 +01:00
|
|
|
(xorg ; from http://www.x.org/wiki/Releases/Download
|
2013-03-03 19:50:26 +01:00
|
|
|
"http://www.x.org/releases/" ; main mirrors
|
2017-11-12 23:40:52 +01:00
|
|
|
"http://mirror.csclub.uwaterloo.ca/x.org/" ; North America
|
2013-02-23 18:59:43 +01:00
|
|
|
"http://xorg.mirrors.pair.com/"
|
|
|
|
"http://mirror.us.leaseweb.net/xorg/"
|
2017-11-12 23:40:52 +01:00
|
|
|
"ftp://mirror.csclub.uwaterloo.ca/x.org/"
|
|
|
|
"ftp://xorg.mirrors.pair.com/"
|
2013-02-23 18:59:43 +01:00
|
|
|
"ftp://artfiles.org/x.org/" ; Europe
|
|
|
|
"ftp://ftp.chg.ru/pub/X11/x.org/"
|
|
|
|
"ftp://ftp.fu-berlin.de/unix/X11/FTP.X.ORG/"
|
|
|
|
"ftp://ftp.gwdg.de/pub/x11/x.org/"
|
|
|
|
"ftp://ftp.mirrorservice.org/sites/ftp.x.org/"
|
|
|
|
"ftp://ftp.ntua.gr/pub/X11/"
|
|
|
|
"ftp://ftp.piotrkosoft.net/pub/mirrors/ftp.x.org/"
|
|
|
|
"ftp://ftp.portal-to-web.de/pub/mirrors/x.org/"
|
|
|
|
"ftp://ftp.solnet.ch/mirror/x.org/"
|
|
|
|
"ftp://mi.mirror.garr.it/mirrors/x.org/"
|
|
|
|
"ftp://mirror.cict.fr/x.org/"
|
|
|
|
"ftp://mirror.switch.ch/mirror/X11/"
|
|
|
|
"ftp://mirrors.ircam.fr/pub/x.org/"
|
|
|
|
"ftp://x.mirrors.skynet.be/pub/ftp.x.org/"
|
2017-11-12 23:40:52 +01:00
|
|
|
"http://x.cs.pu.edu.tw/" ; East Asia
|
|
|
|
"ftp://ftp.cs.cuhk.edu.hk/pub/X11"
|
2013-02-23 18:59:43 +01:00
|
|
|
"ftp://ftp.u-aizu.ac.jp/pub/x11/x.org/"
|
|
|
|
"ftp://ftp.yz.yamagata-u.ac.jp/pub/X11/x.org/"
|
|
|
|
"ftp://ftp.kaist.ac.kr/x.org/"
|
|
|
|
"ftp://mirrors.go-part.com/xorg/"
|
2013-03-04 00:46:27 +01:00
|
|
|
"ftp://ftp.is.co.za/pub/x.org") ; South Africa
|
2017-10-31 00:49:32 +01:00
|
|
|
(cpan
|
2013-03-04 00:46:27 +01:00
|
|
|
"http://www.cpan.org/"
|
2017-10-31 00:49:32 +01:00
|
|
|
"http://cpan.metacpan.org/"
|
|
|
|
;; A selection of HTTP mirrors from http://www.cpan.org/SITES.html.
|
|
|
|
;; Europe.
|
|
|
|
"http://ftp.belnet.be/mirror/ftp.cpan.org/"
|
|
|
|
"http://mirrors.nic.cz/CPAN/"
|
|
|
|
"http://mirror.ibcp.fr/pub/CPAN/"
|
|
|
|
"http://ftp.ntua.gr/pub/lang/perl/"
|
|
|
|
"http://kvin.lv/pub/CPAN/"
|
|
|
|
"http://mirror.as43289.net/pub/CPAN/"
|
|
|
|
"http://cpan.cs.uu.nl/"
|
|
|
|
"http://cpan.uib.no/"
|
|
|
|
"http://cpan-mirror.rbc.ru/pub/CPAN/"
|
|
|
|
"http://mirror.sbb.rs/CPAN/"
|
|
|
|
"http://cpan.lnx.sk/"
|
|
|
|
"http://ftp.rediris.es/mirror/CPAN/"
|
|
|
|
"http://mirror.ox.ac.uk/sites/www.cpan.org/"
|
|
|
|
;; Africa.
|
|
|
|
"http://mirror.liquidtelecom.com/CPAN/"
|
|
|
|
"http://cpan.mirror.ac.za/"
|
|
|
|
"http://mirror.is.co.za/pub/cpan/"
|
|
|
|
"http://cpan.saix.net/"
|
|
|
|
"http://mirror.ucu.ac.ug/cpan/"
|
|
|
|
;; North America.
|
|
|
|
"http://mirrors.gossamer-threads.com/CPAN/"
|
|
|
|
"http://mirror.csclub.uwaterloo.ca/CPAN/"
|
|
|
|
"http://mirrors.ucr.ac.cr/CPAN/"
|
|
|
|
"http://www.msg.com.mx/CPAN/"
|
|
|
|
"http://mirrors.namecheap.com/CPAN/"
|
|
|
|
"http://mirror.uic.edu/CPAN/"
|
|
|
|
"http://mirror.datapipe.net/CPAN/"
|
|
|
|
"http://mirror.cc.columbia.edu/pub/software/cpan/"
|
|
|
|
"http://mirror.uta.edu/CPAN/"
|
|
|
|
;; South America.
|
|
|
|
"http://cpan.mmgdesigns.com.ar/"
|
|
|
|
"http://mirror.nbtelecom.com.br/CPAN/"
|
|
|
|
"http://linorg.usp.br/CPAN/"
|
|
|
|
"http://cpan.dcc.uchile.cl/"
|
|
|
|
"http://mirror.cedia.org.ec/CPAN/"
|
|
|
|
;; Oceania.
|
|
|
|
"http://cpan.mirror.serversaustralia.com.au/"
|
|
|
|
"http://mirror.waia.asn.au/pub/cpan/"
|
|
|
|
"http://mirror.as24220.net/pub/cpan/"
|
|
|
|
"http://cpan.lagoon.nc/pub/CPAN/"
|
|
|
|
"http://cpan.inspire.net.nz/"
|
|
|
|
;; Asia.
|
|
|
|
"http://mirror.dhakacom.com/CPAN/"
|
|
|
|
"http://mirrors.ustc.edu.cn/CPAN/"
|
|
|
|
"http://ftp.cuhk.edu.hk/pub/packages/perl/CPAN/"
|
|
|
|
"http://kambing.ui.ac.id/cpan/"
|
|
|
|
"http://cpan.hostiran.ir/"
|
|
|
|
"http://ftp.nara.wide.ad.jp/pub/CPAN/"
|
|
|
|
"http://mirror.neolabs.kz/CPAN/"
|
|
|
|
"http://cpan.nctu.edu.tw/"
|
|
|
|
"http://cpan.ulak.net.tr/"
|
|
|
|
"http://mirrors.vinahost.vn/CPAN/")
|
2015-02-12 12:58:11 +01:00
|
|
|
(cran
|
|
|
|
;; Arbitrary mirrors from http://cran.r-project.org/mirrors.html
|
|
|
|
;; This one automatically redirects to servers worldwide
|
2015-09-21 10:34:52 +02:00
|
|
|
"http://cran.r-project.org/"
|
2015-02-12 12:58:11 +01:00
|
|
|
"http://cran.rstudio.com/"
|
|
|
|
"http://cran.univ-lyon1.fr/"
|
|
|
|
"http://cran.ism.ac.jp/"
|
|
|
|
"http://cran.stat.auckland.ac.nz/"
|
|
|
|
"http://cran.mirror.ac.za/"
|
|
|
|
"http://cran.csie.ntu.edu.tw/")
|
2014-05-22 21:58:08 +02:00
|
|
|
(imagemagick
|
|
|
|
;; from http://www.imagemagick.org/script/download.php
|
|
|
|
;; (without mirrors that are unavailable or not up to date)
|
|
|
|
;; mirrors keeping old versions at the top level
|
2017-11-12 23:47:53 +01:00
|
|
|
"https://sunsite.icm.edu.pl/packages/ImageMagick/"
|
2014-05-22 21:58:08 +02:00
|
|
|
;; mirrors moving old versions to "legacy"
|
2017-11-12 23:40:52 +01:00
|
|
|
"http://mirrors-usa.go-parts.com/mirrors/ImageMagick/"
|
2013-06-19 19:27:23 +02:00
|
|
|
"http://mirror.checkdomain.de/imagemagick/"
|
2017-11-12 23:40:52 +01:00
|
|
|
"http://ftp.surfnet.nl/pub/ImageMagick/"
|
|
|
|
"http://mirror.searchdaimon.com/ImageMagick"
|
|
|
|
"http://mirror.is.co.za/pub/imagemagick/"
|
|
|
|
"http://www.imagemagick.org/download/"
|
|
|
|
"ftp://mirror.aarnet.edu.au/pub/imagemagick/"
|
2014-05-22 21:58:08 +02:00
|
|
|
"ftp://ftp.kddlabs.co.jp/graphics/ImageMagick/"
|
|
|
|
"ftp://ftp.u-aizu.ac.jp/pub/graphics/image/ImageMagick/imagemagick.org/"
|
|
|
|
"ftp://ftp.nluug.nl/pub/ImageMagick/"
|
|
|
|
"ftp://ftp.tpnet.pl/pub/graphics/ImageMagick/"
|
|
|
|
"ftp://ftp.fifi.org/pub/ImageMagick/"
|
|
|
|
;; one legacy location as a last resort
|
|
|
|
"http://www.imagemagick.org/download/legacy/")
|
2013-10-05 16:45:39 +02:00
|
|
|
(debian
|
|
|
|
"http://ftp.de.debian.org/debian/"
|
|
|
|
"http://ftp.fr.debian.org/debian/"
|
2016-05-16 11:10:49 +02:00
|
|
|
"http://ftp.debian.org/debian/"
|
2016-08-01 11:05:01 +02:00
|
|
|
"http://archive.debian.org/debian/")
|
|
|
|
(kde
|
2016-08-03 15:46:17 +02:00
|
|
|
"http://download.kde.org"
|
2017-10-10 16:01:00 +02:00
|
|
|
"http://download.kde.org/Attic" ; for when it gets archived.
|
2016-08-01 11:05:01 +02:00
|
|
|
;; Mirrors from http://files.kde.org/extra/mirrors.html
|
|
|
|
;; Europe
|
|
|
|
"http://mirror.easyname.at/kde"
|
|
|
|
"http://mirror.karneval.cz/pub/kde"
|
|
|
|
"http://ftp.fi.muni.cz/pub/kde/"
|
|
|
|
"http://mirror.oss.maxcdn.com/kde/"
|
|
|
|
"http://ftp5.gwdg.de/pub/linux/kde/"
|
|
|
|
"http://ftp-stud.fht-esslingen.de/Mirrors/ftp.kde.org/pub/kde/"
|
|
|
|
"http://mirror.klaus-uwe.me/kde/ftp/"
|
|
|
|
"http://kde.beta.mirror.ga/"
|
|
|
|
"http://kde.alpha.mirror.ga/"
|
|
|
|
"http://mirror.netcologne.de/kde"
|
|
|
|
"http://vesta.informatik.rwth-aachen.de/ftp/pub/mirror/kde/"
|
|
|
|
"http://ftp.rz.uni-wuerzburg.de/pub/unix/kde/"
|
|
|
|
"http://mirrors.dotsrc.org/kde/"
|
|
|
|
"http://ftp.funet.fi/pub/mirrors/ftp.kde.org/pub/kde/"
|
|
|
|
"http://kde-mirror.freenux.org/"
|
|
|
|
"http://mirrors.ircam.fr/pub/KDE/"
|
|
|
|
"http://www-ftp.lip6.fr/pub/X11/kde/"
|
|
|
|
"http://fr2.rpmfind.net/linux/KDE/"
|
|
|
|
"http://kde.mirror.anlx.net/"
|
|
|
|
"http://www.mirrorservice.org/sites/ftp.kde.org/pub/kde/"
|
|
|
|
"http://ftp.heanet.ie/mirrors/ftp.kde.org/"
|
|
|
|
"http://ftp.nluug.nl/pub/windowing/kde/"
|
|
|
|
"http://ftp.surfnet.nl/windowing/kde/"
|
|
|
|
"http://ftp.icm.edu.pl/pub/unix/kde/"
|
|
|
|
"http://ftp.pbone.net/pub/kde/"
|
|
|
|
"http://piotrkosoft.net/pub/mirrors/ftp.kde.org/"
|
|
|
|
"http://mirrors.fe.up.pt/pub/kde/"
|
|
|
|
"http://ftp.iasi.roedu.net/pub/mirrors/ftp.kde.org/"
|
|
|
|
"http://ftp.acc.umu.se/mirror/kde.org/ftp/"
|
|
|
|
"http://kde.ip-connect.vn.ua/"
|
|
|
|
;; North America
|
|
|
|
"http://mirror.its.dal.ca/kde/"
|
|
|
|
"http://mirror.csclub.uwaterloo.ca/kde/"
|
|
|
|
"http://mirror.cc.columbia.edu/pub/software/kde/"
|
|
|
|
"http://mirrors-usa.go-parts.com/kde"
|
|
|
|
"http://kde.mirrors.hoobly.com/"
|
|
|
|
"http://ftp.ussg.iu.edu/kde/"
|
|
|
|
"http://mirrors.mit.edu/kde/"
|
|
|
|
"http://kde.mirrors.tds.net/pub/kde/"
|
|
|
|
;; Oceania
|
|
|
|
"http://ftp.kddlabs.co.jp/pub/X11/kde/"
|
2017-07-19 01:42:08 +02:00
|
|
|
"http://kde.mirror.uber.com.au/")
|
|
|
|
(openbsd
|
|
|
|
"https://ftp.openbsd.org/pub/OpenBSD/"
|
|
|
|
;; Anycast CDN redirecting to your friendly local mirror.
|
|
|
|
"https://mirrors.evowise.com/pub/OpenBSD/"
|
|
|
|
;; Other HTTPS mirrors from https://www.openbsd.org/ftp.html
|
|
|
|
"https://mirror.aarnet.edu.au/pub/OpenBSD/"
|
|
|
|
"https://ftp2.eu.openbsd.org/pub/OpenBSD/"
|
|
|
|
"https://openbsd.c3sl.ufpr.br/pub/OpenBSD/"
|
|
|
|
"https://openbsd.ipacct.com/pub/OpenBSD/"
|
|
|
|
"https://ftp.OpenBSD.org/pub/OpenBSD/"
|
|
|
|
"https://openbsd.cs.toronto.edu/pub/OpenBSD/"
|
|
|
|
"https://openbsd.delfic.org/pub/OpenBSD/"
|
|
|
|
"https://openbsd.mirror.netelligent.ca/pub/OpenBSD/"
|
|
|
|
"https://mirrors.ucr.ac.cr/pub/OpenBSD/"
|
|
|
|
"https://mirrors.dotsrc.org/pub/OpenBSD/"
|
|
|
|
"https://mirror.one.com/pub/OpenBSD/"
|
|
|
|
"https://ftp.fr.openbsd.org/pub/OpenBSD/"
|
|
|
|
"https://ftp2.fr.openbsd.org/pub/OpenBSD/"
|
|
|
|
"https://mirrors.ircam.fr/pub/OpenBSD/"
|
|
|
|
"https://ftp.spline.de/pub/OpenBSD/"
|
|
|
|
"https://mirror.hs-esslingen.de/pub/OpenBSD/"
|
|
|
|
"https://ftp.halifax.rwth-aachen.de/openbsd/"
|
|
|
|
"https://ftp.hostserver.de/pub/OpenBSD/"
|
|
|
|
"https://ftp.fau.de/pub/OpenBSD/"
|
|
|
|
"https://ftp.cc.uoc.gr/pub/OpenBSD/"
|
|
|
|
"https://openbsd.hk/pub/OpenBSD/"
|
|
|
|
"https://ftp.heanet.ie/pub/OpenBSD/"
|
|
|
|
"https://openbsd.mirror.garr.it/pub/OpenBSD/"
|
|
|
|
"https://mirror.litnet.lt/pub/OpenBSD/"
|
|
|
|
"https://mirror.meerval.net/pub/OpenBSD/"
|
|
|
|
"https://ftp.nluug.nl/pub/OpenBSD/"
|
|
|
|
"https://ftp.bit.nl/pub/OpenBSD/"
|
|
|
|
"https://mirrors.dalenys.com/pub/OpenBSD/"
|
|
|
|
"https://ftp.icm.edu.pl/pub/OpenBSD/"
|
|
|
|
"https://ftp.rnl.tecnico.ulisboa.pt/pub/OpenBSD/"
|
|
|
|
"https://mirrors.pidginhost.com/pub/OpenBSD/"
|
|
|
|
"https://mirror.yandex.ru/pub/OpenBSD/"
|
|
|
|
"https://ftp.eu.openbsd.org/pub/OpenBSD/"
|
|
|
|
"https://ftp.yzu.edu.tw/pub/OpenBSD/"
|
|
|
|
"https://www.mirrorservice.org/pub/OpenBSD/"
|
|
|
|
"https://anorien.csc.warwick.ac.uk/pub/OpenBSD/"
|
|
|
|
"https://mirror.bytemark.co.uk/pub/OpenBSD/"
|
|
|
|
"https://mirrors.sonic.net/pub/OpenBSD/"
|
|
|
|
"https://ftp3.usa.openbsd.org/pub/OpenBSD/"
|
|
|
|
"https://mirrors.syringanetworks.net/pub/OpenBSD/"
|
|
|
|
"https://openbsd.mirror.constant.com/pub/OpenBSD/"
|
|
|
|
"https://ftp4.usa.openbsd.org/pub/OpenBSD/"
|
|
|
|
"https://ftp5.usa.openbsd.org/pub/OpenBSD/"
|
|
|
|
"https://mirror.esc7.net/pub/OpenBSD/"))))
|
2012-11-12 23:20:06 +01:00
|
|
|
|
2015-08-29 23:47:53 +02:00
|
|
|
(define %mirror-file
|
|
|
|
;; Copy of the list of mirrors to a file. This allows us to keep a single
|
|
|
|
;; copy in the store, and computing it here avoids repeated calls to
|
|
|
|
;; 'object->string'.
|
|
|
|
(plain-file "mirrors" (object->string %mirrors)))
|
|
|
|
|
2016-05-14 17:37:47 +02:00
|
|
|
(define %content-addressed-mirrors
|
|
|
|
;; List of content-addressed mirrors. Each mirror is represented as a
|
2016-07-20 17:00:50 +02:00
|
|
|
;; procedure that takes a file name, an algorithm (symbol) and a hash
|
|
|
|
;; (bytevector), and returns a URL or #f.
|
2016-07-31 18:26:29 +02:00
|
|
|
;; Note: Avoid 'https' to mitigate <http://bugs.gnu.org/22774>.
|
2016-05-14 17:37:47 +02:00
|
|
|
;; TODO: Add more.
|
2016-07-20 17:00:50 +02:00
|
|
|
'(list (lambda (file algo hash)
|
2016-07-31 18:26:29 +02:00
|
|
|
;; Files served by 'guix publish' are accessible under a single
|
|
|
|
;; hash algorithm.
|
|
|
|
(string-append "http://mirror.hydra.gnu.org/file/"
|
|
|
|
file "/" (symbol->string algo) "/"
|
|
|
|
(bytevector->nix-base32-string hash)))
|
|
|
|
(lambda (file algo hash)
|
2016-05-14 17:37:47 +02:00
|
|
|
;; 'tarballs.nixos.org' supports several algorithms.
|
|
|
|
(string-append "http://tarballs.nixos.org/"
|
|
|
|
(symbol->string algo) "/"
|
|
|
|
(bytevector->nix-base32-string hash)))))
|
|
|
|
|
|
|
|
(define %content-addressed-mirror-file
|
|
|
|
;; Content-addressed mirrors stored in a file.
|
|
|
|
(plain-file "content-addressed-mirrors"
|
|
|
|
(object->string %content-addressed-mirrors)))
|
|
|
|
|
2016-11-16 17:44:50 +01:00
|
|
|
(define built-in-builders*
|
|
|
|
(let ((cache (make-weak-key-hash-table)))
|
|
|
|
(lambda ()
|
|
|
|
"Return, as a monadic value, the list of built-in builders supported by
|
|
|
|
the daemon."
|
|
|
|
(lambda (store)
|
|
|
|
;; Memoize the result to avoid repeated RPCs.
|
|
|
|
(values (or (hashq-ref cache store)
|
|
|
|
(let ((result (built-in-builders store)))
|
|
|
|
(hashq-set! cache store result)
|
|
|
|
result))
|
|
|
|
store)))))
|
2012-11-12 23:20:06 +01:00
|
|
|
|
2016-11-16 17:44:50 +01:00
|
|
|
(define* (built-in-download file-name url
|
|
|
|
#:key system hash-algo hash
|
|
|
|
mirrors content-addressed-mirrors
|
|
|
|
(guile 'unused))
|
|
|
|
"Download FILE-NAME from URL using the built-in 'download' builder.
|
2012-11-12 23:10:26 +01:00
|
|
|
|
2016-11-16 17:44:50 +01:00
|
|
|
This is an \"out-of-band\" download in that the returned derivation does not
|
|
|
|
explicitly depend on Guile, GnuTLS, etc. Instead, the daemon performs the
|
|
|
|
download by itself using its own dependencies."
|
|
|
|
(mlet %store-monad ((mirrors (lower-object mirrors))
|
|
|
|
(content-addressed-mirrors
|
|
|
|
(lower-object content-addressed-mirrors)))
|
|
|
|
(raw-derivation file-name "builtin:download" '()
|
|
|
|
#:system system
|
|
|
|
#:hash-algo hash-algo
|
|
|
|
#:hash hash
|
|
|
|
#:inputs `((,mirrors)
|
|
|
|
(,content-addressed-mirrors))
|
|
|
|
|
|
|
|
;; Honor the user's proxy and locale settings.
|
|
|
|
#:leaked-env-vars '("http_proxy" "https_proxy"
|
|
|
|
"LC_ALL" "LC_MESSAGES" "LANG"
|
|
|
|
"COLUMNS")
|
|
|
|
|
|
|
|
#:env-vars `(("url" . ,(object->string url))
|
|
|
|
("mirrors" . ,mirrors)
|
|
|
|
("content-addressed-mirrors"
|
2016-11-18 10:48:31 +01:00
|
|
|
. ,content-addressed-mirrors))
|
|
|
|
|
|
|
|
;; Do not offload this derivation because we cannot be
|
|
|
|
;; sure that the remote daemon supports the 'download'
|
|
|
|
;; built-in. We may remove this limitation when support
|
|
|
|
;; for that built-in is widespread.
|
|
|
|
#:local-build? #t)))
|
2016-11-16 17:44:50 +01:00
|
|
|
|
|
|
|
(define* (url-fetch url hash-algo hash
|
|
|
|
#:optional name
|
|
|
|
#:key (system (%current-system))
|
|
|
|
(guile (default-guile)))
|
|
|
|
"Return a fixed-output derivation that fetches URL (a string, or a list of
|
|
|
|
strings denoting alternate URLs), which is expected to have hash HASH of type
|
|
|
|
HASH-ALGO (a symbol). By default, the file name is the base name of URL;
|
|
|
|
optionally, NAME can specify a different file name.
|
|
|
|
|
|
|
|
When one of the URL starts with mirror://, then its host part is
|
|
|
|
interpreted as the name of a mirror scheme, taken from %MIRROR-FILE.
|
|
|
|
|
|
|
|
Alternately, when URL starts with file://, return the corresponding file name
|
|
|
|
in the store."
|
|
|
|
(define file-name
|
|
|
|
(match url
|
|
|
|
((head _ ...)
|
|
|
|
(basename head))
|
|
|
|
(_
|
|
|
|
(basename url))))
|
|
|
|
|
2014-10-03 11:02:11 +02:00
|
|
|
(let ((uri (and (string? url) (string->uri url))))
|
|
|
|
(if (or (and (string? url) (not uri))
|
|
|
|
(and uri (memq (uri-scheme uri) '(#f file))))
|
2015-01-14 14:42:10 +01:00
|
|
|
(interned-file (if uri (uri-path uri) url)
|
|
|
|
(or name file-name))
|
2017-07-27 15:09:26 +02:00
|
|
|
(mlet %store-monad ((builtins (built-in-builders*)))
|
|
|
|
;; The "download" built-in builder was added in guix-daemon in
|
|
|
|
;; Nov. 2016 and made it in the 0.12.0 release of Dec. 2016. We now
|
|
|
|
;; require it.
|
|
|
|
(unless (member "download" builtins)
|
|
|
|
(error "'guix-daemon' is too old, please upgrade" builtins))
|
|
|
|
|
|
|
|
(built-in-download (or name file-name) url
|
|
|
|
#:guile guile
|
|
|
|
#:system system
|
|
|
|
#:hash-algo hash-algo
|
|
|
|
#:hash hash
|
|
|
|
#:mirrors %mirror-file
|
|
|
|
#:content-addressed-mirrors
|
|
|
|
%content-addressed-mirror-file)))))
|
2012-11-12 23:10:26 +01:00
|
|
|
|
2016-02-22 00:29:54 +01:00
|
|
|
(define* (url-fetch/tarbomb url hash-algo hash
|
|
|
|
#:optional name
|
|
|
|
#:key (system (%current-system))
|
|
|
|
(guile (default-guile)))
|
|
|
|
"Similar to 'url-fetch' but unpack the file from URL in a directory of its
|
|
|
|
own. This helper makes it easier to deal with \"tar bombs\"."
|
2017-01-27 20:48:37 +01:00
|
|
|
(define file-name
|
|
|
|
(match url
|
|
|
|
((head _ ...)
|
|
|
|
(basename head))
|
|
|
|
(_
|
|
|
|
(basename url))))
|
2016-02-22 00:29:54 +01:00
|
|
|
(define gzip
|
|
|
|
(module-ref (resolve-interface '(gnu packages compression)) 'gzip))
|
|
|
|
(define tar
|
|
|
|
(module-ref (resolve-interface '(gnu packages base)) 'tar))
|
|
|
|
|
|
|
|
(mlet %store-monad ((drv (url-fetch url hash-algo hash
|
2017-01-27 20:48:37 +01:00
|
|
|
(string-append "tarbomb-"
|
|
|
|
(or name file-name))
|
2016-02-22 00:29:54 +01:00
|
|
|
#:system system
|
|
|
|
#:guile guile)))
|
|
|
|
;; Take the tar bomb, and simply unpack it as a directory.
|
2018-04-23 14:33:11 +02:00
|
|
|
;; Use ungrafted tar/gzip so that the resulting tarball doesn't depend on
|
|
|
|
;; whether grafts are enabled.
|
2017-01-27 20:48:37 +01:00
|
|
|
(gexp->derivation (or name file-name)
|
2016-02-22 00:29:54 +01:00
|
|
|
#~(begin
|
|
|
|
(mkdir #$output)
|
|
|
|
(setenv "PATH" (string-append #$gzip "/bin"))
|
|
|
|
(chdir #$output)
|
|
|
|
(zero? (system* (string-append #$tar "/bin/tar")
|
|
|
|
"xf" #$drv)))
|
2018-04-23 14:33:11 +02:00
|
|
|
#:graft? #f
|
2016-02-22 00:29:54 +01:00
|
|
|
#:local-build? #t)))
|
|
|
|
|
2017-01-25 13:16:00 +01:00
|
|
|
(define* (url-fetch/zipbomb url hash-algo hash
|
|
|
|
#:optional name
|
|
|
|
#:key (system (%current-system))
|
|
|
|
(guile (default-guile)))
|
|
|
|
"Similar to 'url-fetch' but unpack the zip file at URL in a directory of its
|
|
|
|
own. This helper makes it easier to deal with \"zip bombs\"."
|
|
|
|
(define file-name
|
|
|
|
(match url
|
|
|
|
((head _ ...)
|
|
|
|
(basename head))
|
|
|
|
(_
|
|
|
|
(basename url))))
|
|
|
|
(define unzip
|
gnu: Move contents of zip module into compression module.
* gnu/packages/zip.scm (zip, unzip, zziplib, perl-zip): Move to...
* gnu/packages/compression.scm: ...here.
* gnu/packages/zip.scm: Delete file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Unregister deleted file.
* po/packages/POTFILES.in: Unregister deleted file.
* gnu/packages/{audio, avr, bioinformatics, busybox, cdrom, ci, compression,
docbook, documentation, fonts, fpga, game-development, games, gl, gnome,
gnuzilla, graphics, guile, haskell, image, java, kodi, ldc, libreoffice,
markup, maths, mc, monitoring, music, php, pretty-print, python, scheme,
smalltalk, statistics, synergy, tex, textutils, video, web-browsers, xml,
zip}.scm, guix/build-system/{ant, font}.scm, guix/{download, packages}.scm:
Adapt module import.
2017-06-12 20:40:01 +02:00
|
|
|
(module-ref (resolve-interface '(gnu packages compression)) 'unzip))
|
2017-01-25 13:16:00 +01:00
|
|
|
|
|
|
|
(mlet %store-monad ((drv (url-fetch url hash-algo hash
|
|
|
|
(string-append "zipbomb-"
|
|
|
|
(or name file-name))
|
|
|
|
#:system system
|
|
|
|
#:guile guile)))
|
|
|
|
;; Take the zip bomb, and simply unpack it as a directory.
|
2018-04-23 14:33:11 +02:00
|
|
|
;; Use ungrafted unzip so that the resulting tarball doesn't depend on
|
|
|
|
;; whether grafts are enabled.
|
2017-01-25 13:16:00 +01:00
|
|
|
(gexp->derivation (or name file-name)
|
|
|
|
#~(begin
|
|
|
|
(mkdir #$output)
|
|
|
|
(chdir #$output)
|
|
|
|
(zero? (system* (string-append #$unzip "/bin/unzip")
|
|
|
|
#$drv)))
|
2018-04-23 14:33:11 +02:00
|
|
|
#:graft? #f
|
2017-01-25 13:16:00 +01:00
|
|
|
#:local-build? #t)))
|
|
|
|
|
2013-04-21 22:40:23 +02:00
|
|
|
(define* (download-to-store store url #:optional (name (basename url))
|
2016-11-07 23:29:45 +01:00
|
|
|
#:key (log (current-error-port)) recursive?
|
|
|
|
(verify-certificate? #t))
|
2013-04-21 22:40:23 +02:00
|
|
|
"Download from URL to STORE, either under NAME or URL's basename if
|
2015-06-11 11:19:12 +02:00
|
|
|
omitted. Write progress reports to LOG. RECURSIVE? has the same effect as
|
2016-11-07 23:29:45 +01:00
|
|
|
the same-named parameter of 'add-to-store'. VERIFY-CERTIFICATE? determines
|
|
|
|
whether or not to validate HTTPS server certificates."
|
2013-10-12 16:39:10 +02:00
|
|
|
(define uri
|
|
|
|
(string->uri url))
|
|
|
|
|
2014-03-11 22:09:31 +01:00
|
|
|
(if (or (not uri) (memq (uri-scheme uri) '(file #f)))
|
2015-06-11 11:19:12 +02:00
|
|
|
(add-to-store store name recursive? "sha256"
|
2014-03-11 22:09:31 +01:00
|
|
|
(if uri (uri-path uri) url))
|
2013-10-12 16:39:10 +02:00
|
|
|
(call-with-temporary-output-file
|
|
|
|
(lambda (temp port)
|
|
|
|
(let ((result
|
|
|
|
(parameterize ((current-output-port log))
|
2016-11-07 23:29:45 +01:00
|
|
|
(build:url-fetch url temp
|
|
|
|
#:mirrors %mirrors
|
|
|
|
#:verify-certificate?
|
|
|
|
verify-certificate?))))
|
2013-10-12 16:39:10 +02:00
|
|
|
(close port)
|
|
|
|
(and result
|
2015-06-11 11:19:12 +02:00
|
|
|
(add-to-store store name recursive? "sha256" temp)))))))
|
2013-04-21 22:40:23 +02:00
|
|
|
|
2012-11-12 23:10:26 +01:00
|
|
|
;;; download.scm ends here
|