diff options
32 files changed, 1216 insertions, 409 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index 26ce266e4b..6847b6190f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -743,7 +743,8 @@ dist_patch_DATA = \ %D%/packages/patches/libsndfile-CVE-2017-8361-8363-8365.patch \ %D%/packages/patches/libsndfile-CVE-2017-8362.patch \ %D%/packages/patches/libssh2-fix-build-failure-with-gcrypt.patch \ - %D%/packages/patches/libtar-CVE-2013-4420.patch \ + %D%/packages/patches/libtar-CVE-2013-4420.patch \ + %D%/packages/patches/libtasn1-CVE-2017-6891.patch \ %D%/packages/patches/libtheora-config-guess.patch \ %D%/packages/patches/libtiff-CVE-2016-10092.patch \ %D%/packages/patches/libtiff-CVE-2016-10093.patch \ diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index aa6ccc0a73..e80dc5867d 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -57,6 +57,7 @@ #:use-module (gnu packages perl) #:use-module (gnu packages tcl) #:use-module (gnu packages compression) + #:use-module (gnu packages cross-base) #:use-module (gnu packages tls) #:use-module (gnu packages gnupg) #:use-module (gnu packages bison) @@ -1904,20 +1905,48 @@ Kerberos and Heimdal and FAST is supported with recent MIT Kerberos.") '(delete-file-recursively "bin")) (file-name (string-append name "-" version ".tar.gz")))) (native-inputs - `(("pkg-config" ,pkg-config))) + `(("pkg-config" ,pkg-config) + ("cross-gcc" ,(cross-gcc "arm-linux-gnueabihf" + #:xbinutils (cross-binutils "arm-linux-gnueabihf") + #:libc (cross-libc "arm-linux-gnueabihf"))) + ("cross-libc" ,(cross-libc "arm-linux-gnueabihf")))) (inputs `(("libusb" ,libusb))) (build-system gnu-build-system) (arguments - `(#:tests? #f ; no tests exist + `(#:tests? #f ; no tests exist #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")) - "CROSS_COMPILE=" - "CC=gcc" - "all") + (string-append "CROSS_COMPILE=" + "arm-linux-gnueabihf-") + "CC=gcc") #:phases (modify-phases %standard-phases (delete 'configure) + (add-before 'build 'set-environment-up + (lambda* (#:key make-flags #:allow-other-keys) + (define (cross? x) + (string-contains x "cross-arm-linux")) + (setenv "CROSS_C_INCLUDE_PATH" (getenv "C_INCLUDE_PATH")) + (setenv "CROSS_CPLUS_INCLUDE_PATH" (getenv "CPLUS_INCLUDE_PATH")) + (setenv "CROSS_LIBRARY_PATH" (getenv "LIBRARY_PATH")) + (for-each + (lambda (env-name) + (let* ((env-value (getenv env-name)) + (search-path (search-path-as-string->list env-value)) + (new-search-path (filter (lambda (e) (not (cross? e))) + search-path)) + (new-env-value (list->search-path-as-string + new-search-path ":"))) + (setenv env-name new-env-value))) + '("C_INCLUDE_PATH" "CPLUS_INCLUDE_PATH" "LIBRARY_PATH")) + #t)) + (replace 'build + (lambda* (#:key make-flags #:allow-other-keys) + (zero? (apply system* "make" "tools" "misc" make-flags)))) + (add-after 'build 'build-armhf + (lambda* (#:key make-flags #:allow-other-keys) + (zero? (apply system* "make" "target-tools" make-flags)))) (replace 'install (lambda* (#:key make-flags #:allow-other-keys) (zero? (apply system* "make" "install-all" "install-misc" diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm index 497f20538d..dc668ce131 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm @@ -2054,11 +2054,14 @@ the Turtle syntax.") (base32 "1kji3lhha26qr6xm9j8ic5c40zbrrb5qnwm2qxzmsfxgmrz29wkf")))) (build-system waf-build-system) - (arguments `(#:tests? #f)) ; no check target + (arguments + `(#:tests? #f ; no check target + #:configure-flags + '("CXXFLAGS=-std=gnu++11"))) (inputs `(("lv2" ,lv2) ("gtk+-2" ,gtk+-2) - ("qt-4" ,qt-4))) + ("qt" ,qtbase))) (native-inputs `(("pkg-config" ,pkg-config))) (home-page "http://drobilla.net/software/suil/") diff --git a/gnu/packages/avr.scm b/gnu/packages/avr.scm index fd18ff6a9a..916f7983fa 100644 --- a/gnu/packages/avr.scm +++ b/gnu/packages/avr.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014, 2016 Manolis Fragkiskos Ragkousis <manolis837@gmail.com> -;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net> +;;; Copyright © 2015, 2017 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2016 David Thompson <davet@gnu.org> ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> ;;; @@ -39,7 +39,7 @@ (name "avr-binutils"))) (define-public avr-gcc-4.9 - (let ((xgcc (cross-gcc "avr" avr-binutils))) + (let ((xgcc (cross-gcc "avr" #:xgcc gcc-4.9 #:xbinutils avr-binutils))) (package (inherit xgcc) (name "avr-gcc") diff --git a/gnu/packages/connman.scm b/gnu/packages/connman.scm index b3d62d6f6f..08e725118d 100644 --- a/gnu/packages/connman.scm +++ b/gnu/packages/connman.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com> ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org> +;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net> ;;; ;;; This file is part of GNU Guix. ;;; @@ -145,9 +146,9 @@ sharing) to clients via USB, ethernet, WiFi, cellular and Bluetooth.") (sha256 (base32 "16g9byxr1rkmrnzi6sjplpmkr8h6pqj7418jz30czqviw5qlkqwl")))) (inputs - `(("qt" ,qt))) + `(("qtbase" ,qtbase))) (native-inputs - `(("qmake" ,qt))) + `(("qttools" ,qttools))) (build-system gnu-build-system) (arguments '(#:phases diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index 47e0958193..d5ca9b8da0 100644 --- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm @@ -100,9 +100,9 @@ binutils) target))) -(define (cross-gcc-arguments target libc) - "Return build system arguments for a cross-gcc for TARGET, using LIBC (which -may be either a libc package or #f.)" +(define (cross-gcc-arguments target xgcc libc) + "Return build system arguments for a cross-gcc for TARGET, using XGCC as the +base compiler and using LIBC (which may be either a libc package or #f.)" ;; Set the current target system so that 'glibc-dynamic-linker' returns the ;; right name. (parameterize ((%current-target-system target)) @@ -111,7 +111,7 @@ may be either a libc package or #f.)" ;; <http://lists.fedoraproject.org/pipermail/arm/2010-August/000663.html> ;; for instance. (let ((args `(#:strip-binaries? #f - ,@(package-arguments %xgcc)))) + ,@(package-arguments xgcc)))) (substitute-keyword-arguments args ((#:configure-flags flags) `(append (list ,(string-append "--target=" target) @@ -183,18 +183,22 @@ may be either a libc package or #f.)" (else #f))) (define* (cross-gcc target - #:optional (xbinutils (cross-binutils target)) libc) + #:key + (xgcc %xgcc) + (xbinutils (cross-binutils target)) + (libc #f)) "Return a cross-compiler for TARGET, where TARGET is a GNU triplet. Use -XBINUTILS as the associated cross-Binutils. If LIBC is false, then build a -GCC that does not target a libc; otherwise, target that libc." - (package (inherit %xgcc) +XGCC as the base compiler. Use XBINUTILS as the associated cross-Binutils. +If LIBC is false, then build a GCC that does not target a libc; otherwise, +target that libc." + (package (inherit xgcc) (name (string-append "gcc-cross-" (if libc "" "sans-libc-") target)) - (source (origin (inherit (package-source %xgcc)) + (source (origin (inherit (package-source xgcc)) (patches (append - (origin-patches (package-source %xgcc)) + (origin-patches (package-source xgcc)) (cons (search-patch "gcc-cross-environment-variables.patch") (cross-gcc-patches target)))) (modules '((guix build utils))) @@ -216,7 +220,7 @@ GCC that does not target a libc; otherwise, target that libc." (srfi srfi-26) (ice-9 regex)) - ,@(cross-gcc-arguments target libc))) + ,@(cross-gcc-arguments target xgcc libc))) (native-inputs `(("ld-wrapper-cross" ,(make-ld-wrapper @@ -230,7 +234,7 @@ GCC that does not target a libc; otherwise, target that libc." ("libc-native" ,@(assoc-ref (%final-inputs) "libc")) ;; Remaining inputs. - ,@(let ((inputs (append (package-inputs %xgcc) + ,@(let ((inputs (append (package-inputs xgcc) (alist-delete "libc" (%final-inputs))))) (cond ((target-mingw? target) @@ -490,8 +494,8 @@ XBINUTILS and the cross tool chain." ;; (define-public xgcc-armhf ;; (let ((triplet "arm-linux-gnueabihf")) ;; (cross-gcc triplet -;; (cross-binutils triplet) -;; (cross-libc triplet)))) +;; #:xbinutils (cross-binutils triplet) +;; #:libc (cross-libc triplet)))) ;; ;;; We don't do that here because we'd be referring to bindings from (gnu ;;; packages gcc) from the top level, which doesn't play well with circular diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm index 856308afe8..2e55aa04af 100644 --- a/gnu/packages/crypto.scm +++ b/gnu/packages/crypto.scm @@ -51,7 +51,8 @@ #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix build-system cmake) - #:use-module (guix build-system gnu)) + #:use-module (guix build-system gnu) + #:use-module (guix build-system python)) (define-public libsodium (package @@ -414,3 +415,26 @@ utility as a demonstration of the @code{scrypt} key derivation function. @code{Scrypt} is designed to be far more resistant against hardware brute-force attacks than alternative functions such as @code{PBKDF2} or @code{bcrypt}.") (license license:bsd-2))) + +(define-public python-asn1crypto + (package + (name "python-asn1crypto") + (version "0.22.0") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/wbond/asn1crypto/archive/" + version ".tar.gz")) + (sha256 + (base32 + "1kn910896l3knmilla1c9ly20q181s43w1ah08lzkbm1h3j6pcz0")))) + (build-system python-build-system) + (home-page "https://github.com/wbond/asn1crypto") + (synopsis "ASN.1 parser and serializer in Python") + (description "asn1crypto is an ASN.1 parser and serializer with definitions +for private keys, public keys, certificates, CRL, OCSP, CMS, PKCS#3, PKCS#7, +PKCS#8, PKCS#12, PKCS#5, X.509 and TSP.") + (license license:expat))) + +(define-public python2-asn1crypto + (package-with-python2 python-asn1crypto)) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index a59a4ca698..a85177d814 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -25,6 +25,7 @@ ;;; Copyright © 2017 Kei Kebreau <kei@openmailbox.org> ;;; Copyright © 2017 George Clemmer <myglc2@gmail.com> ;;; Copyright © 2017 Feng Shu <tumashu@163.com> +;;; Copyright © 2017 Jan Nieuwenhuizen <janneke@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -3248,6 +3249,25 @@ identifiers based on their names. Each identifier gets a color based on a hash of its name.") (license license:bsd-2))) +(define-public emacs-rainbow-mode + (package + (name "emacs-rainbow-mode") + (version "0.12") + (source (origin + (method url-fetch) + (uri (string-append + "http://elpa.gnu.org/packages/rainbow-mode-" version ".el")) + (sha256 + (base32 + "10a7qs7fvw4qi4vxj9n56j26gjk61bl79dgz4md1d26slb2j1c04")))) + (build-system emacs-build-system) + (home-page "http://elpa.gnu.org/packages/rainbow-mode.html") + (synopsis "Colorize color names in buffers") + (description + "This minor mode sets background color to strings that match color +names, e.g. #0000ff is displayed in white with a blue background.") + (license license:gpl3+))) + (define-public emacs-visual-fill-column (package (name "emacs-visual-fill-column") @@ -4525,7 +4545,7 @@ It should enable you to implement low-level X11 applications.") (define-public emacs-exwm (package (name "emacs-exwm") - (version "0.13") + (version "0.14") (synopsis "Emacs X window manager") (source (origin (method url-fetch) @@ -4533,7 +4553,7 @@ It should enable you to implement low-level X11 applications.") version ".tar")) (sha256 (base32 - "0n1wzy6chh024r0yaywjbf7mdsrxs6hrfycv5v0ps0drf6q3zldc")))) + "14hjjpbasm84p54fxy73fg7g1fdwqkvisdw8dwwgzkflmd647mkx")))) (build-system emacs-build-system) (propagated-inputs `(("emacs-xelb" ,emacs-xelb))) @@ -4567,12 +4587,9 @@ It should enable you to implement low-level X11 applications.") TryExec=~@*~a~@ Type=Application~%" ,name ,synopsis exwm-executable))) ;; Add a shell wrapper to bin - ;; Set DISPLAY variable to work around - ;; https://github.com/ch11ng/exwm/issues/213 (with-output-to-file exwm-executable (lambda _ (format #t "#!~a ~@ - export DISPLAY=:0 ~@ ~a +SI:localuser:$USER ~@ exec ~a --exit-with-session ~a \"$@\" --eval '~s' ~%" (string-append (assoc-ref inputs "bash") "/bin/sh") @@ -4586,7 +4603,8 @@ It should enable you to implement low-level X11 applications.") (require 'exwm) (require 'exwm-config) (exwm-config-default) - (message "exwm configuration not found. Falling back to default configuration...")))))) + (message (concat "exwm configuration not found. " + "Falling back to default configuration..."))))))) (chmod exwm-executable #o555) #t)))))) (home-page "https://github.com/ch11ng/exwm") @@ -4836,3 +4854,26 @@ Emacs.") using ERT. It assumes a certain test structure setup and can therefore make running tests easier.") (license license:gpl3+)))) + +(define-public emacs-disable-mouse + (package + (name "emacs-disable-mouse") + (version "0.2") + (source + (origin + (method url-fetch) + (uri (string-append + "https://github.com/purcell/disable-mouse/archive/" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0haqpq23r1wx04lsqrrg3p5visg9hx5i36dg55ab003wfsrlrzbc")))) + (build-system emacs-build-system) + (home-page "https://github.com/purcell/disable-mouse") + (synopsis "Disable mouse commands globally") + (description + "Provides @code{disable-mouse-mode} and @code{global-disable-mouse-mode}, +pair of minor modes which suppress all mouse events by intercepting them and +running a customisable handler command (@code{ignore} by default). ") + (license license:gpl3+))) diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm index b919bdf6c4..70541540e5 100644 --- a/gnu/packages/embedded.scm +++ b/gnu/packages/embedded.scm @@ -52,7 +52,8 @@ ;; See https://launchpadlibrarian.net/218827644/release.txt (define-public gcc-arm-none-eabi-4.9 (let ((xgcc (cross-gcc "arm-none-eabi" - (cross-binutils "arm-none-eabi"))) + #:xgcc gcc-4.9 + #:xbinutils (cross-binutils "arm-none-eabi"))) (revision "1") (svn-revision 227977)) (package (inherit xgcc) @@ -196,6 +197,30 @@ usable on embedded products.") "--disable-nls")))) (synopsis "Newlib variant for small systems with limited memory"))) +(define (make-libstdc++-arm-none-eabi xgcc newlib) + (let ((libstdc++ (make-libstdc++ xgcc))) + (package (inherit libstdc++) + (name "libstdc++-arm-none-eabi") + (arguments + (substitute-keyword-arguments (package-arguments libstdc++) + ((#:configure-flags flags) + ``("--target=arm-none-eabi" + "--host=arm-none-eabi" + "--disable-libstdcxx-pch" + "--enable-multilib" + "--with-multilib-list=armv6-m,armv7-m,armv7e-m" + "--disable-shared" + "--disable-tls" + "--disable-plugin" + "--with-newlib" + ,(string-append "--with-gxx-include-dir=" + (assoc-ref %outputs "out") + "/arm-none-eabi/include"))))) + (native-inputs + `(("newlib" ,newlib) + ("xgcc" ,xgcc) + ,@(package-native-inputs libstdc++)))))) + (define (arm-none-eabi-toolchain xgcc newlib) "Produce a cross-compiler toolchain package with the compiler XGCC and the C library variant NEWLIB." @@ -212,9 +237,19 @@ library variant NEWLIB." (version (package-version xgcc)) (source #f) (build-system trivial-build-system) - (arguments '(#:builder (mkdir %output))) + (arguments + '(#:modules ((guix build union)) + #:builder + (begin + (use-modules (ice-9 match) + (guix build union)) + (match %build-inputs + (((names . directories) ...) + (union-build (assoc-ref %outputs "out") + directories)))))) (propagated-inputs `(("binutils" ,(cross-binutils "arm-none-eabi")) + ("libstdc++" ,(make-libstdc++-arm-none-eabi xgcc newlib-with-xgcc)) ("gcc" ,xgcc) ("newlib" ,newlib-with-xgcc))) (synopsis "Complete GCC tool chain for ARM bare metal development") @@ -419,7 +454,7 @@ with a layered architecture of JTAG interface and TAP support.") (define-public propeller-gcc (let ((xgcc (cross-gcc "propeller-elf" - propeller-binutils)) + #:xbinutils propeller-binutils)) (commit "b4f45a4725e0b6d0af59e594c4e3e35ca4105867") (revision "1")) (package (inherit xgcc) @@ -776,7 +811,7 @@ the Raspberry Pi chip.") (define-public gcc-vc4 (let ((commit "165f6d0e11d2e76ee799533bb45bd5c92bf60dc2") - (xgcc (cross-gcc "vc4-elf" binutils-vc4))) + (xgcc (cross-gcc "vc4-elf" #:xbinutils binutils-vc4))) (package (inherit xgcc) (name "gcc-vc4") (source (origin diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm index da3a850fed..b7bcdee94c 100644 --- a/gnu/packages/game-development.scm +++ b/gnu/packages/game-development.scm @@ -262,13 +262,22 @@ levels.") (base32 "1kcj2blrlfpghjv0qigip2qcbxfx7vv9i8nr4997hkwhsh6i2pjp")))) (build-system gnu-build-system) - (inputs `(("qt" ,qt) - ("zlib" ,zlib))) + (inputs + `(("qtbase" ,qtbase) + ("qtsvg" ,qtsvg) + ("zlib" ,zlib))) + (native-inputs + `(("qttools" ,qttools))) (arguments '(#:phases (modify-phases %standard-phases (replace 'configure - (lambda* (#:key outputs #:allow-other-keys) + (lambda* (#:key inputs outputs #:allow-other-keys) + (substitute* "translations/translations.pro" + (("LRELEASE =.*") + (string-append "LRELEASE = " + (assoc-ref inputs "qttools") + "/bin/lrelease\n"))) (let ((out (assoc-ref outputs "out"))) (system* "qmake" (string-append "PREFIX=" out)))))))) diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 4c297005dc..60d885500c 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -2784,6 +2784,12 @@ fullscreen, use F5 or Alt+Enter.") (lambda _ (substitute* "icons/Makefile.in" (("\\$\\(INSTALL_DATA\\) \\$\\(srcdir\\)/warzone2100.appdata.xml.*") "")) + #t)) + (add-after 'unpack 'patch-for-qt5.8 + (lambda _ + (substitute* "lib/widget/editbox.cpp" + (("== '\\\\0'") + "== QChar('\\0')")) #t))))) (native-inputs `(("pkg-config" ,pkg-config) ("unzip" ,unzip) @@ -2797,7 +2803,8 @@ fullscreen, use F5 or Alt+Enter.") ("libxrandr" ,libxrandr) ("openal" ,openal) ("physfs" ,physfs) - ("qt" ,qt) + ("qtbase" ,qtbase) + ("qtscript" ,qtscript) ("openssl" ,openssl) ("quesoglc" ,quesoglc) ("sdl2" ,sdl2))) diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index a502f246ff..cc1497cb8d 100644 --- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2015, 2016 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2015 Tomáš Čech <sleep_walker@gnu.org> ;;; Copyright © 2016 Leo Famulari <leo@famulari.name> -;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net> +;;; Copyright © 2016, 2017 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2016 Andreas Enge <andreas@enge.fr> ;;; @@ -23,7 +23,7 @@ (define-module (gnu packages graphics) #:use-module (guix download) - #:use-module (guix svn-download) + #:use-module (guix git-download) #:use-module (guix packages) #:use-module (guix build-system gnu) #:use-module (guix build-system cmake) @@ -423,66 +423,66 @@ output.") (license (license:non-copyleft "file://LICENSE")))) (define-public brdf-explorer - (package - (name "brdf-explorer") - (version "17") ;svn revision - (source (origin - ;; There are no release tarballs, and not even tags in the repo, - ;; so use the latest revision. - (method svn-fetch) - (uri (svn-reference - (url "https://github.com/wdas/brdf") - (revision (string->number version)))) - (sha256 - (base32 - "1458fwsqxramh0gpnp24x7brfpl9afhvr1wqg6c78xqwf32960m5")) - (file-name (string-append name "-" version "-checkout")))) - (build-system gnu-build-system) - (arguments - `(#:phases (modify-phases %standard-phases - (replace 'configure - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (chdir "trunk") - (zero? (system* "qmake" - (string-append - "prefix=" out)))))) - (add-after 'install 'wrap-program - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (bin (string-append out "/bin")) - (data (string-append - out "/share/brdf"))) - (with-directory-excursion bin - (rename-file "brdf" ".brdf-real") - (call-with-output-file "brdf" - (lambda (port) - (format port "#!/bin/sh + ;; There are no release tarballs, and not even tags in the repo, + ;; so use the latest revision. + (let ((commit "5b2cd46f38a06e47207fa7229b72d37beb945019") + (revision "1")) + (package + (name "brdf-explorer") + (version (string-append "1.0.0-" revision "." (string-take commit 9))) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/wdas/brdf.git") + (commit commit))) + (sha256 + (base32 + "06vzbiajzbi2xl8jlff5d45bc9wd68i3jdndfab1f3jgfrd8bsgx")) + (file-name (string-append name "-" version "-checkout")))) + (build-system gnu-build-system) + (arguments + `(#:phases (modify-phases %standard-phases + (replace 'configure + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (zero? (system* "qmake" + (string-append "prefix=" out)))))) + (add-after 'install 'wrap-program + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (data (string-append + out "/share/brdf"))) + (with-directory-excursion bin + (rename-file "brdf" ".brdf-real") + (call-with-output-file "brdf" + (lambda (port) + (format port "#!/bin/sh # Run the thing from its home, otherwise it just bails out. cd \"~a\" exec -a \"$0\" ~a/.brdf-real~%" - data bin))) - (chmod "brdf" #o555)))))))) - (native-inputs - `(("qt" ,qt-4))) ;for 'qmake' - (inputs - `(("qt" ,qt-4) - ("mesa" ,mesa) - ("glew" ,glew) - ("freeglut" ,freeglut) - ("zlib" ,zlib))) - (home-page "http://www.disneyanimation.com/technology/brdf.html") - (synopsis - "Analyze bidirectional reflectance distribution functions (BRDFs)") - (description - "BRDF Explorer is an application that allows the development and analysis + data bin))) + (chmod "brdf" #o555)))))))) + (native-inputs + `(("qttools" ,qttools))) ;for 'qmake' + (inputs + `(("qtbase" ,qtbase) + ("mesa" ,mesa) + ("glew" ,glew) + ("freeglut" ,freeglut) + ("zlib" ,zlib))) + (home-page "http://www.disneyanimation.com/technology/brdf.html") + (synopsis + "Analyze bidirectional reflectance distribution functions (BRDFs)") + (description + "BRDF Explorer is an application that allows the development and analysis of bidirectional reflectance distribution functions (BRDFs). It can load and plot analytic BRDF functions (coded as functions in OpenGL's GLSL shader language), measured material data from the MERL database, and anisotropic measured material data from MIT CSAIL. Graphs and visualizations update in real time as parameters are changed, making it a useful tool for evaluating and understanding different BRDFs (and other component functions).") - (license license:ms-pl))) + (license license:ms-pl)))) (define-public agg (package diff --git a/gnu/packages/kodi.scm b/gnu/packages/kodi.scm index 260ca947bd..cdab7eca03 100644 --- a/gnu/packages/kodi.scm +++ b/gnu/packages/kodi.scm @@ -239,8 +239,8 @@ generator library for C++.") (define-public kodi ;; We package the git version because the current released ;; version was cut while the cmake transition was in turmoil. - (let ((commit "b8ad238aa8010063eaf7d608d139002a50075e8d") - (revision "4")) + (let ((commit "1a38948ad068870671042bff2d8ac615dca9e5d8") + (revision "5")) (package (name "kodi") (version (string-append "18.0_alpha-" revision "-" (string-take commit 7))) @@ -252,7 +252,7 @@ generator library for C++.") (file-name (string-append name "-" version "-checkout")) (sha256 (base32 - "192agb8lpbajljbnnpn7y1pk2c6bvqbcpqhlgq4pja4pdf664xzg")) + "1apkiicmxb6ncqhznflb8wc4n770jx89asw1drmch7lq7j9m6sns")) (snippet '(begin (use-modules (guix build utils)) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 9db748ebee..11deb2fd79 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -18,11 +18,12 @@ ;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2016 Rene Saavedra <rennes@openmailbox.org> ;;; Copyright © 2016 Carlos Sánchez de La Lama <csanchezdll@gmail.com> -;;; Copyright © 2016 ng0 <ng0@libertad.pw> +;;; Copyright © 2016, 2017 ng0 <ng0@no-reply.pragmatique.xyz> ;;; Copyright © 2017 Leo Famulari <leo@famulari.name> ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.com> ;;; Copyright © 2017 Gábor Boskovits <boskovits@gmail.com> ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com> +;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -354,8 +355,8 @@ It has been modified to remove all non-free binary blobs.") (define %intel-compatible-systems '("x86_64-linux" "i686-linux")) -(define %linux-libre-version "4.11.2") -(define %linux-libre-hash "0vp6hjc7cb6q6bhbg6jcf08r27xbf293cdib2vfng15ygvxpyfij") +(define %linux-libre-version "4.11.3") +(define %linux-libre-hash "14fbn9s7n86p5yivr4vmh4axdavny6xw1qk63cfwlcma7426wmva") (define-public linux-libre (make-linux-libre %linux-libre-version @@ -364,14 +365,14 @@ It has been modified to remove all non-free binary blobs.") #:configuration-file kernel-config)) (define-public linux-libre-4.9 - (make-linux-libre "4.9.29" - "0yj4gajdzilxnh9lhb2zl0hs654lagdfx8cp7bv2w4q41bnmc3l9" + (make-linux-libre "4.9.30" + "1m1ii9n65lwkbwx0ifj13vgdfr0mnx8n7sfvhf5mn4r8krhxi77a" %intel-compatible-systems #:configuration-file kernel-config)) (define-public linux-libre-4.4 - (make-linux-libre "4.4.69" - "14q5lqsfmwyiilbhffr3bwsm6i3z1jv6y09rg8x3faibcg766wny" + (make-linux-libre "4.4.70" + "1dvcj3mk42m91y1x41yh52frjdcwip1wj57qwlkmrpg02icr0b3s" %intel-compatible-systems #:configuration-file kernel-config)) @@ -824,14 +825,14 @@ images more compressible.") (define-public strace (package (name "strace") - (version "4.16") + (version "4.17") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/strace/strace/" version "/strace-" version ".tar.xz")) (sha256 (base32 - "1vzhmpcy989i4k12q4cc438yal2ghhm6x7ychscjbhcf2yspqj4q")))) + "06bl4dld5fk4a3iiq4pyrkm6sh63599ah8dmds0glg5vbw45pww1")))) (build-system gnu-build-system) (arguments '(#:phases @@ -1641,6 +1642,38 @@ system.") (license (list license:gpl2 ;programs license:lgpl2.1)))) ;library +(define-public kbd-neo + (package + (name "kbd-neo") + (version "2486") + (source + (origin + (method url-fetch) + (uri (string-append "https://svn.neo-layout.org/!svn/bc/" + version "/linux/console/neo.map")) + (file-name (string-append name "-" version ".map")) + (sha256 + (base32 + "19mfrd31vzpsjiwc7pshxm0b0sz5dd17xrz6k079cy4im1vf0r4g")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (use-modules (guix build utils)) + (let ((out (string-append %output "/share/keymaps")) + (source (assoc-ref %build-inputs "source"))) + (mkdir-p out) + (copy-file source (string-append out "/neo.map")) + #t)))) + (home-page "https://neo-layout.org") + (synopsis "Neo2 console layout") + (description + "Kbd-neo provides the Neo2 keyboard layout for use with +@command{loadkeys(1)} from @code{kbd(4)}.") + ;; The file is located in an svn directory, the entire content of + ;; the directory is licensed as GPL3. + (license license:gpl3+))) + (define-public kbd (package (name "kbd") @@ -1689,6 +1722,10 @@ system.") ("gzip" ,gzip) ("bzip2" ,bzip2) ("pam" ,linux-pam))) + (native-search-paths + (list (search-path-specification + (variable "LOADKEYS_KEYMAP_PATH") + (files (list "share/keymaps"))))) (native-inputs `(("pkg-config" ,pkg-config))) (home-page "http://kbd-project.org/") (synopsis "Linux keyboard utilities and keyboard maps") @@ -3325,14 +3362,14 @@ the default @code{nsswitch} and the experimental @code{umich_ldap}.") (define-public mcelog (package (name "mcelog") - (version "150") + (version "151") (source (origin (method url-fetch) (uri (string-append "https://git.kernel.org/cgit/utils/cpu/mce/" "mcelog.git/snapshot/v" version ".tar.gz")) (sha256 (base32 - "1skfiracl3a1afmml8mvnccr4rym4ibv33c342rkyxn0j3088h24")) + "1cgfdlz51hv2zbph00ylzm8z94gv8wakx7dva1pa4jcl3hnq0dh5")) (file-name (string-append name "-" version ".tar.gz")) (modules '((guix build utils))) (snippet @@ -3912,3 +3949,39 @@ available in the kernel Linux.") #t)))))) ((#:allowed-references _ '("out")) '("out")))))) + +(define-public cpuid + (package + (name "cpuid") + (version "20170122") + (source (origin + (method url-fetch) + (uri (string-append "http://www.etallen.com/cpuid/cpuid-" + version ".src.tar.gz")) + (sha256 + (base32 + "0ra8ph9m1dckqaikfnbsh408fp2w9k49fkl423fl2hvhwsm14xk6")))) + (build-system gnu-build-system) + (arguments + '(#:make-flags '("CC=gcc") + #:tests? #f ; no tests + #:phases (modify-phases %standard-phases + (delete 'configure) + (add-before 'install 'fix-makefile + (lambda* (#:key outputs #:allow-other-keys) + (substitute* "Makefile" + (("\\$\\(BUILDROOT\\)/usr") (assoc-ref outputs "out"))) + ;; Make the compressed manpages writable so that the + ;; reset-gzip-timestamps phase does not error out. + (substitute* "Makefile" + (("-m 444") "-m 644")) + #t))))) + (inputs `(("perl" ,perl))) + (supported-systems '("i686-linux" "x86_64-linux")) + (home-page "http://www.etallen.com/cpuid.html") + (synopsis "Linux tool to dump x86 CPUID information about the CPU(s)") + (description "cpuid dumps detailed information about the CPU(s) gathered +from the CPUID instruction, and also determines the exact model of CPU(s). It +supports Intel, AMD, and VIA CPUs, as well as older Transmeta, Cyrix, UMC, +NexGen, Rise, and SiS CPUs.") + (license license:gpl2+))) diff --git a/gnu/packages/logging.scm b/gnu/packages/logging.scm index b2b0582aee..eecfe45581 100644 --- a/gnu/packages/logging.scm +++ b/gnu/packages/logging.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2016, 2017 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2017 Stefan Reichör <stefan@xsteve.at> ;;; ;;; This file is part of GNU Guix. ;;; @@ -26,6 +27,7 @@ #:use-module (guix build-system gnu) #:use-module (guix build-system python) #:use-module (gnu packages) + #:use-module (gnu packages ncurses) #:use-module (gnu packages perl) #:use-module (gnu packages python) #:use-module (gnu packages autotools)) @@ -129,3 +131,41 @@ command line.") "Tailon provides a web interface around the tail, grep, awk and sed commands, displaying the results via a web interface.") (license license:bsd-3))) + +(define-public multitail + (package + (name "multitail") + (version "6.4.2") + (source + (origin + (method url-fetch) + (uri (string-append "https://vanheusden.com/multitail/multitail-" + version ".tgz")) + (sha256 + (base32 + "1zd1r89xkxngl1pdrvsc877838nwkfqkbcgfqm3vglwalxc587dg")))) + (build-system gnu-build-system) + (arguments + `(#:make-flags + (list "CC=gcc" + "PREFIX=" + (string-append "DESTDIR=" + (assoc-ref %outputs "out"))) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-curses-lib + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (substitute* "mt.h" + (("ncursesw\\/panel.h") "panel.h") + (("ncursesw\\/ncurses.h") "ncurses.h"))) + #t)) + (delete 'configure)) + #:tests? #f)) ; no test suite (make check just runs cppcheck) + (inputs `(("ncurses" ,ncurses))) + (home-page "https://vanheusden.com/multitail/") + (synopsis "Monitor multiple logfiles") + (description + "MultiTail allows you to monitor logfiles and command output in multiple +windows in a terminal, colorize, filter and merge.") + (license license:gpl2+))) diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm index 2c6d1f5dad..9efe338a19 100644 --- a/gnu/packages/make-bootstrap.scm +++ b/gnu/packages/make-bootstrap.scm @@ -99,8 +99,8 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." (if (%current-target-system) (let ((target (%current-target-system))) `(("cross-gcc" ,(cross-gcc target - (cross-binutils target) - (cross-bootstrap-libc))) + #:xbinutils (cross-binutils target) + #:libc (cross-bootstrap-libc))) ("cross-binutils" ,(cross-binutils target)) ,@(%final-inputs))) `(("libc" ,(glibc-for-bootstrap)) diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm index 89df0970d6..c22d3d4dc8 100644 --- a/gnu/packages/messaging.scm +++ b/gnu/packages/messaging.scm @@ -756,48 +756,43 @@ instant messenger with audio and video chat capabilities.") (define-public qtox (package (name "qtox") - (version "1.5.1") - (source - (origin - (method url-fetch) - (uri (string-append "https://github.com/qTox/qTox/archive/v" - version ".tar.gz")) - (sha256 - (base32 "0y15mc39x54k1kz36cw9412kl1p1p6nzlx97gagv4gg3vybfhbjv")) - (file-name (string-append name "-" version ".tar.gz")))) + (version "1.10.1") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/qTox/qTox/archive/v" + version ".tar.gz")) + (sha256 + (base32 + "0b37an611i2jdri59vsspyl3yf6cn4h0bn9d2jdrkw8d2rfqc8qy")) + (file-name (string-append name "-" version ".tar.gz")))) + (build-system cmake-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'fix-reproducibility-issues + (lambda _ + (substitute* "src/main.cpp" + (("__DATE__") "\"\"") + (("__TIME__") "\"\"") + (("TIMESTAMP") "\"\"")) + #t))))) (inputs `(("ffmpeg" ,ffmpeg) ("glib" ,glib) ("gtk+" ,gtk+-2) ("libsodium" ,libsodium) - ("libtoxcore" ,libtoxcore) + ("c-toxcore" ,c-toxcore) ("libvpx" ,libvpx) ("libxscrnsaver" ,libxscrnsaver) ("libx11" ,libx11) ("openal" ,openal) ("qrencode" ,qrencode) - ("qt" ,qt) + ("qtbase" ,qtbase) + ("qtsvg" ,qtsvg) ("sqlcipher" ,sqlcipher))) (native-inputs `(("pkg-config" ,pkg-config) - ("qmake" ,qt))) - (build-system gnu-build-system) - (arguments - '(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'fix-reproducibility-issues - (lambda _ - (substitute* "src/main.cpp" - (("__DATE__") "\"\"") - (("__TIME__") "\"\"") - (("TIMESTAMP") "\"\"")) - #t)) - (replace 'configure - (lambda* (#:key outputs #:allow-other-keys) - (zero? - (system* "qmake" - (string-append "PREFIX=" - (assoc-ref outputs "out"))))))))) + ("qmake" ,qttools))) (home-page "https://qtox.github.io/") (synopsis "Tox chat client using Qt") (description "qTox is a Tox client that follows the Tox design diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm index 5c0be39c27..186dc276be 100644 --- a/gnu/packages/music.scm +++ b/gnu/packages/music.scm @@ -1883,18 +1883,19 @@ computer's keyboard.") (define-public qtractor (package (name "qtractor") - (version "0.8.1") + (version "0.8.2") (source (origin (method url-fetch) (uri (string-append "http://downloads.sourceforge.net/qtractor/" "qtractor-" version ".tar.gz")) (sha256 (base32 - "1pvs9r5ykfaci900p0kz2xc5xsrswnwwbcl2chsvd98f1ns4vwds")))) + "0sp7r9n926ggdn285l4xzvw558jz1440n7kn2f1qs6w6h6l0f1q3")))) (build-system gnu-build-system) (arguments `(#:tests? #f)) ; no "check" target (inputs - `(("qt" ,qt) + `(("qt" ,qtbase) + ("qtx11extras" ,qtx11extras) ("alsa-lib" ,alsa-lib) ("jack" ,jack-1) ("libsndfile" ,libsndfile) @@ -1909,7 +1910,8 @@ computer's keyboard.") ("liblo" ,liblo) ("zlib" ,zlib))) (native-inputs - `(("pkg-config" ,pkg-config))) + `(("pkg-config" ,pkg-config) + ("qttools" ,qttools))) (home-page "http://qtractor.org/") (synopsis "Audio/MIDI multi-track sequencer") (description diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index b9f1d53cf6..863e367a5b 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -2650,3 +2650,260 @@ match expressions, and if expressions.") (synopsis "Generation of runtime types from type declarations") (description "Automatic generation of runtime types from type definitions.") (license license:asl2.0))) + +(define-public ocaml-ppx-sexp-value + (package + (name "ocaml-ppx-sexp-value") + (version "113.33.03") + (source (janestreet-origin "ppx_sexp_value" version + "0m3ag23mbqm0i2pv1dzilfks15ipa5q60mf57a0cd3p0pvarq10g")) + (build-system ocaml-build-system) + (native-inputs + `(("js-build-tools" ,ocaml-js-build-tools) + ("opam" ,opam))) + (propagated-inputs + `(("ppx-driver" ,ocaml-ppx-driver) + ("ppx-here" ,ocaml-ppx-here) + ("ppx-sexp-conv" ,ocaml-ppx-sexp-conv) + ("ppx-tools" ,ocaml-ppx-tools) + ("ppx-core" ,ocaml-ppx-core))) + (arguments janestreet-arguments) + (home-page "https://github.com/janestreet/ppx_sexp_value/") + (synopsis "Simplify building s-expressions from ocaml values") + (description "A ppx rewriter that simplifies building s-expressions from +ocaml values.") + (license license:asl2.0))) + +(define-public ocaml-ppx-pipebang + (package + (name "ocaml-ppx-pipebang") + (version "113.33.03") + (source (janestreet-origin "ppx_pipebang" version + "1965c7hymp26ncmjs0pfxi2s5jlj60z2c9b194lgcwxqiav56pcw")) + (build-system ocaml-build-system) + (native-inputs + `(("js-build-tools" ,ocaml-js-build-tools) + ("opam" ,opam))) + (propagated-inputs + `(("ppx-driver" ,ocaml-ppx-driver) + ("ppx-tools" ,ocaml-ppx-tools) + ("ppx-core" ,ocaml-ppx-core))) + (arguments janestreet-arguments) + (home-page "https://github.com/janestreet/ppx_pipebang/") + (synopsis "Inline reverse application operators `|>` and `|!`") + (description "A ppx rewriter that inlines reverse application operators +@code{|>} and @code{|!}.") + (license license:asl2.0))) + +(define-public ocaml-ppx-bin-prot + (package + (name "ocaml-ppx-bin-prot") + (version "113.33.03") + (source (janestreet-origin "ppx_bin_prot" version + "173kjv36giik11zgfvsbzwfbpr66dm2pcha9vf990jgzh8hqz39h")) + (build-system ocaml-build-system) + (native-inputs + `(("js-build-tools" ,ocaml-js-build-tools) + ("opam" ,opam))) + (propagated-inputs + `(("bin-prot" ,ocaml-bin-prot) + ("ppx-tools" ,ocaml-ppx-tools) + ("ppx-type-conv" ,ocaml-ppx-type-conv) + ("ppx-core" ,ocaml-ppx-core))) + (arguments janestreet-arguments) + (home-page "https://github.com/janestreet/ppx_bin_prot/") + (synopsis "Generation of bin_prot readers and writers from types") + (description "Generation of binary serialization and deserialization +functions from type definitions.") + (license license:asl2.0))) + +(define-public ocaml-ppx-fail + (package + (name "ocaml-ppx-fail") + (version "113.33.03") + (source (janestreet-origin "ppx_fail" version + "1dwgad0f05gqp5rnwf9dcasidpfi7q3mrpazsw3a2vijjblbhjgn")) + (build-system ocaml-build-system) + (native-inputs + `(("js-build-tools" ,ocaml-js-build-tools) + ("opam" ,opam))) + (propagated-inputs + `(("ppx-driver" ,ocaml-ppx-driver) + ("ppx-tools" ,ocaml-ppx-tools) + ("ppx-here" ,ocaml-ppx-here) + ("ppx-core" ,ocaml-ppx-core))) + (arguments janestreet-arguments) + (home-page "https://github.com/janestreet/ppx_fail/") + (synopsis "Add location to calls to failwiths") + (description "Syntax extension that makes [failwiths] always include a +position.") + (license license:asl2.0))) + +(define-public ocaml-ppx-custom-printf + (package + (name "ocaml-ppx-custom-printf") + (version "113.33.03") + (source (janestreet-origin "ppx_custom_printf" version + "11jlx0n87g2j1vyyp343dibx7lvvwig5j5q0nq0b80kbsq0k6yr8")) + (build-system ocaml-build-system) + (native-inputs + `(("js-build-tools" ,ocaml-js-build-tools) + ("opam" ,opam))) + (propagated-inputs + `(("ppx-sexp-conv" ,ocaml-ppx-sexp-conv) + ("ppx-tools" ,ocaml-ppx-tools) + ("ppx-core" ,ocaml-ppx-core) + ("ppx-driver" ,ocaml-ppx-driver))) + (arguments janestreet-arguments) + (home-page "https://github.com/janestreet/ppx_custom_printf/") + (synopsis "Printf-style format-strings for user-defined string conversion") + (description "Extensions to printf-style format-strings for user-defined +string conversion.") + (license license:asl2.0))) + +(define-public ocaml-ppx-sexp-message + (package + (name "ocaml-ppx-sexp-message") + (version "113.33.03") + (source (janestreet-origin "ppx_sexp_message" version + "084w1l3gnyw4ri9vbn7bv9b2xkw1520qczfxpxdarfivdrz8xr68")) + (build-system ocaml-build-system) + (native-inputs + `(("js-build-tools" ,ocaml-js-build-tools) + ("opam" ,opam))) + (propagated-inputs + `(("ppx-driver" ,ocaml-ppx-driver) + ("ppx-here" ,ocaml-ppx-here) + ("ppx-sexp-conv" ,ocaml-ppx-sexp-conv) + ("ppx-tools" ,ocaml-ppx-tools) + ("ppx-core" ,ocaml-ppx-core))) + (arguments janestreet-arguments) + (home-page "https://github.com/janestreet/ppx_sexp_message/") + (synopsis "A ppx rewriter for easy construction of s-expressions") + (description "Ppx_sexp_message aims to ease the creation of s-expressions +in OCaml. This is mainly motivated by writing error and debugging messages, +where one needs to construct a s-expression based on various element of the +context such as function arguments.") + (license license:asl2.0))) + +(define-public ocaml-ppx-fields-conv + (package + (name "ocaml-ppx-fields-conv") + (version "113.33.03") + (source (janestreet-origin "ppx_fields_conv" version + "1vzbdz27g5qhhfs7wx6rjf979q4xyssxqbmp6sc1sxknbghslbdv")) + (build-system ocaml-build-system) + (native-inputs + `(("js-build-tools" ,ocaml-js-build-tools) + ("opam" ,opam) + ("ppx-core" ,ocaml-ppx-core))) + (propagated-inputs + `(("fieldslib" ,ocaml-fieldslib) + ("ppx-tools" ,ocaml-ppx-tools) + ("ppx-core" ,ocaml-ppx-core) + ("ppx-type-conv" ,ocaml-ppx-type-conv))) + (arguments janestreet-arguments) + (home-page "https://github.com/janestreet/ppx_fields_conv/") + (synopsis "Generation of accessor and iteration functions for ocaml records") + (description "Ppx_fields_conv is a ppx rewriter that can be used to define +first class values representing record fields, and additional routines, to get +and set record fields, iterate and fold over all fields of a record and create +new record values.") + (license license:asl2.0))) + +(define-public ocaml-re + (package + (name "ocaml-re") + (version "1.7.1") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/ocaml/ocaml-re//archive/" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1s3rcr76cgm4p1xmaazc58arkg2lz3zfcp1icm00m6s5ccnkh67b")))) + (build-system ocaml-build-system) + (native-inputs `(("ounit" ,ocaml-ounit))) + (home-page "https://github.com/ocaml/ocaml-re/") + (synopsis "Regular expression library for OCaml") + (description "Pure OCaml regular expressions with: +@enumerate +@item Perl-style regular expressions (module Re_perl) +@item Posix extended regular expressions (module Re_posix) +@item Emacs-style regular expressions (module Re_emacs) +@item Shell-style file globbing (module Re_glob) +@item Compatibility layer for OCaml's built-in Str module (module Re_str) +@end enumerate") + (license license:expat))) + +(define-public ocaml-ppx-expect + (package + (name "ocaml-ppx-expect") + (version "113.33.03") + (source (janestreet-origin "ppx_expect" version + "03sbs4s5i8l9syr45v25f5hzy7msd2b47k2a9wsq9m43d4imgkrc")) + (build-system ocaml-build-system) + (native-inputs + `(("js-build-tools" ,ocaml-js-build-tools) + ("opam" ,opam))) + (propagated-inputs + `(("fieldslib" ,ocaml-fieldslib) + ("ppx-tools" ,ocaml-ppx-tools) + ("ppx-assert" ,ocaml-ppx-assert) + ("ppx-compare" ,ocaml-ppx-compare) + ("ppx-core" ,ocaml-ppx-core) + ("ppx-custom-printf" ,ocaml-ppx-custom-printf) + ("ppx-driver" ,ocaml-ppx-driver) + ("ppx-fields-conv" ,ocaml-ppx-fields-conv) + ("ppx-inline-test" ,ocaml-ppx-inline-test) + ("ppx-sexp-conv" ,ocaml-ppx-sexp-conv) + ("ppx-variants-conv" ,ocaml-ppx-variants-conv) + ("re" ,ocaml-re) + ("sexplib" ,ocaml-sexplib) + ("variantslib" ,ocaml-variantslib))) + (arguments janestreet-arguments) + (home-page "https://github.com/janestreet/ppx_expect/") + (synopsis "Cram like framework for OCaml") + (description "Expect-test is a framework for writing tests in OCaml, similar +to Cram. Expect-tests mimic the existing inline tests framework with the +let%expect_test construct. The body of an expect-test can contain +output-generating code, interleaved with %expect extension expressions to denote +the expected output.") + (license license:asl2.0))) + +(define-public ocaml-ppx-jane + (package + (name "ocaml-ppx-jane") + (version "113.33.03") + (source (janestreet-origin "ppx_jane" version + "0bjxkhmzgm6x9dcvjwybbccn34khbvyyjimcbaja30fp6qcqk5yl")) + (build-system ocaml-build-system) + (native-inputs + `(("js-build-tools" ,ocaml-js-build-tools) + ("opam" ,opam))) + (propagated-inputs + `(("ppx-assert" ,ocaml-ppx-assert) + ("ppx-bench" ,ocaml-ppx-bench) + ("ppx-bin-prot" ,ocaml-ppx-bin-prot) + ("ppx-compare" ,ocaml-ppx-compare) + ("ppx-custom-printf" ,ocaml-ppx-custom-printf) + ("ppx-deriving" ,ocaml-ppx-deriving) + ("ppx-enumerate" ,ocaml-ppx-enumerate) + ("ppx-expect" ,ocaml-ppx-expect) + ("ppx-fail" ,ocaml-ppx-fail) + ("ppx-fields-conv" ,ocaml-ppx-fields-conv) + ("ppx-here" ,ocaml-ppx-here) + ("ppx-inline-test" ,ocaml-ppx-inline-test) + ("ppx-let" ,ocaml-ppx-let) + ("ppx-pipebang" ,ocaml-ppx-pipebang) + ("ppx-sexp-conv" ,ocaml-ppx-sexp-conv) + ("ppx-sexp-message" ,ocaml-ppx-sexp-message) + ("ppx-sexp-value" ,ocaml-ppx-sexp-value) + ("ppx-typerep-conv" ,ocaml-ppx-typerep-conv) + ("ppx-variants-conv" ,ocaml-ppx-variants-conv))) + (arguments janestreet-arguments) + (home-page "https://github.com/janestreet/ppx_jane/") + (synopsis "Standard Jane Street ppx rewriters") + (description "Ppx_jane is a ppx_driver including all standard ppx rewriters.") + (license license:asl2.0))) diff --git a/gnu/packages/patches/libtasn1-CVE-2017-6891.patch b/gnu/packages/patches/libtasn1-CVE-2017-6891.patch new file mode 100644 index 0000000000..1f847ed025 --- /dev/null +++ b/gnu/packages/patches/libtasn1-CVE-2017-6891.patch @@ -0,0 +1,51 @@ +Fix CVE-2017-6891: + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-6891 + +Patch copied from upstream source repository: + +https://git.savannah.gnu.org/cgit/libtasn1.git/commit/?id=5520704d075802df25ce4ffccc010ba1641bd484 + +From 5520704d075802df25ce4ffccc010ba1641bd484 Mon Sep 17 00:00:00 2001 +From: Nikos Mavrogiannopoulos <nmav@redhat.com> +Date: Thu, 18 May 2017 18:03:34 +0200 +Subject: [PATCH] asn1_find_node: added safety check on asn1_find_node() + +This prevents a stack overflow in asn1_find_node() which +is triggered by too long variable names in the definitions +files. That means that applications have to deliberately +pass a too long 'name' constant to asn1_write_value() +and friends. Reported by Jakub Jirasek. + +Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com> +--- + lib/parser_aux.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/lib/parser_aux.c b/lib/parser_aux.c +index b4a7370..976ab38 100644 +--- a/lib/parser_aux.c ++++ b/lib/parser_aux.c +@@ -120,6 +120,9 @@ asn1_find_node (asn1_node pointer, const char *name) + if (n_end) + { + nsize = n_end - n_start; ++ if (nsize >= sizeof(n)) ++ return NULL; ++ + memcpy (n, n_start, nsize); + n[nsize] = 0; + n_start = n_end; +@@ -158,6 +161,9 @@ asn1_find_node (asn1_node pointer, const char *name) + if (n_end) + { + nsize = n_end - n_start; ++ if (nsize >= sizeof(n)) ++ return NULL; ++ + memcpy (n, n_start, nsize); + n[nsize] = 0; + n_start = n_end; +-- +2.13.0 + diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index d29a14c18a..b958199bdb 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -27,7 +27,7 @@ ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org> ;;; Copyright © 2016 David Craven <david@craven.ch> ;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com> -;;; Copyright © 2016 Stefan Reichoer <stefan@xsteve.at> +;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at> ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org> ;;; Copyright © 2016 Alex Vong <alexvong1995@gmail.com> ;;; Copyright © 2016, 2017 Arun Isaac <arunisaac@systemreboot.net> @@ -65,6 +65,7 @@ #:use-module (gnu packages backup) #:use-module (gnu packages bash) #:use-module (gnu packages compression) + #:use-module (gnu packages crypto) #:use-module (gnu packages databases) #:use-module (gnu packages django) #:use-module (gnu packages file) @@ -1487,16 +1488,38 @@ backported for previous versions of Python from 2.4 to 3.3.") (base32 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x")))) (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-tests + (lambda _ + (substitute* "tests/test_parse_type_parse.py" + ;; Newer Python versions don't have the problem this test tests. + (("self[.]assertRaises[(]parse.TooManyFields, p.parse, ''[)]") + "")) + #t))))) (propagated-inputs `(("python-six" ,python-six) ("python-parse" ,python-parse))) - (arguments '(#:tests? #f)) ;TODO: tests require pytest + (native-inputs + `(("python-pytest" ,python-pytest) + ("python-pytest-runner" ,python-pytest-runner))) (home-page "https://github.com/jenisys/parse_type") (synopsis "Extended parse module") (description "Parse_type extends the python parse module.") + (properties + `((python2-variant . ,(delay python2-parse-type)))) (license license:bsd-3))) +(define-public python2-parse-type + (let ((base (package-with-python2 + (strip-python2-variant python-parse-type)))) + (package (inherit base) + (propagated-inputs + `(("python2-enum34" ,python2-enum34) + ,@(package-propagated-inputs base)))))) + (define-public python-parse (package (name "python-parse") @@ -4727,15 +4750,14 @@ a front-end for C compilers or analysis tools.") (define-public python-xcffib (package (name "python-xcffib") - (version "0.1.9") + (version "0.5.1") (source (origin (method url-fetch) - (uri (string-append "https://pypi.python.org/packages/source/x/" - "xcffib/xcffib-" version ".tar.gz")) + (uri (pypi-uri "xcffib" version)) (sha256 (base32 - "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81")))) + "09gbnmr5vn58mm8xi3fmd7fz6743cks6c46dphnxzwax6zsxmy60")))) (build-system python-build-system) (inputs `(("libxcb" ,libxcb))) @@ -4743,10 +4765,16 @@ a front-end for C compilers or analysis tools.") `(("python-cffi" ,python-cffi) ; used at run time ("python-six" ,python-six))) (arguments - `(;; FIXME: Tests cannot load libxcb.so.1 + `(;; FIXME: Tests need more work. See ".travis.yml" in the repository. #:tests? #f #:phases (modify-phases %standard-phases + (add-after 'unpack 'fix-libxcb-path + (lambda* (#:key inputs #:allow-other-keys) + (let ((libxcb (assoc-ref inputs "libxcb"))) + (substitute* '("xcffib/__init__.py") + (("^soname = \"") (string-append "soname = \"" libxcb "/lib/"))) + #t))) (add-after 'install 'install-doc (lambda* (#:key outputs #:allow-other-keys) (let ((doc (string-append (assoc-ref outputs "out") "/share" @@ -7155,14 +7183,14 @@ designed to efficiently cope with extremely large amounts of data.") (define-public python-pyasn1 (package (name "python-pyasn1") - (version "0.1.9") + (version "0.2.3") (source (origin (method url-fetch) (uri (pypi-uri "pyasn1" version)) (sha256 (base32 - "0zraxni14bqi20kr4bi6nwsh32aibz0fq0xaczfisw0zdpcsqg45")))) + "1b86yx23c1x74clai05a5ma8c8nfmhlx3j1mxq0ff657i2ylx33k")))) (build-system python-build-system) (home-page "http://pyasn1.sourceforge.net/") (synopsis "ASN.1 types and codecs") @@ -7253,15 +7281,14 @@ versions of Python.") (define-public python-idna (package (name "python-idna") - (version "2.0") + (version "2.5") (source (origin (method url-fetch) - (uri (string-append "https://pypi.python.org/packages/source/i/" - "idna/idna-" version ".tar.gz")) + (uri (pypi-uri "idna" version)) (sha256 (base32 - "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n")))) + "1ara12a7k2zc69msa0arrvw00gn61a6i6by01xb3lkkc0h4cxd9w")))) (build-system python-build-system) (home-page "https://github.com/kjd/idna") (synopsis "Internationalized domain names in applications") @@ -7306,14 +7333,14 @@ responses, rather than doing any computation.") (define-public python-cryptography-vectors (package (name "python-cryptography-vectors") - (version "1.7.1") + (version "1.8.2") (source (origin (method url-fetch) (uri (pypi-uri "cryptography_vectors" version)) (sha256 (base32 - "1x2mz4wggja5ih45c6cw0kzyad4jr8avg327dawjr1gnpdq1psa7")))) + "0hzvq0bfy21bc35p8z7zdxpv3hbvi7adg4axc1b5yd3hk16a1nh0")))) (build-system python-build-system) (home-page "https://github.com/pyca/cryptography") (synopsis "Test vectors for the cryptography package") @@ -7328,29 +7355,33 @@ responses, rather than doing any computation.") (define-public python-cryptography (package (name "python-cryptography") - (version "1.7.1") + (version "1.8.2") (source (origin (method url-fetch) (uri (pypi-uri "cryptography" version)) (sha256 (base32 - "0k6v7wq4h0yk9r0x0bl2x9fyrg4a6gj5qp4m9mgpk6m481yyygwm")))) + "1nmy4fw3zy7rlvarkhn33g9905rwpy9z7k5kv8j80f0s6ynfp24f")))) (build-system python-build-system) (inputs `(("openssl" ,openssl))) (propagated-inputs - `(("python-cffi" ,python-cffi) + `(("python-asn1crypto" ,python-asn1crypto) + ("python-cffi" ,python-cffi) ("python-six" ,python-six) - ("python-pyasn1" ,python-pyasn1) ("python-idna" ,python-idna) + ;; Packaging is used to check the version of python-cffi in + ;; 'src/cryptography/hazmat/primitives/ciphers/base.py'. We should be + ;; able to remove this dependency in the next release of cryptography: + ;; python-cryptography: + ;; https://github.com/pyca/cryptography/commit/0417d00d9ff1e19bc3ab67d39bdd18e1674768c1 + ("python-packaging" ,python-packaging) ("python-iso8601" ,python-iso8601))) (native-inputs `(("python-cryptography-vectors" ,python-cryptography-vectors) ("python-hypothesis" ,python-hypothesis) ("python-pretend" ,python-pretend) - ("python-pyasn1" ,python-pyasn1) - ("python-pyasn1-modules" ,python-pyasn1-modules) ("python-pytz" ,python-pytz) ("python-pytest" ,python-pytest-3.0))) (home-page "https://github.com/pyca/cryptography") @@ -13449,6 +13480,33 @@ faster ones are not available.") to ansi-escaped strings suitable for display in a terminal.") (license license:expat))) +(define-public python-ansi2html + (package + (name "python-ansi2html") + (version "1.2.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "ansi2html" version)) + (sha256 + (base32 + "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y")))) + (build-system python-build-system) + (native-inputs + `(("python-mock" ,python-mock) + ("python-nose" ,python-nose))) + (propagated-inputs + `(("python-six" ,python-six))) + (home-page "http://github.com/ralphbean/ansi2html") + (synopsis "Convert ANSI-decorated console output to HTML") + (description + "@command{ansi2html} is a Python library and command line utility for +convering text with ANSI color codes to HTML or LaTeX.") + (license license:gpl3+))) + +(define-public python2-ansi2html + (package-with-python2 python-ansi2html)) + (define-public python-ddt (package (name "python-ddt") @@ -14623,3 +14681,126 @@ substitute for redis.") (define-public python2-fakeredis (package-with-python2 python-fakeredis)) + +(define-public python-behave-web-api + (package + (name "python-behave-web-api") + (version "1.0.6") + (source + (origin + (method url-fetch) + (uri (pypi-uri "behave-web-api" version)) + (sha256 + (base32 + "03kpq2xsy1gab3jy0dccbxlsg7vwfy4lagss0qldwmx3xz6b3i19")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'fix-dependencies + (lambda _ + (substitute* "setup.py" + (("'wheel'") "") ; We don't use it. + (("'ordereddict==1.1'") ""))))))) ; Python >= 2.7 has it built-in. + (propagated-inputs + `(("behave" ,behave) + ("python-requests" ,python-requests))) + (home-page "https://github.com/jefersondaniel/behave-web-api") + (synopsis "Provides testing for JSON APIs with Behave for Python") + (description "This package provides testing utility modules for testing +JSON APIs with Behave.") + (license license:expat))) + +(define-public python2-behave-web-api + (package-with-python2 python-behave-web-api)) + +(define-public python-flask-script + (package + (name "python-flask-script") + (version "2.0.5") + (source + (origin + (method url-fetch) + (uri (pypi-uri "Flask-Script" version)) + (sha256 + (base32 + "0zqh2yq8zk7m9b4xw1ryqmrljkdigfb3hk5155a3b5hkfnn6xxyf")))) + (build-system python-build-system) + (propagated-inputs + `(("python-flask" ,python-flask) + ("python-argcomplete" ,python-argcomplete) + ("python-werkzeug" ,python-werkzeug))) + (native-inputs + `(("python-pytest" ,python-pytest))) + (home-page + "http://github.com/smurfix/flask-script") + (synopsis "Scripting support for Flask") + (description "The Flask-Script extension provides support for writing +external scripts in Flask. This includes running a development server, +a customised Python shell, scripts to set up your database, cronjobs, +and other command-line tasks that belong outside the web application +itself.") + (license license:bsd-3))) + +(define-public python2-flask-script + (package-with-python2 python-flask-script)) + +(define-public python-flask-migrate + (package + (name "python-flask-migrate") + (version "2.0.3") + (source + (origin + (method url-fetch) + (uri (pypi-uri "Flask-Migrate" version)) + (sha256 + (base32 + "107x78lkqsnbg92dld3dkagg07jvchp3ib3y0sivc4ipz6n1y7rk")))) + (build-system python-build-system) + (propagated-inputs + `(("python-flask" ,python-flask) + ("python-alembic" ,python-alembic) + ("python-sqlalchemy" ,python-sqlalchemy) + ("python-flask-script" ,python-flask-script) + ("python-flask-sqlalchemy" ,python-flask-sqlalchemy))) + (home-page "http://github.com/miguelgrinberg/flask-migrate/") + (synopsis "SQLAlchemy database migrations for Flask programs using +Alembic") + (description "This package contains SQLAlchemy database migration tools +for Flask programs that are using @code{python-alembic}.") + (license license:expat))) + +(define-public python2-flask-migrate + (package-with-python2 python-flask-migrate)) + +(define-public python-packaging + (package + (name "python-packaging") + (version "16.8") + (source + (origin + (method url-fetch) + (uri (pypi-uri "packaging" version)) + (sha256 + (base32 + "17k1xbjshackwvbsnxqixbph8rbqhz4bf4g3al5xyzhavxgq6l2x")))) + (build-system python-build-system) + (native-inputs + `(("python-pretend" ,python-pretend) + ("python-pytest" ,python-pytest))) + (propagated-inputs + `(("python-pyparsing" ,python-pyparsing) + ("python-six" ,python-six))) + (home-page "https://github.com/pypa/packaging") + (synopsis "Core utilities for Python packages") + (description "Packaging is a Python module for dealing with Python packages. +It offers an interface for working with package versions, names, and dependency +information.") + ;; From 'LICENSE': This software is made available under the terms of + ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD. + ;; Contributions to this software is made under the terms of *both* these + ;; licenses. + (license (list license:asl2.0 license:bsd-2)))) + +(define-public python2-packaging + (package-with-python2 python-packaging)) diff --git a/gnu/packages/scanner.scm b/gnu/packages/scanner.scm index 7bdbf35f05..f44f037efb 100644 --- a/gnu/packages/scanner.scm +++ b/gnu/packages/scanner.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2014 John Darrington <jmd@gnu.org> ;;; Copyright © 2015 Andy Wingo <wingo@igalia.com> ;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca> +;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr> ;;; ;;; This file is part of GNU Guix. ;;; @@ -31,15 +32,15 @@ (define-public sane-backends-minimal (package (name "sane-backends-minimal") - (version "1.0.25") + (version "1.0.27") (source (origin (method url-fetch) (uri (string-append - "https://alioth.debian.org/frs/download.php/file/4146/" + "https://alioth.debian.org/frs/download.php/latestfile/176/" "sane-backends-" version ".tar.gz")) (sha256 (base32 - "0b3fvhrxl4l82bf3v0j47ypjv6a0k5lqbgknrq1agpmjca6vmmx4")) + "1j9nbqspaj0rlgalafb5z6r606k0i22kz0rcpd744p176yzlfdr9")) (modules '((guix build utils))) (snippet ;; Generated HTML files and udev rules normally embed a @@ -53,32 +54,34 @@ (inputs `(("libusb-compat" ,libusb-compat))) (arguments - `(#:tests? #f - #:phases + `(#:phases (modify-phases %standard-phases (add-before 'configure 'disable-backends (lambda _ (setenv "BACKENDS" " ") #t)) - (add-after - 'install 'install-udev-rules - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (mkdir-p (string-append out "/lib/udev/rules.d")) - (copy-file "tools/udev/libsane.rules" - (string-append out - "/lib/udev/rules.d/" - "60-libsane.rules")))))))) - ;; It would seem that tests are not maintained - fails with - ;; the following: - ;; - ;; < This page was last updated on Wed Jul 31 07:52:48 2013 - ;; < by sane-desc 3.5 from sane-backends 1.0.24git - ;; --- - ;; > This page was last updated on Sun Oct 19 15:41:39 2014 - ;; > by sane-desc 3.5 from sane-backends 1.0.24 - ;; **** File generated for html-backends-split mode is different from reference - ;; Makefile:501: recipe for target 'check.local' failed + ;; Disable unmaintained tests that that fail with errors resembling: + ;; + ;; < # by sane-desc 3.5 from sane-backends 1.0.24git on Jul 31 2013 + ;; --- + ;; > # by sane-desc 3.5 from sane-backends 1.0.27 on 1970-01-01# + ;; FAIL: sane-desc -m usermap -s ./data + (add-before 'configure 'disable-failing-tests + (lambda _ + (for-each + (lambda (pattern) + (substitute* "testsuite/tools/Makefile.in" + (((string-append " " pattern " ")) " "))) + (list "usermap" "db" "udev" "udev\\+acl" "udev\\+hwdb" "hwdb")) + #t)) + (add-after 'install 'install-udev-rules + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (mkdir-p (string-append out "/lib/udev/rules.d")) + (copy-file "tools/udev/libsane.rules" + (string-append out + "/lib/udev/rules.d/" + "60-libsane.rules")))))))) (home-page "http://www.sane-project.org") (synopsis "Raster image scanner library and drivers, without scanner support") diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index ebf9a47302..2025a778ac 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -52,6 +52,7 @@ (define-public libtasn1 (package (name "libtasn1") + (replacement libtasn1/fixed) (version "4.10") (source (origin @@ -72,17 +73,26 @@ networking, allowing for formal validation of data according to some specifications.") (license license:lgpl2.0+))) +(define libtasn1/fixed + (package + (inherit libtasn1) + (source + (origin + (inherit (package-source libtasn1)) + (patches + (search-patches "libtasn1-CVE-2017-6891.patch")))))) + (define-public asn1c (package (name "asn1c") - (version "0.9.27") + (version "0.9.28") (source (origin (method url-fetch) (uri (string-append "https://lionet.info/soft/asn1c-" version ".tar.gz")) (sha256 (base32 - "17nvn2kzvlryasr9dzqg6gs27b9lvqpval0k31pb64bjqbhn8pq2")))) + "1fc64g45ykmv73kdndr4zdm4wxhimhrir4rxnygxvwkych5l81w0")))) (build-system gnu-build-system) (native-inputs `(("perl" ,perl))) @@ -368,7 +378,7 @@ required structures.") (package (inherit openssl) (name "openssl") - (version "1.1.0e") + (version "1.1.0f") (source (origin (method url-fetch) (uri (list (string-append "ftp://ftp.openssl.org/source/" @@ -379,7 +389,7 @@ required structures.") (patches (search-patches "openssl-1.1.0-c-rehash-in.patch")) (sha256 (base32 - "0k47sdd9gs6yxfv6ldlgpld2lyzrkcv9kz4cf88ck04xjwc8dgjp")))) + "0r97n4n552ns571diz54qsgarihrxvbn7kvyv8wjyfs9ybrldxqj")))) (outputs '("out" "doc" ;1.3MiB of man3 pages "static")) ; 5.5MiB of .a files diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index aaf211ce89..bfe3063242 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -646,7 +646,7 @@ audio/video codec library.") (define-public vlc (package (name "vlc") - (version "2.2.5.1") + (version "2.2.6") (source (origin (method url-fetch) (uri (string-append @@ -654,7 +654,7 @@ audio/video codec library.") version "/vlc-" version ".tar.xz")) (sha256 (base32 - "1k51vm6piqlrnld7sxyg0s4kdkd3lan97lmy3v5wdh3qyll8m2xj")))) + "1a22b913p2227ljz89c4fgjlyln5gcz8z58w32r0wh4srnnd60y4")))) (build-system gnu-build-system) (native-inputs `(("git" ,git) ; needed for a test diff --git a/gnu/packages/webkit.scm b/gnu/packages/webkit.scm index e343f40cab..71f1e9dc7f 100644 --- a/gnu/packages/webkit.scm +++ b/gnu/packages/webkit.scm @@ -53,14 +53,14 @@ (define-public webkitgtk (package (name "webkitgtk") - (version "2.16.2") + (version "2.16.3") (source (origin (method url-fetch) (uri (string-append "https://www.webkitgtk.org/releases/" name "-" version ".tar.xz")) (sha256 (base32 - "0lpj14cfr8p0ys6z1ych0zcwxbc86asvgs7v3qa72azb0ai8kxjy")))) + "04mmfxm8284zrlkrhkcn9gq1l4lpm1q6wwb5hyybj081v8qr2ki0")))) (build-system cmake-build-system) (arguments '(#:tests? #f ; no tests diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm index 3cf74c4ca8..607ef2b0e7 100644 --- a/gnu/packages/wm.scm +++ b/gnu/packages/wm.scm @@ -72,16 +72,17 @@ (define-public libconfuse (package (name "libconfuse") - (version "2.7") + (version "3.1") (source (origin (method url-fetch) - (uri (string-append "http://savannah.nongnu.org/download/confuse/" - "confuse-" version ".tar.gz")) + (uri (string-append "https://github.com/martinh/libconfuse/" + "releases/download/v" version + "/confuse-" version ".tar.xz")) (sha256 (base32 - "0y47r2ashz44wvnxdb18ivpmj8nxhw3y9bf7v9w0g5byhgyp89g3")))) + "0rnacgfkd88qyxrfdfzn9cxz533l9s5wrzb9093f9mbi00gg6wc1")))) (build-system gnu-build-system) - (home-page "http://www.nongnu.org/confuse/") + (home-page "https://github.com/martinh/libconfuse") (synopsis "Configuration file parser library") (description "libconfuse is a configuration file parser library. It supports sections and (lists of) values (strings, integers, floats, booleans diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm index 980b6e8022..ad919a6b28 100644 --- a/gnu/packages/xdisorg.scm +++ b/gnu/packages/xdisorg.scm @@ -441,7 +441,7 @@ of the screen selected by mouse.") (define-public slop (package (name "slop") - (version "5.3.38") + (version "6.3.38") (source (origin (method url-fetch) (uri (string-append @@ -450,7 +450,7 @@ of the screen selected by mouse.") (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "1gvsxzl4y4l7d5gvx24i0yxk3jxc1gnb48bjwvqmrh34gx974wn7")))) + "1jh08k7nqx6hr4rmb5damzqhnqiac439i6i51fmzymzw3fqykas8")))) (build-system cmake-build-system) (arguments '(#:tests? #f)) ; no "check" target diff --git a/guix/base64.scm b/guix/base64.scm index 4bd5dc5e1b..0fa501eca0 100644 --- a/guix/base64.scm +++ b/guix/base64.scm @@ -5,6 +5,7 @@ ;; February 12, 2014. ;; ;; Some optimizations made by Ludovic Courtès <ludo@gnu.org>, 2015. +;; Turned into a Guile module (instead of R6RS). ;; ;; This program is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by @@ -42,211 +43,211 @@ ;; FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER ;; DEALINGS IN THE SOFTWARE. -#!r6rs - ;; RFC 4648 Base-N Encodings -(library (guix base64) - (export base64-encode - base64-decode - base64-alphabet - base64url-alphabet - get-delimited-base64 - put-delimited-base64) - (import (rnrs) - (only (srfi :13 strings) - string-index - string-prefix? string-suffix? - string-concatenate string-trim-both) - (only (guile) ash logior)) +(define-module (guix base64) + #:export (base64-encode + base64-decode + base64-alphabet + base64url-alphabet + get-delimited-base64 + put-delimited-base64) + #:use-module (rnrs) + #:use-module ((srfi srfi-13) + #:select (string-index + string-prefix? string-suffix? + string-concatenate string-trim-both))) - (define-syntax define-alias - (syntax-rules () - ((_ new old) - (define-syntax new (identifier-syntax old))))) +(define-syntax define-alias + (syntax-rules () + ((_ new old) + (define-syntax new (identifier-syntax old))))) - ;; Force the use of Guile's own primitives to avoid the overhead of its 'fx' - ;; procedures. - (define-alias fxbit-field bitwise-bit-field) - (define-alias fxarithmetic-shift ash) - (define-alias fxarithmetic-shift-left ash) - (define-alias fxand logand) - (define-alias fxior logior) - (define-alias fxxor logxor) +;; Force the use of Guile's own primitives to avoid the overhead of its 'fx' +;; procedures. - (define base64-alphabet - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/") +(define-alias fxbit-field bitwise-bit-field) +(define-alias fxarithmetic-shift ash) +(define-alias fxarithmetic-shift-left ash) +(define-alias fxand logand) +(define-alias fxior logior) +(define-alias fxxor logxor) - (define base64url-alphabet - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_") +(define base64-alphabet + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/") - (define base64-encode - (case-lambda - ;; Simple interface. Returns a string containing the canonical - ;; base64 representation of the given bytevector. - ((bv) - (base64-encode bv 0 (bytevector-length bv) #f #f base64-alphabet #f)) - ((bv start) - (base64-encode bv start (bytevector-length bv) #f #f base64-alphabet #f)) - ((bv start end) - (base64-encode bv start end #f #f base64-alphabet #f)) - ((bv start end line-length) - (base64-encode bv start end line-length #f base64-alphabet #f)) - ((bv start end line-length no-padding) - (base64-encode bv start end line-length no-padding base64-alphabet #f)) - ((bv start end line-length no-padding alphabet) - (base64-encode bv start end line-length no-padding alphabet #f)) - ;; Base64 encodes the bytes [start,end[ in the given bytevector. - ;; Lines are limited to line-length characters (unless #f), - ;; which must be a multiple of four. To omit the padding - ;; characters (#\=) set no-padding to a true value. If port is - ;; #f, returns a string. - ((bv start end line-length no-padding alphabet port) - (assert (or (not line-length) (zero? (mod line-length 4)))) - (let-values (((p extract) (if port - (values port (lambda () (values))) - (open-string-output-port)))) - (letrec ((put (if line-length - (let ((chars 0)) - (lambda (p c) - (when (fx=? chars line-length) - (set! chars 0) - (put-char p #\linefeed)) - (set! chars (fx+ chars 1)) - (put-char p c))) - put-char))) - (let lp ((i start)) - (cond ((= i end)) - ((<= (+ i 3) end) - (let ((x (bytevector-uint-ref bv i (endianness big) 3))) - (put p (string-ref alphabet (fxbit-field x 18 24))) - (put p (string-ref alphabet (fxbit-field x 12 18))) - (put p (string-ref alphabet (fxbit-field x 6 12))) - (put p (string-ref alphabet (fxbit-field x 0 6))) - (lp (+ i 3)))) - ((<= (+ i 2) end) - (let ((x (fxarithmetic-shift-left (bytevector-u16-ref bv i (endianness big)) 8))) - (put p (string-ref alphabet (fxbit-field x 18 24))) - (put p (string-ref alphabet (fxbit-field x 12 18))) - (put p (string-ref alphabet (fxbit-field x 6 12))) - (unless no-padding - (put p #\=)))) - (else - (let ((x (fxarithmetic-shift-left (bytevector-u8-ref bv i) 16))) - (put p (string-ref alphabet (fxbit-field x 18 24))) - (put p (string-ref alphabet (fxbit-field x 12 18))) - (unless no-padding - (put p #\=) - (put p #\=))))))) - (extract))))) +(define base64url-alphabet + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_") + +(define base64-encode + (case-lambda + ;; Simple interface. Returns a string containing the canonical + ;; base64 representation of the given bytevector. + ((bv) + (base64-encode bv 0 (bytevector-length bv) #f #f base64-alphabet #f)) + ((bv start) + (base64-encode bv start (bytevector-length bv) #f #f base64-alphabet #f)) + ((bv start end) + (base64-encode bv start end #f #f base64-alphabet #f)) + ((bv start end line-length) + (base64-encode bv start end line-length #f base64-alphabet #f)) + ((bv start end line-length no-padding) + (base64-encode bv start end line-length no-padding base64-alphabet #f)) + ((bv start end line-length no-padding alphabet) + (base64-encode bv start end line-length no-padding alphabet #f)) + ;; Base64 encodes the bytes [start,end[ in the given bytevector. + ;; Lines are limited to line-length characters (unless #f), + ;; which must be a multiple of four. To omit the padding + ;; characters (#\=) set no-padding to a true value. If port is + ;; #f, returns a string. + ((bv start end line-length no-padding alphabet port) + (assert (or (not line-length) (zero? (mod line-length 4)))) + (let-values (((p extract) (if port + (values port (lambda () (values))) + (open-string-output-port)))) + (letrec ((put (if line-length + (let ((chars 0)) + (lambda (p c) + (when (fx=? chars line-length) + (set! chars 0) + (put-char p #\linefeed)) + (set! chars (fx+ chars 1)) + (put-char p c))) + put-char))) + (let lp ((i start)) + (cond ((= i end)) + ((<= (+ i 3) end) + (let ((x (bytevector-uint-ref bv i (endianness big) 3))) + (put p (string-ref alphabet (fxbit-field x 18 24))) + (put p (string-ref alphabet (fxbit-field x 12 18))) + (put p (string-ref alphabet (fxbit-field x 6 12))) + (put p (string-ref alphabet (fxbit-field x 0 6))) + (lp (+ i 3)))) + ((<= (+ i 2) end) + (let ((x (fxarithmetic-shift-left (bytevector-u16-ref bv i (endianness big)) 8))) + (put p (string-ref alphabet (fxbit-field x 18 24))) + (put p (string-ref alphabet (fxbit-field x 12 18))) + (put p (string-ref alphabet (fxbit-field x 6 12))) + (unless no-padding + (put p #\=)))) + (else + (let ((x (fxarithmetic-shift-left (bytevector-u8-ref bv i) 16))) + (put p (string-ref alphabet (fxbit-field x 18 24))) + (put p (string-ref alphabet (fxbit-field x 12 18))) + (unless no-padding + (put p #\=) + (put p #\=))))))) + (extract))))) ;; Decodes a base64 string. The string must contain only pure ;; unpadded base64 data. - (define base64-decode - (case-lambda - ((str) - (base64-decode str base64-alphabet #f)) - ((str alphabet) - (base64-decode str alphabet #f)) - ((str alphabet port) - (unless (zero? (mod (string-length str) 4)) - (error 'base64-decode - "input string must be a multiple of four characters")) - (let-values (((p extract) (if port - (values port (lambda () (values))) - (open-bytevector-output-port)))) - (do ((i 0 (+ i 4))) - ((= i (string-length str)) - (extract)) - (let ((c1 (string-ref str i)) - (c2 (string-ref str (+ i 1))) - (c3 (string-ref str (+ i 2))) - (c4 (string-ref str (+ i 3)))) - ;; TODO: be more clever than string-index - (let ((i1 (string-index alphabet c1)) - (i2 (string-index alphabet c2)) - (i3 (string-index alphabet c3)) - (i4 (string-index alphabet c4))) - (cond ((and i1 i2 i3 i4) - (let ((x (fxior (fxarithmetic-shift-left i1 18) - (fxarithmetic-shift-left i2 12) - (fxarithmetic-shift-left i3 6) - i4))) - (put-u8 p (fxbit-field x 16 24)) - (put-u8 p (fxbit-field x 8 16)) - (put-u8 p (fxbit-field x 0 8)))) - ((and i1 i2 i3 (char=? c4 #\=) - (= i (- (string-length str) 4))) - (let ((x (fxior (fxarithmetic-shift-left i1 18) - (fxarithmetic-shift-left i2 12) - (fxarithmetic-shift-left i3 6)))) - (put-u8 p (fxbit-field x 16 24)) - (put-u8 p (fxbit-field x 8 16)))) - ((and i1 i2 (char=? c3 #\=) (char=? c4 #\=) - (= i (- (string-length str) 4))) - (let ((x (fxior (fxarithmetic-shift-left i1 18) - (fxarithmetic-shift-left i2 12)))) - (put-u8 p (fxbit-field x 16 24)))) - (else - (error 'base64-decode "invalid input" - (list c1 c2 c3 c4))))))))))) + +(define base64-decode + (case-lambda + ((str) + (base64-decode str base64-alphabet #f)) + ((str alphabet) + (base64-decode str alphabet #f)) + ((str alphabet port) + (unless (zero? (mod (string-length str) 4)) + (error 'base64-decode + "input string must be a multiple of four characters")) + (let-values (((p extract) (if port + (values port (lambda () (values))) + (open-bytevector-output-port)))) + (do ((i 0 (+ i 4))) + ((= i (string-length str)) + (extract)) + (let ((c1 (string-ref str i)) + (c2 (string-ref str (+ i 1))) + (c3 (string-ref str (+ i 2))) + (c4 (string-ref str (+ i 3)))) + ;; TODO: be more clever than string-index + (let ((i1 (string-index alphabet c1)) + (i2 (string-index alphabet c2)) + (i3 (string-index alphabet c3)) + (i4 (string-index alphabet c4))) + (cond ((and i1 i2 i3 i4) + (let ((x (fxior (fxarithmetic-shift-left i1 18) + (fxarithmetic-shift-left i2 12) + (fxarithmetic-shift-left i3 6) + i4))) + (put-u8 p (fxbit-field x 16 24)) + (put-u8 p (fxbit-field x 8 16)) + (put-u8 p (fxbit-field x 0 8)))) + ((and i1 i2 i3 (char=? c4 #\=) + (= i (- (string-length str) 4))) + (let ((x (fxior (fxarithmetic-shift-left i1 18) + (fxarithmetic-shift-left i2 12) + (fxarithmetic-shift-left i3 6)))) + (put-u8 p (fxbit-field x 16 24)) + (put-u8 p (fxbit-field x 8 16)))) + ((and i1 i2 (char=? c3 #\=) (char=? c4 #\=) + (= i (- (string-length str) 4))) + (let ((x (fxior (fxarithmetic-shift-left i1 18) + (fxarithmetic-shift-left i2 12)))) + (put-u8 p (fxbit-field x 16 24)))) + (else + (error 'base64-decode "invalid input" + (list c1 c2 c3 c4))))))))))) - (define (get-line-comp f port) - (if (port-eof? port) - (eof-object) - (f (get-line port)))) +(define (get-line-comp f port) + (if (port-eof? port) + (eof-object) + (f (get-line port)))) ;; Reads the common -----BEGIN/END type----- delimited format from ;; the given port. Returns two values: a string with the type and a ;; bytevector containing the base64 decoded data. The second value ;; is the eof object if there is an eof before the BEGIN delimiter. - (define (get-delimited-base64 port) - (define (get-first-data-line port) - ;; Some MIME data has header fields in the same format as mail - ;; or http. These are ignored. - (let ((line (get-line-comp string-trim-both port))) - (cond ((eof-object? line) line) - ((string-index line #\:) - (let lp () ;read until empty line - (let ((line (get-line-comp string-trim-both port))) - (if (string=? line "") - (get-line-comp string-trim-both port) - (lp))))) - (else line)))) + +(define (get-delimited-base64 port) + (define (get-first-data-line port) + ;; Some MIME data has header fields in the same format as mail + ;; or http. These are ignored. (let ((line (get-line-comp string-trim-both port))) - (cond ((eof-object? line) - (values "" (eof-object))) - ((string=? line "") - (get-delimited-base64 port)) - ((and (string-prefix? "-----BEGIN " line) - (string-suffix? "-----" line)) - (let* ((type (substring line 11 (- (string-length line) 5))) - (endline (string-append "-----END " type "-----"))) - (let-values (((outp extract) (open-bytevector-output-port))) - (let lp ((line (get-first-data-line port))) - (cond ((eof-object? line) + (cond ((eof-object? line) line) + ((string-index line #\:) + (let lp () ;read until empty line + (let ((line (get-line-comp string-trim-both port))) + (if (string=? line "") + (get-line-comp string-trim-both port) + (lp))))) + (else line)))) + (let ((line (get-line-comp string-trim-both port))) + (cond ((eof-object? line) + (values "" (eof-object))) + ((string=? line "") + (get-delimited-base64 port)) + ((and (string-prefix? "-----BEGIN " line) + (string-suffix? "-----" line)) + (let* ((type (substring line 11 (- (string-length line) 5))) + (endline (string-append "-----END " type "-----"))) + (let-values (((outp extract) (open-bytevector-output-port))) + (let lp ((line (get-first-data-line port))) + (cond ((eof-object? line) + (error 'get-delimited-base64 + "unexpected end of file")) + ((string-prefix? "-" line) + (unless (string=? line endline) (error 'get-delimited-base64 - "unexpected end of file")) - ((string-prefix? "-" line) - (unless (string=? line endline) - (error 'get-delimited-base64 - "bad end delimiter" type line)) - (values type (extract))) - (else - (unless (and (= (string-length line) 5) - (string-prefix? "=" line)) ;Skip Radix-64 checksum - (base64-decode line base64-alphabet outp)) - (lp (get-line-comp string-trim-both port)))))))) - (else ;skip garbage (like in openssl x509 -in foo -text output). - (get-delimited-base64 port))))) + "bad end delimiter" type line)) + (values type (extract))) + (else + (unless (and (= (string-length line) 5) + (string-prefix? "=" line)) ;Skip Radix-64 checksum + (base64-decode line base64-alphabet outp)) + (lp (get-line-comp string-trim-both port)))))))) + (else ;skip garbage (like in openssl x509 -in foo -text output). + (get-delimited-base64 port))))) - (define put-delimited-base64 - (case-lambda - ((port type bv line-length) - (display (string-append "-----BEGIN " type "-----\n") port) - (base64-encode bv 0 (bytevector-length bv) - line-length #f base64-alphabet port) - (display (string-append "\n-----END " type "-----\n") port)) - ((port type bv) - (put-delimited-base64 port type bv 76))))) +(define put-delimited-base64 + (case-lambda + ((port type bv line-length) + (display (string-append "-----BEGIN " type "-----\n") port) + (base64-encode bv 0 (bytevector-length bv) + line-length #f base64-alphabet port) + (display (string-append "\n-----END " type "-----\n") port)) + ((port type bv) + (put-delimited-base64 port type bv 76)))) diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm index 730e638c89..7cf0cafc0f 100644 --- a/guix/build-system/gnu.scm +++ b/guix/build-system/gnu.scm @@ -403,8 +403,8 @@ is one of `host' or `target'." (case kind ((host) `(("cross-gcc" ,(gcc target - (binutils target) - (libc target))) + #:xbinutils (binutils target) + #:libc (libc target))) ("cross-binutils" ,(binutils target)))) ((target) `(("cross-libc" ,(libc target)))))))) diff --git a/guix/build/pull.scm b/guix/build/pull.scm index d2e0404b14..03b0f925a7 100644 --- a/guix/build/pull.scm +++ b/guix/build/pull.scm @@ -28,6 +28,7 @@ #:use-module (srfi srfi-1) #:use-module (srfi srfi-11) #:use-module (srfi srfi-26) + #:use-module (srfi srfi-34) #:export (build-guix)) ;;; Commentary: @@ -36,13 +37,18 @@ ;;; ;;; Code: -(define (depends-on-guile-ssh? file) - "Return true if FILE is a Scheme source file that depends, directly or -indirectly, on Guile-SSH." - (find (match-lambda - (('ssh _ ...) #t) - (_ #f)) - (source-module-closure file #:select? (const #t)))) +(define (has-all-its-dependencies? file) + "Return true if the dependencies of the module defined in FILE are +available, false otherwise." + (let ((module (call-with-input-file file + (lambda (port) + (match (read port) + (('define-module name _ ...) + name)))))) + ;; If one of the dependencies of MODULE is missing, we get a + ;; '&missing-dependency-error'. + (guard (c ((missing-dependency-error? c) #f)) + (source-module-closure (list module) #:select? (const #t))))) (define (all-scheme-files directory) "Return a sorted list of Scheme files found in DIRECTORY." @@ -145,10 +151,7 @@ containing the source code. Write any debugging output to DEBUG-PORT." ;; Compile the .scm files. Load all the files before compiling them to ;; work around <http://bugs.gnu.org/15602> (FIXME). ;; Filter out files depending on Guile-SSH when Guile-SSH is missing. - (let* ((files (remove (if (false-if-exception - (resolve-interface '(ssh session))) - (const #f) - depends-on-guile-ssh?) + (let* ((files (filter has-all-its-dependencies? (all-scheme-files out))) (total (length files))) (let loop ((files files) diff --git a/guix/modules.scm b/guix/modules.scm index 24b5903579..19a4acd76c 100644 --- a/guix/modules.scm +++ b/guix/modules.scm @@ -20,8 +20,13 @@ #:use-module (guix memoization) #:use-module (guix sets) #:use-module (srfi srfi-26) + #:use-module (srfi srfi-34) + #:use-module (srfi srfi-35) #:use-module (ice-9 match) - #:export (source-module-closure + #:export (missing-dependency-error? + missing-dependency-module + + source-module-closure live-module-closure guix-module-name?)) @@ -35,6 +40,11 @@ ;;; ;;; Code: +;; The error corresponding to a missing module. +(define-condition-type &missing-dependency-error &error + missing-dependency-error? + (module missing-dependency-module)) + (define (colon-symbol? obj) "Return true if OBJ is a symbol that starts with a colon." (and (symbol? obj) @@ -106,9 +116,12 @@ depends on." "Return the modules used by MODULE by looking at its source code." (if (member module %source-less-modules) '() - (module-file-dependencies - (search-path load-path - (module-name->file-name module))))) + (match (search-path load-path (module-name->file-name module)) + ((? string? file) + (module-file-dependencies file)) + (#f + (raise (condition (&missing-dependency-error + (module module)))))))) (define* (module-closure modules #:key diff --git a/tests/modules.scm b/tests/modules.scm index 04945e531b..57019c600c 100644 --- a/tests/modules.scm +++ b/tests/modules.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2016, 2017 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -19,7 +19,9 @@ (define-module (test-modules) #:use-module (guix modules) #:use-module ((guix build-system gnu) #:select (%gnu-build-system-modules)) + #:use-module ((guix utils) #:select (call-with-temporary-directory)) #:use-module (srfi srfi-1) + #:use-module (srfi srfi-34) #:use-module (srfi srfi-64)) (test-begin "modules") @@ -42,4 +44,25 @@ (live-module-closure '((gnu build vm))) (source-module-closure '((gnu build vm))))) +(test-equal "&missing-dependency-error" + '(something that does not exist) + (call-with-temporary-directory + (lambda (directory) + (call-with-output-file (string-append directory "/foobar.scm") + (lambda (port) + (write '(define-module (foobar) + #:use-module (something that does not exist)) + port))) + + (call-with-output-file (string-append directory "/baz.scm") + (lambda (port) + (write '(define-module (baz) + #:use-module (foobar)) + port))) + + (guard (c ((missing-dependency-error? c) + (missing-dependency-module c))) + (source-module-closure '((baz)) (list directory) + #:select? (const #t)))))) + (test-end) |