diff options
Diffstat (limited to 'guix')
-rw-r--r-- | guix/download.scm | 48 | ||||
-rw-r--r-- | guix/gnu-maintenance.scm | 35 | ||||
-rw-r--r-- | guix/scripts/lint.scm | 8 | ||||
-rw-r--r-- | guix/scripts/publish.scm | 4 | ||||
-rw-r--r-- | guix/scripts/refresh.scm | 6 | ||||
-rw-r--r-- | guix/scripts/system.scm | 14 | ||||
-rw-r--r-- | guix/utils.scm | 6 |
7 files changed, 113 insertions, 8 deletions
diff --git a/guix/download.scm b/guix/download.scm index b2dcdc88f9..f1422bebc0 100644 --- a/guix/download.scm +++ b/guix/download.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch> ;;; Copyright © 2016 Alex Griffin <a@ajgrf.com> +;;; Copyright © 2016 David Craven <david@craven.ch> ;;; ;;; This file is part of GNU Guix. ;;; @@ -224,7 +225,52 @@ "http://ftp.de.debian.org/debian/" "http://ftp.fr.debian.org/debian/" "http://ftp.debian.org/debian/" - "http://archive.debian.org/debian/")))) + "http://archive.debian.org/debian/") + (kde + ;; 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/" + "http://kde.mirror.uber.com.au/")))) (define %mirror-file ;; Copy of the list of mirrors to a file. This allows us to keep a single diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm index 0dd08bf535..20f08027da 100644 --- a/guix/gnu-maintenance.scm +++ b/guix/gnu-maintenance.scm @@ -59,6 +59,7 @@ %gnu-updater %gnome-updater + %kde-updater %xorg-updater)) ;;; Commentary: @@ -500,6 +501,33 @@ elpa.gnu.org, and all the GNOME packages." ;; checksums. #:file->signature (const #f)))) +(define (kde-package? package) + "Return true if PACKAGE is a KDE package, developed by KDE.org." + (define kde-uri? + (match-lambda + ((? string? uri) + (string-prefix? "mirror://kde/" uri)) + (_ + #f))) + + (match (package-source package) + ((? origin? origin) + (match (origin-uri origin) + ((? kde-uri?) #t) + (_ #f))) + (_ #f))) + +(define (latest-kde-release package) + "Return the latest release of PACKAGE, the name of an KDE.org package." + (let ((uri (string->uri (origin-uri (package-source package))))) + (false-if-ftp-error + (latest-ftp-release + (package-name package) + #:server "mirrors.mit.edu" + #:directory + (string-append "/kde" (dirname (dirname (uri-path uri)))) + #:file->signature (const #f))))) + (define (xorg-package? package) "Return true if PACKAGE is an X.org package, developed by X.org." (define xorg-uri? @@ -540,6 +568,13 @@ elpa.gnu.org, and all the GNOME packages." (pred gnome-package?) (latest latest-gnome-release))) +(define %kde-updater + (upstream-updater + (name 'kde) + (description "Updater for KDE packages") + (pred kde-package?) + (latest latest-kde-release))) + (define %xorg-updater (upstream-updater (name 'xorg) diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm index 8aab1febb2..51191e7e7b 100644 --- a/guix/scripts/lint.scm +++ b/guix/scripts/lint.scm @@ -205,7 +205,13 @@ by two spaces; possible infraction~p at ~{~a~^, ~}") ;; native inputs. (let ((linted package) (inputs (package-inputs package)) - (native-inputs '("pkg-config" "glib:bin" "intltool" "itstool"))) + (native-inputs + '("pkg-config" + "extra-cmake-modules" + "glib:bin" + "intltool" + "itstool" + "qttools"))) (match inputs (((labels packages . outputs) ...) (for-each (lambda (package output) diff --git a/guix/scripts/publish.scm b/guix/scripts/publish.scm index 2ca2aeebe3..8404e540f8 100644 --- a/guix/scripts/publish.scm +++ b/guix/scripts/publish.scm @@ -50,6 +50,7 @@ #:use-module (guix zlib) #:use-module (guix ui) #:use-module (guix scripts) + #:use-module ((guix utils) #:select (compressed-file?)) #:use-module ((guix build utils) #:select (dump-port)) #:export (guix-publish)) @@ -199,6 +200,9 @@ compression disabled~%")) if STORE-PATH is invalid. Produce a URL that corresponds to COMPRESSION. The narinfo is signed with KEY." (let* ((path-info (query-path-info store store-path)) + (compression (if (compressed-file? store-path) + %no-compression + compression)) (url (encode-and-join-uri-path `("nar" ,@(match compression diff --git a/guix/scripts/refresh.scm b/guix/scripts/refresh.scm index 209f0d8be9..b00ac98c96 100644 --- a/guix/scripts/refresh.scm +++ b/guix/scripts/refresh.scm @@ -32,7 +32,10 @@ #:use-module (guix scripts graph) #:use-module (guix monads) #:use-module ((guix gnu-maintenance) - #:select (%gnu-updater %gnome-updater %xorg-updater)) + #:select (%gnu-updater + %gnome-updater + %kde-updater + %xorg-updater)) #:use-module (guix import elpa) #:use-module (guix import cran) #:use-module (guix import hackage) @@ -195,6 +198,7 @@ unavailable optional dependencies such as Guile-JSON." ;; List of "updaters" used by default. They are consulted in this order. (list-updaters %gnu-updater %gnome-updater + %kde-updater %xorg-updater %elpa-updater %cran-updater diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index e2c6b2efee..209ebf9752 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -236,11 +236,15 @@ BODY..., and restore them." (with-monad %store-monad (return #f))))) -(define-syntax-rule (with-shepherd-error-handling body ...) - (warn-on-system-error - (guard (c ((shepherd-error? c) - (report-shepherd-error c))) - body ...))) +(define-syntax-rule (with-shepherd-error-handling mbody ...) + "Catch and report Shepherd errors that arise when binding MBODY, a monadic +expression in %STORE-MONAD." + (lambda (store) + (warn-on-system-error + (guard (c ((shepherd-error? c) + (values (report-shepherd-error c) store))) + (values (run-with-store store (begin mbody ...)) + store))))) (define (report-shepherd-error error) "Report ERROR, a '&shepherd-error' error condition object." diff --git a/guix/utils.scm b/guix/utils.scm index 9e1b8ead0a..c68094cf49 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -79,6 +79,7 @@ arguments-from-environment-variable file-extension file-sans-extension + compressed-file? switch-symlinks call-with-temporary-output-file call-with-temporary-directory @@ -551,6 +552,11 @@ minor version numbers from version-string." (substring file 0 dot) file))) +(define (compressed-file? file) + "Return true if FILE denotes a compressed file." + (->bool (member (file-extension file) + '("gz" "bz2" "xz" "lz" "tgz" "tbz2" "zip")))) + (define (switch-symlinks link target) "Atomically switch LINK, a symbolic link, to point to TARGET. Works both when LINK already exists and when it does not." |