diff options
author | Mark H Weaver <mhw@netris.org> | 2018-05-17 01:00:50 -0400 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2018-05-17 01:00:50 -0400 |
commit | 539bf8f2c071b53834829259bb3fabf0390c5dc6 (patch) | |
tree | 16672732afbf4c3f933e67ac677aa1877f6a7657 /gnu/packages | |
parent | 903874328ed5e5ab766e36cee1b1a0989e8b24a9 (diff) | |
parent | 2cf8531f360ef390d3ec670cc150b106bab5eff1 (diff) | |
download | patches-539bf8f2c071b53834829259bb3fabf0390c5dc6.tar patches-539bf8f2c071b53834829259bb3fabf0390c5dc6.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages')
69 files changed, 3558 insertions, 831 deletions
diff --git a/gnu/packages/android.scm b/gnu/packages/android.scm index 105e3d1775..7618c0e1f6 100644 --- a/gnu/packages/android.scm +++ b/gnu/packages/android.scm @@ -27,18 +27,73 @@ #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix build-system gnu) + #:use-module (guix build-system android-ndk) #:use-module (guix build-system python) #:use-module (guix build-system trivial) #:use-module ((guix licenses) #:prefix license:) #:use-module (gnu packages) #:use-module (gnu packages check) + #:use-module (gnu packages compression) #:use-module (gnu packages gnupg) + #:use-module (gnu packages pcre) #:use-module (gnu packages python) + #:use-module (gnu packages selinux) #:use-module (gnu packages ssh) #:use-module (gnu packages version-control) #:use-module (gnu packages tls) #:use-module (gnu packages linux)) +(define-public android-make-stub + (package + (name "android-make-stub") + (version "0.6.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/daym/android-make-stub.git") + (commit (string-append "v" version)))) + (file-name (string-append "android-make-stub-" + version "-checkout")) + (sha256 + (base32 + "0y1b2x96d37n6f1bp6dcx08bn08zac0cylmbfsx6mf2nahc02fhc")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; None exist. + #:phases + (modify-phases %standard-phases + (delete 'configure) + (delete 'build) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out"))) + (invoke "make" (string-append "prefix=" out) "install") + #t)))))) + (home-page "https://github.com/daym/android-make-stub") + (synopsis "Stubs for the @command{make} system of the Android platform") + (description "@code{android-make-stub} provides stubs for the +@command{make} system of the Android platform. This allows us to +use their packages mostly unmodified in our Android NDK build system.") + (license license:asl2.0))) + +(define-public android-googletest + (package (inherit googletest) + (name "android-googletest") + (arguments + `(#:configure-flags '("-DBUILD_SHARED_LIBS=ON") + #:phases + (modify-phases %standard-phases + (add-after 'install 'install-host-libraries + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib"))) + (symlink "libgtest.so" + (string-append lib "/libgtest_host.so")) + (symlink "libgmock.so" + (string-append lib "/libgmock_host.so")) + #t)))))))) + ;; The Makefiles that we add are largely based on the Debian ;; packages. They are licensed under GPL-2 and have copyright: ;; 2012, Stefan Handschuh <handschuh.stefan@googlemail.com> @@ -58,52 +113,69 @@ version "-checkout")) (sha256 (base32 - "0xc2n7jxrf1iw9cc278pijdfjix2fkiig5ws27f6rwp40zg5mrgg")))) + "0xc2n7jxrf1iw9cc278pijdfjix2fkiig5ws27f6rwp40zg5mrgg")) + (patches + (search-patches "libbase-use-own-logging.patch" + "libbase-fix-includes.patch" + "libutils-remove-damaging-includes.patch" + "libutils-add-includes.patch" + "adb-add-libraries.patch" + "libziparchive-add-includes.patch")))) + +(define (android-platform-system-extras version) + (origin + (method git-fetch) + (uri (git-reference + (url "https://android.googlesource.com/platform/system/extras") + (commit (string-append "android-" version)))) + (file-name (string-append "android-platform-system-extras-" + version "-checkout")) + (sha256 + (base32 + "18130c23ybqcpgjc5v6f8kdbv2xn39hyiaj17dzldjb9rlwzcyy9")))) + +(define (android-platform-bionic version) + (origin + (method git-fetch) + (uri (git-reference + (url "https://android.googlesource.com/platform/bionic") + (commit (string-append "android-" version)))) + (file-name (string-append "android-platform-bionic-" + version "-checkout")) + (sha256 + (base32 + "0n9wkz3ynqw39if1ss9n32m66iga14nndf29hpm7g1aqn4wvvgzk")))) + +(define (android-platform-external version subdirectory checksum) + (origin + (method git-fetch) + (uri (git-reference + (url + (string-append "https://android.googlesource.com/platform/external/" + subdirectory)) + (commit (string-append "android-" version)))) + (file-name (string-append "android-platform-system-external-" subdirectory "-" + version "-checkout")) + (sha256 + (base32 + checksum)))) -(define liblog +(define android-liblog (package - (name "liblog") + (name "android-liblog") (version (android-platform-version)) (source (android-platform-system-core version)) - (build-system gnu-build-system) + (build-system android-ndk-build-system) (arguments - `(#:tests? #f ; TODO. - #:make-flags '("CC=gcc") + `(#:make-flags '("LDLIBS=-lpthread") #:phases (modify-phases %standard-phases (add-after 'unpack 'enter-source (lambda _ (chdir "liblog") #t)) - (add-after 'enter-source 'create-Makefile - (lambda _ - ;; No useful makefile is shipped, so we create one. - (with-output-to-file "Makefile" - (lambda _ - (display - (string-append - "NAME = liblog\n" - "SOURCES = log_event_list.c log_event_write.c" - " logger_write.c config_write.c logger_name.c" - " logger_lock.c fake_log_device.c fake_writer.c" - " event_tag_map.c\n" - - "CFLAGS += -fvisibility=hidden -fPIC\n" - "CPPFLAGS += -I../include -DFAKE_LOG_DEVICE=1" - ;; Keep these two in sync with "liblog/Android.bp". - " -DLIBLOG_LOG_TAG=1005" - " -DSNET_EVENT_LOG_TAG=1397638484\n" - "LDFLAGS += -shared -Wl,-soname,$(NAME).so.0 -lpthread\n" - - "build: $(SOURCES)\n" - " $(CC) $^ -o $(NAME).so.0 $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)\n")) - #t)))) - (delete 'configure) - (replace 'install + (add-after 'install 'ldconfig (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (lib (string-append out "/lib"))) - (install-file "liblog.so.0" lib) - (with-directory-excursion lib - (symlink "liblog.so.0" "liblog.so")) + (let ((out (assoc-ref outputs "out"))) + (symlink "liblog.so.0" (string-append out "/lib/liblog.so")) #t)))))) (home-page "https://developer.android.com/") (synopsis "Logging library from the Android platform.") @@ -113,62 +185,29 @@ interfaces for either writing or reading logs. The log buffers are divided up in Main, System, Radio and Events sub-logs.") (license license:asl2.0))) -(define libbase +(define android-libbase (package - (name "libbase") + (name "android-libbase") (version (android-platform-version)) - (source (origin - (inherit (android-platform-system-core version)) - (patches - (search-patches "libbase-use-own-logging.patch" - "libbase-fix-includes.patch")))) - (build-system gnu-build-system) + (source (android-platform-system-core version)) + (build-system android-ndk-build-system) (arguments - `(#:tests? #f ; TODO. + `(#:tests? #f ; Test failure: logging.UNIMPLEMENTED + #:make-flags '("CXXFLAGS=-std=gnu++11") #:phases (modify-phases %standard-phases (add-after 'unpack 'enter-source - (lambda _ (chdir "base") #t)) - (add-after 'enter-source 'create-Makefile - (lambda _ - ;; No useful makefile is shipped, so we create one. - (with-output-to-file "Makefile" - (lambda _ - (display - (string-append - "NAME = libbase\n" - "SOURCES = file.cpp logging.cpp parsenetaddress.cpp" - " stringprintf.cpp strings.cpp errors_unix.cpp\n" - - "CXXFLAGS += -std=gnu++11 -fPIC\n" - "CPPFLAGS += -Iinclude -I../include\n" - "LDFLAGS += -shared -Wl,-soname,$(NAME).so.0" - " -L.. -llog\n" - - "build: $(SOURCES)\n" - " $(CXX) $^ -o $(NAME).so.0 $(CXXFLAGS) $(CPPFLAGS)" - " $(LDFLAGS)\n")) - #t)))) - (delete 'configure) - (replace 'install - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (lib (string-append out "/lib"))) - (install-file "libbase.so.0" lib) - (with-directory-excursion lib - (symlink "libbase.so.0" "libbase.so")) - (copy-recursively "include" out) - #t)))))) - (inputs `(("liblog" ,liblog))) + (lambda _ (chdir "base") #t))))) + (inputs `(("android-liblog" ,android-liblog))) (home-page "https://developer.android.com/") (synopsis "Android platform base library") (description "@code{libbase} is a library in common use by the various Android core host applications.") (license license:asl2.0))) -(define libcutils +(define android-libcutils (package - (name "libcutils") + (name "android-libcutils") (version (android-platform-version)) (source (android-platform-system-core version)) (build-system gnu-build-system) @@ -206,10 +245,13 @@ various Android core host applications.") (replace 'install (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) - (lib (string-append out "/lib"))) + (lib (string-append out "/lib")) + (include (string-append out "/include"))) (install-file "libcutils.so.0" lib) (with-directory-excursion lib (symlink "libcutils.so.0" "libcutils.so")) + (copy-recursively "../include/cutils" + (string-append include "/cutils")) #t)))))) (home-page "https://developer.android.com/") (synopsis "Android platform c utils library") @@ -217,90 +259,92 @@ various Android core host applications.") various Android core host applications.") (license license:asl2.0))) +(define-public android-libsparse + (package + (name "android-libsparse") + (version (android-platform-version)) + (source (android-platform-system-core version)) + (build-system android-ndk-build-system) + (arguments + `(#:make-flags '("CFLAGS=-Wno-error" + "CXXFLAGS=-fpermissive -Wno-error") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'enter-source + (lambda _ (chdir "libsparse") #t))))) + (inputs + `(("zlib" ,zlib))) + (home-page "https://developer.android.com/") + (synopsis "Android platform sparse library") + (description "@code{android-libsparse} is a library in common use by the +various Android core host applications.") + (license license:asl2.0))) + +(define-public android-libziparchive + (package + (name "android-libziparchive") + (version (android-platform-version)) + (source (android-platform-system-core version)) + (build-system android-ndk-build-system) + (arguments + `(#:make-flags '("CFLAGS=-Wno-error" + "CXXFLAGS=-fpermissive -Wno-error -std=gnu++11") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'enter-source + (lambda _ (chdir "libziparchive") #t)) + (add-before 'check 'setenv + (lambda _ + (setenv "ziparchive_tests_host_PARAMS" "--test_data_dir=testdata") + #t)) + (add-after 'install 'install-headers + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (copy-recursively "../include/ziparchive" + (string-append out "/include/ziparchive")) + #t)))))) + (inputs + `(("zlib" ,zlib))) + (native-inputs + `(("android-libbase" ,android-libbase) + ("android-libutils" ,android-libutils) + ("android-liblog" ,android-liblog))) + (home-page "https://developer.android.com/") + (synopsis "Android platform ZIP library") + (description "@code{android-libziparchive} is a library in common use by the +various Android core host applications.") + (license license:asl2.0))) + (define-public adb (package (name "adb") (version (android-platform-version)) - (source (origin - (inherit (android-platform-system-core version)) - (patches - (search-patches "libbase-use-own-logging.patch" - "libbase-fix-includes.patch")))) - (build-system gnu-build-system) + (source (android-platform-system-core version)) + (build-system android-ndk-build-system) (arguments - `(#:phases + `(#:tests? #f ; Test failure: sysdeps_poll.fd_count + #:make-flags + (list "CFLAGS=-Wno-error" + "CXXFLAGS=-fpermissive -Wno-error -std=gnu++14 -D_Nonnull= -D_Nullable= -I ." + (string-append "LDFLAGS=-Wl,-rpath=" (assoc-ref %outputs "out") "/lib " + "-Wl,-rpath=" (assoc-ref %build-inputs "openssl") "/lib -L .")) + #:phases (modify-phases %standard-phases (add-after 'unpack 'enter-source (lambda _ (chdir "adb") #t)) - (add-before 'build 'fix-clang - (lambda _ - ;; adb_client.h contains _Nonnull and _Nullable attributes, that - ;; are not understood by gcc. - (substitute* "adb_client.h" - (("_Nonnull") "") - (("_Nullable") "")) - #t)) - (add-before 'build 'fix-main - (lambda _ - ;; main.cpp used to be adb_main.cpp in the current directory - ;; rather than in its own subdirectory, but it was not fixed. - ;; This leads to some header files not being found anymore. - (copy-file "client/main.cpp" "adb_main.cpp") + (add-after 'enter-source 'make-libs-available + (lambda* (#:key inputs outputs #:allow-other-keys) + (substitute* "Android.mk" + (("libcrypto_static") "libcrypto")) #t)) - (add-after 'enter-source 'create-Makefile - (lambda* (#:key outputs #:allow-other-keys) - ;; No useful makefile is shipped, so we create one. - (with-output-to-file "Makefile" - (lambda _ - (display - (string-append - ;; Common for all components. - "CXXFLAGS += -std=gnu++14 -fpermissive\n" - "CPPFLAGS += -I../include -I../base/include -I. -DADB_HOST=1 " - "-DADB_REVISION='\"" ,version "\"' -fPIC\n" - "LDFLAGS += -lcrypto -lpthread -lbase -lcutils -L. -ladb\n" - - ;; Libadb specifics. - "LIBADB_SOURCES = adb.cpp adb_auth.cpp adb_io.cpp " - "adb_listeners.cpp adb_trace.cpp adb_utils.cpp fdevent.cpp " - "sockets.cpp transport.cpp transport_local.cpp transport_usb.cpp " - "get_my_path_linux.cpp sysdeps_unix.cpp usb_linux.cpp " - "adb_auth_host.cpp diagnose_usb.cpp services.cpp " - "shell_service_protocol.cpp bugreport.cpp line_printer.cpp\n" - - "LIBADB_LDFLAGS += -shared -Wl,-soname,libadb.so.0 " - "-lcrypto -lpthread -lbase\n" - - ;; Adb specifics. - "ADB_SOURCES = adb_main.cpp console.cpp commandline.cpp " - "adb_client.cpp file_sync_client.cpp\n" - "ADB_LDFLAGS += -Wl,-rpath=" (assoc-ref outputs "out") "/lib\n" - - "build: libadb $(ADB_SOURCES)\n" - " $(CXX) $(ADB_SOURCES) -o adb $(CXXFLAGS) $(CPPFLAGS) " - "$(ADB_LDFLAGS) $(LDFLAGS)\n" - - "libadb: $(LIBADB_SOURCES)\n" - " $(CXX) $^ -o libadb.so.0 $(CXXFLAGS) $(CPPFLAGS) " - "$(LIBADB_LDFLAGS)\n" - " ln -sv libadb.so.0 libadb.so\n")) - #t)))) - (delete 'configure) - (replace 'install - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (lib (string-append out "/lib")) - (bin (string-append out "/bin"))) - (install-file "libadb.so.0" lib) - (install-file "adb" bin) - (with-directory-excursion lib - (symlink "libadb.so.0" "libadb.so")) - #t)))) - ;; Test suite must be run with attached devices - #:tests? #f)) + (add-after 'install 'install-headers + (lambda* (#:key inputs outputs #:allow-other-keys) + (install-file "diagnose_usb.h" (string-append (assoc-ref outputs "out") "/include")) + #t))))) (inputs - `(("libbase" ,libbase) - ("libcutils" ,libcutils) + `(("android-libbase" ,android-libbase) + ("android-libcutils" ,android-libcutils) + ("android-liblog" ,android-liblog) ("openssl" ,openssl))) (home-page "https://developer.android.com/studio/command-line/adb.html") (synopsis "Android Debug Bridge") @@ -329,8 +373,10 @@ to a Unix shell that can run commands on the connected device or emulator.") (replace 'install (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) - (bin (string-append out "/bin"))) + (bin (string-append out "/bin")) + (include (string-append out "/include"))) (install-file "mkbootimg" bin) + (install-file "bootimg.h" include) #t)))))) (home-page "https://developer.android.com/studio/command-line/adb.html") (synopsis "Tool to create Android boot images") @@ -338,6 +384,263 @@ to a Unix shell that can run commands on the connected device or emulator.") Images.") (license license:asl2.0))) +(define-public android-safe-iop + (package + (name "android-safe-iop") + (version (android-platform-version)) + (source (android-platform-external version "safe-iop" + "1nyyrs463advjhlq8xx1lm37m4g5afv7gy0csxrj7biwwl0v13qw")) + (build-system android-ndk-build-system) + (arguments + `(#:make-flags '("CXXFLAGS=-fpermissive -Wno-error") + #:phases + (modify-phases %standard-phases + (add-before 'build 'patch-host + (lambda _ + ;; TODO: Cross-compile. + (substitute* "Android.mk" + (("BUILD_STATIC_LIBRARY") "BUILD_HOST_STATIC_LIBRARY")) + #t))))) + (home-page "https://developer.android.com/") + (synopsis "Safe integers in C") + (description "@code{android-safe-iop} provides a set of functions for +performing and checking safe integer operations. Ensure that integer +operations do not result in silent overflow.") + (license license:bsd-2))) + +(define-public android-bionic-uapi + (package + (name "android-bionic-uapi") + (version (android-platform-version)) + (source (android-platform-bionic version)) + (build-system android-ndk-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'enter-source + (lambda _ (chdir "libc") #t)) + (replace 'check + (const #t)) + (replace 'build + (const #t)) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (out-sys (string-append out "/include/sys"))) + (mkdir-p out-sys) + (install-file "include/sys/system_properties.h" out-sys) + (install-file "include/sys/_system_properties.h" out-sys) + (copy-recursively "kernel/uapi" (string-append out "/include")) + #t)))))) + (home-page "https://developer.android.com/") + (synopsis "Android Linux API that is safe for user space") + (description "@code{android-bionic-uapi} provides the part of the Linux API +that is safe to use for user space. It also includes +@code{system_properties.h} and @code{_system_properties.h}.") + (license license:asl2.0))) + +(define-public android-libselinux + (package + (name "android-libselinux") + (version (android-platform-version)) + (source + (android-platform-external version "libselinux" + "13m2q32gzdcs5d0zj1nwasjy1j8vsxsgbjg7m5sa9lfcjaj7nkm7")) + (build-system android-ndk-build-system) + (arguments + ;; See logd/Android.mk for the *_LOG_TAG values. + `(#:make-flags (list (string-append "CFLAGS=-Wno-error " + "-I core/include " + "-I core/libpackagelistparser/include " + "-DAUDITD_LOG_TAG=1003 " + "-DLOGD_LOG_TAG=1004 -D_GNU_SOURCE") + "LDFLAGS=-L . -lpcre") + #:phases + (modify-phases %standard-phases + (add-after 'unpack-core 'patch-HOST + (lambda _ + ;; gettid duplicates otherwise. + (substitute* "src/procattr.c" + (("#ifdef HOST") "#ifdef XXX")) + #t))))) + (inputs + `(("openssl" ,openssl))) + (native-inputs + `(("android-bionic-uapi" ,android-bionic-uapi) + ;; pcre is inlined by our package. + ("pcre" ,pcre))) + (home-page "https://developer.android.com/") + (synopsis (package-synopsis libselinux)) + (description (package-description libselinux)) + (license (package-license libselinux)))) + +(define-public android-ext4-utils + (package + (name "android-ext4-utils") + (version (android-platform-version)) + (source (android-platform-system-extras version)) + (build-system android-ndk-build-system) + (arguments + `(#:make-flags + (list (string-append "CPPFLAGS=" + ;"-Wno-error " + "-I " + (assoc-ref %build-inputs "android-libselinux") + "/include " + "-I " (assoc-ref %build-inputs "android-libsparse") + "/include " + "-I " (assoc-ref %build-inputs "android-libcutils") + "/include " + "-I " (assoc-ref %build-inputs "android-liblog") "/include " + "-I ../core/include") + "CFLAGS=-Wno-error" + "install-libext4_utils_host.a" + (string-append "prefix=" (assoc-ref %outputs "out"))) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'unpack-core + (lambda* (#:key inputs #:allow-other-keys) + (mkdir-p "core") + (with-directory-excursion "core" + (invoke "tar" "axf" (assoc-ref inputs "android-core") + "--strip-components=1")) + #t)) + (add-after 'unpack-core 'enter-source + (lambda _ (chdir "ext4_utils") #t)) + (replace 'install + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (copy-recursively "." (string-append out "/include"))) + #t))))) + (inputs + `(("android-libcutils" ,android-libcutils) + ("android-liblog" ,android-liblog) + ("android-libselinux" ,android-libselinux) + ("android-libsparse" ,android-libsparse) + ("zlib" ,zlib))) + (native-inputs + `(("android-core" ,(android-platform-system-core version)))) + (home-page "https://developer.android.com/") + (synopsis "Android ext4 filesystem utils") + (description "@code{android-ext4-utils} is a library in common use by the +Android core.") + (license license:asl2.0))) + +(define-public android-f2fs-utils + (package + (name "android-f2fs-utils") + (version (android-platform-version)) + (source (android-platform-system-extras version)) + (build-system android-ndk-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'enter-source + (lambda _ (chdir "f2fs_utils") #t)) + (add-after 'install 'install-headers + (lambda* (#:key inputs outputs #:allow-other-keys) + (copy-recursively "." (string-append (assoc-ref outputs "out") + "/include")) + #t)) + (add-after 'install 'install-shell-scripts + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin"))) + (patch-shebang "mkf2fsuserimg.sh") + (substitute* "mkf2fsuserimg.sh" + (("make_f2fs") (string-append bin "/make_f2fs"))) + (install-file "mkf2fsuserimg.sh" bin) + #t)))))) + (inputs + `(("f2fs-tools" ,f2fs-tools-1.7) + ("android-libselinux" ,android-libselinux) + ("android-libsparse" ,android-libsparse) + ("android-libcutils" ,android-libcutils) + ("zlib" ,zlib))) + (home-page "https://developer.android.com/") + (synopsis "Android f2fs utils") + (description "@code{android-f2fs-utils} is a library in common use by the +Android core. It allows the user to create images for the @code{f2fs} Flash +file system.") + (license license:asl2.0))) + +(define-public android-libutils + (package + (name "android-libutils") + (version (android-platform-version)) + (source (android-platform-system-core version)) + (build-system android-ndk-build-system) + (arguments + `(#:tests? #f ; TODO + #:make-flags '("CXXFLAGS=-std=gnu++11 -Wno-error") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'enter-source + (lambda _ (chdir "libutils") #t)) + + (add-after 'install 'install-headers + (lambda* (#:key inputs outputs #:allow-other-keys) + (copy-recursively "../include/utils" (string-append (assoc-ref outputs "out") "/include/utils"))))))) + (inputs + `(("android-safe-iop" ,android-safe-iop) + ("android-libcutils" ,android-libcutils))) + (native-inputs + `(("android-bionic-uapi" ,android-bionic-uapi) + ("android-liblog" ,android-liblog))) + (home-page "https://developer.android.com/") + (synopsis "Android utility library") + (description "@code{android-libutils} provides utilities for Android NDK developers.") + (license license:asl2.0))) + +(define-public fastboot + (package + (name "fastboot") + (version (android-platform-version)) + (source (android-platform-system-core version)) + (build-system android-ndk-build-system) + (arguments + `(#:make-flags (list "CXXFLAGS=-std=gnu++11") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'enter-source + (lambda _ + (chdir "fastboot") + #t)) + (add-after 'enter-source 'patch-source + (lambda _ + (substitute* "Android.mk" + (("libext4_utils_host") "libext4_utils_host libselinux libpcre")) + #t)) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib")) + (bin (string-append out "/bin"))) + (install-file "fastboot" bin) + #t)))))) + (inputs + `(("adb" ,adb) + ("android-safe-iop" ,android-safe-iop) + ("android-ext4-utils" ,android-ext4-utils) + ("android-f2fs-utils" ,android-f2fs-utils) + ("android-libbase" ,android-libbase) + ("android-libcutils" ,android-libcutils) + ("android-liblog" ,android-liblog) + ("android-libutils" ,android-libutils) + ("android-libsparse" ,android-libsparse) + ("android-libziparchive" ,android-libziparchive) + ("android-libselinux" ,android-libselinux) + ("pcre" ,pcre) + ("mkbootimg" ,mkbootimg) + ("zlib" ,zlib))) + (native-inputs + `(("xz" ,xz))) + (home-page "https://developer.android.com/studio/command-line/") + (synopsis "Android image flasher") + (description + "This package provides @command{fastboot}, a tool to upload file system images to Android devices.") + (license license:asl2.0))) + (define-public android-udev-rules (package (name "android-udev-rules") diff --git a/gnu/packages/aux-files/run-in-namespace.c b/gnu/packages/aux-files/run-in-namespace.c new file mode 100644 index 0000000000..f0cff88552 --- /dev/null +++ b/gnu/packages/aux-files/run-in-namespace.c @@ -0,0 +1,313 @@ +/* GNU Guix --- Functional package management for GNU + Copyright (C) 2018 Ludovic Courtès <ludo@gnu.org> + + This file is part of GNU Guix. + + GNU Guix is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or (at + your option) any later version. + + GNU Guix is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. */ + +/* Make the given @WRAPPED_PROGRAM@ relocatable by executing it in a separate + mount namespace where the store is mounted in its right place. + + We would happily do that in Scheme using 'call-with-container'. However, + this very program needs to be relocatable, so it needs to be statically + linked, which complicates things (Guile's modules can hardly be "linked" + into a single executable.) */ + +#define _GNU_SOURCE +#include <stdlib.h> +#include <stdio.h> +#include <unistd.h> +#include <sched.h> +#include <sys/mount.h> +#include <errno.h> +#include <libgen.h> +#include <limits.h> +#include <string.h> +#include <assert.h> +#include <sys/stat.h> +#include <sys/types.h> +#include <sys/wait.h> +#include <fcntl.h> +#include <dirent.h> +#include <sys/syscall.h> + +/* Concatenate DIRECTORY, a slash, and FILE. Return the result, which the + caller must eventually free. */ +static char * +concat (const char *directory, const char *file) +{ + char *result = malloc (strlen (directory) + 2 + strlen (file)); + assert (result != NULL); + + strcpy (result, directory); + strcat (result, "/"); + strcat (result, file); + return result; +} + +static void +mkdir_p (const char *directory) +{ + if (strcmp (directory, "/") != 0) + { + char *parent = dirname (strdupa (directory)); + mkdir_p (parent); + int err = mkdir (directory, 0700); + if (err < 0 && errno != EEXIST) + assert_perror (errno); + } +} + +static void +rm_rf (const char *directory) +{ + DIR *stream = opendir (directory); + + for (struct dirent *entry = readdir (stream); + entry != NULL; + entry = readdir (stream)) + { + if (strcmp (entry->d_name, ".") == 0 + || strcmp (entry->d_name, "..") == 0) + continue; + + char *full = concat (directory, entry->d_name); + + int err = unlink (full); + if (err < 0) + { + if (errno == EISDIR) + /* Recurse (we expect a shallow directory structure so there's + little risk of stack overflow.) */ + rm_rf (full); + else + assert_perror (errno); + } + + free (full); + } + + closedir (stream); + + int err = rmdir (directory); + if (err < 0 && errno != ENOENT) + assert_perror (errno); +} + +/* Bind mount all the top-level entries in SOURCE to TARGET. */ +static void +bind_mount (const char *source, const char *target) +{ + DIR *stream = opendir (source); + + for (struct dirent *entry = readdir (stream); + entry != NULL; + entry = readdir (stream)) + { + /* XXX: Some file systems may not report a useful 'd_type'. Ignore them + for now. */ + assert (entry->d_type != DT_UNKNOWN); + + if (strcmp (entry->d_name, ".") == 0 + || strcmp (entry->d_name, "..") == 0) + continue; + + char *abs_source = concat (source, entry->d_name); + char *new_entry = concat (target, entry->d_name); + + if (entry->d_type == DT_LNK) + { + char target[PATH_MAX]; + + ssize_t result = readlink (abs_source, target, sizeof target - 1); + if (result > 0) + { + target[result] = '\0'; + int err = symlink (target, new_entry); + if (err < 0) + assert_perror (errno); + } + } + else + { + /* Create the mount point. */ + if (entry->d_type == DT_DIR) + { + int err = mkdir (new_entry, 0700); + if (err != 0) + assert_perror (errno); + } + else + close (open (new_entry, O_WRONLY | O_CREAT)); + + int err = mount (abs_source, new_entry, "none", + MS_BIND | MS_REC | MS_RDONLY, NULL); + + /* It used to be that only directories could be bind-mounted. Thus, + keep going if we fail to bind-mount a non-directory entry. + That's OK because regular files in the root file system are + usually uninteresting. */ + if (err != 0 && entry->d_type != DT_DIR) + assert_perror (errno); + + free (new_entry); + free (abs_source); + } + } + + closedir (stream); +} + +/* Write the user/group ID map for PID to FILE, mapping ID to itself. See + user_namespaces(7). */ +static void +write_id_map (pid_t pid, const char *file, int id) +{ + char id_map_file[100]; + snprintf (id_map_file, sizeof id_map_file, "/proc/%d/%s", pid, file); + + char id_map[100]; + + /* Map root and the current user. */ + int len = snprintf (id_map, sizeof id_map, "%d %d 1\n", id, id); + int fd = open (id_map_file, O_WRONLY); + if (fd < 0) + assert_perror (errno); + + int n = write (fd, id_map, len); + if (n < 0) + assert_perror (errno); + + close (fd); +} + +/* Disallow setgroups(2) for PID. */ +static void +disallow_setgroups (pid_t pid) +{ + char file[100]; + + snprintf (file, sizeof file, "/proc/%d/setgroups", pid); + + int fd = open (file, O_WRONLY); + if (fd < 0) + assert_perror (errno); + + int err = write (fd, "deny", 5); + if (err < 0) + assert_perror (errno); + + close (fd); +} + + +int +main (int argc, char *argv[]) +{ + ssize_t size; + char self[PATH_MAX]; + size = readlink ("/proc/self/exe", self, sizeof self - 1); + assert (size > 0); + + /* SELF is something like "/home/ludo/.local/gnu/store/…-foo/bin/ls" and we + want to extract "/home/ludo/.local/gnu/store". */ + size_t index = strlen (self) + - strlen ("@WRAPPED_PROGRAM@") + + strlen ("@STORE_DIRECTORY@"); + char *store = strdup (self); + store[index] = '\0'; + + struct stat statbuf; + + /* If STORE is already at the "right" place, we can execute + @WRAPPED_PROGRAM@ right away. This is not just an optimization: it's + needed when running one of these wrappers from within an unshare'd + namespace, because 'unshare' fails with EPERM in that context. */ + if (strcmp (store, "@STORE_DIRECTORY@") != 0 + && lstat ("@WRAPPED_PROGRAM@", &statbuf) != 0) + { + /* Spawn @WRAPPED_PROGRAM@ in a separate namespace where STORE is + bind-mounted in the right place. */ + int err; + char *new_root = mkdtemp (strdup ("/tmp/guix-exec-XXXXXX")); + char *new_store = concat (new_root, "@STORE_DIRECTORY@"); + char *cwd = get_current_dir_name (); + + /* Create a child with separate namespaces and set up bind-mounts from + there. That way, bind-mounts automatically disappear when the child + exits, which simplifies cleanup for the parent. Note: clone is more + convenient than fork + unshare since the parent can directly write + the child uid_map/gid_map files. */ + pid_t child = syscall (SYS_clone, SIGCHLD | CLONE_NEWNS | CLONE_NEWUSER, + NULL, NULL, NULL); + switch (child) + { + case 0: + /* Note: Due to <https://bugzilla.kernel.org/show_bug.cgi?id=183461> + we cannot make NEW_ROOT a tmpfs (which would have saved the need + for 'rm_rf'.) */ + bind_mount ("/", new_root); + mkdir_p (new_store); + err = mount (store, new_store, "none", MS_BIND | MS_REC | MS_RDONLY, + NULL); + if (err < 0) + assert_perror (errno); + + chdir (new_root); + err = chroot (new_root); + if (err < 0) + assert_perror (errno); + + /* Change back to where we were before chroot'ing. */ + chdir (cwd); + break; + + case -1: + fprintf (stderr, "%s: error: 'clone' failed: %m\n", argv[0]); + fprintf (stderr, "\ +This may be because \"user namespaces\" are not supported on this system.\n\ +Consequently, we cannot run '@WRAPPED_PROGRAM@',\n\ +unless you move it to the '@STORE_DIRECTORY@' directory.\n\ +\n\ +Please refer to the 'guix pack' documentation for more information.\n"); + return EXIT_FAILURE; + + default: + { + /* Map the current user/group ID in the child's namespace (the + default is to get the "overflow UID", i.e., the UID of + "nobody"). We must first disallow 'setgroups' for that + process. */ + disallow_setgroups (child); + write_id_map (child, "uid_map", getuid ()); + write_id_map (child, "gid_map", getgid ()); + + int status; + waitpid (child, &status, 0); + chdir ("/"); /* avoid EBUSY */ + rm_rf (new_root); + free (new_root); + exit (status); + } + } + } + + /* The executable is available under @STORE_DIRECTORY@, so we can now + execute it. */ + int err = execv ("@WRAPPED_PROGRAM@", argv); + if (err < 0) + assert_perror (errno); + + return EXIT_FAILURE; +} diff --git a/gnu/packages/bioconductor.scm b/gnu/packages/bioconductor.scm index 3e6df50653..788e1e7def 100644 --- a/gnu/packages/bioconductor.scm +++ b/gnu/packages/bioconductor.scm @@ -29,6 +29,38 @@ #:use-module (gnu packages statistics) #:use-module (gnu packages bioinformatics)) +(define-public r-bsgenome-dmelanogaster-ucsc-dm6 + (package + (name "r-bsgenome-dmelanogaster-ucsc-dm6") + (version "1.4.1") + (source (origin + (method url-fetch) + ;; We cannot use bioconductor-uri here because this tarball is + ;; located under "data/annotation/" instead of "bioc/". + (uri (string-append "https://www.bioconductor.org/packages/" + "release/data/annotation/src/contrib/" + "BSgenome.Dmelanogaster.UCSC.dm6_" + version ".tar.gz")) + (sha256 + (base32 + "1bhj0rdgf7lspw4xby9y9mf7v7jxxz8001bc8vw8kf04rjsx6060")))) + (properties + `((upstream-name . "BSgenome.Dmelanogaster.UCSC.dm6"))) + (build-system r-build-system) + ;; As this package provides little more than a very large data file it + ;; doesn't make sense to build substitutes. + (arguments `(#:substitutable? #f)) + (propagated-inputs + `(("r-bsgenome" ,r-bsgenome))) + (home-page + "https://www.bioconductor.org/packages/BSgenome.Dmelanogaster.UCSC.dm6/") + (synopsis "Full genome sequences for Fly") + (description + "This package provides full genome sequences for Drosophila +melanogaster (Fly) as provided by UCSC (dm6) and stored in Biostrings +objects.") + (license license:artistic2.0))) + (define-public r-hpar (package (name "r-hpar") diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index ae021f8179..4758ce3081 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -2088,7 +2088,7 @@ accurately delineate genomic rearrangements throughout the genome.") (define-public diamond (package (name "diamond") - (version "0.9.21") + (version "0.9.22") (source (origin (method url-fetch) (uri (string-append @@ -2097,7 +2097,7 @@ accurately delineate genomic rearrangements throughout the genome.") (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "1cf98vcsiwcv3c4apg50w1240v1mpw0zln1sdw3g692dqa4y041z")))) + "0adp87r9ak63frdrdmrdfhsn6g0jnnyq1lr2wibvqbxcl37iir9m")))) (build-system cmake-build-system) (arguments '(#:tests? #f ; no "check" target @@ -11151,25 +11151,22 @@ with narrow binding events such as transcription factor ChIP-seq.") (define-public trim-galore (package (name "trim-galore") - (version "0.4.2") + (version "0.4.5") (source (origin - (method url-fetch) - (uri (string-append "http://www.bioinformatics.babraham.ac.uk/" - "projects/trim_galore/trim_galore_v" - version ".zip")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/FelixKrueger/TrimGalore.git") + (commit version))) + (file-name (string-append name "-" version "-checkout")) (sha256 (base32 - "0b9qdxi4521gsrjvbhgky8g7kry9b5nx3byzaxkgxz7p4k8bn1mn")))) + "0x5892l48c816pf00wmnz5vq0zq6170d3xc8zrxncd4jcz7h1p71")))) (build-system gnu-build-system) (arguments `(#:tests? #f ; no tests #:phases (modify-phases %standard-phases - ;; The archive contains plain files. - (replace 'unpack - (lambda* (#:key source #:allow-other-keys) - (zero? (system* "unzip" source)))) (delete 'configure) (delete 'build) (add-after 'unpack 'hardcode-tool-references @@ -11581,47 +11578,62 @@ Browser.") (define-public bismark (package (name "bismark") - (version "0.16.3") + (version "0.19.1") (source (origin - (method url-fetch) - (uri (string-append "https://github.com/FelixKrueger/Bismark/" - "archive/" version ".tar.gz")) - (file-name (string-append name "-" version ".tar.gz")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/FelixKrueger/Bismark.git") + (commit version))) + (file-name (string-append name "-" version "-checkout")) (sha256 (base32 - "1204i0pa02ll2jn5pnxypkclnskvv7a2nwh5nxhagmhxk9wfv9sq")))) + "0yb5l36slwg02fp4b1jdlplgljcsxgqfzvzihzdnphd87dghcc84")) + (snippet + '(begin + ;; highcharts.js is non-free software. The code is available under + ;; CC-BY-NC or proprietary licenses only. + (delete-file "bismark_sitrep/highcharts.js") + #t)))) (build-system perl-build-system) (arguments - `(#:tests? #f ; there are no tests + `(#:tests? #f ; there are no tests #:phases (modify-phases %standard-phases (delete 'configure) (delete 'build) (replace 'install (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((bin (string-append (assoc-ref outputs "out") - "/bin")) - (docdir (string-append (assoc-ref outputs "out") - "/share/doc/bismark")) - (docs '("Bismark_User_Guide.pdf" - "RELEASE_NOTES.txt")) - (scripts '("bismark" - "bismark_genome_preparation" - "bismark_methylation_extractor" - "bismark2bedGraph" - "bismark2report" - "coverage2cytosine" - "deduplicate_bismark" - "bismark_sitrep.tpl" - "bam2nuc" - "bismark2summary"))) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (share (string-append out "/share/bismark")) + (docdir (string-append out "/share/doc/bismark")) + (docs '("Docs/Bismark_User_Guide.html")) + (scripts '("bismark" + "bismark_genome_preparation" + "bismark_methylation_extractor" + "bismark2bedGraph" + "bismark2report" + "coverage2cytosine" + "deduplicate_bismark" + "filter_non_conversion" + "bam2nuc" + "bismark2summary"))) + (mkdir-p share) (mkdir-p docdir) (mkdir-p bin) (for-each (lambda (file) (install-file file bin)) scripts) (for-each (lambda (file) (install-file file docdir)) docs) + (copy-recursively "Docs/Images" (string-append docdir "/Images")) + + (substitute* "bismark2report" + (("\\$RealBin/bismark_sitrep") + (string-append share "/bismark_sitrep"))) + (copy-recursively "bismark_sitrep" + (string-append share "/bismark_sitrep")) + ;; Fix references to gunzip (substitute* (map (lambda (file) (string-append bin "/" file)) diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 0db6ad3f6a..af5d97288d 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -338,7 +338,7 @@ tree binary files. These are board description files used by Linux and BSD.") (define u-boot (package (name "u-boot") - (version "2018.01") + (version "2018.05") (source (origin (method url-fetch) (uri (string-append @@ -346,10 +346,10 @@ tree binary files. These are board description files used by Linux and BSD.") "u-boot-" version ".tar.bz2")) (sha256 (base32 - "1nidnnjprgxdhiiz7gmaj8cgcf52l5gbv64cmzjq4gmkjirmk3wk")))) + "0j60p4iskzb4hamxgykc6gd7xchxfka1zwh8hv08r9rrc4m3r8ad")))) (native-inputs `(("bc" ,bc) - ;("dtc" ,dtc) ; they have their own incompatible copy. + ("dtc" ,dtc) ("python-2" ,python-2) ("swig" ,swig))) (build-system gnu-build-system) @@ -392,15 +392,17 @@ also initializes the boards (RAM etc).") (if (file-exists? (string-append "configs/" config-name)) (zero? (apply system* "make" `(,@make-flags ,config-name))) (begin - (display "Invalid board name. Valid board names are:") - (let ((suffix-len (string-length "_defconfig"))) - (scandir "configs" - (lambda (file-name) - (when (string-suffix? "_defconfig" file-name) - (format #t - "- ~A\n" - (string-drop-right file-name - suffix-len)))))) + (display "Invalid board name. Valid board names are:" + (current-error-port)) + (let ((suffix-len (string-length "_defconfig")) + (entries (scandir "configs"))) + (for-each (lambda (file-name) + (when (string-suffix? "_defconfig" file-name) + (format (current-error-port) + "- ~A\n" + (string-drop-right file-name + suffix-len)))) + (sort entries string<))) #f))))) (replace 'install (lambda* (#:key outputs #:allow-other-keys) @@ -411,6 +413,8 @@ also initializes the boards (RAM etc).") (find-files "." "^(MLO|SPL)$")))) (mkdir-p libexec) (install-file ".config" libexec) + ;; Useful for "qemu -kernel". + (install-file "u-boot" libexec) (for-each (lambda (file) (let ((target-file (string-append libexec "/" file))) @@ -440,9 +444,10 @@ also initializes the boards (RAM etc).") (let ((bl31 (string-append (assoc-ref inputs "firmware") "/bl31.bin"))) (setenv "BL31" bl31) - ;; This is necessary while we're using the bundled dtc. - (setenv "PATH" (string-append (getenv "PATH") ":" - "scripts/dtc"))) + ;; This is necessary when we're using the bundled dtc. + ;(setenv "PATH" (string-append (getenv "PATH") ":" + ; "scripts/dtc")) + ) #t)))))) (native-inputs `(("firmware" ,arm-trusted-firmware-pine64-plus) @@ -469,6 +474,12 @@ also initializes the boards (RAM etc).") (define-public u-boot-mx6cuboxi (make-u-boot-package "mx6cuboxi" "arm-linux-gnueabihf")) +(define-public u-boot-novena + (make-u-boot-package "novena" "arm-linux-gnueabihf")) + +(define-public u-boot-cubieboard + (make-u-boot-package "Cubieboard" "arm-linux-gnueabihf")) + (define-public vboot-utils (package (name "vboot-utils") diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 9f85781db2..7ad1802f3c 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -267,7 +267,7 @@ ;; Drop trailing letters, as gmp-6.0.0a unpacks ;; into gmp-6.0.0. `(symlink ,(string-trim-right - (package-full-name lib) + (package-full-name lib "-") char-set:letter) ,(package-name lib))) (list gmp-6.0 mpfr mpc)) diff --git a/gnu/packages/dunst.scm b/gnu/packages/dunst.scm index 6df37894da..eaad227747 100644 --- a/gnu/packages/dunst.scm +++ b/gnu/packages/dunst.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015, 2017, 2018 Alex Kost <alezost@gmail.com> +;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> ;;; ;;; This file is part of GNU Guix. ;;; @@ -32,7 +33,7 @@ (define-public dunst (package (name "dunst") - (version "1.3.1") + (version "1.3.2") (source (origin (method url-fetch) (uri (string-append @@ -41,7 +42,7 @@ (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "1mkdp1vqc376z8clwm5s9070jq1g92j8hv2rr231jr2468fnwaga")))) + "12nj8qw3y3nl8sm24wizy2a7k06v1p88bnz1xr9l39h527xyidma")))) (build-system gnu-build-system) (arguments '(#:tests? #f ; no check target diff --git a/gnu/packages/education.scm b/gnu/packages/education.scm index 58f06c3106..72cd7c61ba 100644 --- a/gnu/packages/education.scm +++ b/gnu/packages/education.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2016, 2017 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com> ;;; Copyright © 2017, 2018 Efraim Flashner <efraim@flashner.co.il> +;;; Copyright © 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr> ;;; ;;; This file is part of GNU Guix. ;;; @@ -22,27 +23,33 @@ (define-module (gnu packages education) #:use-module (ice-9 regex) #:use-module (gnu packages) - #:use-module (gnu packages qt) + #:use-module (gnu packages base) + #:use-module (gnu packages bash) #:use-module (gnu packages compression) #:use-module (gnu packages databases) + #:use-module (gnu packages freedesktop) #:use-module (gnu packages gettext) #:use-module (gnu packages glib) #:use-module (gnu packages gnome) #:use-module (gnu packages gtk) + #:use-module (gnu packages javascript) #:use-module (gnu packages kde-frameworks) ; extra-cmake-modules #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) + #:use-module (gnu packages qt) #:use-module (gnu packages sdl) #:use-module (gnu packages texinfo) #:use-module (gnu packages xml) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix git-download) #:use-module (guix svn-download) #:use-module (guix utils) - #:use-module (guix build-system gnu) #:use-module (guix build-system cmake) + #:use-module (guix build-system gnu) + #:use-module (guix build-system trivial) #:use-module (srfi srfi-1)) (define-public gcompris @@ -224,3 +231,65 @@ Useful support functions and an extensive progress tracker, topical lessons and the ability to create your own practice lessons make learning to type easy.") (license license:gpl2))) + +(define-public snap + (package + (name "snap") + (version "4.1.2.7") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/jmoenig/Snap--Build-Your-Own-Blocks.git") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0cy3jhqqpmivqnfm9kmlnh3fhf3m3y4xqhikblk8vfjprh6vmcvd")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils)) + (let* ((source (assoc-ref %build-inputs "source")) + (out (assoc-ref %outputs "out")) + (share (string-append out "/share/snap"))) + (copy-recursively source share) + ;; Replace the sole minified file in the package. + (with-directory-excursion share + (delete-file "FileSaver.min.js") + (symlink (string-append (assoc-ref %build-inputs "js-filesaver") + "/share/javascript/FileSaver.min.js") + "FileSaver.min.js")) + ;; Create a "snap" executable. + (let* ((bin (string-append out "/bin")) + (script (string-append bin "/snap")) + (snap (string-append share "/snap.html")) + (bash (string-append (assoc-ref %build-inputs "bash") + "/bin/sh")) + (xdg-open (string-append (assoc-ref %build-inputs "xdg-utils") + "/bin/xdg-open"))) + (mkdir-p bin) + (call-with-output-file script + (lambda (port) + (format port "#!~a\n~a '~a'" bash xdg-open snap))) + (chmod script #o555))) + #t))) + (inputs + `(("bash" ,bash-minimal) + ("js-filesaver" ,js-filesaver) + ("xdg-utils" ,xdg-utils))) + (home-page "https://snap.berkeley.edu") + (synopsis "Visual, blocks based programming language") + (description "Snap! (formerly BYOB) is a visual, drag-and-drop +programming language. It is an extended reimplementation of Scratch (a +project of the Lifelong Kindergarten Group at the MIT Media Lab) that +allows you to Build Your Own Blocks. It also features first class +lists, first class procedures, and continuations. These added +capabilities make it suitable for a serious introduction to computer +science for high school or college students. + +This package provides a @command{snap} executable calling @command{xdg-open} +to open the application in a web browser, for offline usage.") + (license license:agpl3+))) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 6b91577fb3..680c64b9f2 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -18,7 +18,7 @@ ;;; Copyright © 2016, 2017 Alex Vong <alexvong1995@gmail.com> ;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net> ;;; Copyright © 2017 Christopher Baines <mail@cbaines.net> -;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com> +;;; Copyright © 2017, 2018 Mathieu Othacehe <m.othacehe@gmail.com> ;;; Copyright © 2017, 2018 Clément Lassieur <clement@lassieur.org> ;;; Copyright © 2017 Vasile Dumitrascu <va511e@yahoo.com> ;;; Copyright © 2017, 2018 Kyle Meyer <kyle@kyleam.com> @@ -105,6 +105,7 @@ #:use-module (gnu packages gd) #:use-module (gnu packages fontutils) #:use-module (gnu packages password-utils) + #:use-module (gnu packages xdisorg) #:use-module (guix utils) #:use-module (srfi srfi-1) #:use-module (ice-9 match)) @@ -4731,6 +4732,29 @@ used for reverse direction.") distribution, primarily targeting Clojure users") (license license:gpl3+))) +(define-public emacs-orgalist + (package + (name "emacs-orgalist") + (version "1.7") + (source + (origin + (method url-fetch) + (uri (string-append "https://elpa.gnu.org/packages/" + "orgalist-" version ".el")) + (sha256 + (base32 + "13dl0l727vlny3y88gqpngcy90ly5r719s1pbmkva5gmcryb68xr")))) + (build-system emacs-build-system) + (home-page "http://elpa.gnu.org/packages/orgalist.html") + (synopsis "Manage Org-like lists in non-Org buffers") + (description "Write Org mode's plain lists in non-Org buffers. More +specifically, Orgalist supports the syntax of Org mode for numbered, +unnumbered, description items, checkboxes, and counter cookies. + +The library also implements radio lists, i.e., lists written in Org +syntax later translated into the host format, e.g., LaTeX or HTML.") + (license license:gpl3+))) + (define-public emacs-writegood-mode (package (name "emacs-writegood-mode") @@ -4777,35 +4801,35 @@ passive voice.") (name "emacs-org") ;; emacs-org-contrib inherits from this package. Please update its sha256 ;; checksum as well. - (version "9.1.11") + (version "9.1.13") (source (origin (method url-fetch) (uri (string-append "http://elpa.gnu.org/packages/org-" version ".tar")) (sha256 (base32 - "0i27g5qbkfqbxhgiz917pjwkxg3rwid99d0ickwx43bzq0zi7c1m")))) + "1vx0n32gvrgy2bl2b4pvxf00cywxwm57gi46f2b2zlrnmd5n85pr")))) (build-system emacs-build-system) (home-page "https://orgmode.org/") (synopsis "Outline-based notes management and organizer") (description "Org is an Emacs mode for keeping notes, maintaining TODO -lists, and project planning with a fast and effective plain-text system. It -also is an authoring system with unique support for literate programming and -reproducible research.") +lists, and project planning with a fast and effective lightweight markup +language. It also is an authoring system with unique support for literate +programming and reproducible research.") (license license:gpl3+))) (define-public emacs-org-contrib (package (inherit emacs-org) (name "emacs-org-contrib") - (version "20180423") + (version "20180507") (source (origin (method url-fetch) (uri (string-append "https://orgmode.org/elpa/org-plus-contrib-" version ".tar")) (sha256 (base32 - "1aggvdy74q8p79xyc19zring5gjvlzp6lbsq8ar319zkmcjrapqd")))) + "190iwjpdjrhg7gl2d4bri2y0y679vlrwd841r6dvhza0yy338d2d")))) (arguments `(#:modules ((guix build emacs-build-system) (guix build utils) @@ -8359,23 +8383,34 @@ arXiv, Google Scholar, Library of Congress, etc. (license license:gpl3+)))) (define-public emacs-ewmctrl - (let ((commit "3d0217c4d6cdb5c308b6cb4293574f470d4faacf") - (revision "1")) + (let ((commit "3d0217c4d6cdb5c308b6cb4293574f470d4faacf")) (package (name "emacs-ewmctrl") - (version (string-append "0.0.1" "-" revision "." - (string-take commit 7))) + (version (git-version "0.0.1" "1" commit)) (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/flexibeast/ewmctrl.git") (commit commit))) - (file-name (string-append name "-" version "-checkout")) + (file-name (git-file-name name version)) (sha256 (base32 "0ilwvx0qryv3v6xf0gxqwnfm6pf96gxap8h9g3f6z6lk9ff4n1wi")))) (build-system emacs-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-ewmctrl + ;; This build phase makes sure ‘ewmctrl’ looks + ;; for ‘wmctrl’ in the right place. + (lambda _ + (let ((file "ewmctrl.el")) + (chmod file #o644) + (emacs-substitute-sexps file + ("(defcustom ewmctrl-wmctrl-path" (which "wmctrl"))))))))) + (inputs + `(("wmctrl" ,wmctrl))) (home-page "https://github.com/flexibeast/ewmctrl") (synopsis "Emacs interface to @code{wmctrl}") (description "@code{ewmctrl} provides an Emacs interface to @@ -10416,3 +10451,27 @@ with absolutely no stored indexes (tags) or persistent background processes. Dumb Jump performs best with The Silver Searcher @command{ag} or ripgrep @command{rg} installed.") (license license:gpl3+))) + +(define-public emacs-dts-mode + (let ((commit "9ee0854446dcc6c53d2b8d2941051768dba50344") + (revision "1")) + (package + (name "emacs-dts-mode") + (version (string-append "0.1.0-" revision "." (string-take commit 7))) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/bgamari/dts-mode.git") + (commit commit))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "1k8lljdbc90nd29xrhdrsscxavzdq532wq2mg7ljc94krj7538b1")))) + (build-system emacs-build-system) + (home-page "https://github.com/bgamari/dts-mode.git") + (synopsis "Emacs minor mode for editing device tree files") + (description + "This package provides an Emacs minor mode for highlighting +device tree files.") + (license license:gpl3+)))) diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm index 7a11eb33ca..e5624de07e 100644 --- a/gnu/packages/emulators.scm +++ b/gnu/packages/emulators.scm @@ -45,6 +45,7 @@ #:use-module (gnu packages fontutils) #:use-module (gnu packages freedesktop) #:use-module (gnu packages game-development) + #:use-module (gnu packages gcc) #:use-module (gnu packages gettext) #:use-module (gnu packages gl) #:use-module (gnu packages glib) @@ -107,8 +108,8 @@ ;; Building from recent Git because the official 5.0 release no longer builds. (define-public dolphin-emu - (let ((commit "d04b179111f8d863f360839474cb82c766f762b8") - (revision "0")) + (let ((commit "47fd8c6eff4cdea7660d0fa78040f98d1d4fa136") + (revision "1")) (package (name "dolphin-emu") (version (git-version "5.0" revision commit)) @@ -134,7 +135,7 @@ #t)) (sha256 (base32 - "0g725wmhlim73zrhi47wmr1bmplpy4b7sbimd5pm8xpfhj5nm10l")))) + "1gp2sshnr0dswdawxd5ix96nksp435b52bqvpjx8pmn523k29zsw")))) (build-system cmake-build-system) (arguments '(#:tests? #f @@ -143,6 +144,10 @@ #:phases (modify-phases %standard-phases + (add-before 'configure 'fixgcc7 + (lambda _ + (unsetenv "C_INCLUDE_PATH") + (unsetenv "CPLUS_INCLUDE_PATH"))) (add-before 'configure 'generate-fonts&hardcore-libvulkan-path (lambda* (#:key inputs outputs #:allow-other-keys) (let ((fontfile @@ -179,6 +184,7 @@ "-DX11_FOUND=1"))) (native-inputs `(("pkg-config" ,pkg-config) + ("gcc" ,gcc-7) ; Building with gcc@5 doesn't work anymore. ("gettext" ,gnu-gettext))) (inputs `(("alsa-lib" ,alsa-lib) diff --git a/gnu/packages/ftp.scm b/gnu/packages/ftp.scm index 58f707fc48..cb837e554e 100644 --- a/gnu/packages/ftp.scm +++ b/gnu/packages/ftp.scm @@ -169,7 +169,7 @@ as required.") (define-public libfilezilla (package (name "libfilezilla") - (version "0.12.1") + (version "0.12.2") (source (origin (method url-fetch) @@ -177,7 +177,7 @@ as required.") name "/" name "-" version ".tar.bz2")) (sha256 (base32 - "1gbqm42dd0m3fvqz3bk53889479dvn8679zp6ba8a9q2br2wkvv0")))) + "1v461hwdk74whp89s490dj1z18gfqf9bz9140m5f11rsvrpid33p")))) (build-system gnu-build-system) (native-inputs `(("cppunit" ,cppunit) diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 671b3df28d..45f1f10018 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -1819,7 +1819,7 @@ falling, themeable graphics and sounds, and replays.") (define-public wesnoth (package (name "wesnoth") - (version "1.14.0") + (version "1.14.1") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/wesnoth/wesnoth-" @@ -1828,8 +1828,7 @@ falling, themeable graphics and sounds, and replays.") name "-" version ".tar.bz2")) (sha256 (base32 - "09niq53y17faizhmd98anx3dha7hvacvj9a0a64lg8wn915cm0bw")) - (patches (search-patches "wesnoth-fix-std-bad-cast.patch")))) + "1mzrnbv71b4s41c5x8clhb53l8lidiwzny1hl828228pvys5bxkb")))) (build-system cmake-build-system) (arguments `(#:tests? #f)) ; no check target diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 8c694c75c7..4609ea9da1 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -536,7 +536,7 @@ and keep up to date translations of documentation.") (define-public gnome-disk-utility (package (name "gnome-disk-utility") - (version "3.28.1") + (version "3.28.2") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -544,7 +544,7 @@ and keep up to date translations of documentation.") name "-" version ".tar.xz")) (sha256 (base32 - "09dmknfas8iifv6k5jb4a9ag57s8awrn0f26fd1qlg0mbfjlnfd6")))) + "1j3l4b1prbnixzy6srvcsjfg1dx5nqys2lmygm31ygfdq7svp3m6")))) (build-system meson-build-system) (native-inputs `(("glib:bin" ,glib "bin") @@ -3877,7 +3877,7 @@ supports image conversion, rotation, and slideshows.") ;; 'XDG_DATA_DIRS' appropriately set. (package (name "eog-plugins") - (version "3.26.1") + (version "3.26.2") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -3885,7 +3885,7 @@ supports image conversion, rotation, and slideshows.") name "-" version ".tar.xz")) (sha256 (base32 - "0v45f2m3b60ygkwpq6jrl49nwrivw6qy0ciibpv821qrm73hsgd7")))) + "1w8zw7kwfvlwlyb1k1inqdvbwnzq959sqawlmnwfb8ykn98hbk8y")))) (build-system gnu-build-system) (home-page "https://wiki.gnome.org/Apps/EyeOfGnome/Plugins") (synopsis "Extensions for the Eye of GNOME image viewer") diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 1681e37172..8f2afd1b03 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -459,27 +459,29 @@ security standards.") (mozilla-patch "icecat-CVE-2018-5146.patch" "494e5d5278ba" "1yb4lxjw499ppwhk31vz0vzl0cfqvj9d4jwqag7ayj53ybwsqgjr") (mozilla-patch "icecat-CVE-2018-5147.patch" "5cd5586a2f48" "10s774pwvj6xfk3kk6ivnhp2acc8x9sqq6na8z47nkhgwl2712i5") (mozilla-patch "icecat-CVE-2018-5148.patch" "c3e447e07077" "0gmwy631f8ip4gr1mpbjk8bx1n1748wdls5zq4y8hpmpnq5g1wyx") - (mozilla-patch "icecat-bug-1443891.patch" "17201199b18d" "1d0hcim1fwh0bklwpmnal1mv9d9kmyif1m15aj1nqkf1n3x4xc37") + (mozilla-patch "icecat-CVE-2018-5178.patch" "17201199b18d" "1d0hcim1fwh0bklwpmnal1mv9d9kmyif1m15aj1nqkf1n3x4xc37") (mozilla-patch "icecat-bug-1361699.patch" "a07d6c3ff262" "1z8mjg2487r8pxi0x951v6fwwr696q84f6hlzimc3r7bn5ds9r83") - (mozilla-patch "icecat-bug-1433609.patch" "7127ccf8f88c" "0m4my7aflpp0wlqilr2m4axd7k2fyrs7jqdcz2rrz5pwivz1anvd") + (mozilla-patch "icecat-CVE-2018-5150-pt01.patch" "7127ccf8f88c" "0m4my7aflpp0wlqilr2m4axd7k2fyrs7jqdcz2rrz5pwivz1anvd") (mozilla-patch "icecat-bug-1444231.patch" "57bd35fa8618" "0pl6x5amc5x6nhwl7qnmnff3jjjxmbs8r365bfzj58g7q5ihqwvf") - (mozilla-patch "icecat-bug-1409440.patch" "2f3e1ccf1661" "0azl8g81kpc0w2xpjpgm1154ll12g0a8n6i7bl3s9nnrk2i26n74") - (mozilla-patch "icecat-bug-1441941.patch" "8ff2c4d68e36" "0kz1rqhnz8ca4z20hnpcafidhsrwhnm0h2gmlgchni33h8pisr1f") - (mozilla-patch "icecat-bug-1443092.patch" "b8c430253efd" "1arjcaps9axhxh5ff84n9bydhhzrihn7hbq7v69nvqwqrjp3lgg9") - (mozilla-patch "icecat-bug-1448774.patch" "05cadfa3ac39" "0q0vh7vy7x0l8jp6376fn10qljfp4mnp4m9zfn90j4m19pfl86a0") - (mozilla-patch "icecat-bug-1449548.patch" "48a678d7cb81" "1yfh7kxxxvqck2hpn98pwag4splyc6c9brc5haq28fp8x9r9qvlk") - (mozilla-patch "icecat-bug-1448705.patch" "112032576872" "1x1hxyggbxlnlj0n9cbp03hjnfvm6cq8nqj0jizrd8cfyd5aig8p") - (mozilla-patch "icecat-bug-1388020.patch" "ad9a885b0df4" "1hrk1q9mk59jww55g4lqmaflznk87x3vvjn2mxfgfbbjs8l1cyz4") + (mozilla-patch "icecat-CVE-2018-5150-pt02.patch" "2f3e1ccf1661" "0azl8g81kpc0w2xpjpgm1154ll12g0a8n6i7bl3s9nnrk2i26n74") + (mozilla-patch "icecat-CVE-2018-5159.patch" "8ff2c4d68e36" "0kz1rqhnz8ca4z20hnpcafidhsrwhnm0h2gmlgchni33h8pisr1f") + (mozilla-patch "icecat-CVE-2018-5154.patch" "b8c430253efd" "1arjcaps9axhxh5ff84n9bydhhzrihn7hbq7v69nvqwqrjp3lgg9") + (mozilla-patch "icecat-CVE-2018-5155.patch" "05cadfa3ac39" "0q0vh7vy7x0l8jp6376fn10qljfp4mnp4m9zfn90j4m19pfl86a0") + (mozilla-patch "icecat-CVE-2018-5168.patch" "48a678d7cb81" "1yfh7kxxxvqck2hpn98pwag4splyc6c9brc5haq28fp8x9r9qvlk") + (mozilla-patch "icecat-CVE-2018-5150-pt03.patch" "112032576872" "1x1hxyggbxlnlj0n9cbp03hjnfvm6cq8nqj0jizrd8cfyd5aig8p") + (mozilla-patch "icecat-CVE-2018-5150-pt04.patch" "ad9a885b0df4" "1hrk1q9mk59jww55g4lqmaflznk87x3vvjn2mxfgfbbjs8l1cyz4") (mozilla-patch "icecat-bug-1452416.patch" "f89ab96a2532" "1dqchxdyznhgyxhfq0hm0vg1p597hjqflfzigc7j3s5vxf9rg2nv") - (mozilla-patch "icecat-bug-1451376.patch" "af885a1bd293" "1wfpqhm2dp4fsx6zbrncngsqz7g2x09b625zcighixrbpvybyww3") - (mozilla-patch "icecat-bug-1444668.patch" "666fc84ec72d" "0lml2wqd4yqidhi364x8r90f78397k2y0kq5z5bv8l8j4bhcnb9v") - (search-patch "icecat-bug-1452075.patch") - (mozilla-patch "icecat-bug-1393367.patch" "1ab40761a856" "1kgwypy7k5b33jwkni4025za4kcnv5m6klsx4wsswlixmljmkbc7") + (mozilla-patch "icecat-CVE-2018-5150-pt05.patch" "af885a1bd293" "1wfpqhm2dp4fsx6zbrncngsqz7g2x09b625zcighixrbpvybyww3") + (mozilla-patch "icecat-CVE-2018-5150-pt06.patch" "666fc84ec72d" "0lml2wqd4yqidhi364x8r90f78397k2y0kq5z5bv8l8j4bhcnb9v") + (search-patch "icecat-CVE-2018-5157-and-CVE-2018-5158.patch") + (mozilla-patch "icecat-CVE-2018-5150-pt07.patch" "1ab40761a856" "1kgwypy7k5b33jwkni4025za4kcnv5m6klsx4wsswlixmljmkbc7") (mozilla-patch "icecat-bug-1453339.patch" "0edb8dca7087" "0b30pipqryh311sc97rcmwnx9n8qdlbbz90b2hkybjnprmbhfxrm") - (mozilla-patch "icecat-bug-1452202.patch" "134c728799c1" "16hbwx6fx1hrddsyjjbd3z954ql3pg348xs13h9riyblq8crzmam") - (mozilla-patch "icecat-bug-1411415.patch" "14eab155eaa8" "0wr4xgblxzk4c2gvlnpl7ic1196mrhry1hgwdl1jivq0ji5cbvbd") + (mozilla-patch "icecat-CVE-2018-5150-pt08.patch" "134c728799c1" "16hbwx6fx1hrddsyjjbd3z954ql3pg348xs13h9riyblq8crzmam") + (mozilla-patch "icecat-CVE-2018-5150-pt09.patch" "14eab155eaa8" "0wr4xgblxzk4c2gvlnpl7ic1196mrhry1hgwdl1jivq0ji5cbvbd") (mozilla-patch "icecat-bug-1452619.patch" "2b75d55ccf0e" "1g87aybw6ggv6hyk385bplv0lx63n020gwyq0d6d4pqld48hsm1i") - (mozilla-patch "icecat-bug-1453127.patch" "89857f35df29" "0gzi47svrw5ajdlm3i12193psm702zx70x5h1rwp4gb7gxh4m4d9"))) + (mozilla-patch "icecat-bug-1453127.patch" "89857f35df29" "0gzi47svrw5ajdlm3i12193psm702zx70x5h1rwp4gb7gxh4m4d9") + (mozilla-patch "icecat-CVE-2018-5150-pt10.patch" "3f2ec03c0405" "0w02952dlxd2gmwghck2nm4rjjmc5ylg62bw6m1rvi35kcr134lr") + (mozilla-patch "icecat-CVE-2018-5183.patch" "f729bf78fb3a" "0xkj6jwxwdqkvb5c7wi16b8cm8qrnlrd3s9jnd46jg03iykrx56f"))) (modules '((guix build utils))) (snippet '(begin diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index c6fc68468f..fe6dfbe1c8 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -214,7 +214,7 @@ in the style of communicating sequential processes (@dfn{CSP}).") (package (inherit go-1.4) (name "go") - (version "1.9.5") + (version "1.9.6") (source (origin (method url-fetch) @@ -222,7 +222,7 @@ in the style of communicating sequential processes (@dfn{CSP}).") name version ".src.tar.gz")) (sha256 (base32 - "1g4zqhbh1yw3gnb400szzwrdz0k5s3h0h5nc35xgmn5v69zvphpi")))) + "0a2qkvzr0g5cbd66wi7b6r40qyp9p55y0zz2j5qg1xsqwsdhbx1n")))) (arguments (substitute-keyword-arguments (package-arguments go-1.4) ((#:phases phases) @@ -383,7 +383,7 @@ in the style of communicating sequential processes (@dfn{CSP}).") (package (inherit go-1.9) (name "go") - (version "1.10.1") + (version "1.10.2") (source (origin (method url-fetch) @@ -391,7 +391,7 @@ in the style of communicating sequential processes (@dfn{CSP}).") name version ".src.tar.gz")) (sha256 (base32 - "1p1xyyxicp752n9wj10sljjl6mjxpfsplkhx74fzzjrwdkzlk52q")))) + "1gcqbac3wbhbcr0ri9zgfj6qkqbwf9fn116a0a7fvn4wdff60r32")))) (arguments (substitute-keyword-arguments (package-arguments go-1.9) ((#:phases phases) diff --git a/gnu/packages/graphviz.scm b/gnu/packages/graphviz.scm index 2b7438c902..11997598c1 100644 --- a/gnu/packages/graphviz.scm +++ b/gnu/packages/graphviz.scm @@ -117,13 +117,13 @@ interfaces for other technical domains.") (define-public python-graphviz (package (name "python-graphviz") - (version "0.8.2") + (version "0.8.3") (source (origin (method url-fetch) (uri (pypi-uri "graphviz" version ".zip")) (sha256 (base32 - "148h7ln8z65c1723w9vpx8khkvl9iigh8csv0qd4pidc53042rv0")))) + "0gnl11w98iib7vif92f3vircavy2v1yl9sl54y6hhk1mwm0f07f6")))) (build-system python-build-system) (native-inputs `(("unzip" ,unzip))) diff --git a/gnu/packages/groovy.scm b/gnu/packages/groovy.scm new file mode 100644 index 0000000000..512f9c9edb --- /dev/null +++ b/gnu/packages/groovy.scm @@ -0,0 +1,1156 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (gnu packages groovy) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix utils) + #:use-module (guix build-system ant) + #:use-module (gnu packages) + #:use-module (gnu packages java) + #:use-module (gnu packages xml)) + +(define java-groovy-bootstrap + (package + (name "java-groovy-bootstrap") + (version "2.4.15") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/apache/groovy/archive/GROOVY_" + (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version) + ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "19f3yd2z6jmz1xhwi5kkg1wmgbqkfs7qvd3rzb43xr3nffz8cisv")) + (patches + (search-patches + "groovy-add-exceptionutilsgenerator.patch")))) + (build-system ant-build-system) + (arguments + `(#:jar-name "groovy.jar" + #:source-dir "src/main:subprojects/groovy-test/src/main/java" + #:test-dir "src/test" + #:tests? #f + #:jdk ,icedtea-8 + #:main-class "groovy.ui.GroovyMain" + #:phases + (modify-phases %standard-phases + (add-before 'build 'fix-java8 + ;; Fix "Reference to plus is ambiguous" + (lambda _ + (substitute* "src/main/org/codehaus/groovy/runtime/DefaultGroovyMethods.java" + (("toList\\(left\\)") + "(List<T>)toList(left)")) + #t)) + (add-before 'build 'generate-parsers + (lambda _ + (with-directory-excursion "src/main/org/codehaus/groovy/antlr/java" + (invoke "antlr" "java.g")) + (with-directory-excursion "src/main/org/codehaus/groovy/antlr" + (mkdir "parser") + (with-directory-excursion "parser" + (invoke "antlr" "../groovy.g"))) + #t)) + (add-before 'build 'generate-exception-utils + (lambda _ + (invoke "javac" "-cp" (getenv "CLASSPATH") + "config/ant/src/org/codehaus/groovy/ExceptionUtilsGenerator.java") + (invoke "java" "-cp" (string-append (getenv "CLASSPATH") + ":config/ant/src") + "org.codehaus.groovy.ExceptionUtilsGenerator" + "build/classes/org/codehaus/groovy/runtime/ExceptionUtils.class") + #t))))) + (native-inputs + `(("java-junit" ,java-junit) + ("java-hamcrest-core" ,java-hamcrest-core) + ("antlr2" ,antlr2) + ("java-jmock-1" ,java-jmock-1) + ("java-xmlunit-legacy" ,java-xmlunit-legacy))) + (inputs + `(("java-commons-cli" ,java-commons-cli) + ("java-asm" ,java-asm) + ("java-classpathx-servletapi" ,java-classpathx-servletapi) + ("java-xstream" ,java-xstream) + ("java-jansi" ,java-jansi) + ("java-jline-2" ,java-jline-2))) + (home-page "http://groovy-lang.org/") + (synopsis "Groovy's java bootstrap") + (description "This package contains the java bootstrap that is used to build +groovy submodules.") + (license license:asl2.0))) + +(define groovy-bootstrap + (package + (inherit java-groovy-bootstrap) + (name "groovy-bootstrap") + (arguments + `(#:jar-name "groovy.jar" + #:jdk ,icedtea-8 + ;Requires groovy-xml and logback-classic which are circular dependencies + #:tests? #f + #:phases + (modify-phases %standard-phases + (add-before 'build 'fix-java8 + ;; Fix "Reference to plus is ambiguous" + (lambda _ + (substitute* "src/main/org/codehaus/groovy/runtime/DefaultGroovyMethods.java" + (("toList\\(left\\)") + "(List<T>)toList(left)")) + #t)) + (add-before 'build 'generate-parser + (lambda _ + (with-directory-excursion "src/main/org/codehaus/groovy/antlr/java" + (invoke "antlr" "java.g")) + (with-directory-excursion "src/main/org/codehaus/groovy/antlr" + (mkdir "parser") + (with-directory-excursion "parser" + (invoke "antlr" "../groovy.g"))) + #t)) + (add-before 'build 'generate-exception-utils + (lambda _ + (invoke "javac" "-cp" (getenv "CLASSPATH") + "config/ant/src/org/codehaus/groovy/ExceptionUtilsGenerator.java") + (invoke "java" "-cp" (string-append (getenv "CLASSPATH") + ":config/ant/src") + "org.codehaus.groovy.ExceptionUtilsGenerator" + "target/classes/org/codehaus/groovy/runtime/ExceptionUtils.class") + #t)) + (add-before 'build 'generate-dgminfo + (lambda _ + (mkdir-p "target/classes/org/codehaus/groovy/runtime") + (mkdir-p "target/classes/META-INF") + (invoke "javac" "-cp" (getenv "CLASSPATH") + "src/main/org/codehaus/groovy/tools/DgmConverter.java") + (invoke "java" "-cp" (string-append (getenv "CLASSPATH") + ":src/main") + "org.codehaus.groovy.tools.DgmConverter") + #t)) + (add-before 'build 'copy-resources + (lambda _ + (with-directory-excursion "src/main" + (for-each (lambda (file) + (mkdir-p (string-append "../../target/classes/" + (dirname file))) + (copy-file file + (string-append "../../target/classes/" + file))) + (find-files "." ".*.(txt|properties|xml|html)"))) + #t)) + (replace 'build + (lambda _ + (mkdir-p "build/jar") + (apply invoke "java" "-cp" (getenv "CLASSPATH") + "org.codehaus.groovy.tools.FileSystemCompiler" + "-d" "target/classes" + "-j"; joint compilation + (find-files "src/main" + ".*\\.(groovy|java)$")) + (invoke "jar" "-cf" "build/jar/groovy.jar" + "-C" "target/classes" ".") + #t))))) + (inputs + `(("java-apache-ivy" ,java-apache-ivy) + ,@(package-inputs java-groovy-bootstrap))) + (native-inputs + `(("java-groovy-bootstrap" ,java-groovy-bootstrap) + ,@(package-native-inputs java-groovy-bootstrap))) + (synopsis "Groovy compiler") + (description "This package contains the first version of the Groovy compiler. +Although already usable, it doesn't contain the groovy library yet. This package +is used to build the groovy submodules written in groovy."))) + +(define groovy-tests-bootstrap + (package + (inherit groovy-bootstrap) + (name "groovy-tests-bootstrap") + (arguments + `(#:jar-name "groovy-tests-bootstrap.jar" + #:jdk ,icedtea-8 + #:tests? #f; no tests + #:phases + (modify-phases %standard-phases + (replace 'build + (lambda _ + (mkdir-p "build/classes") + (mkdir-p "build/jar") + (apply invoke "java" "-cp" (getenv "CLASSPATH") + "org.codehaus.groovy.tools.FileSystemCompiler" + "-d" "build/classes" + "-j"; joint compilation + (append + (find-files "src/test" "TestSupport.java") + (find-files "src/test" "HeadlessTestSupport.java") + (find-files "src/test" "XmlAssert.java"))) + (invoke "jar" "-cf" "build/jar/groovy-tests-bootstrap.jar" + "-C" "build/classes" ".") + #t))))) + (inputs + `(("groovy-test" ,groovy-test) + ,@(package-inputs groovy-bootstrap))) + (native-inputs + `(("groovy-bootstrap" ,groovy-bootstrap) + ,@(package-native-inputs java-groovy-bootstrap))) + (synopsis "Groovy test classes") + (description "This package contains three classes required for testing +other groovy submodules."))) + +(define groovy-test + (package + (inherit groovy-bootstrap) + (name "groovy-test") + (arguments + `(#:jar-name "groovy-test.jar" + #:jdk ,icedtea-8 + #:test-dir "subprojects/groovy-test/src/test" + #:phases + (modify-phases %standard-phases + (replace 'build + (lambda _ + (mkdir-p "build/classes") + (mkdir-p "build/jar") + (apply invoke "java" "-cp" (getenv "CLASSPATH") + "org.codehaus.groovy.tools.FileSystemCompiler" + "-d" "build/classes" "-j"; joint compilation + (find-files "subprojects/groovy-test/src/main" + ".*\\.(groovy|java)$")) + (invoke "jar" "-cf" "build/jar/groovy-test.jar" + "-C" "build/classes" ".") + #t)) + (replace 'check + (lambda _ + (mkdir-p "build/test-classes") + (substitute* "build.xml" + (("depends=\"compile-tests\"") "depends=\"\"") + (("}/java") "}/groovy")) + (apply invoke "java" "-cp" + (string-append (getenv "CLASSPATH") ":build/classes") + "org.codehaus.groovy.tools.FileSystemCompiler" + "-d" "build/test-classes" "-j" + (append (find-files "subprojects/groovy-test/src/test" + ".*\\.(groovy|java)$"))) + (invoke "ant" "check") + #t))))) + (native-inputs + `(("groovy-bootstrap" ,groovy-bootstrap) + ,@(package-native-inputs java-groovy-bootstrap))) + (synopsis "Groovy test submodule") + (description "This package contains the test submodules used to test +other groovy submodules."))) + +(define groovy-xml + (package + (inherit groovy-bootstrap) + (name "groovy-xml") + (arguments + `(#:jar-name "groovy-xml.jar" + #:jdk ,icedtea-8 + #:test-dir "src/test" + #:phases + (modify-phases %standard-phases + (add-before 'configure 'chdir + (lambda _ + (chdir "subprojects/groovy-xml") + #t)) + (replace 'build + (lambda _ + (mkdir-p "build/classes") + (mkdir-p "build/jar") + (apply invoke "java" "-cp" (getenv "CLASSPATH") + "org.codehaus.groovy.tools.FileSystemCompiler" + "-d" "build/classes" "-j"; joint compilation + (find-files "src/main" ".*\\.(groovy|java)$")) + (invoke "jar" "-cf" "build/jar/groovy-xml.jar" + "-C" "build/classes" ".") + #t)) + (replace 'check + (lambda _ + (mkdir-p "build/test-classes") + (substitute* "build.xml" + (("depends=\"compile-tests\"") "depends=\"\"") + (("}/java") "}/groovy")) + (apply invoke "java" "-cp" + (string-append (getenv "CLASSPATH") ":build/classes") + "org.codehaus.groovy.tools.FileSystemCompiler" + "-d" "build/test-classes" "-j" + (append (find-files "src/test" ".*\\.(groovy|java)$"))) + (invoke "ant" "check") + #t))))) + (native-inputs + `(("groovy-bootstrap" ,groovy-bootstrap) + ("groovy-test" ,groovy-test) + ("groovy-tests-bootstrap" ,groovy-tests-bootstrap) + ,@(package-native-inputs java-groovy-bootstrap))) + (synopsis "Groovy XML") + (description "This package contains XML-related utilities for groovy."))) + +(define groovy-templates + (package + (inherit groovy-bootstrap) + (name "groovy-templates") + (arguments + `(#:jar-name "groovy-templates.jar" + #:jdk ,icedtea-8 + #:test-dir "subprojects/groovy-templates/src/test" + #:tests? #f;Requires spock-framework which is a circular dependency + #:phases + (modify-phases %standard-phases + (replace 'build + (lambda _ + (mkdir-p "build/classes") + (mkdir-p "build/jar") + (apply invoke "java" "-cp" (getenv "CLASSPATH") + "org.codehaus.groovy.tools.FileSystemCompiler" + "-d" "build/classes" "-j"; joint compilation + (find-files "subprojects/groovy-templates/src/main" + ".*\\.(groovy|java)$")) + (invoke "jar" "-cf" "build/jar/groovy-templates.jar" + "-C" "build/classes" ".") + #t))))) + (inputs + `(("groovy-xml" ,groovy-xml) + ,@(package-inputs groovy-bootstrap))) + (native-inputs + `(("groovy-bootstrap" ,groovy-bootstrap) + ("groovy-test" ,groovy-test) + ("groovy-tests-bootstrap" ,groovy-tests-bootstrap) + ,@(package-native-inputs java-groovy-bootstrap))) + (synopsis "Groovy template engine") + (description "This package contains a template framework which is +well-suited to applications where the text to be generated follows the form of +a static template."))) + +(define groovy-groovydoc + (package + (inherit groovy-bootstrap) + (name "groovy-groovydoc") + (arguments + `(#:jar-name "groovy-groovydoc.jar" + #:jdk ,icedtea-8 + #:test-dir "subprojects/groovy-groovydoc/src/test" + #:tests? #f; Requires groovy-ant which is a circular dependency + #:phases + (modify-phases %standard-phases + (add-before 'build 'copy-resources + (lambda _ + (copy-recursively "subprojects/groovy-groovydoc/src/main/resources" + "build/classes") + #t)) + (replace 'build + (lambda _ + (mkdir-p "build/classes") + (mkdir-p "build/jar") + (apply invoke "java" "-cp" (getenv "CLASSPATH") + "org.codehaus.groovy.tools.FileSystemCompiler" + "-d" "build/classes" + "-j"; joint compilation + (find-files "subprojects/groovy-groovydoc/src/main" + ".*\\.(groovy|java)$")) + (invoke "jar" "-cf" "build/jar/groovy-groovydoc.jar" + "-C" "build/classes" ".") + #t))))) + (inputs + `(("groovy-templates" ,groovy-templates) + ,@(package-inputs groovy-bootstrap))) + (native-inputs + `(("groovy-bootstrap" ,groovy-bootstrap) + ("groovy-test" ,groovy-test) + ("groovy-tests-bootstrap" ,groovy-tests-bootstrap) + ,@(package-native-inputs java-groovy-bootstrap))) + (synopsis "Groovy documentation generation") + (description "This package contains the groovy documentation generator, +similar to javadoc."))) + +(define groovy-ant + (package + (inherit groovy-bootstrap) + (name "groovy-ant") + (arguments + `(#:jar-name "groovy-ant.jar" + #:jdk ,icedtea-8 + #:test-dir "src/test" + ;; FIXME: Excluding all tests because they fail + #:test-exclude (list + "**/GroovyTest.java" + "**/GroovycTest.java") + #:phases + (modify-phases %standard-phases + (add-before 'configure 'chdir + (lambda _ + (chdir "subprojects/groovy-ant") + #t)) + (add-before 'build 'copy-resources + (lambda _ + (copy-recursively "src/main/resources" "build/classes") + #t)) + (replace 'build + (lambda _ + (mkdir-p "build/classes") + (mkdir-p "build/jar") + (apply invoke "java" "-cp" (getenv "CLASSPATH") + "org.codehaus.groovy.tools.FileSystemCompiler" + "-d" "build/classes" "-j"; joint compilation + (find-files "src/main" ".*\\.(groovy|java)$")) + (invoke "jar" "-cf" "build/jar/groovy-ant.jar" + "-C" "build/classes" ".") + #t)) + (replace 'check + (lambda _ + (mkdir-p "build/test-classes") + (substitute* "build.xml" + (("depends=\"compile-tests\"") "depends=\"\"") + (("}/java") "}/groovy")) + (apply invoke "java" "-cp" + (string-append (getenv "CLASSPATH") ":build/classes") + "org.codehaus.groovy.tools.FileSystemCompiler" + "-d" "build/test-classes" "-j" + (find-files "src/test" ".*\\.(groovy|java)$")) + (invoke "ant" "check") + #t))))) + (inputs + `(("groovy-groovydoc" ,groovy-groovydoc) + ,@(package-inputs groovy-bootstrap))) + (native-inputs + `(("groovy-bootstrap" ,groovy-bootstrap) + ("groovy-xml" ,groovy-xml) + ("groovy-test" ,groovy-test) + ("groovy-tests-bootstrap" ,groovy-tests-bootstrap) + ,@(package-native-inputs java-groovy-bootstrap))) + (synopsis "Groovy ant tasks") + (description "This package contains groovy-related ant tasks definitions."))) + +(define groovy-bsf + (package + (inherit groovy-bootstrap) + (name "groovy-bsf") + (arguments + `(#:jar-name "groovy-bsf.jar" + #:jdk ,icedtea-8 + #:test-dir "src/test" + #:test-exclude (list +;; exception from Groovy: org.codehaus.groovy.runtime.InvokerInvocationException: +;; groovy.lang.MissingMethodException: No signature of method: +;; java.util.ArrayList.each() is applicable for argument types: +;; (groovy.script.MapFromList$_doit_closure1) values: +;; [groovy.script.MapFromList$_doit_closure1@17e554d5] + "**/BSFTest.java") + #:phases + (modify-phases %standard-phases + (add-before 'configure 'chdir + (lambda _ + (chdir "subprojects/groovy-bsf") + #t)) + (replace 'build + (lambda _ + (mkdir-p "build/classes") + (mkdir-p "build/jar") + (apply invoke "java" "-cp" (getenv "CLASSPATH") + "org.codehaus.groovy.tools.FileSystemCompiler" + "-d" "build/classes" "-j"; joint compilation + (find-files "src/main" ".*\\.(groovy|java)$")) + (invoke "jar" "-cf" "build/jar/groovy-bsf.jar" + "-C" "build/classes" ".") + #t)) + (replace 'check + (lambda _ + (mkdir-p "build/test-classes") + (substitute* "build.xml" + (("depends=\"compile-tests\"") "depends=\"\"")) + (apply invoke "java" "-cp" + (string-append (getenv "CLASSPATH") ":build/classes") + "org.codehaus.groovy.tools.FileSystemCompiler" + "-d" "build/test-classes" "-j" + (find-files "src/test" ".*\\.(groovy|java)$")) + (invoke "ant" "check") + #t))))) + (inputs + `(("java-commons-bsf" ,java-commons-bsf) + ,@(package-inputs groovy-bootstrap))) + (native-inputs + `(("groovy-bootstrap" ,groovy-bootstrap) + ("groovy-test" ,groovy-test) + ("groovy-tests-bootstrap" ,groovy-tests-bootstrap) + ("java-commons-logging-minimal" ,java-commons-logging-minimal) + ,@(package-native-inputs java-groovy-bootstrap))) + (synopsis "Groovy BSF engine") + (description "This package defines the BSF engine for using Groovy inside +any @dfn{Bean Scripting Framework} (BSF) application."))) + +(define groovy-swing + (package + (inherit groovy-bootstrap) + (name "groovy-swing") + (arguments + `(#:jar-name "groovy-swing.jar" + #:jdk ,icedtea-8 + ;; FIXME: tests are not run + #:test-dir "src/test" + #:phases + (modify-phases %standard-phases + (add-before 'configure 'chdir + (lambda _ + (chdir "subprojects/groovy-swing") + #t)) + (replace 'build + (lambda _ + (mkdir-p "build/classes") + (mkdir-p "build/jar") + (apply invoke "java" "-cp" (getenv "CLASSPATH") + "org.codehaus.groovy.tools.FileSystemCompiler" + "-d" "build/classes" "-j"; joint compilation + (find-files "src/main" ".*\\.(groovy|java)$")) + (invoke "jar" "-cf" "build/jar/groovy-swing.jar" + "-C" "build/classes" ".") + #t)) + (replace 'check + (lambda _ + (mkdir-p "build/test-classes") + (substitute* "src/test/groovy/groovy/util/GroovySwingTestCase.groovy" + (("HeadlessTestSupport.headless") "isHeadless()")) + (substitute* "build.xml" + (("depends=\"compile-tests\"") "depends=\"\"") + (("}/java") "}/groovy")) + (apply invoke "java" "-cp" + (string-append (getenv "CLASSPATH") ":build/classes") + "org.codehaus.groovy.tools.FileSystemCompiler" + "-d" "build/test-classes" "-j" + (find-files "src/test" ".*\\.(groovy|java)$")) + (invoke "ant" "check") + #t))))) + (native-inputs + `(("groovy-bootstrap" ,groovy-bootstrap) + ("groovy-test" ,groovy-test) + ("groovy-tests-bootstrap" ,groovy-tests-bootstrap) + ("java-commons-logging-minimal" ,java-commons-logging-minimal) + ,@(package-native-inputs java-groovy-bootstrap))) + (synopsis "Groovy graphical library") + (description "This package contains the groovy bindings to Java Swing, a +library used to build graphical interfaces."))) + +(define groovy-console + (package + (inherit groovy-bootstrap) + (name "groovy-console") + (arguments + `(#:jar-name "groovy-console.jar" + #:jdk ,icedtea-8 + ;; FIXME: tests are not run + #:test-dir "src/test" + #:phases + (modify-phases %standard-phases + (add-before 'configure 'chdir + (lambda _ + (chdir "subprojects/groovy-console") + #t)) + (add-before 'build 'copy-resources + (lambda _ + (copy-recursively "src/main/resources" "build/classes") + #t)) + (replace 'build + (lambda _ + (mkdir-p "build/classes") + (mkdir-p "build/jar") + (apply invoke "java" "-cp" (getenv "CLASSPATH") + "org.codehaus.groovy.tools.FileSystemCompiler" + "-d" "build/classes" "-j"; joint compilation + (find-files "src/main" ".*\\.(groovy|java)$")) + (invoke "jar" "-cf" "build/jar/groovy-console.jar" + "-C" "build/classes" ".") + #t)) + (replace 'check + (lambda _ + (mkdir-p "build/test-classes") + (substitute* "build.xml" + (("depends=\"compile-tests\"") "depends=\"\"") + (("}/java") "}/groovy")) + (substitute* + "../groovy-swing/src/test/groovy/groovy/util/GroovySwingTestCase.groovy" + (("HeadlessTestSupport.headless") "isHeadless()")) + (apply invoke "java" "-cp" + (string-append (getenv "CLASSPATH") ":build/classes") + "org.codehaus.groovy.tools.FileSystemCompiler" + "-d" "build/test-classes" "-j" + (append + (find-files "../groovy-swing/src/test" ".*\\.(groovy|java)$") + (find-files "src/test" ".*\\.(groovy|java)$"))) + (invoke "ant" "check") + #t))))) + (inputs + `(("groovy-swing" ,groovy-swing) + ("groovy-templates" ,groovy-templates) + ,@(package-inputs groovy-bootstrap))) + (native-inputs + `(("groovy-bootstrap" ,groovy-bootstrap) + ("groovy-test" ,groovy-test) + ("groovy-tests-bootstrap" ,groovy-tests-bootstrap) + ("java-commons-logging-minimal" ,java-commons-logging-minimal) + ,@(package-native-inputs java-groovy-bootstrap))) + (synopsis "Groovy graphical interface") + (description "This package contains a graphical interface to run groovy."))) + +(define groovy-docgenerator + (package + (inherit groovy-bootstrap) + (name "groovy-docgenerator") + (arguments + `(#:jar-name "groovy-docgenerator.jar" + #:jdk ,icedtea-8 + #:tests? #f; No tests + #:phases + (modify-phases %standard-phases + (add-before 'configure 'chdir + (lambda _ + (chdir "subprojects/groovy-docgenerator") + #t)) + (add-before 'build 'copy-resources + (lambda _ + (copy-recursively "src/main/resources" "build/classes") + #t)) + (replace 'build + (lambda _ + (mkdir-p "build/classes") + (mkdir-p "build/jar") + (apply invoke "java" "-cp" (getenv "CLASSPATH") + "org.codehaus.groovy.tools.FileSystemCompiler" + "-d" "build/classes" "-j"; joint compilation + (find-files "src/main" ".*\\.(groovy|java)$")) + (invoke "jar" "-cf" "build/jar/groovy-docgenerator.jar" + "-C" "build/classes" ".") + #t))))) + (inputs + `(("groovy-templates" ,groovy-templates) + ("groovy-swing" ,groovy-swing) + ("java-qdox-1.12" ,java-qdox-1.12) + ,@(package-inputs groovy-bootstrap))) + (native-inputs + `(("groovy-bootstrap" ,groovy-bootstrap) + ("groovy-test" ,groovy-test) + ("groovy-tests-bootstrap" ,groovy-tests-bootstrap) + ,@(package-native-inputs java-groovy-bootstrap))) + (synopsis "Groovy documentation generation") + (description "This package contains a command line tool to generate +documentation for groovy applications."))) + +(define groovy-groovysh + (package + (inherit groovy-bootstrap) + (name "groovy-groovysh") + (arguments + `(#:jar-name "groovy-groovysh.jar" + #:test-dir "src/test" + #:jdk ,icedtea-8 + #:phases + (modify-phases %standard-phases + (add-before 'configure 'chdir + (lambda _ + (chdir "subprojects/groovy-groovysh") + #t)) + (add-before 'build 'copy-resources + (lambda _ + (copy-recursively "src/main/resources" "build/classes") + #t)) + (replace 'build + (lambda _ + (mkdir-p "build/classes") + (mkdir-p "build/jar") + (apply invoke "java" "-cp" (getenv "CLASSPATH") + "org.codehaus.groovy.tools.FileSystemCompiler" + "-d" "build/classes" "-j"; joint compilation + (find-files "src/main" ".*\\.(groovy|java)$")) + (invoke "jar" "-cf" "build/jar/groovy-groovysh.jar" + "-C" "build/classes" ".") + #t)) + (replace 'check + (lambda _ + (mkdir-p "build/test-classes") + (substitute* "build.xml" + (("depends=\"compile-tests\"") "depends=\"\"") + (("}/java") "}/groovy")) + (apply invoke "java" "-cp" + (string-append (getenv "CLASSPATH") ":build/classes") + "org.codehaus.groovy.tools.FileSystemCompiler" + "-d" "build/test-classes" "-j" + (append (find-files "src/test" ".*\\.(groovy|java)$"))) + (invoke "ant" "check") + #t))))) + (inputs + `(("groovy-xml" ,groovy-xml) + ("groovy-console" ,groovy-console) + ,@(package-inputs groovy-bootstrap))) + (native-inputs + `(("groovy-bootstrap" ,groovy-bootstrap) + ("groovy-test" ,groovy-test) + ("groovy-tests-bootstrap" ,groovy-tests-bootstrap) + ,@(package-native-inputs java-groovy-bootstrap))) + (synopsis "Groovy REPL") + (description "This package contains the Groovy REPL."))) + +(define groovy-jmx + (package + (inherit groovy-bootstrap) + (name "groovy-jmx") + (arguments + `(#:jar-name "groovy-jmx.jar" + #:test-dir "src/test" + #:jdk ,icedtea-8 + #:phases + (modify-phases %standard-phases + (add-before 'configure 'chdir + (lambda _ + (chdir "subprojects/groovy-jmx") + #t)) + (replace 'build + (lambda _ + (mkdir-p "build/classes") + (mkdir-p "build/jar") + (apply invoke "java" "-cp" (getenv "CLASSPATH") + "org.codehaus.groovy.tools.FileSystemCompiler" + "-d" "build/classes" "-j"; joint compilation + (find-files "src/main" ".*\\.(groovy|java)$")) + (invoke "jar" "-cf" "build/jar/groovy-jmx.jar" + "-C" "build/classes" ".") + #t)) + (replace 'check + (lambda _ + (mkdir-p "build/test-classes") + (substitute* "build.xml" + (("depends=\"compile-tests\"") "depends=\"\"") + (("}/java") "}/groovy")) + (apply invoke "java" "-cp" + (string-append (getenv "CLASSPATH") ":build/classes") + "org.codehaus.groovy.tools.FileSystemCompiler" + "-d" "build/test-classes" "-j" + (append (find-files "src/test" ".*\\.(groovy|java)$"))) + (invoke "ant" "check") + #t))))) + (native-inputs + `(("groovy-bootstrap" ,groovy-bootstrap) + ("groovy-test" ,groovy-test) + ("groovy-tests-bootstrap" ,groovy-tests-bootstrap) + ,@(package-native-inputs java-groovy-bootstrap))) + (synopsis "Groovy JMX extension") + (description "This package contains the JMX extension of Groovy, for +management and monitoring of JVM-based solutions."))) + +(define groovy-json + (package + (inherit groovy-bootstrap) + (name "groovy-json") + (arguments + `(#:jar-name "groovy-json.jar" + #:test-dir "src/test" + #:jdk ,icedtea-8 + #:phases + (modify-phases %standard-phases + (add-before 'configure 'chdir + (lambda _ + (chdir "subprojects/groovy-json") + #t)) + (replace 'build + (lambda _ + (mkdir-p "build/classes") + (mkdir-p "build/jar") + (apply invoke "java" "-cp" (getenv "CLASSPATH") + "org.codehaus.groovy.tools.FileSystemCompiler" + "-d" "build/classes" "-j"; joint compilation + (find-files "src/main" ".*\\.(groovy|java)$")) + (invoke "jar" "-cf" "build/jar/groovy-json.jar" + "-C" "build/classes" ".") + #t)) + (replace 'check + (lambda _ + (mkdir-p "build/test-classes") + (substitute* "build.xml" + (("depends=\"compile-tests\"") "depends=\"\"") + (("}/java") "}/groovy")) + (apply invoke "java" "-cp" + (string-append (getenv "CLASSPATH") ":build/classes") + "org.codehaus.groovy.tools.FileSystemCompiler" + "-d" "build/test-classes" "-j" + (append (find-files "src/test" ".*\\.(groovy|java)$"))) + (invoke "ant" "check") + #t))))) + (native-inputs + `(("groovy-bootstrap" ,groovy-bootstrap) + ("groovy-test" ,groovy-test) + ("groovy-tests-bootstrap" ,groovy-tests-bootstrap) + ,@(package-native-inputs java-groovy-bootstrap))) + (synopsis "Groovy JSON") + (description "This package contains JSON-related utilities for groovy."))) + +(define groovy-jsr223 + (package + (inherit groovy-bootstrap) + (name "groovy-jsr223") + (arguments + `(#:jar-name "groovy-jsr223.jar" + #:test-dir "src/test" + #:jdk ,icedtea-8 + #:phases + (modify-phases %standard-phases + (add-before 'configure 'chdir + (lambda _ + (chdir "subprojects/groovy-jsr223") + #t)) + (add-before 'build 'copy-resources + (lambda _ + (copy-recursively "src/main/resources" "build/classes") + #t)) + (replace 'build + (lambda _ + (mkdir-p "build/classes") + (mkdir-p "build/jar") + (apply invoke "java" "-cp" (getenv "CLASSPATH") + "org.codehaus.groovy.tools.FileSystemCompiler" + "-d" "build/classes" "-j"; joint compilation + (find-files "src/main" ".*\\.(groovy|java)$")) + (invoke "jar" "-cf" "build/jar/groovy-jsr223.jar" + "-C" "build/classes" ".") + #t)) + (replace 'check + (lambda _ + (mkdir-p "build/test-classes") + (substitute* "build.xml" + (("depends=\"compile-tests\"") "depends=\"\"") + (("}/java") "}/groovy")) + (apply invoke "java" "-cp" + (string-append (getenv "CLASSPATH") ":build/classes") + "org.codehaus.groovy.tools.FileSystemCompiler" + "-d" "build/test-classes" "-j" + (append (find-files "src/test" ".*\\.(groovy|java)$"))) + (invoke "ant" "check") + #t))))) + (native-inputs + `(("groovy-bootstrap" ,groovy-bootstrap) + ("groovy-test" ,groovy-test) + ("groovy-tests-bootstrap" ,groovy-tests-bootstrap) + ,@(package-native-inputs java-groovy-bootstrap))) + (synopsis "Groovy's own JSR223 implementation") + (description "This package contains Groovy's own JSR223 implementation. This +module is used for interaction between Groovy and Java code."))) + +(define groovy-nio + (package + (inherit groovy-bootstrap) + (name "groovy-nio") + (arguments + `(#:jar-name "groovy-nio.jar" + #:test-dir "src/test" + #:jdk ,icedtea-8 + #:tests? #f; Requires spock-framework + #:phases + (modify-phases %standard-phases + (add-before 'configure 'chdir + (lambda _ + (chdir "subprojects/groovy-nio") + #t)) + (replace 'build + (lambda _ + (mkdir-p "build/classes") + (mkdir-p "build/jar") + (apply invoke "java" "-cp" (getenv "CLASSPATH") + "org.codehaus.groovy.tools.FileSystemCompiler" + "-d" "build/classes" "-j"; joint compilation + (find-files "src/main" ".*\\.(groovy|java)$")) + (invoke "jar" "-cf" "build/jar/groovy-nio.jar" + "-C" "build/classes" ".") + #t))))) + (native-inputs + `(("groovy-bootstrap" ,groovy-bootstrap) + ("groovy-test" ,groovy-test) + ("groovy-tests-bootstrap" ,groovy-tests-bootstrap) + ,@(package-native-inputs java-groovy-bootstrap))) + (synopsis "Groovy input-output library") + (description "This package implements an input/output library that extends +the functionality of the common library of Java."))) + +(define groovy-servlet + (package + (inherit groovy-bootstrap) + (name "groovy-servlet") + (arguments + `(#:jar-name "groovy-servlet.jar" + #:test-dir "src/test" + #:jdk ,icedtea-8 + #:phases + (modify-phases %standard-phases + (add-before 'configure 'chdir + (lambda _ + (chdir "subprojects/groovy-servlet") + #t)) + (replace 'build + (lambda _ + (mkdir-p "build/classes") + (mkdir-p "build/jar") + (apply invoke "java" "-cp" (getenv "CLASSPATH") + "org.codehaus.groovy.tools.FileSystemCompiler" + "-d" "build/classes" + "-j"; joint compilation + (find-files "src/main" ".*\\.(groovy|java)$")) + (invoke "jar" "-cf" "build/jar/groovy-servlet.jar" + "-C" "build/classes" ".") + #t)) + (replace 'check + (lambda _ + (mkdir-p "build/test-classes") + (substitute* "build.xml" + (("depends=\"compile-tests\"") "depends=\"\"") + (("}/java") "}/groovy")) + (apply invoke "java" "-cp" + (string-append (getenv "CLASSPATH") ":build/classes") + "org.codehaus.groovy.tools.FileSystemCompiler" + "-d" "build/test-classes" + "-j" + (append (find-files "src/test" ".*\\.(groovy|java)$"))) + (invoke "ant" "check") + #t))))) + (inputs + `(("groovy-templates" ,groovy-templates) + ("groovy-xml" ,groovy-xml) + ,@(package-inputs groovy-bootstrap))) + (native-inputs + `(("groovy-bootstrap" ,groovy-bootstrap) + ("groovy-json" ,groovy-json) + ("groovy-test" ,groovy-test) + ("groovy-tests-bootstrap" ,groovy-tests-bootstrap) + ,@(package-native-inputs java-groovy-bootstrap))) + (synopsis "Groovy's servlet implementation") + (description "This package contains a library to create groovlets, Groovy's +version of Java servlets."))) + +(define groovy-sql + (package + (inherit groovy-bootstrap) + (name "groovy-sql") + (arguments + `(#:jar-name "groovy-sql.jar" + #:test-dir "src/test" + #:tests? #f;TODO: Requires hsqldb + #:jdk ,icedtea-8 + #:phases + (modify-phases %standard-phases + (add-before 'configure 'chdir + (lambda _ + (chdir "subprojects/groovy-sql") + #t)) + (replace 'build + (lambda _ + (mkdir-p "build/classes") + (mkdir-p "build/jar") + (apply invoke "java" "-cp" (getenv "CLASSPATH") + "org.codehaus.groovy.tools.FileSystemCompiler" + "-d" "build/classes" "-j"; joint compilation + (find-files "src/main" + ".*\\.(groovy|java)$")) + (invoke "jar" "-cf" "build/jar/groovy-sql.jar" + "-C" "build/classes" ".") + #t))))) + (native-inputs + `(("groovy-bootstrap" ,groovy-bootstrap) + ("groovy-test" ,groovy-test) + ("groovy-tests-bootstrap" ,groovy-tests-bootstrap) + ,@(package-native-inputs java-groovy-bootstrap))) + (synopsis "Groovy SQL library") + (description "This package contains a facade over Java's normal JDBC APIs +providing greatly simplified resource management and result set handling."))) + +(define groovy-testng + (package + (inherit groovy-bootstrap) + (name "groovy-testng") + (arguments + `(#:jar-name "groovy-testng.jar" + #:tests? #f; No tests + #:jdk ,icedtea-8 + #:phases + (modify-phases %standard-phases + (add-before 'configure 'chdir + (lambda _ + (chdir "subprojects/groovy-testng") + #t)) + (add-before 'build 'copy-resources + (lambda _ + (copy-recursively "src/main/resources" "build/classes") + #t)) + (replace 'build + (lambda _ + (mkdir-p "build/classes") + (mkdir-p "build/jar") + (apply invoke "java" "-cp" (getenv "CLASSPATH") + "org.codehaus.groovy.tools.FileSystemCompiler" + "-d" "build/classes" + "-j"; joint compilation + (find-files "src/main" ".*\\.(groovy|java)$")) + (invoke "jar" "-cf" "build/jar/groovy-testng.jar" + "-C" "build/classes" ".") + #t))))) + (native-inputs + `(("groovy-bootstrap" ,groovy-bootstrap) + ("groovy-test" ,groovy-test) + ("groovy-tests-bootstrap" ,groovy-tests-bootstrap) + ,@(package-native-inputs java-groovy-bootstrap))) + (synopsis "Groovy testing framework") + (description "This package contains integration code for running TestNG +tests in Groovy."))) + +(define groovy-macro + (package + (inherit groovy-bootstrap) + (name "groovy-macro") + (arguments + `(#:jar-name "groovy-macro.jar" + #:test-dir "src/test" + #:jdk ,icedtea-8 + #:phases + (modify-phases %standard-phases + (add-before 'configure 'chdir + (lambda _ + (chdir "subprojects/groovy-macro") + #t)) + (replace 'build + (lambda _ + (mkdir-p "build/classes") + (mkdir-p "build/jar") + (apply invoke "java" "-cp" (getenv "CLASSPATH") + "org.codehaus.groovy.tools.FileSystemCompiler" + "-d" "build/classes" "-j"; joint compilation + (find-files "src/main" ".*\\.(groovy|java)$")) + (invoke "jar" "-cf" "build/jar/groovy-macro.jar" + "-C" "build/classes" ".") + #t)) + (replace 'check + (lambda _ + (mkdir-p "build/test-classes") + (substitute* "build.xml" + (("depends=\"compile-tests\"") "depends=\"\"") + (("}/java") "}/groovy")) + (apply invoke "java" "-cp" + (string-append (getenv "CLASSPATH") ":build/classes") + "org.codehaus.groovy.tools.FileSystemCompiler" + "-d" "build/test-classes" "-j" + (append (find-files "src/test" ".*\\.(groovy|java)$"))) + (invoke "ant" "check") + #t))))) + (inputs + `(("groovy-templates" ,groovy-templates) + ("groovy-xml" ,groovy-xml) + ,@(package-inputs groovy-bootstrap))) + (native-inputs + `(("groovy-bootstrap" ,groovy-bootstrap) + ("groovy-json" ,groovy-json) + ("groovy-test" ,groovy-test) + ("groovy-tests-bootstrap" ,groovy-tests-bootstrap) + ,@(package-native-inputs java-groovy-bootstrap))) + (synopsis "Groovy macro processor") + (description "This package contains a high-level library to create macro +and modify groovy's @dfn{Abstract Syntax Tree} (AST)."))) + +(define-public groovy + (package + (inherit groovy-bootstrap) + (name "groovy") + (arguments + `(#:tests? #f; No tests + #:jdk ,icedtea-8 + #:phases + (modify-phases %standard-phases + (delete 'configure) + (delete 'build) + (replace 'install + (lambda* (#:key outputs inputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (out-bin (string-append out "/bin")) + (out-lib (string-append out "/lib"))) + (with-directory-excursion "src/bin" + (substitute* "startGroovy" + (("\"\\\\\"") "\"") + (("\\\\\"\"") "\"") + (("\\\\\\$") "$") + (("@GROOVYJAR@") "groovy.jar") + (("MAX_FD=\"maximum\"") + (string-append + "MAX_FD=\"maximum\"\nJAVAHOME=" + (assoc-ref inputs "jdk")))) + ;; Groovy uses class loading. It's not enough to put the class + ;; in the loader's classpath, as it causes breakages: + ;; the compiler would give this error: + ;; "Prohibited package name: java.lang" + ;; So we symlink dependencies in this package's output. The + ;; starter class (in groovy-bootstrap) is where the class loader + ;; will look for dependencies, so we put it there too. + (mkdir-p out-lib) + (for-each + (lambda (input) + (for-each + (lambda (jar) + (symlink jar (string-append out-lib "/" (basename jar)))) + (find-files (assoc-ref inputs input) ".*.jar"))) + '("groovy-bootstrap" "groovy-ant" "groovy-bsf" + "groovy-console" "groovy-docgenerator" + "groovy-groovydoc" "groovy-groovysh" + "groovy-jmx" "groovy-json" "groovy-jsr223" + "groovy-nio" "groovy-servlet" "groovy-sql" + "groovy-swing" "groovy-templates" "groovy-testng" + "java-commons-cli" "java-asm" + "java-classpathx-servletapi" "java-xstream" + "java-jansi" "java-jline-2")) + ;; antlr.jar is present twice in antlr2. Symlink doesn't like + ;; it, so we symlink it here. + (symlink (string-append (assoc-ref inputs "antlr2") "/lib/antlr.jar") + (string-append out-lib "/antlr.jar")) + (for-each + (lambda (tool) + (install-file tool out-bin) + (chmod (string-append out-bin "/" tool) #o755)) + '("grape" "groovy" "groovyc" "groovyConsole" "groovydoc" + "groovysh" "java2groovy" "startGroovy"))) + (install-file "src/conf/groovy-starter.conf" + (string-append out "/conf")) + #t)))))) + (inputs + `(("groovy-bootstrap" ,groovy-bootstrap) + ("groovy-ant" ,groovy-ant) + ("groovy-bsf" ,groovy-bsf) + ("groovy-console" ,groovy-console) + ("groovy-docgenerator" ,groovy-docgenerator) + ("groovy-groovydoc" ,groovy-groovydoc) + ("groovy-groovysh" ,groovy-groovysh) + ("groovy-jmx" ,groovy-jmx) + ("groovy-json" ,groovy-json) + ("groovy-jsr223" ,groovy-jsr223) + ("groovy-nio" ,groovy-nio) + ("groovy-servlet" ,groovy-servlet) + ("groovy-sql" ,groovy-sql) + ("groovy-swing" ,groovy-swing) + ("groovy-templates" ,groovy-templates) + ("groovy-testng" ,groovy-testng) + ("java-commons-cli" ,java-commons-cli) + ("java-asm" ,java-asm) + ("java-classpathx-servletapi" ,java-classpathx-servletapi) + ("java-xstream" ,java-xstream) + ("java-jansi" ,java-jansi) + ("java-jline-2" ,java-jline-2) + ("antlr2" ,antlr2))) + (synopsis "Programming language for the JVM") + (description "Apache Groovy is a powerful, optionally typed and dynamic +language, with static-typing and static compilation capabilities, for the Java +platform. It integrates smoothly with any Java program, and immediately +delivers to your application powerful features, including scripting +capabilities, Domain-Specific Language authoring, runtime and compile-time +meta-programming and functional programming."))) diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm index 9eefb58433..40e1e86f7e 100644 --- a/gnu/packages/gstreamer.scm +++ b/gnu/packages/gstreamer.scm @@ -353,7 +353,6 @@ par compared to the rest.") (inputs `(("gst-plugins-base" ,gst-plugins-base) ("liba52" ,liba52) - ("libmad" ,libmad) ("lame" ,lame) ("libcdio" ,libcdio) ("twolame" ,twolame) diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm index ae7813c739..578b4513f8 100644 --- a/gnu/packages/guile.scm +++ b/gnu/packages/guile.scm @@ -17,6 +17,8 @@ ;;; Copyright © 2017 Nils Gillmann <ng0@n0.is> ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2018 Maxim Cournoyer <maxim.cournoyer@gmail.com> +;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net> +;;; Copyright © 2018 Pierre-Antoine Rouby <pierre-antoine.rouby@inria.fr> ;;; ;;; This file is part of GNU Guix. ;;; @@ -66,6 +68,7 @@ #:use-module (gnu packages version-control) #:use-module (gnu packages xdisorg) #:use-module (gnu packages xorg) + #:use-module (gnu packages networking) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) @@ -1569,6 +1572,9 @@ provides access to that interface and its types from the Scheme level.") '(#:configure-flags (list (string-append "--with-guile-site-dir=" %output "/share/guile/site/2.2")) + #:make-flags + (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib:" + (assoc-ref %build-inputs "guile-dbd-sqlite3") "/lib")) #:phases (modify-phases %standard-phases (add-after 'install 'patch-extension-path @@ -1579,6 +1585,8 @@ provides access to that interface and its types from the Scheme level.") (ext (string-append out "/lib/libguile-dbi"))) (substitute* dbi.scm (("libguile-dbi") ext)) #t)))))) + (inputs + `(("guile-dbd-sqlite3" ,guile-dbd-sqlite3))) ; only shared library, no scheme files (propagated-inputs `(("guile" ,guile-2.2))) (synopsis "Guile database abstraction layer") @@ -1590,6 +1598,15 @@ programming interface is presented regardless of which database system is used. It currently supports MySQL, Postgres and SQLite3.") (license license:gpl2+))) +(define guile-dbi-bootstrap + (package + (inherit guile-dbi) + (name "guile-dbi-bootstrap") + (inputs '()) + (arguments + (substitute-keyword-arguments (package-arguments guile-dbi) + ((#:make-flags _) '(list)))))) + (define-public guile-dbd-sqlite3 (package (name "guile-dbd-sqlite3") @@ -1604,12 +1621,11 @@ It currently supports MySQL, Postgres and SQLite3.") "0rg71jchxd2y8x496s8zmfmikr5g8zxi8zv2ar3f7a23pph92iw2")))) (build-system gnu-build-system) (native-inputs - `(("pkg-config" ,pkg-config))) + `(("pkg-config" ,pkg-config) + ("guile-dbi-bootstrap" ,guile-dbi-bootstrap))) ; only required for headers (inputs `(("sqlite" ,sqlite) ("zlib" ,(@ (gnu packages compression) zlib)))) - (propagated-inputs - `(("guile-dbi" ,guile-dbi))) (synopsis "Guile DBI driver for SQLite") (home-page "https://github.com/jkalbhenn/guile-dbd-sqlite3") (description @@ -2109,4 +2125,93 @@ It has a nice, simple s-expression based syntax.") "Guile-colorized provides you with a colorized REPL for GNU Guile.") (license license:gpl3+))) +(define-public guile-simple-zmq + (let ((commit "d76657aeb1cd10ef8136edc06bb90999914c7c3c") + (revision "0")) + (package + (name "guile-simple-zmq") + (version (git-version "0.0.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/jerry40/guile-simple-zmq") + (commit commit))) + (sha256 + (base32 + "1w73dy5gpyv33jn34dqlkqpwh9w4y8wm6hgvbpb3wbp6xsa2mk4z")) + (file-name (git-file-name name version)))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils) + (srfi srfi-26) + (ice-9 match) + (ice-9 popen) + (ice-9 rdelim)) + + (let* ((out (assoc-ref %outputs "out")) + (guile (assoc-ref %build-inputs "guile")) + (effective (read-line + (open-pipe* OPEN_READ + (string-append guile "/bin/guile") + "-c" "(display (effective-version))"))) + (module-dir (string-append out "/share/guile/site/" + effective)) + (go-dir (string-append out "/lib/guile/" + effective "/site-ccache/")) + (source (string-append (assoc-ref %build-inputs "source") + "/src")) + (scm-file "simple-zmq.scm") + (guild (string-append (assoc-ref %build-inputs "guile") + "/bin/guild")) + (zmq (assoc-ref %build-inputs "zeromq")) + (deps (list zmq)) + (path (string-join + (map (cut string-append <> + "/lib/") + deps) + ":"))) + ;; Make installation directories. + (mkdir-p module-dir) + (mkdir-p go-dir) + + ;; Compile .scm files and install. + (chdir source) + (setenv "GUILE_AUTO_COMPILE" "0") + (for-each (lambda (file) + (let* ((dest-file (string-append module-dir "/" + file)) + (go-file (match (string-split file #\.) + ((base _) + (string-append go-dir "/" + base ".go"))))) + ;; Install source module. + (copy-file file dest-file) + (substitute* dest-file + (("\\(dynamic-link \"libzmq\"\\)") + (format #f "(dynamic-link \"~a/lib/libzmq.so\")" + (assoc-ref %build-inputs "zeromq")))) + + ;; Install and compile module. + (unless (zero? (system* guild "compile" + "-L" source + "-o" go-file + dest-file)) + (error (format #f "Failed to compile ~s to ~s!" + file go-file))))) + (list scm-file)) + #t)))) + (propagated-inputs + `(("guile" ,guile-2.2) + ("zeromq" ,zeromq))) + (home-page "https://github.com/jerry40/guile-simple-zmq") + (synopsis "Guile wrapper over ZeroMQ library") + (description + "This package provides a Guile programming interface to the ZeroMQ +messaging library.") + (license license:gpl3+)))) + ;;; guile.scm ends here diff --git a/gnu/packages/haskell-check.scm b/gnu/packages/haskell-check.scm index 6b1d769313..7453f9fbf1 100644 --- a/gnu/packages/haskell-check.scm +++ b/gnu/packages/haskell-check.scm @@ -8,6 +8,7 @@ ;;; Copyright © 2017 Danny Milosavljevic <dannym@scratchpost.org> ;;; Copyright © 2017 rsiddharth <s@ricketyspace.net> ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr> +;;; Copyright © 2018 Tonton <tonton@riseup.net> ;;; ;;; This file is part of GNU Guix. ;;; @@ -451,6 +452,19 @@ hold in a large number of randomly generated cases. Specifications are expressed in Haskell, using combinators defined in the QuickCheck library.") (license license:bsd-3))) +(define-public ghc-quickcheck-2.9 + (package + (inherit ghc-quickcheck) + (name "ghc-quickcheck") + (version "2.9.2") + (source (origin + (method url-fetch) + (uri (string-append "https://hackage.haskell.org/package/QuickCheck-2.9.2/QuickCheck-" + version ".tar.gz")) + (sha256 + (base32 + "119np67qvx8hyp9vkg4gr2wv3lj3j6ay2vl4hxspkg43ymb1cp0m")))))) + (define-public ghc-quickcheck-latest (package (inherit ghc-quickcheck) (version "2.11.3") diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm index f2c546d08b..c302ae8308 100644 --- a/gnu/packages/haskell.scm +++ b/gnu/packages/haskell.scm @@ -13,6 +13,7 @@ ;;; Copyright © 2017, 2018 Alex Vong <alexvong1995@gmail.com> ;;; Copyright © 2017 rsiddharth <s@ricketyspace.net> ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr> +;;; Copyright © 2018 Tonton <tonton@riseup.net> ;;; ;;; This file is part of GNU Guix. ;;; @@ -9468,4 +9469,58 @@ system dependencies.") address string against RFC 5322.") (license license:bsd-3))) +(define-public ghc-array + (package + (name "ghc-array") + (version "0.5.2.0") + (source + (origin + (method url-fetch) + (uri + (string-append "https://hackage.haskell.org/package/array-0.5.2.0/array-" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "12v83s2imxb3p2crnlzrpjh0nk6lpysw9bdk9yahs6f37csa5jaj")))) + (build-system haskell-build-system) + (synopsis "Haskell @code{Data.Array} module") + (description "In addition to providing the @code{Data.Array} module as +specified in the Haskell 2010 Language Report, this package defines the +classes @code{IArray} of immutable arrays and @code{MArray} of arrays mutable +within appropriate monads, as well as some instances of these classes.") + (home-page "https://hackage.haskell.org/package/array") + (license license:bsd-3))) + +(define-public ghc-containers + (package + (name "ghc-containers") + (version "0.5.11.0") + (source + (origin + (method url-fetch) + (uri + (string-append "https://hackage.haskell.org/package/containers-0.5.11.0/containers-" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0j29w09kvcn1c0yi4clmrdbgs2gqmpxs2m7q80ib2ix1smm25kaq")))) + (build-system haskell-build-system) + (inputs `(("ghc-array" ,ghc-array) + ("ghc-deepseq" ,ghc-deepseq-generics) + ("ghc-hunit" ,ghc-hunit) + ("ghc-chasingbottoms" ,ghc-chasingbottoms) + ("ghc-test-framework" ,ghc-test-framework) + ("ghc-test-framework-hunit" ,ghc-test-framework-hunit) + ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2) + ("ghc-quickcheck" ,ghc-quickcheck) + ("ghc-ghc-prim" ,ghc-primitive))) + (synopsis "Haskell containers: Assorted concrete container types") + (description "This Haskell module provides efficient general-purpose +implementations of various immutable container types including sets, maps, +sequences, trees, and graphs.") + (home-page "https://hackage.haskell.org/package/containers") + (license license:bsd-3))) + ;;; haskell.scm ends here diff --git a/gnu/packages/image-processing.scm b/gnu/packages/image-processing.scm index a44bc086d6..8f80b75af4 100644 --- a/gnu/packages/image-processing.scm +++ b/gnu/packages/image-processing.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org> ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> +;;; Copyright © 2018 Björn Höfling <bjoern.hoefling@bjoernhoefling.de> ;;; ;;; This file is part of GNU Guix. ;;; @@ -38,12 +39,16 @@ #:use-module (gnu packages gnome) #:use-module (gnu packages graphics) #:use-module (gnu packages graphviz) + #:use-module (gnu packages gtk) #:use-module (gnu packages image) #:use-module (gnu packages maths) #:use-module (gnu packages perl) + #:use-module (gnu packages photo) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages protobuf) #:use-module (gnu packages python) #:use-module (gnu packages serialization) + #:use-module (gnu packages video) #:use-module (gnu packages xiph) #:use-module (gnu packages xml) #:use-module (gnu packages xorg)) @@ -191,3 +196,203 @@ triangulation. VTK has an extensive information visualization framework, has a suite of 3D interaction widgets, supports parallel processing, and integrates with various databases on GUI toolkits such as Qt and Tk.") (license license:bsd-3))) + +(define-public opencv + (package + (name "opencv") + (version "3.4.1") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/opencv/opencv/archive/" + version ".zip")) + (file-name (string-append name "-" version ".zip")) + (sha256 + (base32 + "1g8pvnlkzzp50amd89149hqsbvsc2hq3vk1d6a9fksdcx8ra9g94")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Remove external libraries. We have all available in Guix: + (delete-file-recursively "3rdparty") + + ;; Milky icon set is non-free: + (delete-file-recursively "modules/highgui/src/files_Qt/Milky") + + ;; Some jars found: + (for-each delete-file + '("modules/java/test/pure_test/lib/junit-4.11.jar" + "samples/java/sbt/sbt/sbt-launch.jar")))))) + (build-system cmake-build-system) + (arguments + `(#:configure-flags + (list "-DWITH_IPP=OFF" + "-DWITH_ITT=OFF" + + ;; CPU-Features: + ;; See cmake/OpenCVCompilerOptimizations.cmake + ;; (CPU_ALL_OPTIMIZATIONS) for a list of all optimizations + ;; BASELINE is the minimum optimization all CPUs must support + ;; + ;; DISPATCH is the list of optional dispatches + "-DCPU_BASELINE=SSE2, NEON" + + "-DCPU_DISPATCH=SSE3,SSSE3,SSE4_1,SSE4_2,AVX,AVX2" + "-DCPU_DISPATCH_REQUIRE=SSE3,SSSE3,SSE4_1,SSE4_2,AVX,AVX2" + + "-DBUILD_PERF_TESTS=OFF" + "-D BUILD_TESTS=ON" + + (string-append "-DOPENCV_EXTRA_MODULES_PATH=" + "/tmp/guix-build-opencv-" ,version ".drv-0" + "/opencv-contrib/opencv_contrib-" ,version + "/modules") + + ;;Define test data: + (string-append "-DOPENCV_TEST_DATA_PATH=" + "/tmp/guix-build-opencv-" ,version ".drv-0" + ;;"/opencv-3.4.0" + "/opencv-extra/opencv_extra-" ,version + "/testdata") + + ;; Is ON by default and would try to rebuild 3rd-party protobuf, + ;; which we had removed, which would lead to an error: + "-DBUILD_PROTOBUF=OFF" + + ;; Rebuild protobuf files, because we have a slightly different + ;; version than the included one. If we would not update, we + ;; would get a compile error later: + "-DPROTOBUF_UPDATE_FILES=ON" + + ;; xfeatures2d disabled, because it downloads extra binaries from + ;; https://github.com/opencv/opencv_3rdparty + ;; defined in xfeatures2d/cmake/download_{vgg|bootdesc}.cmake + ;; Cmp this bug entry: + ;; https://github.com/opencv/opencv_contrib/issues/1131 + "-DBUILD_opencv_xfeatures2d=OFF") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'disable-broken-tests + (lambda _ + ;; These tests fails with: + ;; vtkXOpenGLRenderWindow (0x723990): Could not find a decent config + ;; I think we have no OpenGL support with the Xvfb. + (substitute* '("modules/viz/test/test_tutorial3.cpp" + "modules/viz/test/test_main.cpp" + "modules/viz/test/tests_simple.cpp" + "modules/viz/test/test_viz3d.cpp") + (("(TEST\\(Viz, )([a-z].*\\).*)" all pre post) + (string-append pre "DISABLED_" post))) + + ;; This one fails with "unknown file: Failure" + ;; But I couldn't figure out which file was missing: + (substitute* (list (string-append + "../opencv-contrib/opencv_contrib-" + ,version + "/modules/face/test/test_face_align.cpp")) + (("(TEST\\(CV_Face_FacemarkKazemi, )(can_detect_landmarks\\).*)" + all pre post) + (string-append pre "DISABLED_" post))) + + ;; Failure reason: Bad accuracy + ;; Incorrect count of accurate poses [2nd case]: 90.000000 / 94.000000 + (substitute* (list (string-append + "../opencv-contrib/opencv_contrib-" + ,version + "/modules/rgbd/test/test_odometry.cpp")) + (("(TEST\\(RGBD_Odometry_Rgbd, )(algorithmic\\).*)" all pre post) + (string-append pre "DISABLED_" post))) + #t)) + + ;; Idea copied from ldc.scm (ldc-bootstrap): + (add-after 'unpack 'unpack-submodule-sources + (lambda* (#:key inputs #:allow-other-keys) + (mkdir "../opencv-extra") + (mkdir "../opencv-contrib") + (let ((unpack (lambda (source target) + (with-directory-excursion target + (apply invoke "unzip" + (list (assoc-ref inputs source))))))) + (unpack "opencv-extra" "../opencv-extra") + (unpack "opencv-contrib" "../opencv-contrib")))) + + (add-after 'set-paths 'add-ilmbase-include-path + (lambda* (#:key inputs #:allow-other-keys) + ;; OpenEXR propagates ilmbase, but its include files do not appear + ;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to + ;; the CPATH to satisfy the dependency on "ImathVec.h". + (setenv "CPATH" + (string-append (assoc-ref inputs "ilmbase") + "/include/OpenEXR" + ":" (or (getenv "CPATH") ""))) + #t)) + (add-before 'check 'start-xserver + (lambda* (#:key inputs #:allow-other-keys) + (let ((xorg-server (assoc-ref inputs "xorg-server")) + (disp ":1")) + (setenv "HOME" (getcwd)) + (setenv "DISPLAY" disp) + ;; There must be a running X server and make check doesn't start one. + ;; Therefore we must do it. + (zero? (system (format #f "~a/bin/Xvfb ~a &" xorg-server disp))))))))) + (native-inputs + `(("unzip" ,unzip) + ("pkg-config" ,pkg-config) + ("xorg-server" ,xorg-server) ; For running the tests + ("opencv-extra" + ,(origin + (method url-fetch) + (uri (string-append "https://codeload.github.com/" + "opencv/opencv_extra/zip/" version)) + (file-name (string-append "opencv-extra-" version ".zip")) + (sha256 + (base32 "0wfh3pvfxqydf7hsccp50npcsg37sf6fqi6cd3zkc4qil9zhpbps")))) + ("opencv-contrib" + ,(origin + (method url-fetch) + (uri (string-append "https://codeload.github.com/" + "opencv/opencv_contrib/zip/" version)) + (file-name (string-append "opencv-contrib-" version ".zip")) + (sha256 + (base32 "18zm0qmjcdvg90c33gzv0ws0xdaid1xpqzz2xa9l2x12qkr6zj3p")))))) + (inputs `(("libjpeg" ,libjpeg) + ("libpng" ,libpng) + ("jasper" ,jasper) + ;; ffmpeg 4.0 causes core dumps in tests. + ("ffmpeg" ,ffmpeg-3.4) + ("libtiff" ,libtiff) + ("hdf5" ,hdf5) + ("libgphoto2" ,libgphoto2) + ("libwebp" ,libwebp) + ("zlib" ,zlib) + ("gtkglext" ,gtkglext) + ("openexr" ,openexr) + ("ilmbase" ,ilmbase) + ("gtk+" ,gtk+-2) + ("python-numpy" ,python-numpy) + ("protobuf" ,protobuf) + ("vtk" ,vtk) + ("python" ,python))) + ;; These three CVEs are not a problem of OpenCV, see: + ;; https://github.com/opencv/opencv/issues/10998 + (properties '((lint-hidden-cve . ("CVE-2018-7712" + "CVE-2018-7713" + "CVE-2018-7714")))) + (synopsis "Computer vision library") + (description "OpenCV is a library aimed at +real-time computer vision, including several hundred computer +vision algorithms. It can be used to do things like: + +@itemize +@item image and video input and output +@item image and video processing +@item displaying +@item feature recognition +@item segmentation +@item facial recognition +@item stereo vision +@item structure from motion +@item augmented reality +@item machine learning +@end itemize\n") + (home-page "https://opencv.org/") + (license license:bsd-3))) diff --git a/gnu/packages/image-viewers.scm b/gnu/packages/image-viewers.scm index 1f0a9e46e1..68f1148908 100644 --- a/gnu/packages/image-viewers.scm +++ b/gnu/packages/image-viewers.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2013, 2017, 2018 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net> ;;; Copyright © 2015, 2016 Alex Kost <alezost@gmail.com> -;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il> +;;; Copyright © 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2017 Alex Griffin <a@ajgrf.com> ;;; Copyright © 2017 Nils Gillmann <ng0@n0.is> ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com> @@ -31,14 +31,15 @@ #:use-module (guix packages) #:use-module (guix build-system gnu) #:use-module (guix build-system cmake) + #:use-module (guix build-system meson) #:use-module (guix build-system python) #:use-module (gnu packages autotools) #:use-module (gnu packages algebra) - #:use-module (gnu packages base) #:use-module (gnu packages boost) #:use-module (gnu packages compression) #:use-module (gnu packages curl) #:use-module (gnu packages fontutils) + #:use-module (gnu packages gettext) #:use-module (gnu packages ghostscript) #:use-module (gnu packages glib) #:use-module (gnu packages gnome) @@ -59,7 +60,7 @@ (define-public feh (package (name "feh") - (version "2.26") + (version "2.26.2") (home-page "https://feh.finalrewind.org/") (source (origin (method url-fetch) @@ -67,7 +68,7 @@ name "-" version ".tar.bz2")) (sha256 (base32 - "11kckzwk3b734l0n4j41k40liq1v2lbbj1gzir5qc386g7fvzmmi")))) + "07hn5d5m1jsqp6qb2d3lah1js8382hrf225y0q8776m2k3vzylk3")))) (build-system gnu-build-system) (arguments '(#:phases (modify-phases %standard-phases (delete 'configure)) @@ -231,43 +232,36 @@ it and customize it for your needs.") (define-public viewnior (package (name "viewnior") - (version "1.6") + (version "1.7") (source (origin (method url-fetch) - (uri (string-append "https://github.com/xsisqox/Viewnior/archive/" + (uri (string-append "https://github.com/hellosiyan/Viewnior/archive/" name "-" version ".tar.gz")) (sha256 (base32 - "18309qjgwak3kn228z3p3nx7yxasqgzx69v3rgc23hf161nky0c9")))) - (build-system gnu-build-system) + "1rpkk721s3xas125q3g0fl11b5zsrmzv9pzl6ddzcy4sj2rd7ymr")))) + (build-system meson-build-system) (arguments '(#:phases (modify-phases %standard-phases - (add-after 'unpack 'autogen - (lambda _ - (zero? (system* "sh" "autogen.sh")))) - (add-before 'install 'skip-gtk-update-icon-cache + (add-after 'unpack 'patch-source (lambda _ ;; Don't create 'icon-theme.cache' - (substitute* (find-files "data" "^Makefile$") - (("gtk-update-icon-cache") (which "true"))) - #t))))) + (substitute* "meson.build" + (("meson.add_install_script*") "")) + #t))) + #:tests? #f)) ; no tests (native-inputs - `(("automake" ,automake) - ("autoconf" ,autoconf) - ("intltool" ,intltool) + `(("gettext" ,gettext-minimal) ("glib" ,glib "bin") ; glib-genmarshal - ("gnome-common" ,gnome-common) - ("libtool" ,libtool) ("pkg-config" ,pkg-config) - ("shared-mime-info" ,shared-mime-info) - ("which" ,which))) + ("shared-mime-info" ,shared-mime-info))) (inputs `(("exiv2" ,exiv2) ("gdk-pixbuf" ,gdk-pixbuf) ("gtk+-2" ,gtk+-2))) - (home-page "http://siyanpanayotov.com/project/viewnior/") + (home-page "http://siyanpanayotov.com/project/viewnior") (synopsis "Simple, fast and elegant image viewer") (description "Viewnior is an image viewer program. Created to be simple, fast and elegant. Its minimalistic interface provides more screenspace for diff --git a/gnu/packages/imagemagick.scm b/gnu/packages/imagemagick.scm index c63259dd01..e80da6d848 100644 --- a/gnu/packages/imagemagick.scm +++ b/gnu/packages/imagemagick.scm @@ -47,14 +47,14 @@ ;; The 7 release series has an incompatible API, while the 6 series is still ;; maintained. Don't update to 7 until we've made sure that the ImageMagick ;; users are ready for the 7-series API. - (version "6.9.9-39") + (version "6.9.9-43") (source (origin (method url-fetch) (uri (string-append "mirror://imagemagick/ImageMagick-" version ".tar.xz")) (sha256 (base32 - "0cgrvfg8722cdv2y0hw2f7xhzdfmfiqc1348l71ki38dg4b0q4sn")))) + "09vfxb1ljfma7mvkcqp17bs7adlrfh6kc6k9hifkhgxf51vr7hk6")))) (build-system gnu-build-system) (arguments `(#:configure-flags '("--with-frozenpaths" "--without-gcc-arch") @@ -169,7 +169,7 @@ script.") (define-public graphicsmagick (package (name "graphicsmagick") - (version "1.3.28") + (version "1.3.29") (source (origin (method url-fetch) (uri @@ -181,7 +181,7 @@ script.") "/GraphicsMagick-" version ".tar.xz"))) (sha256 (base32 - "0jlrrimrajcmwp7llivyj14qnzb1mpqd8vw95dl6zbx5m2lnhall")))) + "1m0cc6kpky06lpcipj7rfwc2jbw2igr0jk97zqmw3j1ld5mg93g1")))) (build-system gnu-build-system) (arguments `(#:configure-flags diff --git a/gnu/packages/inkscape.scm b/gnu/packages/inkscape.scm index ffd5f60b38..de9940df1c 100644 --- a/gnu/packages/inkscape.scm +++ b/gnu/packages/inkscape.scm @@ -80,8 +80,13 @@ ;; FIXME: tests require gmock (arguments `(#:tests? #f - #:make-flags - '("gtk_update_icon_cache=true"))) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-icon-cache-generator + (lambda _ + (substitute* "share/icons/application/CMakeLists.txt" + (("gtk-update-icon-cache") "true")) + #t))))) (home-page "https://inkscape.org/") (synopsis "Vector graphics editor") (description "Inkscape is a vector graphics editor. What sets Inkscape diff --git a/gnu/packages/javascript.scm b/gnu/packages/javascript.scm index eeeec406a8..3a9e88ad08 100644 --- a/gnu/packages/javascript.scm +++ b/gnu/packages/javascript.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il> +;;; Copyright © 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr> ;;; ;;; This file is part of GNU Guix. ;;; @@ -370,6 +371,44 @@ to ES5 without causing run-time errors in older engines. In many cases, this means that these shams cause many ES5 methods to silently fail.") (license license:expat))) +(define-public js-filesaver + (package + (name "js-filesaver") + (version "1.3.8") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/eligrey/FileSaver.js/" + "archive/" version ".tar.gz")) + (file-name (string-append name "-" version)) + (sha256 + (base32 + "1rkhfqs5plaj628kzj7qgm5qahy4v7ihygifidqr6g6265mil97h")))) + (build-system minify-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'fix-uglification + ;; Remove "export" keyword which prevents the file from being + ;; uglified by uglify-js. Moreover, that keyword is not present in + ;; the minified version of the library some projects are using, + ;; e.g., + ;; <https://github.com/jmoenig/Snap--Build-Your-Own-Blocks/blob/master/FileSaver.min.js> + (lambda _ + (substitute* "src/FileSaver.js" + (("export ") "")) + #t))))) + (home-page + "https://eligrey.com/blog/saving-generated-files-on-the-client-side/") + (synopsis "HTML5 saveAs() FileSaver implementation") + (description "@file{FileSaver.js} implements the @code{saveAs()} +FileSaver interface in browsers that do not natively support it. + +@file{FileSaver.js} is the solution to saving files on the +client-side, and is perfect for webapps that need to generate files, +or for saving sensitive information that shouldn't be sent to an +external server.") + (license license:expat))) + (define-public mujs (package (name "mujs") diff --git a/gnu/packages/kde-frameworks.scm b/gnu/packages/kde-frameworks.scm index 099c01fe3d..7dc2cf37fe 100644 --- a/gnu/packages/kde-frameworks.scm +++ b/gnu/packages/kde-frameworks.scm @@ -142,7 +142,7 @@ common build settings used in software produced by the KDE community.") (define-public phonon (package (name "phonon") - (version "4.10.0") + (version "4.10.1") (source (origin (method url-fetch) (uri (string-append @@ -151,7 +151,7 @@ common build settings used in software produced by the KDE community.") name "-" version ".tar.xz")) (sha256 (base32 - "0gyhlnwamzfw31kw4qh0v6rj0m47k9wfygd6h07klg9ggp60xhg2")))) + "1dwdw0hm6685psrp7v9frhkhqvsxrbdnm3gw794j5z7g3brqvag5")))) (build-system cmake-build-system) (native-inputs ;; TODO: Think about adding pulseaudio. Is it required for sound? diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm index 65119e85df..39e2ef1d7e 100644 --- a/gnu/packages/libreoffice.scm +++ b/gnu/packages/libreoffice.scm @@ -838,7 +838,7 @@ and to return information on pronunciations, meanings and synonyms.") (define-public libreoffice (package (name "libreoffice") - (version "5.4.6.2") + (version "5.4.7.1") (source (origin (method url-fetch) @@ -848,7 +848,7 @@ and to return information on pronunciations, meanings and synonyms.") (version-prefix version 3) "/libreoffice-" version ".tar.xz")) (sha256 (base32 - "0icd8h221gp2dsbn6d35flwhqhcfpx66cjc5dg8yifhhvrfam74i")))) + "0g60wzg90n1kanmkiwy01jz4s4xgdkpczvm7vdrmjpp7ifrgijbv")))) (build-system gnu-build-system) (native-inputs `(("bison" ,bison) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 427f9bd88d..85d83d85d8 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -392,8 +392,8 @@ It has been modified to remove all non-free binary blobs.") ;; supports qemu "virt" machine and possibly a large number of ARM boards. ;; See : https://wiki.debian.org/DebianKernel/ARMMP. -(define %linux-libre-version "4.16.7") -(define %linux-libre-hash "145hv7paw5zd6bnkk0agxyg2a37066xhrxszbq3d03mjvi8ap117") +(define %linux-libre-version "4.16.9") +(define %linux-libre-hash "13v5pb30v16cn81w2gnwaa4zhxas7q3zz10igpa2rqd5fdiy3rlz") (define-public linux-libre (make-linux-libre %linux-libre-version @@ -401,8 +401,8 @@ It has been modified to remove all non-free binary blobs.") %linux-compatible-systems #:configuration-file kernel-config)) -(define %linux-libre-4.14-version "4.14.39") -(define %linux-libre-4.14-hash "0r6fydsgspnskh5n1hfrkyrlrmql635zqr44ajafmqimldc0bplz") +(define %linux-libre-4.14-version "4.14.41") +(define %linux-libre-4.14-hash "0qcfw4spnjlzri8bgch1j0yxsw75gjx1m9qyn3h1lk4a33gczih6") (define-public linux-libre-4.14 (make-linux-libre %linux-libre-4.14-version @@ -411,14 +411,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.98" - "14mqg2hvxg4zwajwly18akyaca821sp4iz5w3xmikwndn2j8y1lw" + (make-linux-libre "4.9.100" + "1zphlisrjzbgk7nvclbwm23kmrx7vw13w02r1va3g5lzh0rlwx71" %intel-compatible-systems #:configuration-file kernel-config)) (define-public linux-libre-4.4 - (make-linux-libre "4.4.131" - "1phah297rxjwy22wfaqlzpbk71ddp3drma5dx3i8xv6g8vijd08x" + (make-linux-libre "4.4.132" + "012nmbvvi8sg0iav5aibk8qx189iwqjadnr4h5jv65gzi7i79li9" %intel-compatible-systems #:configuration-file kernel-config)) @@ -716,7 +716,7 @@ slabtop, and skill.") (define-public usbutils (package (name "usbutils") - (version "009") + (version "010") (source (origin (method url-fetch) @@ -724,7 +724,7 @@ slabtop, and skill.") "usbutils-" version ".tar.xz")) (sha256 (base32 - "0q3iavmak2bs9xw486w4xfbjl0hbzii93ssgpr95mxmm9kjz1gwb")))) + "06aag4jfgsfjxk563xsp9ik9nadihmasrr37a1gb0vwqni5kdiv1")))) (build-system gnu-build-system) (inputs `(("libusb" ,libusb) @@ -3268,10 +3268,10 @@ repair and easy administration.") from the btrfs-progs package. It is meant to be used in initrds.") (license (package-license btrfs-progs)))) -(define-public f2fs-tools +(define-public f2fs-tools-1.7 (package (name "f2fs-tools") - (version "1.8.0") + (version "1.7.0") (source (origin (method url-fetch) (uri (string-append @@ -3279,15 +3279,27 @@ from the btrfs-progs package. It is meant to be used in initrds.") "/f2fs-tools.git/snapshot/" name "-" version ".tar.gz")) (sha256 (base32 - "1bir9ladb58ijlcvrjrq1fb1xv5ys50zdjaq0yzliib0apsyrnyl")))) + "1m6bn1ibq0p53m0n97il91xqgjgn2pzlz74lb5bfzassx7159m1k")))) + (build-system gnu-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'install 'install-headers + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (out-include (string-append out "/include"))) + (install-file "include/f2fs_fs.h" out-include) + (install-file "mkfs/f2fs_format_utils.h" out-include) + #t)))))) (native-inputs `(("autoconf" ,autoconf) ("automake" ,automake) ("libtool" ,libtool) ("pkg-config" ,pkg-config))) (inputs - `(("libuuid" ,util-linux))) + `(("libuuid" ,util-linux) + ("libselinux" ,libselinux))) (home-page "https://f2fs.wiki.kernel.org/") (synopsis "Userland tools for f2fs") (description @@ -3298,6 +3310,22 @@ disks and SD cards. This package provides the userland utilities.") ;; GPL2/LGPL2.1, everything else is GPL2 only. See 'COPYING'. (license (list license:gpl2 license:lgpl2.1)))) +(define-public f2fs-tools + (package + (inherit f2fs-tools-1.7) + (name "f2fs-tools") + (version "1.8.0") + (source (origin + (method url-fetch) + (uri (string-append + "https://git.kernel.org/cgit/linux/kernel/git/jaegeuk" + "/f2fs-tools.git/snapshot/" name "-" version ".tar.gz")) + (sha256 + (base32 + "1bir9ladb58ijlcvrjrq1fb1xv5ys50zdjaq0yzliib0apsyrnyl")))) + (inputs + `(("libuuid" ,util-linux))))) + (define-public freefall (package (name "freefall") @@ -3493,7 +3521,7 @@ The following service daemons are also provided: (define-public rng-tools (package (name "rng-tools") - (version "6.1") + (version "6.2") (source (origin (method url-fetch) (uri (string-append "https://github.com/nhorman/rng-tools/" @@ -3501,7 +3529,7 @@ The following service daemons are also provided: (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "00ywsknjpc9jd9kfmz2syk9l0xkiiwyx5qhl5zvhhc69v6682i31")))) + "0xy4qmfhvkr5z4jr9j55dn5gnajr2jccdp6n0xsxkipjcgag342j")))) (build-system gnu-build-system) (arguments `(;; Avoid using OpenSSL, curl, and libxml2, reducing the closure by 166 MiB. @@ -4136,7 +4164,7 @@ re-use code and to avoid re-inventing the wheel.") (define-public libnftnl (package (name "libnftnl") - (version "1.0.9") + (version "1.1.0") (source (origin (method url-fetch) @@ -4144,7 +4172,7 @@ re-use code and to avoid re-inventing the wheel.") "libnftnl-" version ".tar.bz2")) (sha256 (base32 - "0d9nkdbdck8sg6msysqyv3m9kjr9sjif5amf26dfa0g3mqjdihgy")))) + "0v4gywcjvv2vg4zk632al1zv3ad0lx87nshynv110l8n3fhsq3pc")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config))) diff --git a/gnu/packages/lxde.scm b/gnu/packages/lxde.scm index af576c44f7..9a0d8e957d 100644 --- a/gnu/packages/lxde.scm +++ b/gnu/packages/lxde.scm @@ -48,7 +48,7 @@ (define-public libfm (package (name "libfm") - (version "1.3.0") + (version "1.3.0.2") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/pcmanfm/" @@ -56,7 +56,7 @@ "%29/LibFM/" name "-" version ".tar.xz")) (sha256 (base32 - "151jyy8ipmp2h829gd9s4s429qafv1zxl7j6zaj1k1gzm9s5rmnb")))) + "0wkwbi1nyvqza3r1dhrq846axiiq0fy0dqgngnagh76fjrwnzl0q")))) (build-system gnu-build-system) (inputs `(("glib" ,glib) ("gtk+" ,gtk+-2))) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 2b21e839a6..aac042027b 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -481,7 +481,10 @@ large scale eigenvalue problems.") (inputs `(("mpi" ,openmpi) ,@(package-inputs arpack-ng))) - (arguments `(#:configure-flags '("--enable-mpi"))) + (arguments + (substitute-keyword-arguments (package-arguments arpack-ng) + ((#:configure-flags _ '()) + ''("--enable-mpi")))) (synopsis "Fortran subroutines for solving eigenvalue problems with MPI"))) (define-public lapack @@ -3466,6 +3469,7 @@ set.") (native-inputs `(("doc++" ,doc++) ("netpbm" ,netpbm) + ("perl" ,perl) ;needed to run 'ppmquant' during tests ("texlive" ,texlive) ;full package required for fonts ("ghostscript" ,ghostscript))) (inputs @@ -3900,14 +3904,14 @@ are noisy or are discontinuous at the solution.") (define-public r-desolve (package (name "r-desolve") - (version "1.20") + (version "1.21") (source (origin (method url-fetch) (uri (cran-uri "deSolve" version)) (sha256 (base32 - "18nx3maww979a8p8ly4hv63y65mnjx8vbj2fpipd6rhcbf1lbsan")))) + "0qqc4mknw1jblzcmph1dg3k1p6w42yal0k1xjh8pqk7yb3a75hs5")))) (properties `((upstream-name . "deSolve"))) (build-system r-build-system) (native-inputs diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm index af49ddc8c6..95744075cb 100644 --- a/gnu/packages/messaging.scm +++ b/gnu/packages/messaging.scm @@ -627,7 +627,15 @@ was initially a fork of xmpppy, but uses non-blocking sockets.") (with-directory-excursion icons (symlink adwaita "Adwaita") (copy-recursively hicolor "hicolor"))) - #t))))) + #t)) + (add-after 'install-icons 'wrap-program + (lambda* (#:key inputs outputs #:allow-other-keys) + (wrap-program (string-append (assoc-ref outputs "out") + "/bin/gajim") + ;; For GtkFileChooserDialog. + `("GSETTINGS_SCHEMA_DIR" = + (,(string-append (assoc-ref inputs "gtk+") + "/share/glib-2.0/schemas"))))))))) (native-inputs `(("intltool" ,intltool) ("xorg-server" ,xorg-server))) @@ -728,14 +736,14 @@ a graphical desktop environment like GNOME.") (define-public prosody (package (name "prosody") - (version "0.10.0") + (version "0.10.1") (source (origin (method url-fetch) (uri (string-append "https://prosody.im/downloads/source/" "prosody-" version ".tar.gz")) (sha256 (base32 - "1644jy5dk46vahmh6nna36s79k8k668sbi3qamjb4q3c4m3y853l")))) + "1kmmpkkgymg1r8r0k8j83pgmiskg1phl8hmpzjrnvlvsfnrnjplr")))) (build-system gnu-build-system) (arguments `(#:tests? #f ; no "check" target diff --git a/gnu/packages/mpd.scm b/gnu/packages/mpd.scm index 1889035492..6f2ff5d784 100644 --- a/gnu/packages/mpd.scm +++ b/gnu/packages/mpd.scm @@ -119,9 +119,10 @@ interfacing MPD in the C, C++ & Objective C languages.") ("flac" ,flac) ("glib" ,glib) ("icu4c" ,icu4c) + ;; The LAME decoder comes from FFmpeg, but is added here so that + ;; configure picks up the LAME encoder. ("lame" ,lame) ("libid3tag" ,libid3tag) - ("libmad" ,libmad) ("libmpdclient" ,libmpdclient) ("libsamplerate" ,libsamplerate) ("libsndfile" ,libsndfile) diff --git a/gnu/packages/nano.scm b/gnu/packages/nano.scm index 21ef9d5592..07c2a1ff77 100644 --- a/gnu/packages/nano.scm +++ b/gnu/packages/nano.scm @@ -30,7 +30,7 @@ (define-public nano (package (name "nano") - (version "2.9.6") + (version "2.9.7") (source (origin (method url-fetch) @@ -38,7 +38,7 @@ version ".tar.xz")) (sha256 (base32 - "1inl8ljkc711969ncwy7irf0464psasikg1g42l0g4sfpdz50wx3")))) + "1ga4sdk3ikx1ilggc6c77vyfpbmq3nrhg6svgglpf5sv60bv0jmn")))) (build-system gnu-build-system) (inputs `(("gettext" ,gettext-minimal) diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm index 0d187ab930..9a24c372f6 100644 --- a/gnu/packages/networking.scm +++ b/gnu/packages/networking.scm @@ -1333,7 +1333,7 @@ networks.") (define-public speedtest-cli (package (name "speedtest-cli") - (version "1.0.7") + (version "2.0.0") (source (origin (method url-fetch) @@ -1342,7 +1342,7 @@ networks.") (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "1fbq4kpx8sj50g74hwpixisfjjgxq6zyn40d3m28dxhn7mxbnlrq")))) + "16kcpba7nmszz2h0fq7qvv6src20syck2wlknaacg69kk88aybbk")))) (build-system python-build-system) (home-page "https://github.com/sivel/speedtest-cli") (synopsis "Internet bandwidth tester") diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm index 0a7caf2e7a..ea79de9021 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -544,13 +544,13 @@ transactions from C or Python.") (define-public diffoscope (package (name "diffoscope") - (version "93") + (version "94") (source (origin (method url-fetch) (uri (pypi-uri name version)) (sha256 (base32 - "0g90nf7817jk03hzk36l3hymky4xqs50iynfld3r0in7hffly5nj")))) + "07pcc4r9kz8zfr4pfkzk3ipgyv7m5h9vwicrzdgjpa87nbbdgjx6")))) (build-system python-build-system) (arguments `(#:phases (modify-phases %standard-phases diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm index 923122903e..011cf594d1 100644 --- a/gnu/packages/password-utils.scm +++ b/gnu/packages/password-utils.scm @@ -18,6 +18,7 @@ ;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2018 Konrad Hinsen <konrad.hinsen@fastmail.net> ;;; Copyright © 2018 Thomas Sigurdsen <tonton@riseup.net> +;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net> ;;; ;;; This file is part of GNU Guix. ;;; @@ -62,6 +63,7 @@ #:use-module (gnu packages ncurses) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) + #:use-module (gnu packages python-web) #:use-module (gnu packages suckless) #:use-module (gnu packages tls) #:use-module (gnu packages qt) @@ -94,7 +96,7 @@ human.") (define-public keepassxc (package (name "keepassxc") - (version "2.3.1") + (version "2.3.3") (source (origin (method url-fetch) @@ -103,7 +105,7 @@ human.") version "-src.tar.xz")) (sha256 (base32 - "1gdrbpzwbs56anc3k5vklvcackcn214pc8gm5xh5zcymsi8q4zff")))) + "1m8alsp39vk21zgcvy5zswk0dc1xmajbwnccg7n0lndsi7pqbzyg")))) (build-system cmake-build-system) (arguments '(#:configure-flags '("-DWITH_XC_NETWORKING=YES" @@ -659,3 +661,30 @@ Upstream development seems to have stopped. It is therefore recommended to use a different password manager.") (home-page "https://als.regnet.cz/fpm2/") (license license:gpl2+))) + +(define-public pass-rotate + (package + (name "pass-rotate") + (version "0.1") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/SirCmpwn/pass-rotate/archive/" + version ".tar.gz")) + (sha256 + (base32 + "1svm5nj8bczv2dg8lh2zqqhbsrljqsw9680r03qwgl9vlci90210")) + (file-name (string-append name "-" version ".tar.gz")))) + (build-system python-build-system) + (inputs + `(("python-beautifulsoup4" ,python-beautifulsoup4) + ("python-docopt" ,python-docopt) + ("python-html5lib" ,python-html5lib) + ("python-requests" ,python-requests))) + (home-page "https://github.com/SirCmpwn/pass-rotate") + (synopsis "Rotate password on online services") + (description "pass-rotate is a command line utility and python library for +rotating passwords on various web services. It makes it easier to rotate your +passwords, one at a time or in bulk, when security events or routine upkeep of +your online accounts makes it necessary.") + (license license:expat))) diff --git a/gnu/packages/patches/adb-add-libraries.patch b/gnu/packages/patches/adb-add-libraries.patch new file mode 100644 index 0000000000..b014832f62 --- /dev/null +++ b/gnu/packages/patches/adb-add-libraries.patch @@ -0,0 +1,30 @@ +--- a/adb/Android.mk 2018-04-25 23:23:29.527198350 +0200 ++++ b/adb/Android.mk 2018-04-25 23:24:25.558632573 +0200 +@@ -226,7 +226,7 @@ + LOCAL_SRC_FILES := test_track_devices.cpp + LOCAL_SANITIZE := $(adb_host_sanitize) + LOCAL_SHARED_LIBRARIES := libbase +-LOCAL_STATIC_LIBRARIES := libadb libcrypto_static libcutils ++LOCAL_STATIC_LIBRARIES := libadb libbase libcrypto_static libcutils + LOCAL_LDLIBS += -lrt -ldl -lpthread + include $(BUILD_HOST_EXECUTABLE) + endif +@@ -278,6 +278,7 @@ + LOCAL_SANITIZE := $(adb_host_sanitize) + LOCAL_STATIC_LIBRARIES := \ + libadb \ ++ libcutils \ + libbase \ + libcrypto_static \ + libdiagnose_usb \ +--- a/adb/sysdeps_test.cpp 2018-05-09 23:58:46.583163684 +0200 ++++ b/adb/sysdeps_test.cpp 2018-05-09 23:56:41.356544648 +0200 +@@ -17,6 +17,8 @@ + #include <gtest/gtest.h> + #include <unistd.h> + #include <atomic> ++#include <climits> ++#include <mutex> + + #include "adb_io.h" + #include "sysdeps.h" diff --git a/gnu/packages/patches/groovy-add-exceptionutilsgenerator.patch b/gnu/packages/patches/groovy-add-exceptionutilsgenerator.patch new file mode 100644 index 0000000000..df74bdbaba --- /dev/null +++ b/gnu/packages/patches/groovy-add-exceptionutilsgenerator.patch @@ -0,0 +1,98 @@ +From 3dbdc68093e90f0ef9b77b70490d8e0b1dcfbf8f Mon Sep 17 00:00:00 2001 +From: Julien Lepiller <julien@lepiller.eu> +Date: Sun, 17 Sep 2017 21:08:45 +0200 +Subject: [PATCH] Add ExceptionUtilsGenerator.java. + +A gradle task (in gradle/utils.gradle) is normally used to generate an +ExceptionUtils class. Since gradle depends on groovy, we cannot use it, so +we copy the code from the gradle task to a new file. Running this file then +generates the required class. +--- + .../codehaus/groovy/ExceptionUtilsGenerator.java | 75 ++++++++++++++++++++++ + 1 file changed, 75 insertions(+) + create mode 100644 config/ant/src/org/codehaus/groovy/ExceptionUtilsGenerator.java + +diff --git a/config/ant/src/org/codehaus/groovy/ExceptionUtilsGenerator.java b/config/ant/src/org/codehaus/groovy/ExceptionUtilsGenerator.java +new file mode 100644 +index 0000000..41f006d +--- /dev/null ++++ b/config/ant/src/org/codehaus/groovy/ExceptionUtilsGenerator.java +@@ -0,0 +1,75 @@ ++package org.codehaus.groovy; ++ ++import org.objectweb.asm.*; ++ ++import java.io.BufferedOutputStream; ++import java.io.File; ++import java.io.FileOutputStream; ++import java.io.IOException; ++import java.util.logging.Logger; ++ ++public class ExceptionUtilsGenerator implements Opcodes { ++ private final static Logger LOGGER = Logger.getLogger(ExceptionUtilsGenerator.class.getName()); ++ ++ public static void main(String... args) { ++ if (args==null || args.length==0) { ++ throw new IllegalArgumentException("You must specify at least one file"); ++ } ++ ++ ClassWriter cw = new ClassWriter(0); ++ MethodVisitor mv; ++ ++ cw.visit(V1_5, ACC_PUBLIC + ACC_SUPER, "org/codehaus/groovy/runtime/ExceptionUtils", null, "java/lang/Object", null); ++ ++ cw.visitSource("ExceptionUtils.java", null); ++ ++ mv = cw.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null); ++ mv.visitCode(); ++ Label l0 = new Label(); ++ mv.visitLabel(l0); ++ mv.visitLineNumber(18, l0); ++ mv.visitVarInsn(ALOAD, 0); ++ mv.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "<init>", "()V"); ++ mv.visitInsn(RETURN); ++ Label l1 = new Label(); ++ mv.visitLabel(l1); ++ mv.visitLocalVariable("this", "Lorg/codehaus/groovy/runtime/ExceptionUtils;", null, l0, l1, 0); ++ mv.visitMaxs(1, 1); ++ mv.visitEnd(); ++ ++ mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "sneakyThrow", "(Ljava/lang/Throwable;)V", null, null); ++ mv.visitCode(); ++ Label l2 = new Label(); ++ mv.visitLabel(l2); ++ mv.visitLineNumber(20, l2); ++ mv.visitVarInsn(ALOAD, 0); ++ mv.visitInsn(ATHROW); ++ Label l3 = new Label(); ++ mv.visitLabel(l3); ++ mv.visitLocalVariable("e", "Ljava/lang/Throwable;", null, l2, l3, 0); ++ mv.visitMaxs(1, 1); ++ mv.visitEnd(); ++ ++ cw.visitEnd(); ++ ++ LOGGER.info("Generating ExceptionUtils"); ++ byte[] bytes = cw.toByteArray(); ++ for (String classFilePath : args) { ++ File classFile = new File(classFilePath); ++ if (classFile.getParentFile().exists() || classFile.getParentFile().mkdirs()) { ++ try { ++ if (classFile.exists()) { ++ classFile.delete(); ++ } ++ BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(classFile)); ++ bos.write(bytes); ++ bos.close(); ++ } catch (IOException e) { ++ LOGGER.warning("Unable to write file "+classFile); ++ } ++ } else { ++ LOGGER.warning("Unable to create directory "+classFile.getParentFile()); ++ } ++ } ++ } ++} +-- +2.14.1 + diff --git a/gnu/packages/patches/icecat-bug-1452075.patch b/gnu/packages/patches/icecat-CVE-2018-5157-and-CVE-2018-5158.patch index b776640133..b776640133 100644 --- a/gnu/packages/patches/icecat-bug-1452075.patch +++ b/gnu/packages/patches/icecat-CVE-2018-5157-and-CVE-2018-5158.patch diff --git a/gnu/packages/patches/libutils-add-includes.patch b/gnu/packages/patches/libutils-add-includes.patch new file mode 100644 index 0000000000..354c59b735 --- /dev/null +++ b/gnu/packages/patches/libutils-add-includes.patch @@ -0,0 +1,11 @@ +--- a/libutils/CallStack.cpp 2018-04-25 20:13:06.348665241 +0200 ++++ b/libutils/CallStack.cpp 2018-04-25 20:13:18.360510763 +0200 +@@ -17,7 +17,7 @@ + #define LOG_TAG "CallStack" + + #include <memory> +- ++#include <cstdlib> + #include <utils/CallStack.h> + #include <utils/Printer.h> + #include <utils/Errors.h> diff --git a/gnu/packages/patches/libutils-remove-damaging-includes.patch b/gnu/packages/patches/libutils-remove-damaging-includes.patch new file mode 100644 index 0000000000..7867dd3b80 --- /dev/null +++ b/gnu/packages/patches/libutils-remove-damaging-includes.patch @@ -0,0 +1,21 @@ +--- a/include/utils/StrongPointer.h 2018-04-25 18:42:34.321003602 +0200 ++++ b/include/utils/StrongPointer.h 2018-04-25 18:42:42.180912201 +0200 +@@ -17,8 +17,6 @@ + #ifndef ANDROID_STRONG_POINTER_H + #define ANDROID_STRONG_POINTER_H + +-#include <cutils/atomic.h> +- + #include <stdint.h> + #include <sys/types.h> + #include <stdlib.h> +--- a/libutils/Trace.cpp 2018-04-25 20:41:48.775049786 +0200 ++++ b/libutils/Trace.cpp 2018-04-25 20:42:13.674744182 +0200 +@@ -21,5 +21,7 @@ + + static void traceInit() + { ++#if defined(__ANDROID__) + ::android::add_sysprop_change_callback(atrace_update_tags, 0); ++#endif + } diff --git a/gnu/packages/patches/libziparchive-add-includes.patch b/gnu/packages/patches/libziparchive-add-includes.patch new file mode 100644 index 0000000000..41137105a0 --- /dev/null +++ b/gnu/packages/patches/libziparchive-add-includes.patch @@ -0,0 +1,10 @@ +--- a/libziparchive/zip_writer.cc 2018-04-25 22:33:05.472674164 +0200 ++++ b/libziparchive/zip_writer.cc 2018-04-25 22:33:21.296519518 +0200 +@@ -22,6 +22,7 @@ + + #include <sys/param.h> + ++#include <cstring> + #include <cassert> + #include <cstdio> + #include <memory> diff --git a/gnu/packages/patches/mupdf-CVE-2017-17858.patch b/gnu/packages/patches/mupdf-CVE-2017-17858.patch deleted file mode 100644 index 66df127509..0000000000 --- a/gnu/packages/patches/mupdf-CVE-2017-17858.patch +++ /dev/null @@ -1,111 +0,0 @@ -Fix CVE-2017-17858: - -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-17858 -https://bugs.ghostscript.com/show_bug.cgi?id=698819 -https://github.com/mzet-/Security-Advisories/blob/master/mzet-adv-2017-01.md - -Patch copied from upstream source repository: - -https://git.ghostscript.com/?p=mupdf.git;a=commit;h=55c3f68d638ac1263a386e0aaa004bb6e8bde731 - -From 55c3f68d638ac1263a386e0aaa004bb6e8bde731 Mon Sep 17 00:00:00 2001 -From: Sebastian Rasmussen <sebras@gmail.com> -Date: Mon, 11 Dec 2017 14:09:15 +0100 -Subject: [PATCH] Bugs 698804/698810/698811: Keep PDF object numbers below - limit. - -This ensures that: - * xref tables with objects pointers do not grow out of bounds. - * other readers, e.g. Adobe Acrobat can parse PDFs written by mupdf. ---- - include/mupdf/pdf/object.h | 3 +++ - source/pdf/pdf-repair.c | 5 +---- - source/pdf/pdf-xref.c | 21 ++++++++++++--------- - 3 files changed, 16 insertions(+), 13 deletions(-) - -diff --git a/include/mupdf/pdf/object.h b/include/mupdf/pdf/object.h -index 21ed8595..4177112b 100644 ---- a/include/mupdf/pdf/object.h -+++ b/include/mupdf/pdf/object.h -@@ -3,6 +3,9 @@ - - typedef struct pdf_document_s pdf_document; - -+/* Defined in PDF 1.7 according to Acrobat limit. */ -+#define PDF_MAX_OBJECT_NUMBER 8388607 -+ - /* - * Dynamic objects. - * The same type of objects as found in PDF and PostScript. -diff --git a/source/pdf/pdf-repair.c b/source/pdf/pdf-repair.c -index ca149bd3..0c29758e 100644 ---- a/source/pdf/pdf-repair.c -+++ b/source/pdf/pdf-repair.c -@@ -6,9 +6,6 @@ - - /* Scan file for objects and reconstruct xref table */ - --/* Define in PDF 1.7 to be 8388607, but mupdf is more lenient. */ --#define MAX_OBJECT_NUMBER (10 << 20) -- - struct entry - { - int num; -@@ -436,7 +433,7 @@ pdf_repair_xref(fz_context *ctx, pdf_document *doc) - break; - } - -- if (num <= 0 || num > MAX_OBJECT_NUMBER) -+ if (num <= 0 || num > PDF_MAX_OBJECT_NUMBER) - { - fz_warn(ctx, "ignoring object with invalid object number (%d %d R)", num, gen); - goto have_next_token; -diff --git a/source/pdf/pdf-xref.c b/source/pdf/pdf-xref.c -index 00586dbd..6284e70b 100644 ---- a/source/pdf/pdf-xref.c -+++ b/source/pdf/pdf-xref.c -@@ -868,11 +868,12 @@ pdf_read_old_xref(fz_context *ctx, pdf_document *doc, pdf_lexbuf *buf) - fz_seek(ctx, file, -(2 + (int)strlen(s)), SEEK_CUR); - } - -- if (ofs < 0) -- fz_throw(ctx, FZ_ERROR_GENERIC, "out of range object num in xref: %d", (int)ofs); -- if (ofs > INT64_MAX - len) -- fz_throw(ctx, FZ_ERROR_GENERIC, "xref section object numbers too big"); -- -+ if (ofs < 0 || ofs > PDF_MAX_OBJECT_NUMBER -+ || len < 0 || len > PDF_MAX_OBJECT_NUMBER -+ || ofs + len - 1 > PDF_MAX_OBJECT_NUMBER) -+ { -+ fz_throw(ctx, FZ_ERROR_GENERIC, "xref subsection object numbers are out of range"); -+ } - /* broken pdfs where size in trailer undershoots entries in xref sections */ - if (ofs + len > xref_len) - { -@@ -933,10 +934,8 @@ pdf_read_new_xref_section(fz_context *ctx, pdf_document *doc, fz_stream *stm, in - pdf_xref_entry *table; - int i, n; - -- if (i0 < 0 || i1 < 0 || i0 > INT_MAX - i1) -- fz_throw(ctx, FZ_ERROR_GENERIC, "negative xref stream entry index"); -- //if (i0 + i1 > pdf_xref_len(ctx, doc)) -- // fz_throw(ctx, FZ_ERROR_GENERIC, "xref stream has too many entries"); -+ if (i0 < 0 || i0 > PDF_MAX_OBJECT_NUMBER || i1 < 0 || i1 > PDF_MAX_OBJECT_NUMBER || i0 + i1 - 1 > PDF_MAX_OBJECT_NUMBER) -+ fz_throw(ctx, FZ_ERROR_GENERIC, "xref subsection object numbers are out of range"); - - table = pdf_xref_find_subsection(ctx, doc, i0, i1); - for (i = i0; i < i0 + i1; i++) -@@ -2086,6 +2085,10 @@ pdf_create_object(fz_context *ctx, pdf_document *doc) - /* TODO: reuse free object slots by properly linking free object chains in the ofs field */ - pdf_xref_entry *entry; - int num = pdf_xref_len(ctx, doc); -+ -+ if (num > PDF_MAX_OBJECT_NUMBER) -+ fz_throw(ctx, FZ_ERROR_GENERIC, "too many objects stored in pdf"); -+ - entry = pdf_get_incremental_xref_entry(ctx, doc, num); - entry->type = 'f'; - entry->ofs = -1; --- -2.16.1 - diff --git a/gnu/packages/patches/mupdf-CVE-2018-1000051.patch b/gnu/packages/patches/mupdf-CVE-2018-1000051.patch deleted file mode 100644 index bb78c46f80..0000000000 --- a/gnu/packages/patches/mupdf-CVE-2018-1000051.patch +++ /dev/null @@ -1,88 +0,0 @@ -Fix CVE-2018-1000051: - -https://bugs.ghostscript.com/show_bug.cgi?id=698873 -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-1000051 - -Patch copied from upstream source repository: - -https://git.ghostscript.com/?p=mupdf.git;a=commit;h=321ba1de287016b0036bf4a56ce774ad11763384 - -From 321ba1de287016b0036bf4a56ce774ad11763384 Mon Sep 17 00:00:00 2001 -From: Sebastian Rasmussen <sebras@gmail.com> -Date: Tue, 19 Dec 2017 23:47:47 +0100 -Subject: [PATCH] Bug 698825: Do not drop borrowed colorspaces. - -Previously the borrowed colorspace was dropped when updating annotation -appearances, leading to use after free warnings from valgrind/ASAN. ---- - source/pdf/pdf-appearance.c | 8 ++------ - 1 file changed, 2 insertions(+), 6 deletions(-) - -diff --git a/source/pdf/pdf-appearance.c b/source/pdf/pdf-appearance.c -index 70f684f4..d7a1dddd 100644 ---- a/source/pdf/pdf-appearance.c -+++ b/source/pdf/pdf-appearance.c -@@ -2170,7 +2170,6 @@ void pdf_update_free_text_annot_appearance(fz_context *ctx, pdf_document *doc, p - fz_device *dev = NULL; - font_info font_rec; - fz_text *text = NULL; -- fz_colorspace *cs = NULL; - fz_matrix page_ctm; - - pdf_page_transform(ctx, annot->page, NULL, &page_ctm); -@@ -2184,11 +2183,11 @@ void pdf_update_free_text_annot_appearance(fz_context *ctx, pdf_document *doc, p - fz_var(dlist); - fz_var(dev); - fz_var(text); -- fz_var(cs); - fz_try(ctx) - { - char *contents = pdf_to_str_buf(ctx, pdf_dict_get(ctx, obj, PDF_NAME_Contents)); - char *da = pdf_to_str_buf(ctx, pdf_dict_get(ctx, obj, PDF_NAME_DA)); -+ fz_colorspace *cs; - fz_point pos; - fz_rect rect; - -@@ -2223,7 +2222,6 @@ void pdf_update_free_text_annot_appearance(fz_context *ctx, pdf_document *doc, p - fz_drop_display_list(ctx, dlist); - font_info_fin(ctx, &font_rec); - fz_drop_text(ctx, text); -- fz_drop_colorspace(ctx, cs); - } - fz_catch(ctx) - { -@@ -2359,7 +2357,6 @@ void pdf_set_signature_appearance(fz_context *ctx, pdf_document *doc, pdf_annot - fz_device *dev = NULL; - font_info font_rec; - fz_text *text = NULL; -- fz_colorspace *cs = NULL; - fz_path *path = NULL; - fz_buffer *fzbuf = NULL; - fz_matrix page_ctm; -@@ -2375,7 +2372,6 @@ void pdf_set_signature_appearance(fz_context *ctx, pdf_document *doc, pdf_annot - fz_var(dlist); - fz_var(dev); - fz_var(text); -- fz_var(cs); - fz_var(fzbuf); - fz_try(ctx) - { -@@ -2384,6 +2380,7 @@ void pdf_set_signature_appearance(fz_context *ctx, pdf_document *doc, pdf_annot - fz_rect logo_bounds; - fz_matrix logo_tm; - fz_rect rect; -+ fz_colorspace *cs = fz_device_rgb(ctx); /* Borrowed reference */ - - pdf_to_rect(ctx, pdf_dict_get(ctx, annot->obj, PDF_NAME_Rect), &annot_rect); - rect = annot_rect; -@@ -2396,7 +2393,6 @@ void pdf_set_signature_appearance(fz_context *ctx, pdf_document *doc, pdf_annot - fz_bound_path(ctx, path, NULL, &fz_identity, &logo_bounds); - center_rect_within_rect(&logo_bounds, &rect, &logo_tm); - fz_concat(&logo_tm, &logo_tm, &page_ctm); -- cs = fz_device_rgb(ctx); /* Borrowed reference */ - fz_fill_path(ctx, dev, path, 0, &logo_tm, cs, logo_color, 1.0f, NULL); - - get_font_info(ctx, doc, dr, da, &font_rec); --- -2.16.3 - diff --git a/gnu/packages/patches/mupdf-CVE-2018-6544.patch b/gnu/packages/patches/mupdf-CVE-2018-6544.patch deleted file mode 100644 index b2c8f849f3..0000000000 --- a/gnu/packages/patches/mupdf-CVE-2018-6544.patch +++ /dev/null @@ -1,109 +0,0 @@ -Fix CVE-2018-6544: - -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-6544 -https://bugs.ghostscript.com/show_bug.cgi?id=698830 -https://bugs.ghostscript.com/show_bug.cgi?id=698965 - -Patches copied from upstream source repository: - -https://git.ghostscript.com/?p=mupdf.git;h=26527eef77b3e51c2258c8e40845bfbc015e405d -https://git.ghostscript.com/?p=mupdf.git;h=b03def134988da8c800adac1a38a41a1f09a1d89 - -From b03def134988da8c800adac1a38a41a1f09a1d89 Mon Sep 17 00:00:00 2001 -From: Sebastian Rasmussen <sebras@gmail.com> -Date: Thu, 1 Feb 2018 16:36:14 +0100 -Subject: [PATCH] Bug 698830: Avoid recursion when loading object streams - objects. - -If there were indirect references in the object stream dictionary and -one of those indirect references referred to an object inside the object -stream itself, mupdf would previously enter recursion only bounded by the -exception stack. After this commit the object stream is checked if it is -marked immediately after being loaded. If it is marked then we terminate -the recursion at this point, if it is not marked then mark it and -attempt to load the desired object within. We also take care to unmark -the stream object when done or upon exception. ---- - source/pdf/pdf-xref.c | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) - -diff --git a/source/pdf/pdf-xref.c b/source/pdf/pdf-xref.c -index 723b543c..ed09094c 100644 ---- a/source/pdf/pdf-xref.c -+++ b/source/pdf/pdf-xref.c -@@ -1576,6 +1576,19 @@ pdf_load_obj_stm(fz_context *ctx, pdf_document *doc, int num, pdf_lexbuf *buf, i - { - objstm = pdf_load_object(ctx, doc, num); - -+ if (pdf_obj_marked(ctx, objstm)) -+ fz_throw(ctx, FZ_ERROR_GENERIC, "recursive object stream lookup"); -+ } -+ fz_catch(ctx) -+ { -+ pdf_drop_obj(ctx, objstm); -+ fz_rethrow(ctx); -+ } -+ -+ fz_try(ctx) -+ { -+ pdf_mark_obj(ctx, objstm); -+ - count = pdf_to_int(ctx, pdf_dict_get(ctx, objstm, PDF_NAME_N)); - first = pdf_to_int(ctx, pdf_dict_get(ctx, objstm, PDF_NAME_First)); - -@@ -1655,6 +1668,7 @@ pdf_load_obj_stm(fz_context *ctx, pdf_document *doc, int num, pdf_lexbuf *buf, i - fz_drop_stream(ctx, stm); - fz_free(ctx, ofsbuf); - fz_free(ctx, numbuf); -+ pdf_unmark_obj(ctx, objstm); - pdf_drop_obj(ctx, objstm); - } - fz_catch(ctx) --- -2.16.3 - -From 26527eef77b3e51c2258c8e40845bfbc015e405d Mon Sep 17 00:00:00 2001 -From: Sebastian Rasmussen <sebras@gmail.com> -Date: Mon, 29 Jan 2018 02:00:48 +0100 -Subject: [PATCH] Bug 698830: Don't drop unkept stream if running out of error - stack. - -Under normal conditions where fz_keep_stream() is called inside -fz_try() we may call fz_drop_stream() in fz_catch() upon exceptions. -The issue comes when fz_keep_stream() has not yet been called but is -dropped in fz_catch(). This happens in the PDF from the bug when -fz_try() runs out of exception stack, and next the code in fz_catch() -runs, dropping the caller's reference to the filter chain stream! - -The simplest way of fixing this it to always keep the filter chain -stream before fz_try() is called. That way fz_catch() may drop the -stream whether an exception has occurred or if the fz_try() ran out of -exception stack. ---- - source/pdf/pdf-stream.c | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -diff --git a/source/pdf/pdf-stream.c b/source/pdf/pdf-stream.c -index c89da5c4..c6ba7ad3 100644 ---- a/source/pdf/pdf-stream.c -+++ b/source/pdf/pdf-stream.c -@@ -303,14 +303,13 @@ pdf_open_raw_filter(fz_context *ctx, fz_stream *chain, pdf_document *doc, pdf_ob - *orig_gen = 0; - } - -- fz_var(chain); -+ chain = fz_keep_stream(ctx, chain); - - fz_try(ctx) - { - len = pdf_to_int(ctx, pdf_dict_get(ctx, stmobj, PDF_NAME_Length)); - -- /* don't close chain when we close this filter */ -- chain2 = fz_keep_stream(ctx, chain); -+ chain2 = chain; - chain = NULL; - chain = fz_open_null(ctx, chain2, len, offset); - --- -2.16.3 - diff --git a/gnu/packages/patches/mupdf-build-with-latest-openjpeg.patch b/gnu/packages/patches/mupdf-build-with-latest-openjpeg.patch deleted file mode 100644 index d5c9c60242..0000000000 --- a/gnu/packages/patches/mupdf-build-with-latest-openjpeg.patch +++ /dev/null @@ -1,27 +0,0 @@ -Make it possible to build MuPDF with OpenJPEG 2.3, which is the latest -release series and contains many important bug fixes. - -Patch adapted from Debian: - -https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=745246 - -And related to this upstream commit: - -http://git.ghostscript.com/?p=mupdf.git;a=commit;h=f88bfe2e62dbadb96d4f52d7aa025f0a516078da - -diff --git a/source/fitz/load-jpx.c b/source/fitz/load-jpx.c -index 65699ba..ea84778 100644 ---- a/source/fitz/load-jpx.c -+++ b/source/fitz/load-jpx.c -@@ -445,11 +445,6 @@ fz_load_jpx_info(fz_context *ctx, const unsigned char *data, size_t size, int *w - - #else /* HAVE_LURATECH */ - --#define OPJ_STATIC --#define OPJ_HAVE_INTTYPES_H --#if !defined(_MSC_VER) || _MSC_VER >= 1600 --#define OPJ_HAVE_STDINT_H --#endif - #define USE_JPIP - - #include <openjpeg.h> diff --git a/gnu/packages/patches/myrepos-CVE-2018-7032.patch b/gnu/packages/patches/myrepos-CVE-2018-7032.patch new file mode 100644 index 0000000000..ce9493e5f9 --- /dev/null +++ b/gnu/packages/patches/myrepos-CVE-2018-7032.patch @@ -0,0 +1,69 @@ +http://source.myrepos.branchable.com/?p=source.git;a=patch;h=40a3df21c73f1bb1b6915cc6fa503f50814664c8 +This can be removed with the next release. It was modified slightly to apply + +From 40a3df21c73f1bb1b6915cc6fa503f50814664c8 Mon Sep 17 00:00:00 2001 +From: Paul Wise <pabs3@bonedaddy.net> +Date: Sun, 11 Feb 2018 21:57:49 +0800 +Subject: [PATCH] Mitigate vulnerabilities caused by some git remotes being + able to execute code + +Set GIT_PROTOCOL_FROM_USER=0 with git versions newer than 2.12. + +Prevent remote websites from causing cloning of local repositories. + +Manually whitelist known-safe protocols (http, https, git, ssh) +when using git versions older than 2.12. + +Fixes: CVE-2018-7032 +Fixes: https://bugs.debian.org/840014 +Suggestions-by: Jakub Wilk <jwilk@jwilk.net> +Reported-by: Jakub Wilk <jwilk@jwilk.net> +--- + webcheckout | 22 +++++++++++++++++++++- + 1 file changed, 21 insertions(+), 1 deletion(-) + +diff --git a/webcheckout b/webcheckout +index e98da5c..de497ba 100755 +--- a/webcheckout ++++ b/webcheckout +@@ -71,6 +71,16 @@ use Getopt::Long; + use warnings; + use strict; + ++# Mitigate some git remote types being dangerous ++my $git_unsafe = 1; ++my $git_version = `git --version`; ++$git_version =~ s{^git version }{}; ++my ($major, $minor) = split(/\./, $git_version); ++if (int($major) >= 2 && int($minor) >= 12) { ++ $ENV{GIT_PROTOCOL_FROM_USER} = 0; ++ $git_unsafe = 0; ++} ++ + # What to download. + my $url; + +@@ -89,7 +99,17 @@ my $destdir; + + # how to perform checkouts + my %handlers=( +- git => sub { doit("git", "clone", shift, $destdir) }, +- svn => sub { doit("svn", "checkout", shift, $destdir) }, +- bzr => sub { doit("bzr", "branch", shift, $destdir) }, ++ git => sub { ++ my $git_url = shift; ++ # Reject unsafe URLs with older versions of git ++ # that do not already check the URL safety. ++ if ($git_unsafe && $git_url !~ m{^(?:(?:https?|git|ssh):[^:]|(?:[-_.A-Za-z0-9]+@)?[-_.A-Za-z0-9]+:(?!:|//))}) { ++ print STDERR "potentially unsafe git URL, may fail, touch local files or execute arbitrary code\n"; ++ return 1; ++ } ++ # Reject cloning local directories too, webcheckout is for remote repos ++ doit(qw(git -c protocol.file.allow=user clone --), $git_url, $destdir) ++ }, ++ svn => sub { doit(qw(svn checkout --), shift, $destdir) }, ++ bzr => sub { doit(qw(bzr branch --), shift, $destdir) }, + ); +-- +2.11.0 + diff --git a/gnu/packages/patches/python-statsmodels-fix-tests.patch b/gnu/packages/patches/python-statsmodels-fix-tests.patch deleted file mode 100644 index f910b4b5a5..0000000000 --- a/gnu/packages/patches/python-statsmodels-fix-tests.patch +++ /dev/null @@ -1,28 +0,0 @@ -This drops a test that fails with numpy 1.12. - -Upstream bug URL: https://github.com/statsmodels/statsmodels/issues/3541 - ---- a/statsmodels/discrete/tests/test_discrete.py 2017-03-06 15:29:19.947343331 +0000 -+++ b/statsmodels/discrete/tests/test_discrete.py 2017-03-06 15:29:37.759328845 +0000 -@@ -1329,21 +1329,6 @@ - res = mod.fit(start_params=-np.ones(4), method='newton', disp=0)
- assert_(not res.mle_retvals['converged'])
-
--def test_issue_339():
-- # make sure MNLogit summary works for J != K.
-- data = sm.datasets.anes96.load()
-- exog = data.exog
-- # leave out last exog column
-- exog = exog[:,:-1]
-- exog = sm.add_constant(exog, prepend=True)
-- res1 = sm.MNLogit(data.endog, exog).fit(method="newton", disp=0)
-- # strip the header from the test
-- smry = "\n".join(res1.summary().as_text().split('\n')[9:])
-- cur_dir = os.path.dirname(os.path.abspath(__file__))
-- test_case_file = os.path.join(cur_dir, 'results', 'mn_logit_summary.txt')
-- test_case = open(test_case_file, 'r').read()
-- np.testing.assert_equal(smry, test_case[:-1])
--
- def test_issue_341():
- data = sm.datasets.anes96.load()
- exog = data.exog
diff --git a/gnu/packages/patches/wesnoth-fix-std-bad-cast.patch b/gnu/packages/patches/wesnoth-fix-std-bad-cast.patch deleted file mode 100644 index 18328ed018..0000000000 --- a/gnu/packages/patches/wesnoth-fix-std-bad-cast.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 18e5ea50a7136cb3686c5a7c51c111ccce73dc54 Mon Sep 17 00:00:00 2001 -From: Iris Morelle <shadowm@wesnoth.org> -Date: Sun, 6 May 2018 16:10:42 -0300 -Subject: [PATCH] i18n: Blind fix attempt for std::bad_cast being thrown on - Windows - -Several reports on Steam and our forums point at std::bad_cast being -thrown when accessing Preferences and the Multiplayer menu amongst -others. It's possible that the locale configuration on those systems is -not quite right, and compare() and icompare() are able to throw -std::bad_cast when this happens as they both use std::use_facet(). - -Note that much like the macOS/iOS version of icompare(), this stopgap -patch doesn't attempt to provide any form of case-insensitive fallback -and just uses a case-sensitive comparison instead. ---- - src/gettext_boost.cpp | 29 +++++++++++++++++++++++++++-- - 1 file changed, 27 insertions(+), 2 deletions(-) - -diff --git a/src/gettext_boost.cpp b/src/gettext_boost.cpp -index 3cc7690d5ef..fb04ffeea90 100644 ---- a/src/gettext_boost.cpp -+++ b/src/gettext_boost.cpp -@@ -423,7 +423,19 @@ void set_language(const std::string& language, const std::vector<std::string>* / - int compare(const std::string& s1, const std::string& s2) - { - std::lock_guard<std::mutex> lock(get_mutex()); -- return std::use_facet<std::collate<char>>(get_manager().get_locale()).compare(s1.c_str(), s1.c_str() + s1.size(), s2.c_str(), s2.c_str() + s2.size()); -+ -+ try { -+ return std::use_facet<std::collate<char>>(get_manager().get_locale()).compare(s1.c_str(), s1.c_str() + s1.size(), s2.c_str(), s2.c_str() + s2.size()); -+ } catch(const std::bad_cast&) { -+ static bool bad_cast_once = false; -+ -+ if(!bad_cast_once) { -+ ERR_G << "locale set-up for compare() is broken, falling back to std::string::compare()\n"; -+ bad_cast_once = true; -+ } -+ -+ return s1.compare(s2); -+ } - } - - int icompare(const std::string& s1, const std::string& s2) -@@ -433,8 +445,21 @@ int icompare(const std::string& s1, const std::string& s2) - return compare(s1, s2); - #else - std::lock_guard<std::mutex> lock(get_mutex()); -- return std::use_facet<bl::collator<char>>(get_manager().get_locale()).compare( -+ -+ try { -+ return std::use_facet<bl::collator<char>>(get_manager().get_locale()).compare( - bl::collator_base::secondary, s1, s2); -+ } catch(const std::bad_cast&) { -+ static bool bad_cast_once = false; -+ -+ if(!bad_cast_once) { -+ ERR_G << "locale set-up for icompare() is broken, falling back to std::string::compare()\n"; -+ bad_cast_once = true; -+ } -+ -+ // FIXME: not even lazily case-insensitive -+ return s1.compare(s2); -+ } - #endif - } - diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index aaa22cce15..84f17ad553 100644 --- a/gnu/packages/pdf.scm +++ b/gnu/packages/pdf.scm @@ -5,7 +5,7 @@ ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org> ;;; Copyright © 2016 Roel Janssen <roel@gnu.org> ;;; Copyright © 2016 Nils Gillmann <ng0@n0.is> -;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il> +;;; Copyright © 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2016, 2017 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2016 Julien Lepiller <julien@lepiller.eu> @@ -597,19 +597,15 @@ extracting content or merging files.") (define-public mupdf (package (name "mupdf") - (version "1.12.0") + (version "1.13.0") (source (origin (method url-fetch) (uri (string-append "https://mupdf.com/downloads/archive/" name "-" version "-source.tar.xz")) - (patches (search-patches "mupdf-build-with-latest-openjpeg.patch" - "mupdf-CVE-2017-17858.patch" - "mupdf-CVE-2018-6544.patch" - "mupdf-CVE-2018-1000051.patch")) (sha256 (base32 - "0b9j0gqbc3jhmx87r6idcsh8lnb30840c3hyx6dk2gdjqqh3hysp")) + "0129k92bav692l6lyw10ryldx7h2f9khjpgnp3f3n4fdsph9hrkl")) (modules '((guix build utils))) (snippet '(begin (delete-file-recursively "thirdparty") #t)))) (build-system gnu-build-system) diff --git a/gnu/packages/photo.scm b/gnu/packages/photo.scm index 348ac1df62..6c3c116ef6 100644 --- a/gnu/packages/photo.scm +++ b/gnu/packages/photo.scm @@ -69,14 +69,14 @@ (define-public libraw (package (name "libraw") - (version "0.18.10") + (version "0.18.11") (source (origin (method url-fetch) (uri (string-append "https://www.libraw.org/data/LibRaw-" version ".tar.gz")) (sha256 (base32 - "0klrzg1cn8ksxqbhx52dldi5bbmad190npnhhgkyr2jzpgrbpj88")))) + "07a7k83hx7icahh6jaxfbd7pw5jjm5i11xcqjj31b28d1aj29xvw")))) (build-system gnu-build-system) (home-page "https://www.libraw.org") (synopsis "Raw image decoder") diff --git a/gnu/packages/printers.scm b/gnu/packages/printers.scm new file mode 100644 index 0000000000..f8890cb7f1 --- /dev/null +++ b/gnu/packages/printers.scm @@ -0,0 +1,69 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2018 Ludovic Courtès <ludo@gnu.org> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (gnu packages printers) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (gnu packages libusb) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages qt)) + +;; This is a module for packages related to printer-like devices, but not +;; related to CUPS. + +(define-public robocut + (package + (name "robocut") + (version "1.0.11") + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/Timmmm/robocut/archive/v" + version ".tar.gz")) + (sha256 + (base32 + "0nmr1plq1f6sarxwqwy4vzbxkljlx8y4xalm7r05vx4lrdai5pad")) + (file-name (string-append name "-" version ".tar.gz")))) + (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"))) + (substitute* "Robocut.pro" + (("/usr/") + (string-append out "/"))) + + (invoke "qmake" + (string-append "PREFIX=" out)) + #t)))))) + (inputs + `(("libusb" ,libusb) + ("qt" ,qtbase) + ("qtsvg" ,qtsvg))) + (native-inputs + `(("pkg-config" ,pkg-config) + ("qmake" ,qtbase))) + (synopsis "Graphical program to drive plotting cutters") + (description + "Robocut is a simple graphical program that allows you to cut graphics +with Graphtec and Sihouette plotting cutters using an SVG file as its input.") + (home-page "http://robocut.org") + (license license:gpl3+))) diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm index 48e84521c5..b7cd51e868 100644 --- a/gnu/packages/python-crypto.scm +++ b/gnu/packages/python-crypto.scm @@ -16,6 +16,7 @@ ;;; Copyright © 2016, 2017 Arun Isaac <arunisaac@systemreboot.net> ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au> ;;; Copyright © 2018 Tomáš Čech <sleep_walker@gnu.org> +;;; Copyright © 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr> ;;; ;;; This file is part of GNU Guix. ;;; @@ -44,11 +45,32 @@ #:use-module (gnu packages multiprecision) #:use-module (gnu packages protobuf) #:use-module (gnu packages python) + #:use-module (gnu packages python-web) #:use-module (gnu packages time) #:use-module (gnu packages tls) #:use-module ((guix licenses) #:prefix license:) #:use-module (srfi srfi-1)) +(define-public python-base58 + (package + (name "python-base58") + (version "1.0.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "base58" version)) + (sha256 + (base32 + "0lgnk7ycdxwhk2bkygl30nsks56bvrdj79ix76iv965pz808pzn5")))) + (build-system python-build-system) + (native-inputs + `(("python-pyhamcrest" ,python-pyhamcrest))) + (home-page "https://github.com/keis/base58") + (synopsis "Base58 and Base58Check implementation") + (description "Base58 and Base58Check implementation compatible +with what is used by the Bitcoin network.") + (license license:expat))) + (define-public python-bcrypt (package (name "python-bcrypt") @@ -821,3 +843,105 @@ through the Engine interface.") (define-public python2-m2crypto (package-with-python2 python-m2crypto)) + +(define-public python-pylibscrypt + (package + (name "python-pylibscrypt") + (version "1.7.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pylibscrypt" version)) + (sha256 + (base32 + "1b3rgzl6dbzs08vhv41b6y4n5189wv7lr27acxn104hs45745abs")))) + (build-system python-build-system) + (arguments + `(#:tests? #f)) ;FIXME: unable to find libraries + (inputs + `(("openssl" ,openssl))) + (home-page "https://github.com/jvarho/pylibscrypt") + (synopsis "Scrypt for Python") + (description "There are a lot of different scrypt modules for Python, but +none of them have everything that I'd like, so here's one more. It uses +hashlib.scrypt on Python 3.6 and OpenSSL 1.1.") + (license license:isc))) + +(define-public python-libnacl + (package + (name "python-libnacl") + (version "1.6.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "libnacl" version)) + (sha256 + (base32 + "0nv7n8nfswkhl614x5mllrkvaslraa0053q11iylb337cy43vb4v")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'locate-libsodium + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "libnacl/__init__.py" + (("(return ctypes.cdll.LoadLibrary\\(')libsodium.so('\\))" + _ pre post) + (let ((libsodium (string-append (assoc-ref inputs "libsodium") + "/lib/libsodium.so"))) + (string-append pre libsodium post))))))))) + (native-inputs + `(("python-pyhamcrest" ,python-pyhamcrest))) + (inputs + `(("libsodium" ,libsodium))) + (home-page "https://libnacl.readthedocs.org/") + (synopsis "Python bindings for libsodium based on ctypes") + (description "@code{libnacl} is used to gain direct access to the +functions exposed by @code{NaCl} library via @code{libsodium}. It has +been constructed to maintain extensive documentation on how to use +@code{NaCl} as well as being completely portable.") + (license license:asl2.0))) + +(define-public python-duniterpy + (package + (name "python-duniterpy") + (version "0.43.2") + (source + (origin + (method git-fetch) + ;; Pypi's default URI is missing "requirements.txt" file. + (uri (git-reference + (url "https://github.com/duniter/duniter-python-api.git") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1ch4f150k1p1l876pp08p5rxqhpv5xfbxdw6njcmr06hspv8v8x4")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + ;; Among 108 tests, a single one is failing: FAIL: + ;; test_from_pubkey. Remove it. + (add-after 'unpack 'remove-failing-test + (lambda _ + (delete-file "tests/documents/test_crc_pubkey.py") + #t))))) + (propagated-inputs + `(("python-aiohttp" ,python-aiohttp) + ("python-base58" ,python-base58) + ("python-jsonschema" ,python-jsonschema) + ("python-libnacl" ,python-libnacl) + ("python-pylibscrypt" ,python-pylibscrypt) + ("python-pypeg2" ,python-pypeg2))) + (home-page "https://github.com/duniter/duniter-python-api") + (synopsis "Python implementation of Duniter API") + (description "@code{duniterpy} is an implementation of +@uref{https://github.com/duniter/duniter/, duniter} API. Its +main features are: +@itemize +@item Supports Duniter's Basic Merkle API and protocol +@item Asynchronous +@item Duniter signing key +@end itemize") + (license license:gpl3+))) diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 6e8d9ab954..8ebae2e4b7 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -24,6 +24,7 @@ ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org> ;;; Copyright © 2017 Mark Meyer <mark@ofosos.org> ;;; Copyright © 2018 Tomáš Čech <sleep_walker@gnu.org> +;;; Copyright © 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr> ;;; ;;; This file is part of GNU Guix. ;;; @@ -60,6 +61,70 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (srfi srfi-1)) +(define-public python-aiohttp + (package + (name "python-aiohttp") + (version "3.1.3") + (source + (origin + (method url-fetch) + (uri (pypi-uri "aiohttp" version)) + (sha256 + (base32 + "1b888lggmyf2d08rfayq9khszzc0pav1z70ssc0b4d9kkr4g1klz")))) + (build-system python-build-system) + (arguments + `(#:tests? #f)) ;FIXME: 2 errors, 2084 passed + (native-inputs + `(("python-async-generator" ,python-async-generator) + ("python-pytest" ,python-pytest) + ("python-pytest-capturelog" ,python-pytest-capturelog) + ("python-pytest-mock" ,python-pytest-mock))) + (propagated-inputs + `(("python-aiodns" ,python-aiodns) + ("python-async-timeout" ,python-async-timeout) + ("python-attrs" ,python-attrs) + ("python-chardet" ,python-chardet) + ("python-idna-ssl" ,python-idna-ssl) + ("python-multidict" ,python-multidict) + ("python-yarl" ,python-yarl))) + (home-page "https://github.com/aio-libs/aiohttp/") + (synopsis "Async HTTP client/server framework (asyncio)") + (description "@code{aiohttp} is an asynchronous HTTP client/server +framework. + +Its main features are: +@itemize +@item Supports both client and server side of HTTP protocol. +@item Supports both client and server Web-Sockets out-of-the-box without the +Callback Hell. +@item Web-server has middlewares and pluggable routing. +@end itemize") + (license license:asl2.0))) + +(define-public python-aiodns + (package + (name "python-aiodns") + (version "1.1.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "aiodns" version)) + (sha256 + (base32 + "1snr5paql8dgvc676n8xq460wypjsb1xj53cf3px1s4wczf7lryq")))) + (build-system python-build-system) + (inputs + `(("python-pycares" ,python-pycares))) + (arguments + `(#:tests? #f)) ;tests require internet access + (home-page "http://github.com/saghul/aiodns") + (synopsis "Simple DNS resolver for asyncio") + (description "@code{aiodns} provides a simple way for doing +asynchronous DNS resolutions with a synchronous looking interface by +using @url{https://github.com/saghul/pycares,pycares}.") + (license license:expat))) + (define-public python-furl (package (name "python-furl") @@ -2511,3 +2576,47 @@ protocols, it supports features like HTTP keep-alive, reget, throttling and more.") (license license:lgpl2.1+))) +(define-public python-pycares + (package + (name "python-pycares") + (version "2.3.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pycares" version)) + (sha256 + (base32 + "0h4fxw5drrhfyslzmfpljk0qnnpbhhb20hnnndzahhbwylyw1x1n")))) + (build-system python-build-system) + (arguments + `(#:tests? #f)) ;tests require internet access + (home-page "http://github.com/saghul/pycares") + (synopsis "Python interface for @code{c-ares}") + (description "@code{pycares} is a Python module which provides an +interface to @code{c-ares}, a C library that performs DNS requests and +name resolutions asynchronously.") + (license license:expat))) + +(define-public python-yarl + (package + (name "python-yarl") + (version "1.1.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "yarl" version)) + (sha256 + (base32 + "1s6z13g8vgxfkkqwhn6imnm7pl7ky9arv4jygnn6bcndcbidg7d6")))) + (build-system python-build-system) + (native-inputs + `(("python-pytest" ,python-pytest) + ("python-pytest-runner" ,python-pytest-runner))) + (propagated-inputs + `(("python-idna" ,python-idna) + ("python-multidict" ,python-multidict))) + (home-page "https://github.com/aio-libs/yarl/") + (synopsis "Yet another URL library") + (description "@code{yarl} module provides handy @code{URL} class +for URL parsing and changing.") + (license license:asl2.0))) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 080552573d..b7b7714fb1 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -51,6 +51,7 @@ ;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org> ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com> ;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org> +;;; Copyright © 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr> ;;; ;;; This file is part of GNU Guix. ;;; @@ -3369,14 +3370,14 @@ that client code uses to construct the grammar directly in Python code.") (define-public python-numexpr (package (name "python-numexpr") - (version "2.6.4") + (version "2.6.5") (source (origin (method url-fetch) (uri (pypi-uri "numexpr" version)) (sha256 (base32 - "1kpnbb5d5n927113zccfibn16z7gidjipyac6kbbhzs0lnizkgph")))) + "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq")))) (build-system python-build-system) (arguments `(#:tests? #f)) ; no tests included (propagated-inputs @@ -3872,6 +3873,27 @@ Python code against some of the style conventions in (define-public python2-pycodestyle (package-with-python2 python-pycodestyle)) +(define-public python-multidict + (package + (name "python-multidict") + (version "4.2.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "multidict" version)) + (sha256 + (base32 + "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194")))) + (build-system python-build-system) + (native-inputs + `(("python-pytest" ,python-pytest) + ("python-pytest-runner" ,python-pytest-runner))) + (home-page "https://github.com/aio-libs/multidict/") + (synopsis "Multidict implementation") + (description "Multidict is dict-like collection of key-value pairs +where key might be occurred more than once in the container.") + (license license:asl2.0))) + (define-public python-orderedmultidict (package (name "python-orderedmultidict") @@ -5030,14 +5052,14 @@ converts incoming documents to Unicode and outgoing documents to UTF-8.") (define-public python-netifaces (package (name "python-netifaces") - (version "0.10.6") + (version "0.10.7") (source (origin (method url-fetch) (uri (pypi-uri "netifaces" version)) (sha256 (base32 - "1q7bi5k2r955rlcpspx4salvkkpk28jky67fjbpz2dkdycisak8c")))) + "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx")))) (build-system python-build-system) (home-page "https://github.com/al45tair/netifaces") (synopsis @@ -6373,6 +6395,26 @@ specification.") (define-public python2-idna (package-with-python2 python-idna)) +(define-public python-idna-ssl + (package + (name "python-idna-ssl") + (version "1.0.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "idna-ssl" version)) + (sha256 + (base32 + "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj")))) + (build-system python-build-system) + (arguments + `(#:tests? #f)) ;circular dependency with python-aiohttp + (home-page "https://github.com/aio-libs/idna-ssl") + (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support") + (description "Patch @code{ssl.match_hostname} for Unicode(idna) +domains support.") + (license license:expat))) + (define-public python-pretend (package (name "python-pretend") @@ -10606,14 +10648,14 @@ convering text with ANSI color codes to HTML or LaTeX.") (define-public python-ddt (package (name "python-ddt") - (version "1.1.2") + (version "1.1.3") (source (origin (method url-fetch) (uri (pypi-uri "ddt" version)) (sha256 (base32 - "1wqkmz0yhanly8sif5vb02p2iik7mwxwph8ywph2kbb8ws8szdpx")))) + "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk")))) (build-system python-build-system) (native-inputs `(("python-mock" ,python-mock) @@ -10827,10 +10869,12 @@ and bit flag values.") "1jafnn1kzd6qhxgprhx6y6ik1r5m2rilx25syzcmq03azp660y8w")))) (build-system python-build-system) (native-inputs - `(("python-pytest" ,python-pytest) + `(("python-coverage" ,python-coverage) ("python-hypothesis" ,python-hypothesis) - ("python-zope-interface" ,python-zope-interface) - ("python-six" ,python-six))) + ("python-pytest" ,python-pytest) + ("python-six" ,python-six) + ("python-sphinx" ,python-sphinx) + ("python-zope-interface" ,python-zope-interface))) (home-page "https://github.com/python-attrs/attrs/") (synopsis "Attributes without boilerplate") (description "@code{attrs} is a Python package with class decorators that @@ -13336,3 +13380,43 @@ Parso is also able to list multiple syntax errors in your Python file.") (define-public python2-parso (package-with-python2 python-parso)) + +(define-public python-async-generator + (package + (name "python-async-generator") + (version "1.9") + (source + (origin + (method url-fetch) + (uri (pypi-uri "async_generator" version)) + (sha256 + (base32 + "0wc3hidz1q85cja93k5pzybn0fprfnqyrv4qlkdqdzklc5f4dmdp")))) + (build-system python-build-system) + (native-inputs + `(("python-pytest" ,python-pytest))) + (home-page "https://github.com/python-trio/async_generator") + (synopsis "Async generators and context managers for Python 3.5+") + (description "@code{async_generator} back-ports Python 3.6's native async +generators and Python 3.7's context managers into Python 3.5.") + ;; Dual licensed. + (license (list license:expat license:asl2.0)))) + +(define-public python-async-timeout + (package + (name "python-async-timeout") + (version "2.0.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "async-timeout" version)) + (sha256 + (base32 + "1l3kg062m02mph6rf9rdv8r5c5n356clxa6b6mrn0i77vk9g9kq0")))) + (build-system python-build-system) + (home-page "https://github.com/aio-libs/async_timeout/") + (synopsis "Timeout context manager for asyncio programs") + (description "@code{async-timeout} provides a timeout timeout context +manager compatible with @code{asyncio}.") + (license license:asl2.0))) + diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm index 0a9d5bb382..bf50cdd55e 100644 --- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -237,8 +237,21 @@ in turn be used to build the final Rust.") ("llvm" ,llvm-3.9.1) ("openssl" ,openssl) ("libcurl" ,curl))) ; For "cargo" + ;; rustc invokes gcc, so we need to set its search paths accordingly. - (native-search-paths (package-native-search-paths gcc)) + ;; Note: duplicate its value here to cope with circular dependencies among + ;; modules (see <https://bugs.gnu.org/31392>). + (native-search-paths + (list (search-path-specification + (variable "C_INCLUDE_PATH") + (files '("include"))) + (search-path-specification + (variable "CPLUS_INCLUDE_PATH") + (files '("include"))) + (search-path-specification + (variable "LIBRARY_PATH") + (files '("lib" "lib64"))))) + (synopsis "Compiler for the Rust progamming language") (description "Rust is a systems programming language that provides memory safety and thread safety guarantees.") diff --git a/gnu/packages/shells.scm b/gnu/packages/shells.scm index a948547f72..24ee68abd2 100644 --- a/gnu/packages/shells.scm +++ b/gnu/packages/shells.scm @@ -52,7 +52,7 @@ (define-public dash (package (name "dash") - (version "0.5.9.1") + (version "0.5.10.1") (source (origin (method url-fetch) @@ -60,7 +60,7 @@ "dash-" version ".tar.gz")) (sha256 (base32 - "0ng695mq5ngg43h7ljhxvbjm46ym3nayj6ssn47d2gm9fbm5pkay")) + "1bl4brz5vy07lrss54glp4vfca3q8d73hyc87sqdk99f76z95b6s")) (modules '((guix build utils))) (snippet '(begin diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm index aca26edad4..0762037ee3 100644 --- a/gnu/packages/statistics.scm +++ b/gnu/packages/statistics.scm @@ -639,14 +639,14 @@ curves, Cox models, and parametric accelerated failure time models.") (define-public r-bit (package (name "r-bit") - (version "1.1-12") + (version "1.1-13") (source (origin (method url-fetch) (uri (cran-uri "bit" version)) (sha256 (base32 - "0a6ig6nnjzq80r2ll4hc74za3xwzbzig6wlyb4dby0knzf3iqa6f")))) + "1yhpwvfkxpb773h8khjzyamqxl2jn7pjjmxjfawq626hhds8fsh6")))) (build-system r-build-system) (home-page "http://ff.r-forge.r-project.org") (synopsis "Class for vectors of 1-bit booleans") @@ -965,13 +965,13 @@ transliteration, concatenation, date-time formatting and parsing, etc.") (define-public r-stringr (package (name "r-stringr") - (version "1.3.0") + (version "1.3.1") (source (origin (method url-fetch) (uri (cran-uri "stringr" version)) (sha256 - (base32 "07dvfbkhv8gk6l32j43jvxpmqlhqp0mdby406h5a3bsc6k94ic13")))) + (base32 "0hq3ybz7clnifi5wdm2s6p2i0kzljdkv26blg6yphng472h8x2vs")))) (build-system r-build-system) (propagated-inputs `(("r-glue" ,r-glue) @@ -1824,14 +1824,15 @@ building design matrices.") (uri (pypi-uri "statsmodels" version)) (sha256 (base32 - "0j30v3932shnj9368c9jr3svkyrvfj90h2l7nxnqkbpv0svilhr6")) - (patches (search-patches "python-statsmodels-fix-tests.patch")))) + "0j30v3932shnj9368c9jr3svkyrvfj90h2l7nxnqkbpv0svilhr6")))) (build-system python-build-system) (arguments - `(#:phases + `(;; The test suite is very large and rather brittle. Tests often fail + ;; because of minor changes in dependencies that upstream hasn't fixed + ;; in a new release. + #:tests? #f + #:phases (modify-phases %standard-phases - ;; tests must be run after installation - (delete 'check) (add-after 'unpack 'set-matplotlib-backend-to-agg (lambda _ ;; Set the matplotlib backend to Agg to avoid problems using the @@ -1843,14 +1844,17 @@ building design matrices.") (string-append "import matplotlib;matplotlib.use('Agg');" line))) #t)) - (add-after 'install 'check - (lambda* (#:key inputs outputs #:allow-other-keys) - ;; Make installed package available for running the tests - (add-installed-pythonpath inputs outputs) - (with-directory-excursion "/tmp" - (zero? (system* "nosetests" - "--stop" - "-v" "statsmodels")))))))) + ;; FIXME: This is a bug in version 0.8 since the upgrade to scipy 1.0. + ;; See https://github.com/statsmodels/statsmodels/issues/3931 + ;; This has been fixed in version 0.9. + (add-after 'unpack 'patch-for-scipy + (lambda _ + (substitute* "statsmodels/discrete/discrete_model.py" + (("return stats.chisqprob" match) + (string-append + "stats.chisqprob = lambda chisq, df: stats.chi2.sf(chisq, df);" + match))) + #t))))) (propagated-inputs `(("python-numpy" ,python-numpy) ("python-scipy" ,python-scipy) @@ -2423,13 +2427,13 @@ disk (or a connection).") (define-public r-plotrix (package (name "r-plotrix") - (version "3.7") + (version "3.7-1") (source (origin (method url-fetch) (uri (cran-uri "plotrix" version)) (sha256 (base32 - "0rw81n9p3d2i03b4pgcfj5blryc94f29bm9a4j9bnp5h8qjj6pry")))) + "16p6d2dna6dah7rg2xknhyy65jkfn0zzivx1nnfxhd4f5q0v87w2")))) (build-system r-build-system) (home-page "https://cran.r-project.org/web/packages/plotrix") (synopsis "Various plotting functions") @@ -5195,14 +5199,14 @@ classification and regression models.") (define-public r-rcppprogress (package (name "r-rcppprogress") - (version "0.4") + (version "0.4.1") (source (origin (method url-fetch) (uri (cran-uri "RcppProgress" version)) (sha256 (base32 - "09ayw6d69i0lplmaj5md25p5hn1nmiyp6a4sh60v93nrrs1cq7iv")))) + "0yk01hfv961zyp569682k9igvhnwqyg5j0n5fm63sxigj82l2xhi")))) (properties `((upstream-name . "RcppProgress"))) (build-system r-build-system) (propagated-inputs diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm index 5210e73ed4..6b625b5d3f 100644 --- a/gnu/packages/telephony.scm +++ b/gnu/packages/telephony.scm @@ -8,6 +8,7 @@ ;;; Copyright © 2016, 2017 Nils Gillmann <ng0@n0.is> ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr> +;;; Copyright © 2018 Jovany Leandro G.C <bit4bit@riseup.net> ;;; ;;; This file is part of GNU Guix. ;;; @@ -30,6 +31,7 @@ #:use-module (gnu packages avahi) #:use-module (gnu packages boost) #:use-module (gnu packages check) + #:use-module (gnu packages file) #:use-module (gnu packages protobuf) #:use-module (gnu packages gnupg) #:use-module (gnu packages linux) @@ -42,9 +44,15 @@ #:use-module (gnu packages tls) #:use-module (gnu packages xiph) #:use-module (gnu packages xorg) + #:use-module (gnu packages xml) + #:use-module (gnu packages readline) + #:use-module (gnu packages bison) + #:use-module (gnu packages flex) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix git-download) + #:use-module (guix build-system cmake) #:use-module (guix build-system gnu)) (define-public commoncpp @@ -482,3 +490,64 @@ Mumble consists of two applications for separate usage: (license (list license:bsd-3 ;; The bundled celt is bsd-2. Remove after 1.3.0. license:bsd-2)))) + +(define-public twinkle + (let ((commit "02e1d1538af3337134bd7381dcd95f8d7775b30f") + (revision "1")) + (package + (name "twinkle") + (version (git-version "1.10.1" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/LubosD/twinkle") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0ds4rp4vr1wagn4m4m7ldqbsx5vgmgbfcqqgyhn1wf6s1dm0020z")))) + (build-system cmake-build-system) + (arguments + `(#:tests? #f ; no test target + #:configure-flags '("-DWITH_SPEEX=On") + #:phases + (modify-phases %standard-phases + (add-after 'install 'wrap-executable + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (wrap-program (string-append out "/bin/twinkle") + `("QT_PLUGIN_PATH" ":" prefix + ,(map (lambda (label) + (string-append (assoc-ref inputs label) + "/lib/qt5/plugins")) + '("qtbase" "qtdeclarative"))) + `("QML2_IMPORT_PATH" ":" prefix + ,(map (lambda (label) + (string-append (assoc-ref inputs label) + "/lib/qt5/qml")) + '("qtdeclarative" "qtquickcontrols")))) + #t)))))) + (native-inputs + `(("bison" ,bison) + ("flex" ,flex) + ("readline" ,readline) + ("file" ,file) + ("ucommon" ,ucommon) + ("ccrtp" ,ccrtp) + ("libxml2" ,libxml2) + ("speex" ,speex) + ("speexdsp" ,speexdsp) + ("libsndfile" ,libsndfile) + ("alsa-lib" ,alsa-lib) + ("qttools" ,qttools))) + (inputs + `(("qtbase" ,qtbase) + ("qtdeclarative" ,qtdeclarative) + ("qtquickcontrols" ,qtquickcontrols))) + (home-page "http://twinkle.dolezel.info/") + (synopsis "Softphone for voice over IP and instant messaging") + (description "Twinkle is a softphone for your voice over IP and instant +messaging communcations using the SIP protocol. You can use it for direct IP +phone to IP phone communication or in a network using a SIP proxy to route your +calls and messages") + (license license:gpl2+)))) diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index ea3955439a..7f1f6ef72b 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -449,14 +449,14 @@ required structures.") (define-public libressl (package (name "libressl") - (version "2.7.2") + (version "2.7.3") (source (origin (method url-fetch) (uri (string-append "mirror://openbsd/LibreSSL/" name "-" version ".tar.gz")) (sha256 (base32 - "1589f0kg7kj51j9hid542s4isb96s1azjaqsfprpy5s2qdwqfyli")))) + "1597kj9jy3jyw52ys19sd4blg2gkam5q0rqdxbnrnvnyw67hviqn")))) (build-system gnu-build-system) (arguments ;; Do as if 'getentropy' was missing since older Linux kernels lack it diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index ba60cb0826..54bcbd46bf 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -1570,7 +1570,8 @@ modification time.") (commit version))) (file-name (string-append name "-" version "-checkout")) (sha256 - (base32 "10q7lpx152xnkk701fscn4dq99q9znnmv3bc2482khhjg7z8rps0")))) + (base32 "10q7lpx152xnkk701fscn4dq99q9znnmv3bc2482khhjg7z8rps0")) + (patches (search-patches "myrepos-CVE-2018-7032.patch")))) (build-system gnu-build-system) (inputs `(("perl" ,perl))) diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index 983ce45ec4..fce51150c0 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -472,7 +472,7 @@ canvas operations.") (define-public libdca (package (name "libdca") - (version "0.0.5") + (version "0.0.6") (source (origin (method url-fetch) (uri (string-append @@ -480,7 +480,7 @@ canvas operations.") version "/libdca-" version ".tar.bz2")) (sha256 (base32 - "0hh6a7l8vvccsd5i1fkv9av2gzv9fy8m0b8jpsn5p6hh4bh2586v")))) + "0h0zvcn97i9kyljdpifzi8in9xnw31fx3b3ggj96p8h0l2d8mycq")))) (build-system gnu-build-system) (home-page "https://www.videolan.org/developers/libdca.html") (synopsis "DTS Coherent Acoustics decoder") @@ -1156,7 +1156,7 @@ access to mpv's powerful playback capabilities.") (define-public youtube-dl (package (name "youtube-dl") - (version "2018.04.25") + (version "2018.05.09") (source (origin (method url-fetch) (uri (string-append "https://yt-dl.org/downloads/" @@ -1164,7 +1164,7 @@ access to mpv's powerful playback capabilities.") version ".tar.gz")) (sha256 (base32 - "17zxgwfcy7c6gdyxdgh02f5zi52gvmy0zpccfj6zjkhw5iqj1vbw")))) + "0sl4bi2jls3417rd62awbqdq1b6wskkjbfwpnyw4a61qarfxid1d")))) (build-system python-build-system) (arguments ;; The problem here is that the directory for the man page and completion diff --git a/gnu/packages/web-browsers.scm b/gnu/packages/web-browsers.scm index a5ecd0b546..d6da22152c 100644 --- a/gnu/packages/web-browsers.scm +++ b/gnu/packages/web-browsers.scm @@ -79,14 +79,14 @@ older or slower computers and embedded systems.") (define-public links (package (name "links") - (version "2.15") + (version "2.16") (source (origin (method url-fetch) (uri (string-append "http://links.twibright.com/download/" name "-" version ".tar.bz2")) (sha256 (base32 - "1jp3xyvp87a188b4kg5ycqahrazj7928zncgsznzn54w8d5iqahy")))) + "0gsa2gpb1grhssl5jzpc5pa0zi21mxi8g25rh5bacl70slw31w42")))) (build-system gnu-build-system) (arguments `(#:phases @@ -130,7 +130,7 @@ features including, tables, builtin image display, bookmarks, SSL and more.") (define-public lynx (package (name "lynx") - (version "2.8.9dev.17") + (version "2.8.9dev.18") (source (origin (method url-fetch) (uri (string-append @@ -138,7 +138,7 @@ features including, tables, builtin image display, bookmarks, SSL and more.") "/lynx" version ".tar.bz2")) (sha256 (base32 - "1lvfsnrw5mmwrmn1m76q9mx287xwm3h5lg8sv7bcqilc0ywi2f54")))) + "08v3n58hlrwncfvz6g76v061xwcbjgabiy5gv7ainf1li5akjwz5")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config) ("perl" ,perl))) diff --git a/gnu/packages/wine.scm b/gnu/packages/wine.scm index ae7b08fddf..c96f8699d0 100644 --- a/gnu/packages/wine.scm +++ b/gnu/packages/wine.scm @@ -69,7 +69,7 @@ (define-public wine (package (name "wine") - (version "3.0") + (version "3.0.1") (source (origin (method url-fetch) (uri (string-append "https://dl.winehq.org/wine/source/" @@ -77,7 +77,7 @@ "/wine-" version ".tar.xz")) (sha256 (base32 - "1v7vq9iinkscbq6wg85fb0d2137660fg2nk5iabxkl2wr850asil")))) + "1wr63n70pli83p3rmclr2j4lxzs4ll1cwlpdlaajfrf6v9yhvl5s")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config) ("gettext" ,gettext-minimal) @@ -223,7 +223,7 @@ integrate Windows applications into your desktop.") (define-public wine-staging-patchset-data (package (name "wine-staging-patchset-data") - (version "3.7") + (version "3.8") (source (origin (method url-fetch) @@ -232,7 +232,7 @@ integrate Windows applications into your desktop.") (file-name (string-append name "-" version ".zip")) (sha256 (base32 - "112sy32sja4cc3rv8x6v4cdi3jfxdgzwfra8f78hzdf8a2wrjqz6")))) + "1z1a9zlhcglyzfxdilrsz558qpn69b4mzp086s364jqgzj930sja")))) (build-system trivial-build-system) (native-inputs `(("bash" ,bash) @@ -279,7 +279,7 @@ integrate Windows applications into your desktop.") (file-name (string-append name "-" version ".tar.xz")) (sha256 (base32 - "1drbzk3y0m14lkq3vzwwkvain5shykgcbmyzh6gcb5r4sxh3givn")))) + "0l8dqb8r72i6n7yh2bmx738i8ss0lmsj07hvgrqsnfwbjin0rc02")))) (inputs `(("autoconf" ,autoconf) ; for autoreconf ("gtk+" ,gtk+) ("libva" ,libva) diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm index b503f71a62..6b589c823d 100644 --- a/gnu/packages/wm.scm +++ b/gnu/packages/wm.scm @@ -136,14 +136,14 @@ the leaves of a full binary tree.") (define-public i3status (package (name "i3status") - (version "2.11") + (version "2.12") (source (origin (method url-fetch) (uri (string-append "https://i3wm.org/i3status/i3status-" version ".tar.bz2")) (sha256 (base32 - "0pwcy599fw8by1a1sf91crkqba7679qhvhbacpmhis8c1xrpxnwq")))) + "06krpbijv4yi33nypg6qcn4hilcrdyarsdpd9fmr2cq46qaqiikg")))) (build-system gnu-build-system) (arguments `(#:make-flags (list "CC=gcc" (string-append "PREFIX=" %output)) diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm index 6801de39c1..18b78ccc7f 100644 --- a/gnu/packages/xdisorg.scm +++ b/gnu/packages/xdisorg.scm @@ -18,7 +18,7 @@ ;;; Copyright © 2016 Petter <petter@mykolab.ch> ;;; Copyright © 2017 Mekeor Melire <mekeor.melire@gmail.com> ;;; Copyright © 2017 Nils Gillmann <ng0@n0.is> -;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr> +;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2017 Marek Benc <dusxmt@gmx.com> ;;; Copyright © 2017 Mike Gerwitz <mtg@gnu.org> ;;; Copyright © 2018 Thomas Sigurdsen <tonton@riseup.net> @@ -529,7 +529,7 @@ selection's dimensions to stdout.") (define-public maim (package (name "maim") - (version "5.5") + (version "5.5.1") (source (origin (method url-fetch) (uri (string-append @@ -538,7 +538,7 @@ selection's dimensions to stdout.") (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "02blbimjdckbcb04crhv0k2vxnp3rcgskyq66sk0v13l2h52849v")))) + "1dvw0axnr9hhjg6zdcq9lwvaq0x7vrzlz00p8n3hj25qzsi4z5as")))) (build-system cmake-build-system) (arguments '(#:tests? #f)) ; no "check" target diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm index 8491faf881..99cd0a14a9 100644 --- a/gnu/packages/xml.scm +++ b/gnu/packages/xml.scm @@ -636,14 +636,14 @@ that conforms to the API of the Document Object Model.") (define-public perl-xml-compile-tester (package (name "perl-xml-compile-tester") - (version "0.90") + (version "0.91") (source (origin (method url-fetch) (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/" "XML-Compile-Tester-" version ".tar.gz")) (sha256 (base32 - "1bcl8x8cyacqv9yjp97aq9qq85sy8wv78kd8c16yd9yw3by4cpp1")))) + "1drzwziwi96rfkh48qpw4l225mcbk8ppl2157nj92cslcpwwdk75")))) (build-system perl-build-system) (propagated-inputs `(("perl-log-report" ,perl-log-report) @@ -735,14 +735,14 @@ used.") (define-public perl-xml-compile-wsdl11 (package (name "perl-xml-compile-wsdl11") - (version "3.06") + (version "3.07") (source (origin (method url-fetch) (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/" "XML-Compile-WSDL11-" version ".tar.gz")) (sha256 (base32 - "0vbq05cpynm3jj81fw1k4nsb3wv4zngi6blvi1jhdarmh2rfg1x2")))) + "09ayl442hzvn97q4ghn5rz4r82dm9w3l69hixhb29h9xq9ysi7ba")))) (build-system perl-build-system) (propagated-inputs `(("perl-log-report" ,perl-log-report) diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm index 422f625cf4..62cdc78604 100644 --- a/gnu/packages/xorg.scm +++ b/gnu/packages/xorg.scm @@ -5899,7 +5899,7 @@ basic eye-candy effects.") (define-public xpra (package (name "xpra") - (version "2.2.6") + (version "2.3") (source (origin (method url-fetch) @@ -5907,7 +5907,7 @@ basic eye-candy effects.") version ".tar.xz")) (sha256 (base32 - "1zyynghhzjbgnmzcibm17wpj9f7jy31d7dr373li8cwg2yl2swyz")))) + "0kq0ambpy8r7m3wxdp79cgxgnl9yfmr19lv88f617gnv0sp0aarp")))) (build-system python-build-system) (inputs `(("ffmpeg" ,ffmpeg) ("flac" ,flac) @@ -6000,15 +6000,15 @@ X11 servers, Windows, or macOS.") (define-public uim (package (name "uim") - (version "1.8.6") + (version "1.8.8") (source (origin (method url-fetch) - (uri (string-append "https://github.com/uim/uim/releases/download/uim-" + (uri (string-append "https://github.com/uim/uim/releases/download/" version "/uim-" version ".tar.bz2")) (sha256 (base32 - "0pr3rfqpxha8p6cxzdjsxbbmmr76riklzw36f68phd1zqw1sh7kv")))) + "1p7sl0js47ja4glmax93ci59h02ipqw3wxkh4f1qgaz5qjy9nn9l")))) (build-system gnu-build-system) (inputs `(("anthy" ,anthy) |