summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--emacs/guix-build-log.el2
-rw-r--r--gnu/packages/bioinformatics.scm38
-rw-r--r--gnu/packages/compression.scm41
-rw-r--r--gnu/packages/gnupg.scm43
-rw-r--r--gnu/packages/messaging.scm80
-rw-r--r--gnu/packages/python.scm209
-rw-r--r--guix/http-client.scm27
-rw-r--r--guix/scripts/lint.scm24
-rw-r--r--guix/scripts/offload.scm12
-rw-r--r--guix/ui.scm1
-rw-r--r--guix/utils.scm21
11 files changed, 466 insertions, 32 deletions
diff --git a/emacs/guix-build-log.el b/emacs/guix-build-log.el
index 6faa37c311..9ce30bd1dd 100644
--- a/emacs/guix-build-log.el
+++ b/emacs/guix-build-log.el
@@ -141,7 +141,7 @@ STATE is a symbol denoting how a build phase was ended. It should be
(rx-to-string
`(and bol "phase " (regexp ,guix-build-log-phase-name-regexp)
" " (group (regexp ,state-rx)) " after "
- (group (1+ digit)) " seconds")
+ (group (1+ (or digit "."))) " seconds")
t)))
(defvar guix-build-log-phase-end-regexp
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 1977fd3bf9..8fc6142f19 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -2544,6 +2544,44 @@ manipulation, online and indexed string search, efficient I/O of
bioinformatics file formats, sequence alignment, and more.")
(license license:bsd-3)))
+(define-public seqmagick
+ (package
+ (name "seqmagick")
+ (version "0.6.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://pypi.python.org/packages/source/s/seqmagick/seqmagick-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "0cgn477n74gsl4qdaakrrhi953kcsd4q3ivk2lr18x74s3g4ma1d"))))
+ (build-system python-build-system)
+ (arguments
+ ;; python2 only, see https://github.com/fhcrc/seqmagick/issues/56
+ `(#:python ,python-2
+ #:phases
+ (modify-phases %standard-phases
+ ;; Current test in setup.py does not work as of 0.6.1,
+ ;; so use nose to run tests instead for now. See
+ ;; https://github.com/fhcrc/seqmagick/issues/55
+ (replace 'check (lambda _ (zero? (system* "nosetests")))))))
+ (inputs
+ `(("python-biopython" ,python2-biopython)))
+ (native-inputs
+ `(("python-setuptools" ,python2-setuptools)
+ ("python-nose" ,python2-nose)))
+ (home-page "http://github.com/fhcrc/seqmagick")
+ (synopsis "Tools for converting and modifying sequence files")
+ (description
+ "Bioinformaticians often have to convert sequence files between formats
+and do little manipulations on them, and it's not worth writing scripts for
+that. Seqmagick is a utility to expose the file format conversion in
+BioPython in a convenient way. Instead of having a big mess of scripts, there
+is one that takes arguments.")
+ (license license:gpl3)))
+
(define-public star
(package
(name "star")
diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index f4b327ecec..fbe5ba484e 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -545,3 +545,44 @@ time for compression ratio.")
;; The libraries (lz4, lz4hc, and xxhash are BSD licenced. The command
;; line interface programs (lz4, fullbench, fuzzer, datagen) are GPL2+.
(license (list license:bsd-2 license:gpl2+))))
+
+(define-public squashfs-tools
+ (package
+ (name "squashfs-tools")
+ (version "4.3")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://sourceforge/squashfs/"
+ "squashfs" version ".tar.gz"))
+ (sha256
+ (base32
+ "1xpklm0y43nd9i6jw43y2xh5zvlmj9ar2rvknh0bh7kv8c95aq0d"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:tests? #f ; no check target
+ #:make-flags
+ (list "CC=gcc"
+ "XZ_SUPPORT=1"
+ "LZO_SUPPORT=1"
+ "LZ4_SUPPORT=1"
+ (string-append "INSTALL_DIR=" %output "/bin"))
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda _
+ (chdir "squashfs-tools"))))))
+ (inputs
+ `(("lz4" ,lz4)
+ ("lzo" ,lzo)
+ ("xz" ,xz)
+ ("zlib" ,zlib)))
+ (home-page "http://squashfs.sourceforge.net/")
+ (synopsis "Tools to create and extract squashfs filesystems")
+ (description
+ "Squashfs is a highly compressed read-only filesystem for Linux. It uses
+zlib to compress files, inodes, and directories. All blocks are packed to
+minimize the data overhead, and block sizes of between 4K and 1M are supported.
+It is intended to be used for archival use, for live CDs, and for embedded
+systems where low overhead is needed. This package allows you to create and
+extract such filesystems.")
+ (license license:gpl2+)))
diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm
index 58826176d5..3bd87dccc6 100644
--- a/gnu/packages/gnupg.scm
+++ b/gnu/packages/gnupg.scm
@@ -325,6 +325,49 @@ instead. This way bug fixes or improvements can be done at a central place
and every application benefits from this.")
(license license:lgpl2.1+)))
+(define-public python-gnupg
+ (package
+ (name "python-gnupg")
+ (version "0.3.7")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://pypi.python.org/packages/source/p/"
+ "python-gnupg/python-gnupg-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1hg9gshk4b7raskj8mjadsjcv10axlx2z4xl4ag2f2bpi4f8chvq"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "test_gnupg.py"
+ ;; Test keyrings are missing, so this test fails.
+ (("'test_scan_keys'") "True")
+ (("def test_scan_keys") "def disabled__scan_keys")
+ ;; Unsure why this test fails.
+ (("'test_search_keys'") "True")
+ (("def test_search_keys") "def disabled__search_keys"))
+ (setenv "GPGBINARY" "gpg")
+ (setenv "USERNAME" "guixbuilder")
+ ;; The doctests are extremely slow and sometimes time out,
+ ;; so we disable them.
+ (zero? (system* "python"
+ "test_gnupg.py" "--no-doctests")))))))
+ (native-inputs
+ `(("gnupg" ,gnupg-1)))
+ (home-page "http://packages.python.org/python-gnupg/index.html")
+ (synopsis "Wrapper for the GNU Privacy Guard")
+ (description
+ "This module allows easy access to GnuPG’s key management, encryption
+and signature functionality from Python programs.")
+ (license license:bsd-3)))
+
+(define-public python2-gnupg
+ (package-with-python2 python-gnupg))
+
(define-public pius
(package
(name "pius")
diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 7263a3810f..731acb54c6 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -3,6 +3,7 @@
;;; Copyright © 2014 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
+;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -21,13 +22,14 @@
(define-module (gnu packages messaging)
#:use-module ((guix licenses)
- #:select (gpl2+ gpl2 lgpl2.1 lgpl2.0+ bsd-2 non-copyleft
+ #:select (gpl3+ gpl2+ gpl2 lgpl2.1 lgpl2.0+ bsd-2 non-copyleft
asl2.0))
#:use-module (guix utils)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system gnu)
#:use-module (guix build-system glib-or-gtk)
+ #:use-module (guix build-system python)
#:use-module (gnu packages)
#:use-module (gnu packages autotools)
#:use-module (gnu packages avahi)
@@ -393,4 +395,80 @@ clients from different locations can connect to a single ZNC account
simultaneously and therefore appear under the same nickname on IRC.")
(license asl2.0)))
+(define-public python-nbxmpp
+ (package
+ (name "python-nbxmpp")
+ (version "0.5.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://pypi.python.org/packages/source/n/nbxmpp/"
+ "nbxmpp-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0dcr786dyips1fdvgsn8yvpgcz5j7217fi05c29cfypdl8jnp6mp"))))
+ (build-system python-build-system)
+ ;; No tests included
+ (arguments `(#:tests? #f))
+ (home-page "http://python-nbxmpp.gajim.org")
+ (synopsis "Non-blocking Jabber/XMPP module")
+ (description
+ "The goal of this python library is to provide a way for Python
+applications to use Jabber/XMPP networks in a non-blocking way. This library
+was initially a fork of xmpppy, but is using non-blocking sockets.")
+ (license gpl3+)))
+
+(define-public python2-nbxmpp
+ (package-with-python2 python-nbxmpp))
+
+(define-public gajim
+ (package
+ (name "gajim")
+ (version "0.16.3")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://gajim.org/downloads/"
+ (version-major+minor version)
+ "/gajim-" version ".tar.bz2"))
+ (sha256
+ (base32
+ "05a59hf9wna6n9fi0a4bhz1hifqj21bwb4ff9rd0my23rdwmij51"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'install 'wrap-program
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; Make sure all Python scripts run with the correct PYTHONPATH.
+ (let ((out (assoc-ref outputs "out"))
+ (path (getenv "PYTHONPATH")))
+ (for-each (lambda (name)
+ (let ((file (string-append out "/bin/" name)))
+ ;; Wrapping destroys identification of intended
+ ;; application, so we need to override "APP".
+ (substitute* file
+ (("APP=`basename \\$0`")
+ (string-append "APP=" name)))
+ (wrap-program file
+ `("PYTHONPATH" ":" prefix (,path)))))
+ '("gajim" "gajim-remote" "gajim-history-manager")))
+ #t)))))
+ (native-inputs
+ `(("intltool" ,intltool)))
+ (propagated-inputs
+ `(("python2-nbxmpp" ,python2-nbxmpp)
+ ("python2-pyopenssl" ,python2-pyopenssl)
+ ("python2-gnupg" ,python2-gnupg)))
+ (inputs
+ `(("python2-pygtk" ,python2-pygtk)
+ ("python" ,python-2)))
+ (home-page "https://gajim.org/")
+ (synopsis "Jabber (XMPP) client")
+ (description "Gajim is a feature-rich and easy to use Jabber/XMPP client.
+Among its features are: a tabbed chat window and single window modes; support
+for group chat (with Multi-User Chat protocol), invitation, chat to group chat
+transformation; audio and video conferences; file transfer; TLS, GPG and
+end-to-end encryption support; XML console.")
+ (license gpl3+)))
+
;;; messaging.scm ends here
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 0c13303d7d..708ba29d24 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -4968,3 +4968,212 @@ suitable for a wide range of protocols based on the ASN.1 specification.")
(define-public python2-pyasn1
(package-with-python2 python-pyasn1))
+
+(define-public python2-ipaddress
+ (package
+ (name "python2-ipaddress")
+ (version "1.0.14")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://pypi.python.org/packages/source/i/"
+ "ipaddress/ipaddress-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0givid4963n57nsjibms2fc347zmcs188q1hw9al1dkc9kj4nvr2"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:tests? #f ; no tests
+ #:python ,python-2))
+ (home-page "https://github.com/phihag/ipaddress")
+ (synopsis "IP address manipulation library")
+ (description
+ "This package provides a fast, lightweight IPv4/IPv6 manipulation library
+in Python. This library is used to create, poke at, and manipulate IPv4 and
+IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
+module to older versions of Python.")
+ (license psfl)))
+
+(define-public python-idna
+ (package
+ (name "python-idna")
+ (version "2.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://pypi.python.org/packages/source/i/"
+ "idna/idna-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
+ (build-system python-build-system)
+ (native-inputs
+ `(("python-setuptools" ,python-setuptools)))
+ (home-page "https://github.com/kjd/idna")
+ (synopsis "Internationalized domain names in applications")
+ (description
+ "This is a library to support the Internationalised Domain Names in
+Applications (IDNA) protocol as specified in RFC 5891. This version of the
+protocol is often referred to as “IDNA2008” and can produce different results
+from the earlier standard from 2003. The library is also intended to act as a
+suitable drop-in replacement for the “encodings.idna” module that comes with
+the Python standard library but currently only supports the older 2003
+specification.")
+ (license bsd-4)))
+
+(define-public python2-idna
+ (package-with-python2 python-idna))
+
+(define-public python-pretend
+ (package
+ (name "python-pretend")
+ (version "1.0.8")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://pypi.python.org/packages/source/p/"
+ "pretend/pretend-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
+ (build-system python-build-system)
+ (native-inputs
+ `(("python-setuptools" ,python-setuptools)))
+ (home-page "https://github.com/alex/pretend")
+ (synopsis "Library for stubbing in Python")
+ (description
+ "Pretend is a library to make stubbing with Python easier. Stubbing is a
+technique for writing tests. You may hear the term mixed up with mocks,
+fakes, or doubles. Basically, a stub is an object that returns pre-canned
+responses, rather than doing any computation.")
+ (license bsd-3)))
+
+(define-public python2-pretend
+ (package-with-python2 python-pretend))
+
+(define-public python-cryptography-vectors
+ (package
+ (name "python-cryptography-vectors")
+ (version "1.0.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://pypi.python.org/packages/source/c/"
+ "cryptography-vectors/cryptography_vectors-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1i2chlyhlx4792di82fqzcy9wz0gnnc661bj46zr794ip4629sp4"))))
+ (build-system python-build-system)
+ (native-inputs
+ `(("python-setuptools" ,python-setuptools)))
+ (home-page "https://github.com/pyca/cryptography")
+ (synopsis "Test vectors for the cryptography package.")
+ (description
+ "This package contains test vectors for the cryptography package.")
+ ;; Distributed under either BSD-3 or ASL2.0
+ (license (list bsd-3 asl2.0))))
+
+(define-public python2-cryptography-vectors
+ (package-with-python2 python-cryptography-vectors))
+
+(define-public python-cryptography
+ (package
+ (name "python-cryptography")
+ (version "1.0.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://pypi.python.org/packages/source/c/"
+ "cryptography/cryptography-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1lxzvhlyl6h6nm77n34622rcj2cxnx220x9vgjlw76wjd8m0kqyg"))))
+ (build-system python-build-system)
+ (inputs
+ `(("openssl" ,openssl)))
+ (propagated-inputs
+ `(("python-cffi" ,python-cffi)
+ ("python-six" ,python-six)
+ ("python-pyasn1" ,python-pyasn1)
+ ("python-enum34" ,python-enum34)
+ ("python-idna" ,python-idna)
+ ("python-iso8601" ,python-iso8601)))
+ (native-inputs
+ `(("python-cryptography-vectors" ,python-cryptography-vectors)
+ ("python-setuptools" ,python-setuptools)
+ ("python-pretend" ,python-pretend)
+ ("python-pytest" ,python-pytest)))
+ (home-page "https://github.com/pyca/cryptography")
+ (synopsis "Cryptographic recipes and primitives for Python")
+ (description
+ "cryptography is a package which provides cryptographic recipes and
+primitives to Python developers. It aims to be the “cryptographic standard
+library” for Python. The package includes both high level recipes, and low
+level interfaces to common cryptographic algorithms such as symmetric ciphers,
+message digests and key derivation functions.")
+ ;; Distributed under either BSD-3 or ASL2.0
+ (license (list bsd-3 asl2.0))))
+
+(define-public python2-cryptography
+ (let ((crypto (package-with-python2 python-cryptography)))
+ (package (inherit crypto)
+ (propagated-inputs
+ `(("python2-ipaddress" ,python2-ipaddress)
+ ,@(package-propagated-inputs crypto))))))
+
+(define-public python-pyopenssl
+ (package
+ (name "python-pyopenssl")
+ (version "0.15.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://pypi.python.org/packages/source/p/"
+ "pyOpenSSL/pyOpenSSL-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0wnnq15rhj7fhdcd8ycwiw6r6g3w9f9lcy6cigg8226vsrq618ph"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'fix-tests
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "OpenSSL/test/test_ssl.py"
+ (("client\\.connect\\(\\('verisign\\.com', 443\\)\\)")
+ "return True")
+ ;; FIXME: disable broken test
+ (("test_set_tmp_ecdh") "disabled__set_tmp_ecdh"))
+ (substitute* "OpenSSL/test/test_crypto.py"
+ (("command = b\"openssl \"")
+ (string-append "command = b\""
+ (assoc-ref inputs "openssl")
+ "/bin/openssl" " \""))
+ ;; FIXME: disable four broken tests
+ (("test_der") "disabled__der")
+ (("test_digest") "disabled__digest")
+ (("test_get_extension") "disabled__get_extension")
+ (("test_extension_count") "disabled__extension_count"))
+ #t)))))
+ (propagated-inputs
+ `(("python-cryptography" ,python-cryptography)
+ ("python-six" ,python-six)))
+ (inputs
+ `(("openssl" ,openssl)))
+ (native-inputs
+ `(("python-setuptools" ,python-setuptools)))
+ (home-page "https://github.com/pyca/pyopenssl")
+ (synopsis "Python wrapper module around the OpenSSL library")
+ (description
+ "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
+library.")
+ (license asl2.0)))
+
+(define-public python2-pyopenssl
+ (let ((pyopenssl (package-with-python2 python-pyopenssl)))
+ (package (inherit pyopenssl)
+ (propagated-inputs
+ `(("python2-cryptography" ,python2-cryptography)
+ ,@(alist-delete "python-cryptography"
+ (package-propagated-inputs pyopenssl)))))))
diff --git a/guix/http-client.scm b/guix/http-client.scm
index 5cfe05f2e0..9861ec80cb 100644
--- a/guix/http-client.scm
+++ b/guix/http-client.scm
@@ -25,6 +25,7 @@
#:use-module (srfi srfi-11)
#:use-module (srfi srfi-34)
#:use-module (srfi srfi-35)
+ #:use-module (ice-9 match)
#:use-module (rnrs io ports)
#:use-module (rnrs bytevectors)
#:use-module (guix ui)
@@ -66,7 +67,8 @@
(when-guile<=2.0.5-or-otherwise-broken
;; Backport of Guile commits 312e79f8 ("Add HTTP Chunked Encoding support to
- ;; web modules.") and 00d3ecf2 ("http: Do not buffer HTTP chunks.")
+ ;; web modules."), 00d3ecf2 ("http: Do not buffer HTTP chunks."), and 53b8d5f
+ ;; ("web: Gracefully handle premature EOF when reading chunk header.")
(use-modules (ice-9 rdelim))
@@ -75,14 +77,21 @@
;; Chunked Responses
(define (read-chunk-header port)
- (let* ((str (read-line port))
- (extension-start (string-index str (lambda (c) (or (char=? c #\;)
- (char=? c #\return)))))
- (size (string->number (if extension-start ; unnecessary?
- (substring str 0 extension-start)
- str)
- 16)))
- size))
+ "Read a chunk header from PORT and return the size in bytes of the
+ upcoming chunk."
+ (match (read-line port)
+ ((? eof-object?)
+ ;; Connection closed prematurely: there's nothing left to read.
+ 0)
+ (str
+ (let ((extension-start (string-index str
+ (lambda (c)
+ (or (char=? c #\;)
+ (char=? c #\return))))))
+ (string->number (if extension-start ; unnecessary?
+ (substring str 0 extension-start)
+ str)
+ 16)))))
(define* (make-chunked-input-port port #:key (keep-alive? #f))
"Returns a new port which translates HTTP chunked transfer encoded
diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm
index 8224f540bb..0adb3bf179 100644
--- a/guix/scripts/lint.scm
+++ b/guix/scripts/lint.scm
@@ -129,7 +129,7 @@ monad."
(exit 0))
(define (properly-starts-sentence? s)
- (string-match "^[(\"'[:upper:][:digit:]]" s))
+ (string-match "^[(\"'`[:upper:][:digit:]]" s))
(define (starts-with-abbreviation? s)
"Return #t if S starts with what looks like an abbreviation or acronym."
@@ -143,12 +143,14 @@ monad."
(_ "description should not be empty")
'description)))
- (define (check-texinfo-markup package)
- "Check that PACKAGE description can be parsed as a Texinfo fragment."
- (catch 'parser-error
- (lambda () (package-description-string package))
- (lambda (keys . args)
- (emit-warning package (_ "Texinfo markup in description is invalid")))))
+ (define (check-texinfo-markup description)
+ "Check that DESCRIPTION can be parsed as a Texinfo fragment. If the
+markup is valid return a plain-text version of DESCRIPTION, otherwise #f."
+ (unless (false-if-exception (texi->plain-text description))
+ (emit-warning package
+ (_ "Texinfo markup in description is invalid")
+ 'description)
+ #f))
(define (check-proper-start description)
(unless (or (properly-starts-sentence? description)
@@ -179,9 +181,11 @@ by two spaces; possible infraction~p at ~{~a~^, ~}")
(let ((description (package-description package)))
(when (string? description)
(check-not-empty description)
- (check-texinfo-markup package)
- (check-proper-start description)
- (check-end-of-sentence-space description))))
+ ;; Use raw description for this because Texinfo rendering automatically
+ ;; fixes end of sentence space.
+ (check-end-of-sentence-space description)
+ (and=> (check-texinfo-markup description)
+ check-proper-start))))
(define (check-inputs-should-be-native package)
;; Emit a warning if some inputs of PACKAGE are likely to belong to its
diff --git a/guix/scripts/offload.scm b/guix/scripts/offload.scm
index c0df03b98f..d594be18e5 100644
--- a/guix/scripts/offload.scm
+++ b/guix/scripts/offload.scm
@@ -474,14 +474,19 @@ success, #f otherwise."
;; Compute the subset of FILES missing on MACHINE, and send them in
;; topologically sorted order so that they can actually be imported.
+ ;;
+ ;; To reduce load on the machine that's offloading (since it's typically
+ ;; already quite busy, see hydra.gnu.org), compress with gzip rather
+ ;; than xz: For a compression ratio 2 times larger, it is 20 times
+ ;; faster.
(let* ((files (missing-files (topologically-sorted store files)))
(pipe (remote-pipe machine OPEN_WRITE
- '("xz" "-dc" "|"
+ '("gzip" "-dc" "|"
"guix" "archive" "--import")
#:quote? #f)))
(format #t (_ "sending ~a store files to '~a'...~%")
(length files) (build-machine-name machine))
- (call-with-compressed-output-port 'xz pipe
+ (call-with-compressed-output-port 'gzip pipe
(lambda (compressed)
(catch 'system-error
(lambda ()
@@ -489,7 +494,8 @@ success, #f otherwise."
(lambda args
(warning (_ "failed while exporting files to '~a': ~a~%")
(build-machine-name machine)
- (strerror (system-error-errno args)))))))
+ (strerror (system-error-errno args))))))
+ #:options '("--fast"))
;; Wait for the 'lsh' process to complete.
(zero? (close-pipe pipe))))))
diff --git a/guix/ui.scm b/guix/ui.scm
index 67dd062a34..fb8121c213 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -75,6 +75,7 @@
switch-symlinks
config-directory
fill-paragraph
+ texi->plain-text
package-description-string
string->recutils
package->recutils
diff --git a/guix/utils.scm b/guix/utils.scm
index 4bfd88fbb3..b6df5d9cc9 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -284,22 +284,27 @@ data is lost."
(close-port in)
(values out (list child)))))))
-(define (compressed-output-port compression output)
+(define* (compressed-output-port compression output
+ #:key (options '()))
"Return an output port whose input is compressed according to COMPRESSION,
a symbol such as 'xz, and then written to OUTPUT. In addition return a list
-of PIDs to wait for."
+of PIDs to wait for. OPTIONS is a list of strings passed to the compression
+program--e.g., '(\"--fast\")."
(match compression
((or #f 'none) (values output '()))
- ('bzip2 (filtered-output-port `(,%bzip2 "-c") output))
- ('xz (filtered-output-port `(,%xz "-c") output))
- ('gzip (filtered-output-port `(,%gzip "-c") output))
+ ('bzip2 (filtered-output-port `(,%bzip2 "-c" ,@options) output))
+ ('xz (filtered-output-port `(,%xz "-c" ,@options) output))
+ ('gzip (filtered-output-port `(,%gzip "-c" ,@options) output))
(else (error "unsupported compression scheme" compression))))
-(define (call-with-compressed-output-port compression port proc)
+(define* (call-with-compressed-output-port compression port proc
+ #:key (options '()))
"Call PROC with a wrapper around PORT, a file port, that compresses data
-that goes to PORT according to COMPRESSION, a symbol such as 'xz."
+that goes to PORT according to COMPRESSION, a symbol such as 'xz. OPTIONS is
+a list of command-line arguments passed to the compression program."
(let-values (((compressed pids)
- (compressed-output-port compression port)))
+ (compressed-output-port compression port
+ #:options options)))
(dynamic-wind
(const #f)
(lambda ()