From 883302daf2b0a7cb64dd4c51824753b1a80b9b32 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 13 Jun 2016 11:52:22 +0200 Subject: gnu: piranha: Update to 1.2.1. * gnu/packages/bioinformatics.scm (piranha): Update to 1.2.1. --- gnu/packages/bioinformatics.scm | 119 ++++++++++++++++++++-------------------- 1 file changed, 61 insertions(+), 58 deletions(-) diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 6a90aa9456..98b00348dd 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -5127,68 +5127,71 @@ libraries for systems that do not have these available via other means.") (license license:artistic2.0))) (define-public piranha - (package - (name "piranha") - (version "1.1.3") - (source (origin - (method url-fetch) - (uri (string-append "https://github.com/smithlabcode/piranha" - "/archive/svn/tags/piranha-" - version ".tar.gz")) - (sha256 - (base32 - "1lczxff01n4139w7xwqamlb36g9hgrcy93gh03nqszhwb8ivsrqd")))) - (build-system gnu-build-system) - (arguments - `(#:test-target "test" - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'copy-smithlab-cpp - (lambda* (#:key inputs #:allow-other-keys) - (mkdir "src/smithlab_cpp") - (for-each (lambda (file) - (install-file file "./src/smithlab_cpp/")) - (find-files (assoc-ref inputs "smithlab-cpp"))) - #t)) - (add-after 'install 'install-to-store - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (bin (string-append out "/bin"))) - (mkdir-p bin) + ;; There is no release tarball for the latest version. The latest commit is + ;; older than one year at the time of this writing. + (let ((revision "1") + (commit "0466d364b71117d01e4471b74c514436cc281233")) + (package + (name "piranha") + (version (string-append "1.2.1-" revision "." (string-take commit 9))) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/smithlabcode/piranha.git") + (commit commit))) + (sha256 + (base32 + "117dc0zf20c61jam69sk4abl57ah6yi6i7qra7d7y5zrbgk12q5n")))) + (build-system gnu-build-system) + (arguments + `(#:test-target "test" + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'copy-smithlab-cpp + (lambda* (#:key inputs #:allow-other-keys) (for-each (lambda (file) - (install-file file bin)) - (find-files "bin" ".*"))) - #t))) - #:configure-flags - (list (string-append "--with-bam_tools_headers=" - (assoc-ref %build-inputs "bamtools") "/include/bamtools") - (string-append "--with-bam_tools_library=" - (assoc-ref %build-inputs "bamtools") "/lib/bamtools")))) - (inputs - `(("bamtools" ,bamtools) - ("samtools" ,samtools-0.1) - ("gsl" ,gsl) - ("smithlab-cpp" - ,(let ((commit "3723e2db438c51501d0423429ff396c3035ba46a")) - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/smithlabcode/smithlab_cpp.git") - (commit commit))) - (file-name (string-append "smithlab_cpp-" commit "-checkout")) - (sha256 - (base32 - "0l4gvbwslw5ngziskja41c00x1r06l3yidv7y0xw9djibhykzy0g"))))))) - (native-inputs - `(("python" ,python-2))) - (home-page "https://github.com/smithlabcode/piranha") - (synopsis "Peak-caller for CLIP-seq and RIP-seq data") - (description - "Piranha is a peak-caller for genomic data produced by CLIP-seq and + (install-file file "./src/smithlab_cpp/")) + (find-files (assoc-ref inputs "smithlab-cpp"))) + #t)) + (add-after 'install 'install-to-store + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin"))) + (mkdir-p bin) + (for-each (lambda (file) + (install-file file bin)) + (find-files "bin" ".*"))) + #t))) + #:configure-flags + (list (string-append "--with-bam_tools_headers=" + (assoc-ref %build-inputs "bamtools") "/include/bamtools") + (string-append "--with-bam_tools_library=" + (assoc-ref %build-inputs "bamtools") "/lib/bamtools")))) + (inputs + `(("bamtools" ,bamtools) + ("samtools" ,samtools-0.1) + ("gsl" ,gsl) + ("smithlab-cpp" + ,(let ((commit "3723e2db438c51501d0423429ff396c3035ba46a")) + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/smithlabcode/smithlab_cpp.git") + (commit commit))) + (file-name (string-append "smithlab_cpp-" commit "-checkout")) + (sha256 + (base32 + "0l4gvbwslw5ngziskja41c00x1r06l3yidv7y0xw9djibhykzy0g"))))))) + (native-inputs + `(("python" ,python-2))) + (home-page "https://github.com/smithlabcode/piranha") + (synopsis "Peak-caller for CLIP-seq and RIP-seq data") + (description + "Piranha is a peak-caller for genomic data produced by CLIP-seq and RIP-seq experiments. It takes input in BED or BAM format and identifies regions of statistically significant read enrichment. Additional covariates may optionally be provided to further inform the peak-calling process.") - (license license:gpl3+))) + (license license:gpl3+)))) (define-public pepr (package -- cgit v1.2.3 From 9f8ee3fe0ed615a89520618c4df66647845b15b3 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Thu, 21 Apr 2016 17:27:42 +0200 Subject: gnu: Add python-tables. * gnu/packages/python.scm (python-tables, python2-tables): New variables. --- gnu/packages/python.scm | 57 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index b2d27efa46..2645b8ecca 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -5716,6 +5716,63 @@ printing of sub-tables by specifying a row range.") (define-public python2-prettytable (package-with-python2 python-prettytable)) +(define-public python-tables + (package + (name "python-tables") + (version "3.2.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "tables" version)) + (sha256 + (base32 + "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m")))) + (build-system python-build-system) + (arguments + `(;; FIXME: python-build-system does not pass configure-flags to "build" + ;; or "check", so we must override the build and check phases. + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'use-gcc + (lambda _ + (substitute* "setup.py" + (("compiler = new_compiler\\(\\)" line) + (string-append line + "\ncompiler.set_executables(compiler='gcc'," + "compiler_so='gcc'," + "linker_exe='gcc'," + "linker_so='gcc -shared')"))) + #t)) + (replace 'build + (lambda* (#:key inputs #:allow-other-keys) + (zero? (system* "python" "setup.py" "build" + (string-append "--hdf5=" + (assoc-ref inputs "hdf5")))))) + (replace 'check + (lambda* (#:key inputs #:allow-other-keys) + (zero? (system* "python" "setup.py" "check" + (string-append "--hdf5=" + (assoc-ref inputs "hdf5"))))))))) + (propagated-inputs + `(("python-numexpr" ,python-numexpr) + ("python-numpy" ,python-numpy))) + (native-inputs + `(("python-setuptools" ,python-setuptools) + ("python-cython" ,python-cython) + ("pkg-config" ,pkg-config))) + (inputs + `(("hdf5" ,hdf5) + ("bzip2" ,bzip2) + ("zlib" ,zlib))) + (home-page "http://www.pytables.org/") + (synopsis "Hierarchical datasets for Python") + (description "PyTables is a package for managing hierarchical datasets and +designed to efficently cope with extremely large amounts of data.") + (license bsd-3))) + +(define-public python2-tables + (package-with-python2 python-tables)) + (define-public python-pyasn1 (package (name "python-pyasn1") -- cgit v1.2.3 From 1752a17a1e6f7138892eeeb4806cd04ccb3ca1b0 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 13 Jun 2016 17:52:08 +0200 Subject: utils: 'with-atomic-file-output' calls 'fdatasync'. Suggested by Danny Milosavljevic at . * guix/build/syscalls.scm (fdatasync): New procedure. * guix/utils.scm (with-atomic-file-output): Use it. Use 'close-port' instead of 'close'. --- guix/build/syscalls.scm | 15 +++++++++++++++ guix/utils.scm | 5 +++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm index 48ff227e10..ed0eb060d9 100644 --- a/guix/build/syscalls.scm +++ b/guix/build/syscalls.scm @@ -64,6 +64,7 @@ processes mkdtemp! + fdatasync pivot-root fcntl-flock @@ -506,6 +507,20 @@ string TMPL and return its file name. TMPL must end with 'XXXXXX'." (list err))) (pointer->string result))))) +(define fdatasync + (let ((proc (syscall->procedure int "fdatasync" (list int)))) + (lambda (port) + "Flush buffered output of PORT, an output file port, and then call +fdatasync(2) on the underlying file descriptor." + (force-output port) + (let* ((fd (fileno port)) + (ret (proc fd)) + (err (errno))) + (unless (zero? ret) + (throw 'system-error "fdatasync" "~S: ~A" + (list fd (strerror err)) + (list err))))))) + (define-record-type (file-system type block-size blocks blocks-free diff --git a/guix/utils.scm b/guix/utils.scm index c77da5d846..18d913c514 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -34,7 +34,7 @@ #:use-module ((rnrs bytevectors) #:select (bytevector-u8-set!)) #:use-module (guix combinators) #:use-module ((guix build utils) #:select (dump-port)) - #:use-module ((guix build syscalls) #:select (mkdtemp!)) + #:use-module ((guix build syscalls) #:select (mkdtemp! fdatasync)) #:use-module (ice-9 vlist) #:use-module (ice-9 format) #:autoload (ice-9 popen) (open-pipe*) @@ -625,7 +625,8 @@ output port, and PROC's result is returned." (with-throw-handler #t (lambda () (let ((result (proc out))) - (close out) + (fdatasync out) + (close-port out) (rename-file template file) result)) (lambda (key . args) -- cgit v1.2.3 From d1f33ba44b60526d20da04d384f3af5437f8a3ae Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 13 Jun 2016 17:57:25 +0200 Subject: syscalls: Use 'syscall->procedure' everywhere. * guix/build/syscalls.scm (mkdtemp!, setns, %ioctl, network-interfaces): (free-ifaddrs): Use 'syscall->procedure'. --- guix/build/syscalls.scm | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm index ed0eb060d9..c663899160 100644 --- a/guix/build/syscalls.scm +++ b/guix/build/syscalls.scm @@ -494,8 +494,7 @@ user-land process." <)) (define mkdtemp! - (let* ((ptr (dynamic-func "mkdtemp" (dynamic-link))) - (proc (pointer->procedure '* ptr '(*)))) + (let ((proc (syscall->procedure '* "mkdtemp" '(*)))) (lambda (tmpl) "Create a new unique directory in the file system using the template string TMPL and return its file name. TMPL must end with 'XXXXXX'." @@ -626,8 +625,7 @@ are shared between the parent and child processes." ;; Some systems may be using an old (pre-2.14) version of glibc where there ;; is no 'setns' function available. (false-if-exception - (let* ((ptr (dynamic-func "setns" (dynamic-link))) - (proc (pointer->procedure int ptr (list int int)))) + (let ((proc (syscall->procedure int "setns" (list int int)))) (lambda (fdes nstype) "Reassociate the current process with the namespace specified by FDES, a file descriptor obtained by opening a /proc/PID/ns/* file. NSTYPE specifies @@ -833,9 +831,7 @@ bytevector BV at INDEX." (define %ioctl ;; The most terrible interface, live from Scheme. - (pointer->procedure int - (dynamic-func "ioctl" (dynamic-link)) - (list int unsigned-long '*))) + (syscall->procedure int "ioctl" (list int unsigned-long '*))) (define (bytevector->string-list bv stride len) "Return the null-terminated strings found in BV every STRIDE bytes. Read at @@ -1075,8 +1071,7 @@ return the list of resulting objects." (loop ptr (cons ifaddr result))))))) (define network-interfaces - (let* ((ptr (dynamic-func "getifaddrs" (dynamic-link))) - (proc (pointer->procedure int ptr (list '*)))) + (let ((proc (syscall->procedure int "getifaddrs" (list '*)))) (lambda () "Return a list of objects, each denoting a configured network interface. This is implemented using the 'getifaddrs' libc function." @@ -1093,8 +1088,7 @@ network interface. This is implemented using the 'getifaddrs' libc function." (list err))))))) (define free-ifaddrs - (let ((ptr (dynamic-func "freeifaddrs" (dynamic-link)))) - (pointer->procedure void ptr '(*)))) + (syscall->procedure void "freeifaddrs" '(*))) ;;; -- cgit v1.2.3 From c25637dfe8aaf2aa7550c9196fb7e18820552ca6 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 13 Jun 2016 18:00:29 +0200 Subject: utils: 'with-atomic-file-output' closes the port upon exception. Previously it could have left the file descriptor open. * guix/utils.scm (with-atomic-file-output): Call 'close-port' in handler. --- guix/utils.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/guix/utils.scm b/guix/utils.scm index 18d913c514..2d8bfd84b0 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -630,7 +630,8 @@ output port, and PROC's result is returned." (rename-file template file) result)) (lambda (key . args) - (false-if-exception (delete-file template)))))) + (false-if-exception (delete-file template)) + (close-port out))))) (define (cache-directory) "Return the cache directory for Guix, by default ~/.cache/guix." -- cgit v1.2.3 From 2e2c6e965573e91b5e9455c5009e61adfbaae7ec Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Sun, 12 Jun 2016 13:52:45 +0200 Subject: gnu: asymptote: Update to 2.38 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/plotutils.scm (asymptote): Update to 2.38. Signed-off-by: Ludovic Courtès --- gnu/packages/plotutils.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/plotutils.scm b/gnu/packages/plotutils.scm index 3edb25a42a..74d209192f 100644 --- a/gnu/packages/plotutils.scm +++ b/gnu/packages/plotutils.scm @@ -173,14 +173,14 @@ colors, styles, options and details.") (define-public asymptote (package (name "asymptote") - (version "2.37") + (version "2.38") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/asymptote/" version "/asymptote-" version ".src.tgz")) (sha256 (base32 - "16nh02m52mk9a53i8wc6l9vg710gnzr3lfbypcbvamghvaj0458i")))) + "1dxwvq0xighqckkjkjva8s0igxfgy1j25z81pbwvlz6jzsrxpip9")))) (build-system gnu-build-system) ;; Note: The 'asy' binary retains a reference to docdir for use with its ;; "help" command in interactive mode, so adding a "doc" output is not -- cgit v1.2.3 From 2fb3dddabfc06c9454cfaa9fb6aba427f393b04e Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Sun, 12 Jun 2016 17:02:18 +0200 Subject: gnu: giac-xcas: Update to 1.2.2-59 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/algebra.scm (giac-xcas): Update to 1.2.2-59. Signed-off-by: Ludovic Courtès --- gnu/packages/algebra.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm index 9518e65db6..12691da17d 100644 --- a/gnu/packages/algebra.scm +++ b/gnu/packages/algebra.scm @@ -202,7 +202,7 @@ GP2C, the GP to C compiler, translates GP scripts to PARI programs.") (define-public giac-xcas (package (name "giac-xcas") - (version "1.2.2-41") + (version "1.2.2-59") (source (origin (method url-fetch) ;; "~parisse/giac" is not used because the maintainer regularly @@ -214,7 +214,7 @@ GP2C, the GP to C compiler, translates GP scripts to PARI programs.") "source/giac_" version ".tar.gz")) (sha256 (base32 - "061a0p5l1qlb9iqk7n7yznhv2f3hvll1hrzjbhn81bf31f2wj6sq")))) + "02s774v2zg2ya43rm8s7bcwzrmp4wlmn8h2rlg4816zpfrjkrdn4")))) (build-system gnu-build-system) (arguments `(#:phases -- cgit v1.2.3 From c6bccf713bf2e2bbd072df2d60b17a661db919d7 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 13 Jun 2016 21:31:13 +0300 Subject: gnu: python-pykafka: Change uri. * gnu/packages/python.scm (python-pykafka)[source]: Update pypi uri. --- gnu/packages/python.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 2645b8ecca..fa06a128b9 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -9160,7 +9160,10 @@ programming errors.") (version "2.4.0") (source (origin (method url-fetch) - (uri (pypi-uri "pykafka" version)) + (uri (string-append + "https://pypi.python.org/packages/8b/3e/" + "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/" + "pykafka-" version ".tar.gz")) (sha256 (base32 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv")))) -- cgit v1.2.3 From 65089213c8dd26f6fc6e2be52d04823c91f32763 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 13 Jun 2016 22:37:35 +0300 Subject: gnu: wayland: Update to 1.11.0. * gnu/packages/freedesktop.scm (wayland): Update to 1.11.0. --- gnu/packages/freedesktop.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm index 9bd080c7f9..53bd757c1d 100644 --- a/gnu/packages/freedesktop.scm +++ b/gnu/packages/freedesktop.scm @@ -253,14 +253,14 @@ Python.") (define-public wayland (package (name "wayland") - (version "1.10.0") + (version "1.11.0") (source (origin (method url-fetch) (uri (string-append "https://wayland.freedesktop.org/releases/" name "-" version ".tar.xz")) (sha256 (base32 - "1p307ly1yyqjnzn9dbv78yffql2qszn84qk74lwanl3gma8fgxjb")))) + "1c0d5ivy9n44hykvw2ggrvqrnn7naw3wg11vbvgwzgi8g5gr4h4m")))) (build-system gnu-build-system) (arguments `(#:parallel-tests? #f)) (native-inputs -- cgit v1.2.3 From d3ef652aa15b899084613dd1d41ac7722dc582b3 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 13 Jun 2016 23:13:16 +0200 Subject: gnu: wget: Update to 1.18. * gnu/packages/wget.scm (wget): Update to 1.18. --- gnu/packages/wget.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/wget.scm b/gnu/packages/wget.scm index d8a7bea48e..80da33272e 100644 --- a/gnu/packages/wget.scm +++ b/gnu/packages/wget.scm @@ -32,7 +32,7 @@ (define-public wget (package (name "wget") - (version "1.17.1") + (version "1.18") (source (origin (method url-fetch) @@ -40,7 +40,7 @@ version ".tar.xz")) (sha256 (base32 - "1jcpvl5sxb2ag8yahpy370c5jlfb097a21k2mhsidh4wxdhrnmgy")))) + "1hcwx8ww3sxzdskkx3l7q70a7wd6569yrnjkw9pw013cf9smpddm")))) (build-system gnu-build-system) (inputs `(("gnutls" ,gnutls) -- cgit v1.2.3 From e4a44a6aa5b6dcda39ab8c347d1dc68a4cc7e4f9 Mon Sep 17 00:00:00 2001 From: Ben Woodcroft Date: Fri, 10 Jun 2016 19:45:14 +1000 Subject: gnu: Add ruby-bio-kseq. * gnu/packages/bioinformatics.scm (ruby-bio-kseq): New variable. --- gnu/packages/bioinformatics.scm | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 98b00348dd..58877f7c61 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -3926,6 +3926,34 @@ clusters.") (home-page "https://sourceforge.net/projects/pardre/") (license license:gpl3+))) +(define-public ruby-bio-kseq + (package + (name "ruby-bio-kseq") + (version "0.0.2") + (source + (origin + (method url-fetch) + (uri (rubygems-uri "bio-kseq" version)) + (sha256 + (base32 + "1xyaha46khb5jc6wzkbf7040jagac49jbimn0vcrzid0j8jdikrz")))) + (build-system ruby-build-system) + (arguments + `(#:test-target "spec")) + (native-inputs + `(("bundler" ,bundler) + ("ruby-rspec" ,ruby-rspec) + ("ruby-rake-compiler" ,ruby-rake-compiler))) + (inputs + `(("zlib" ,zlib))) + (synopsis "Ruby bindings for the kseq.h FASTA/Q parser") + (description + "@code{Bio::Kseq} provides ruby bindings to the @code{kseq.h} FASTA and +FASTQ parsing code. It provides a fast iterator over sequences and their +quality scores.") + (home-page "https://github.com/gusevfe/bio-kseq") + (license license:expat))) + (define-public bio-locus (package (name "bio-locus") -- cgit v1.2.3 From 32ac717c5f38192b8bf832e2aba4e83e38a201c3 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sat, 11 Jun 2016 21:21:02 -0400 Subject: gnu: Add gnome-shell-extensions. * gnu/packages/gnome.scm (gnome-shell-extensions): New variable. --- gnu/packages/gnome.scm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index c87c371423..0b80ebb448 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -5183,6 +5183,33 @@ alternative user interface themes, changes in window management behavior, GNOME Shell appearance and extension, etc.") (license license:gpl3+))) +(define-public gnome-shell-extensions + (package + (name "gnome-shell-extensions") + (version "3.20.1") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnome/sources/" name "/" + (version-major+minor version) "/" + name "-" version ".tar.xz")) + (sha256 + (base32 + "18rr55krnqx1nzrzlj6kfzh4n67f3crakmwh28rr95y7cg0jwhxw")))) + (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--enable-extensions=all"))) + (native-inputs + `(("intltool" ,intltool) + ("pkg-config" ,pkg-config))) + (propagated-inputs + `(("glib" ,glib) + ("glib" ,glib "bin"))) + (synopsis "Extensions for GNOME Shell") + (description "GNOME Shell extensions modify and extend GNOME Shell +functionality and behavior.") + (home-page "https://extensions.gnome.org/") + (license license:gpl3+))) + (define-public arc-theme (package (name "arc-theme") -- cgit v1.2.3 From feb5c554036f65386a5474b0e6fdcd375988208b Mon Sep 17 00:00:00 2001 From: Alex Vong Date: Tue, 14 Jun 2016 12:30:12 +0800 Subject: gnu: youtube-dl: Update to 2016.06.14. * gnu/packages/video.scm (youtube-dl): Update to 2016.06.14. [source]: Use https. [home-page]: Use https. Signed-off-by: Efraim Flashner --- gnu/packages/video.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index eee04faec0..b447557d70 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -869,17 +869,17 @@ projects while introducing many more.") (define-public youtube-dl (package (name "youtube-dl") - (version "2016.05.01") + (version "2016.06.14") (source (origin (method url-fetch) - (uri (string-append "http://youtube-dl.org/downloads/" + (uri (string-append "https://youtube-dl.org/downloads/" version "/youtube-dl-" version ".tar.gz")) (sha256 (base32 - "1w04afmwq5pjvp3nl2k59q0cigqrj9n8fwkydcfldwpq83l15j5d")))) + "0fmvpqipc1xwagvk7ih4slmv1xz1rb6s8wpndhypwvrq4pnnm9ns")))) (build-system python-build-system) - (home-page "http://youtube-dl.org") + (home-page "https://youtube-dl.org") (arguments ;; The problem here is that the directory for the man page and completion ;; files is relative, and for some reason, setup.py uses the -- cgit v1.2.3 From d0d2b0f9cd156d6ce90600ec59dc4cbe17a68c4f Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 14 Jun 2016 10:08:14 +0300 Subject: gnu: parallel: Update to 20160522. * gnu/packages/parallel.scm (parallel): Update to 20160522. --- gnu/packages/parallel.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gnu/packages/parallel.scm b/gnu/packages/parallel.scm index b0984a823e..d1f49abed3 100644 --- a/gnu/packages/parallel.scm +++ b/gnu/packages/parallel.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2014 Eric Bavier ;;; Copyright © 2015 Mark H Weaver -;;; Copyright © 2015 Efraim Flashner +;;; Copyright © 2015, 2016 Efraim Flashner ;;; Copyright © 2016 Pjotr Prins ;;; Copyright © 2016 Andreas Enge ;;; Copyright © 2016 Ricardo Wurmus @@ -44,7 +44,7 @@ (define-public parallel (package (name "parallel") - (version "20160222") + (version "20160522") (source (origin (method url-fetch) @@ -52,7 +52,7 @@ version ".tar.bz2")) (sha256 (base32 - "1sjmvinwr9j2a0jdk9y9nf2x4hhzcbl529slkwpz0vva0cwybywd")))) + "03r07ksxw5xx946x9s26ivifgldr8bc9bz6da4wfrd0dx4546xyy")))) (build-system gnu-build-system) (inputs `(("perl" ,perl))) (home-page "http://www.gnu.org/software/parallel/") -- cgit v1.2.3 From e831256ff5c31a61c4239734f5b2f81fbd2222fd Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 14 Jun 2016 14:08:07 +0300 Subject: gnu: perl-xml-simple: Update to 2.22. * gnu/packages/xml.scm (perl-xml-simple): Update to 2.22. [propagated-inputs]: Add perl-xml-sax. [home-page]: Update it. --- gnu/packages/xml.scm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm index e62bfa7e54..5ef27d06cd 100644 --- a/gnu/packages/xml.scm +++ b/gnu/packages/xml.scm @@ -5,7 +5,7 @@ ;;; Copyright © 2015 Sou Bunnbu ;;; Copyright © 2015, 2016 Ricardo Wurmus ;;; Copyright © 2015 Mark H Weaver -;;; Copyright © 2015 Efraim Flashner +;;; Copyright © 2015, 2016 Efraim Flashner ;;; Copyright © 2015 Raimon Grau ;;; Copyright © 2016 Leo Famulari ;;; @@ -355,7 +355,7 @@ callback.") (define-public perl-xml-simple (package (name "perl-xml-simple") - (version "2.20") + (version "2.22") (source (origin (method url-fetch) (uri (string-append @@ -363,17 +363,18 @@ callback.") version ".tar.gz")) (sha256 (base32 - "0jj3jiray1l4pi9wkjcpxjc3v431whdwx5aqnhgdm4i7h3817zsw")))) + "0jgbk30jizafpl7078jhw1di1yh08gf8d85dsvjllr595vr0widr")))) (build-system perl-build-system) (propagated-inputs - `(("perl-xml-parser" ,perl-xml-parser))) + `(("perl-xml-parser" ,perl-xml-parser) + ("perl-xml-sax" ,perl-xml-sax))) (license (package-license perl)) (synopsis "Perl module for easy reading/writing of XML files") (description "The XML::Simple module provides a simple API layer on top of an underlying XML parsing module (either XML::Parser or one of the SAX2 parser modules).") - (home-page "http://search.cpan.org/~grantm/XML-Simple-2.20/lib/XML/Simple.pm"))) + (home-page "http://search.cpan.org/dist/XML-Simple"))) (define-public perl-xml-regexp (package -- cgit v1.2.3 From 54c3c140ce14bafdf13d2f6846191d746c71f301 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 14 Jun 2016 14:29:03 +0300 Subject: gnu: perl-xml-libxml: Update to 2.0125. * gnu/packages/xml.scm (perl-xml-libxml): Update to 2.0125. --- gnu/packages/xml.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm index 5ef27d06cd..81a71bde6c 100644 --- a/gnu/packages/xml.scm +++ b/gnu/packages/xml.scm @@ -230,7 +230,7 @@ module.") (define-public perl-xml-libxml (package (name "perl-xml-libxml") - (version "2.0118") + (version "2.0125") (source (origin (method url-fetch) @@ -238,7 +238,7 @@ module.") "XML-LibXML-" version ".tar.gz")) (sha256 (base32 - "170c8dbk4p6jw9is0cria73021yp3hpmhb19p9j0zg2yxwkawr6c")))) + "1mvbv1pwpdqni9ia9b6brg8brnnvfxr8j5x872qsngc92gipyh01")))) (build-system perl-build-system) (propagated-inputs `(("perl-xml-namespacesupport" ,perl-xml-namespacesupport) @@ -248,7 +248,7 @@ module.") (home-page "http://search.cpan.org/dist/XML-LibXML") (synopsis "Perl interface to libxml2") (description "This module implements a Perl interface to the libxml2 -library which provides interfaces for parsing and manipulating XML files. This +library which provides interfaces for parsing and manipulating XML files. This module allows Perl programmers to make use of the highly capable validating XML parser and the high performance DOM implementation.") (license (package-license perl)))) -- cgit v1.2.3 From cf4a71322b45d2b42732977f042593f425590232 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 14 Jun 2016 14:31:58 +0300 Subject: gnu: perl-test-deep: Update to 1.120. * gnu/packages/perl.scm (perl-test-deep): Update to 1.120. [home-page]: Update it. --- gnu/packages/perl.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm index a517581e7d..fc3bf55d58 100644 --- a/gnu/packages/perl.scm +++ b/gnu/packages/perl.scm @@ -6,6 +6,7 @@ ;;; Copyright © 2015 Eric Dvorsak ;;; Copyright © 2016 Mark H Weaver ;;; Copyright © 2016 Jochem Raat +;;; Copyright © 2016 Efraim Flashner ;;; ;;; This file is part of GNU Guix. ;;; @@ -4955,14 +4956,14 @@ called as methods, which usually isn't want you want.") (define-public perl-test-deep (package (name "perl-test-deep") - (version "0.114") + (version "1.120") (source (origin (method url-fetch) (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/" "Test-Deep-" version ".tar.gz")) (sha256 (base32 - "09yr47vw7vj27sdik312x08938higcij8ybyq8k67mlccx8cpqf0")))) + "1kdy06r0yg7zwarqglc9163vbfb0sfc4s6ld4pw5q7i9f7mghzi0")))) (build-system perl-build-system) (inputs `(("perl-test-tester" ,perl-test-tester) ("perl-test-nowarnings" ,perl-test-nowarnings))) @@ -4972,8 +4973,7 @@ called as methods, which usually isn't want you want.") that the values match, that arrays and hashes have the same elements and that references are blessed into the correct class. It also handles circular data structures without getting caught in an infinite loop.") - (home-page (string-append "http://search.cpan.org/~rjbs/" - "Test-Deep-" version)) + (home-page "http://search.cpan.org/dist/Test-Deep") (license gpl1+))) ; or "Artistic License" (define-public perl-test-differences -- cgit v1.2.3 From 67abcc05ba72a65ccc986c61647ddf2af8c1d2c2 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 14 Jun 2016 15:01:35 +0300 Subject: gnu: perl-image-exiftool: Update to 10.20. * gnu/packages/photo.scm (perl-image-exiftool): Update to 10.20. [home-page]: Update it. --- gnu/packages/photo.scm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gnu/packages/photo.scm b/gnu/packages/photo.scm index 4b21926105..38bd9c3ed9 100644 --- a/gnu/packages/photo.scm +++ b/gnu/packages/photo.scm @@ -162,7 +162,7 @@ MTP, and much more.") (define-public perl-image-exiftool (package (name "perl-image-exiftool") - (version "9.70") + (version "10.20") (source (origin (method url-fetch) (uri (string-append @@ -170,7 +170,7 @@ MTP, and much more.") version ".tar.gz")) (sha256 (base32 - "074yxjgy50iacnjakdvac37wvrzrqmabkn0nzk0n70y3hssli7d5")))) + "0akdnxvb23ibcwa63ncibaj5m5k56cb34x8gy90z9lqcjl0f4sph")))) (build-system perl-build-system) (arguments '(#:phases (alist-cons-after @@ -184,8 +184,7 @@ MTP, and much more.") (wrap-program (string-append out "/bin/exiftool") `("PERL5LIB" prefix (,lib))))) %standard-phases))) - (home-page - "http://search.cpan.org/~exiftool/Image-ExifTool-9.70/lib/Image/ExifTool.pod") + (home-page "http://search.cpan.org/dist/Image-ExifTool") (synopsis "Program and Perl library to manipulate EXIF tags") (description "This package provides the 'exiftool' command and the 'Image::ExifTool' -- cgit v1.2.3 From 0e8186eb12ff94897210d1631fa189952248bbd3 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 14 Jun 2016 15:04:09 +0300 Subject: gnu: perl-exporter-lite: Update to 0.08. * gnu/packages/perl.scm (perl-exporter-lite): Update to 0.08. [home-page]: Update it. --- gnu/packages/perl.scm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm index fc3bf55d58..e7e79671e3 100644 --- a/gnu/packages/perl.scm +++ b/gnu/packages/perl.scm @@ -2038,22 +2038,21 @@ in your modules in a \"Java-esque\" manner.") (define-public perl-exporter-lite (package (name "perl-exporter-lite") - (version "0.06") + (version "0.08") (source (origin (method url-fetch) (uri (string-append "mirror://cpan/authors/id/N/NE/NEILB/" "Exporter-Lite-" version ".tar.gz")) (sha256 (base32 - "0k4gkvid4fr8yvwj0axdx5111mzfw2iipls3qllxr364fqhmclpj")))) + "1hns15imih8z2h6zv3m1wwmv9fiysacsb52y94v6zf2cmw4kjny0")))) (build-system perl-build-system) (synopsis "Lightweight exporting of functions and variables") (description "Exporter::Lite is an alternative to Exporter, intended to provide a lightweight subset of the most commonly-used functionality. It supports import(), @@EXPORT and @@EXPORT_OK and not a whole lot else.") - (home-page (string-append "http://search.cpan.org/~neilb/" - "Exporter-Lite-" version)) + (home-page "http://search.cpan.org/dist/Exporter-Lite") (license (package-license perl)))) (define-public perl-exporter-tiny -- cgit v1.2.3 From 6138dedec97762564b0e9e4083ecf0ee09399470 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 14 Jun 2016 15:06:48 +0300 Subject: gnu: perl-dbi: Update to 1.636. * gnu/packages/databases.scm (perl-dbi): Update to 1.636. [home-page]: Update it. --- gnu/packages/databases.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index 3458b3ba33..3a81a8ee8c 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -553,7 +553,7 @@ extremely small.") (define-public perl-dbi (package (name "perl-dbi") - (version "1.631") + (version "1.636") (source (origin (method url-fetch) (uri (string-append @@ -561,11 +561,11 @@ extremely small.") version ".tar.gz")) (sha256 (base32 - "04fmrnchhwi7jx4niaiv93vmi343hdm3xj04w9zr2m9hhqh782np")))) + "0v37vnr5p0bx396cj0lb5kb69jbryq2mspp602hbgd04gklxqzcg")))) (build-system perl-build-system) (synopsis "Database independent interface for Perl") (description "This package provides an database interface for Perl.") - (home-page "http://search.cpan.org/~timb/DBI-1.631/DBI.pm") + (home-page "http://search.cpan.org/dist/DBI") (license (package-license perl)))) (define-public perl-dbix-class -- cgit v1.2.3 From 4f54a63e1e71bf9a48e66bd4459809b699889620 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 25 May 2016 17:11:57 +0200 Subject: gnu: julia: Use unbundled release tarball. * gnu/packages/julia.scm (julia)[source]: Use smaller tarball without bundled sources. [inputs]: Add inputs for rmath-julia, suitesparse, objconv, dsfmt, and virtualenv. [arguments]: Add phase "prepare-deps" to copy tarballs to their expected locations. --- gnu/packages/julia.scm | 62 +++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 59 insertions(+), 3 deletions(-) diff --git a/gnu/packages/julia.scm b/gnu/packages/julia.scm index d358a003e7..1cda5d89c8 100644 --- a/gnu/packages/julia.scm +++ b/gnu/packages/julia.scm @@ -73,10 +73,10 @@ (method url-fetch) (uri (string-append "https://github.com/JuliaLang/julia/releases/download/v" - version "/julia-" version "-full.tar.gz")) + version "/julia-" version ".tar.gz")) (sha256 (base32 - "1nbi78fav5f4zj5332iwm4mfk0qhd5qh61z881q69rvp7b163wyb")))) + "09gc6yf3v4in0qwhrbgjrjgvblp941di0mli4zax22mvf4dzc7s4")))) (build-system gnu-build-system) (arguments `(#:test-target "test" @@ -92,6 +92,19 @@ #:phases (modify-phases %standard-phases (delete 'configure) + (add-after 'unpack 'prepare-deps + (lambda* (#:key inputs #:allow-other-keys) + (copy-file (assoc-ref inputs "rmath-julia") + "deps/Rmath-julia-0.1.tar.gz") + (copy-file (assoc-ref inputs "dsfmt") + "deps/dsfmt-2.2.3.tar.gz") + (copy-file (assoc-ref inputs "objconv") + "deps/objconv.zip") + (copy-file (assoc-ref inputs "suitesparse") + "deps/SuiteSparse-4.4.2.tar.gz") + (copy-file (assoc-ref inputs "virtualenv") + "deps/virtualenv-1.11.6.tar.gz") + #t)) (add-after 'unpack 'hardcode-soname-map ;; ./src/ccall.cpp creates a map from library names to paths using the ;; output of "/sbin/ldconfig -p". Since ldconfig is not used in Guix, @@ -249,7 +262,50 @@ ("mpfr" ,mpfr) ("wget" ,wget) ("which" ,which) - ("gmp" ,gmp))) + ("gmp" ,gmp) + ;; FIXME: The following inputs are downloaded from upstream to allow us + ;; to use the lightweight Julia release tarball. Ideally, these inputs + ;; would eventually be replaced with proper Guix packages. + ("rmath-julia" + ,(origin + (method url-fetch) + (uri "https://api.github.com/repos/JuliaLang/Rmath-julia/tarball/v0.1") + (file-name "rmath-julia-0.1.tar.gz") + (sha256 + (base32 + "0ai5dhjc43zcvangz123ryxmlbm51s21rg13bllwyn98w67arhb4")))) + ("suitesparse" + ,(origin + (method url-fetch) + (uri "http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-4.4.2.tar.gz") + (sha256 + (base32 + "1dg0qsv07n71nbn9cgcvn73933rgy1jnxw5bfqkwfq3bidk44cqc")))) + ("objconv" + ,(origin + (method url-fetch) + (uri "http://www.agner.org/optimize/objconv.zip") + (sha256 + (base32 + "1fi7qa2sd9vb35dvkgripjf0fayzg2qmff215f8agfqfiwd1g8qs")))) + ("dsfmt" + ,(origin + (method url-fetch) + (uri (string-append + "http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/" + "SFMT/dSFMT-src-2.2.3.tar.gz")) + (sha256 + (base32 + "03kaqbjbi6viz0n33dk5jlf6ayxqlsq4804n7kwkndiga9s4hd42")))) + ("virtualenv" + ,(origin + (method url-fetch) + (uri (string-append "https://pypi.python.org/packages/24/cc/" + "a3cdf0a49ffcaef483b7e2511476aa520cf7260c199a6928fda6c43ba916/" + "virtualenv-1.11.6.tar.gz")) + (sha256 + (base32 + "1xq4prmg25n9cz5zcvbqx68lmc3kl39by582vd8pzs9f3qalqyiy")))))) (native-inputs `(("perl" ,perl) ("patchelf" ,patchelf) -- cgit v1.2.3 From 266785d21e9ed3fcbecebea302231cf35e303d66 Mon Sep 17 00:00:00 2001 From: Cyril Roelandt Date: Sun, 27 Dec 2015 03:26:11 +0100 Subject: import: pypi: read requirements from wheels. * doc/guix.tex (Invoking guix import): Mention that the pypi importer works better with "unzip". * guix/import/pypi.scm (latest-wheel-release, wheel-url->extracted-directory): New procedures. * tests/pypi.scm (("pypi->guix-package, wheels"): New test. --- doc/guix.texi | 4 +- guix/import/pypi.scm | 113 +++++++++++++++++++++++++++++++++++++++------------ tests/pypi.scm | 78 ++++++++++++++++++++++++++++++++++- 3 files changed, 166 insertions(+), 29 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 46d9e77fe6..0a30b52fca 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -4545,7 +4545,9 @@ Import metadata from the @uref{https://pypi.python.org/, Python Package Index}@footnote{This functionality requires Guile-JSON to be installed. @xref{Requirements}.}. Information is taken from the JSON-formatted description available at @code{pypi.python.org} and usually includes all -the relevant information, including package dependencies. +the relevant information, including package dependencies. For maximum +efficiency, it is recommended to install the @command{unzip} utility, so +that the importer can unzip Python wheels and gather data from them. The command below imports metadata for the @code{itsdangerous} Python package: diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm index de30f4bea6..70ef507666 100644 --- a/guix/import/pypi.scm +++ b/guix/import/pypi.scm @@ -71,6 +71,16 @@ or #f on failure." (raise (condition (&missing-source-error (package pypi-package))))))) +(define (latest-wheel-release pypi-package) + "Return the url of the wheel for the latest release of pypi-package, +or #f if there isn't any." + (let ((releases (assoc-ref* pypi-package "releases" + (assoc-ref* pypi-package "info" "version")))) + (or (find (lambda (release) + (string=? "bdist_wheel" (assoc-ref release "packagetype"))) + releases) + #f))) + (define (python->package-name name) "Given the NAME of a package on PyPI, return a Guix-compliant name for the package." @@ -88,6 +98,11 @@ package on PyPI." ;; '/' + package name + '/' + ... (substring source-url 42 (string-rindex source-url #\/)))) +(define (wheel-url->extracted-directory wheel-url) + (match (string-split (basename wheel-url) #\-) + ((name version _ ...) + (string-append name "-" version ".dist-info")))) + (define (maybe-inputs package-inputs) "Given a list of PACKAGE-INPUTS, tries to generate the 'inputs' field of a package definition." @@ -97,10 +112,10 @@ package definition." ((package-inputs ...) `((inputs (,'quasiquote ,package-inputs)))))) -(define (guess-requirements source-url tarball) - "Given SOURCE-URL and a TARBALL of the package, return a list of the required -packages specified in the requirements.txt file. TARBALL will be extracted in -the current directory, and will be deleted." +(define (guess-requirements source-url wheel-url tarball) + "Given SOURCE-URL, WHEEL-URL and a TARBALL of the package, return a list of +the required packages specified in the requirements.txt file. TARBALL will be +extracted in the current directory, and will be deleted." (define (tarball-directory url) ;; Given the URL of the package's tarball, return the name of the directory @@ -147,26 +162,69 @@ cannot determine package dependencies")) (loop (cons (python->package-name (clean-requirement line)) result)))))))))) - (let ((dirname (tarball-directory source-url))) - (if (string? dirname) - (let* ((req-file (string-append dirname "/requirements.txt")) - (exit-code (system* "tar" "xf" tarball req-file))) - ;; TODO: support more formats. - (if (zero? exit-code) - (dynamic-wind - (const #t) - (lambda () - (read-requirements req-file)) - (lambda () - (delete-file req-file) - (rmdir dirname))) - (begin - (warning (_ "'tar xf' failed with exit code ~a\n") - exit-code) - '()))) - '()))) + (define (read-wheel-metadata wheel-archive) + ;; Given WHEEL-ARCHIVE, a ZIP Python wheel archive, return the package's + ;; requirements. + (let* ((dirname (wheel-url->extracted-directory wheel-url)) + (json-file (string-append dirname "/metadata.json"))) + (and (zero? (system* "unzip" "-q" wheel-archive json-file)) + (dynamic-wind + (const #t) + (lambda () + (call-with-input-file json-file + (lambda (port) + (let* ((metadata (json->scm port)) + (run_requires (hash-ref metadata "run_requires")) + (requirements (hash-ref (list-ref run_requires 0) + "requires"))) + (map (lambda (r) + (python->package-name (clean-requirement r))) + requirements))))) + (lambda () + (delete-file json-file) + (rmdir dirname)))))) + + (define (guess-requirements-from-wheel) + ;; Return the package's requirements using the wheel, or #f if an error + ;; occurs. + (call-with-temporary-output-file + (lambda (temp port) + (if wheel-url + (and (url-fetch wheel-url temp) + (read-wheel-metadata temp)) + #f)))) + + + (define (guess-requirements-from-source) + ;; Return the package's requirements by guessing them from the source. + (let ((dirname (tarball-directory source-url))) + (if (string? dirname) + (let* ((req-file (string-append dirname "/requirements.txt")) + (exit-code (system* "tar" "xf" tarball req-file))) + ;; TODO: support more formats. + (if (zero? exit-code) + (dynamic-wind + (const #t) + (lambda () + (read-requirements req-file)) + (lambda () + (delete-file req-file) + (rmdir dirname))) + (begin + (warning (_ "'tar xf' failed with exit code ~a\n") + exit-code) + '()))) + '()))) + + ;; First, try to compute the requirements using the wheel, since that is the + ;; most reliable option. If a wheel is not provided for this package, try + ;; getting them by reading the "requirements.txt" file from the source. Note + ;; that "requirements.txt" is not mandatory, so this is likely to fail. + (or (guess-requirements-from-wheel) + (guess-requirements-from-source))) + -(define (compute-inputs source-url tarball) +(define (compute-inputs source-url wheel-url tarball) "Given the SOURCE-URL of an already downloaded TARBALL, return a list of name/variable pairs describing the required inputs of this package." (sort @@ -175,13 +233,13 @@ name/variable pairs describing the required inputs of this package." (append '("python-setuptools") ;; Argparse has been part of Python since 2.7. (remove (cut string=? "python-argparse" <>) - (guess-requirements source-url tarball)))) + (guess-requirements source-url wheel-url tarball)))) (lambda args (match args (((a _ ...) (b _ ...)) (string-cilicense (assoc-ref* package "info" "license")))) - (make-pypi-sexp name version release home-page synopsis + (make-pypi-sexp name version release wheel home-page synopsis description license)))))) (define (pypi-package? package) diff --git a/tests/pypi.scm b/tests/pypi.scm index e463467c41..379c288394 100644 --- a/tests/pypi.scm +++ b/tests/pypi.scm @@ -21,7 +21,7 @@ #:use-module (guix base32) #:use-module (guix hash) #:use-module (guix tests) - #:use-module ((guix build utils) #:select (delete-file-recursively)) + #:use-module ((guix build utils) #:select (delete-file-recursively which)) #:use-module (srfi srfi-64) #:use-module (ice-9 match)) @@ -42,6 +42,9 @@ }, { \"url\": \"https://example.com/foo-1.0.0.tar.gz\", \"packagetype\": \"sdist\", + }, { + \"url\": \"https://example.com/foo-1.0.0-py2.py3-none-any.whl\", + \"packagetype\": \"bdist_wheel\", } ] } @@ -56,6 +59,18 @@ bar baz > 13.37") +(define test-metadata + "{ + \"run_requires\": [ + { + \"requires\": [ + \"bar\", + \"baz (>13.37)\" + ] + } + ] +}") + (test-begin "pypi") (test-assert "pypi->guix-package" @@ -77,6 +92,67 @@ baz > 13.37") (delete-file-recursively "foo-1.0.0") (set! test-source-hash (call-with-input-file file-name port-sha256)))) + ("https://example.com/foo-1.0.0-py2.py3-none-any.whl" #f) + (_ (error "Unexpected URL: " url))))) + (match (pypi->guix-package "foo") + (('package + ('name "python-foo") + ('version "1.0.0") + ('source ('origin + ('method 'url-fetch) + ('uri (string-append "https://example.com/foo-" + version ".tar.gz")) + ('sha256 + ('base32 + (? string? hash))))) + ('build-system 'python-build-system) + ('inputs + ('quasiquote + (("python-bar" ('unquote 'python-bar)) + ("python-baz" ('unquote 'python-baz)) + ("python-setuptools" ('unquote 'python-setuptools))))) + ('home-page "http://example.com") + ('synopsis "summary") + ('description "summary") + ('license 'lgpl2.0)) + (string=? (bytevector->nix-base32-string + test-source-hash) + hash)) + (x + (pk 'fail x #f))))) + +(test-skip (if (which "zip") 0 1)) +(test-assert "pypi->guix-package, wheels" + ;; Replace network resources with sample data. + (mock ((guix import utils) url-fetch + (lambda (url file-name) + (match url + ("https://pypi.python.org/pypi/foo/json" + (with-output-to-file file-name + (lambda () + (display test-json)))) + ("https://example.com/foo-1.0.0.tar.gz" + (begin + (mkdir "foo-1.0.0") + (with-output-to-file "foo-1.0.0/requirements.txt" + (lambda () + (display test-requirements))) + (system* "tar" "czvf" file-name "foo-1.0.0/") + (delete-file-recursively "foo-1.0.0") + (set! test-source-hash + (call-with-input-file file-name port-sha256)))) + ("https://example.com/foo-1.0.0-py2.py3-none-any.whl" + (begin + (mkdir "foo-1.0.0.dist-info") + (with-output-to-file "foo-1.0.0.dist-info/metadata.json" + (lambda () + (display test-metadata))) + (let ((zip-file (string-append file-name ".zip"))) + ;; zip always adds a "zip" extension to the file it creates, + ;; so we need to rename it. + (system* "zip" zip-file "foo-1.0.0.dist-info/metadata.json") + (rename-file zip-file file-name)) + (delete-file-recursively "foo-1.0.0.dist-info"))) (_ (error "Unexpected URL: " url))))) (match (pypi->guix-package "foo") (('package -- cgit v1.2.3 From 19c1763113a0dd832eb8a5d6b7d0e83171deb35b Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Fri, 20 May 2016 13:14:50 +0300 Subject: gnu: Add qtsvg. * gnu/packages/qt.scm (qtsvg): New variable. --- gnu/packages/qt.scm | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index c79160f05c..7c3f480000 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -431,6 +431,40 @@ developers using C++ or QML, a CSS & JavaScript like language.") developers using C++ or QML, a CSS & JavaScript like language.") (license (list lgpl2.1 lgpl3)))) +(define-public qtsvg + (package (inherit qtbase) + (name "qtsvg") + (version "5.6.1") + (source (origin + (method url-fetch) + (uri (string-append "https://download.qt.io/official_releases/qt/" + (version-major+minor version) "/" version + "/submodules/" name "-opensource-src-" + version ".tar.xz")) + (sha256 + (base32 + "08ca5g46g75acy27jfnvnalmcias5hxmjp7491v3y4k9y7a4ybpi")))) + (propagated-inputs `()) + (native-inputs `(("perl" ,perl))) + (inputs + `(("mesa" ,mesa) + ("qtbase" ,qtbase) + ("zlib" ,zlib))) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'configure + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (zero? (system* "qmake" (string-append "PREFIX=" out)))))) + (add-before 'install 'fix-Makefiles + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (qtbase (assoc-ref inputs "qtbase"))) + (substitute* (find-files "." "Makefile") + (((string-append "INSTALL_ROOT)" qtbase)) + (string-append "INSTALL_ROOT)" out))))))))))) + (define-public qjson (package (name "qjson") -- cgit v1.2.3 From 9b69421021b1d679c85dcba546afbad364e95fd3 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Fri, 3 Jun 2016 18:39:18 +0300 Subject: gnu: Add qtimageformats. * gnu/packages/qt.scm (qtimageformats): New variable. --- gnu/packages/qt.scm | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 7c3f480000..c3f82423f3 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -465,6 +465,28 @@ developers using C++ or QML, a CSS & JavaScript like language.") (((string-append "INSTALL_ROOT)" qtbase)) (string-append "INSTALL_ROOT)" out))))))))))) +(define-public qtimageformats + (package (inherit qtsvg) + (name "qtimageformats") + (version "5.6.1") + (source (origin + (method url-fetch) + (uri (string-append "https://download.qt.io/official_releases/qt/" + (version-major+minor version) "/" version + "/submodules/" name "-opensource-src-" + version ".tar.xz")) + (sha256 + (base32 + "020v1148433zx4g87z2r8fgff32n0laajxqqsja1l3yzz7jbrwvl")))) + (native-inputs `()) + (inputs + `(("libmng" ,libmng) + ("libtiff" ,libtiff) + ("libwebp" ,libwebp) + ("mesa" ,mesa) + ("qtbase" ,qtbase) + ("zlib" ,zlib))))) + (define-public qjson (package (name "qjson") -- cgit v1.2.3 From f6c13613af6abd71ff041939255f7dfddbbeba82 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Sun, 5 Jun 2016 01:06:22 +0300 Subject: gnu: Add qtx11extras. * gnu/packages/qt.scm (qtx11extras): New variable. --- gnu/packages/qt.scm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index c3f82423f3..41cfd5f7c9 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -487,6 +487,24 @@ developers using C++ or QML, a CSS & JavaScript like language.") ("qtbase" ,qtbase) ("zlib" ,zlib))))) +(define-public qtx11extras + (package (inherit qtsvg) + (name "qtx11extras") + (version "5.6.1") + (source (origin + (method url-fetch) + (uri (string-append "https://download.qt.io/official_releases/qt/" + (version-major+minor version) "/" version + "/submodules/" name "-opensource-src-" + version ".tar.xz")) + (sha256 + (base32 + "0l736qiz8adrnh267xz63hv4sph6nhy90h836qfnnmv3p78ipsz8")))) + (native-inputs `(("perl" ,perl))) + (inputs + `(("mesa" ,mesa) + ("qtbase" ,qtbase))))) + (define-public qjson (package (name "qjson") -- cgit v1.2.3 From 98eec7128081126fb32f91b580a345ccf7552835 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Sun, 5 Jun 2016 06:55:24 +0300 Subject: gnu: Add qtxmlpatterns. * gnu/packages/qt.scm (qtxmlpatterns): New variable. --- gnu/packages/qt.scm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 41cfd5f7c9..313fcd21bd 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -505,6 +505,22 @@ developers using C++ or QML, a CSS & JavaScript like language.") `(("mesa" ,mesa) ("qtbase" ,qtbase))))) +(define-public qtxmlpatterns + (package (inherit qtsvg) + (name "qtxmlpatterns") + (version "5.6.1") + (source (origin + (method url-fetch) + (uri (string-append "https://download.qt.io/official_releases/qt/" + (version-major+minor version) "/" version + "/submodules/" name "-opensource-src-" + version ".tar.xz")) + (sha256 + (base32 + "0q412jv3xbg7v05b8pbahifwx17gzlp96s90akh6zwhpm8i6xx34")))) + (native-inputs `(("perl" ,perl))) + (inputs `(("qtbase" ,qtbase))))) + (define-public qjson (package (name "qjson") -- cgit v1.2.3 From e3a2ed81519a55f9bb777134382b6d026e925ee8 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 6 Jun 2016 16:30:22 +0300 Subject: gnu: Add qtdeclarative. * gnu/packages/qt.scm (qtdeclarative): New variable. --- gnu/packages/qt.scm | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 313fcd21bd..fb8716391e 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -521,6 +521,29 @@ developers using C++ or QML, a CSS & JavaScript like language.") (native-inputs `(("perl" ,perl))) (inputs `(("qtbase" ,qtbase))))) +(define-public qtdeclarative + (package (inherit qtsvg) + (name "qtdeclarative") + (version "5.6.1") + (source (origin + (method url-fetch) + (uri (string-append "https://download.qt.io/official_releases/qt/" + (version-major+minor version) "/" version + "/submodules/" name "-opensource-src-" + version ".tar.xz")) + (sha256 + (base32 + "1d2217kxk85kpi7ls08b41hqzy26hvch8m4cgzq6km5sqi5zvz0j")))) + (native-inputs + `(("perl" ,perl) + ("pkg-config" ,pkg-config) + ("python" ,python-2) + ("qtsvg" ,qtsvg) + ("qtxmlpatterns" ,qtxmlpatterns))) + (inputs + `(("mesa" ,mesa) + ("qtbase" ,qtbase))))) + (define-public qjson (package (name "qjson") -- cgit v1.2.3 From e98cb96d69b8aa743c62c4f73c69e8cb16c0e5e4 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 6 Jun 2016 19:43:59 +0300 Subject: gnu: Add qtconnectivity. * gnu/packages/qt.scm (qtconnectivity): New variable. --- gnu/packages/qt.scm | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index fb8716391e..c9770050a9 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -544,6 +544,27 @@ developers using C++ or QML, a CSS & JavaScript like language.") `(("mesa" ,mesa) ("qtbase" ,qtbase))))) +(define-public qtconnectivity + (package (inherit qtsvg) + (name "qtconnectivity") + (version "5.6.1") + (source (origin + (method url-fetch) + (uri (string-append "https://download.qt.io/official_releases/qt/" + (version-major+minor version) "/" version + "/submodules/" name "-opensource-src-" + version ".tar.xz")) + (sha256 + (base32 + "06fr9321f52kf0nda9zjjfzp5694hbnx0y0v315iw28mnpvandas")))) + (native-inputs + `(("perl" ,perl) + ("pkg-config" ,pkg-config) + ("qtdeclarative" ,qtdeclarative))) + (inputs + `(("bluez" ,bluez) + ("qtbase" ,qtbase))))) + (define-public qjson (package (name "qjson") -- cgit v1.2.3 From cac893ec09f7f1b1922e42f85f45235c603b220d Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 6 Jun 2016 20:05:47 +0300 Subject: gnu: Add qtwebsockets. * gnu/packages/qt.scm (qtwebsockets): New variable. --- gnu/packages/qt.scm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index c9770050a9..e25081bfba 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -565,6 +565,24 @@ developers using C++ or QML, a CSS & JavaScript like language.") `(("bluez" ,bluez) ("qtbase" ,qtbase))))) +(define-public qtwebsockets + (package (inherit qtsvg) + (name "qtwebsockets") + (version "5.6.1") + (source (origin + (method url-fetch) + (uri (string-append "https://download.qt.io/official_releases/qt/" + (version-major+minor version) "/" version + "/submodules/" name "-opensource-src-" + version ".tar.xz")) + (sha256 + (base32 + "0fkj52i4yi6gmq4jfjgdij08cspxspac6mbpf0fknnllimmkl7jm")))) + (native-inputs + `(("perl" ,perl) + ("qtdeclarative" ,qtdeclarative))) + (inputs `(("qtbase" ,qtbase))))) + (define-public qjson (package (name "qjson") -- cgit v1.2.3 From 3474767cbd46102e3398a421e63223eace009a67 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 6 Jun 2016 20:14:45 +0300 Subject: gnu: Add qtsensors. * gnu/packages/qt.scm (qtsensors): New variable. --- gnu/packages/qt.scm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index e25081bfba..81334a3f78 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -583,6 +583,24 @@ developers using C++ or QML, a CSS & JavaScript like language.") ("qtdeclarative" ,qtdeclarative))) (inputs `(("qtbase" ,qtbase))))) +(define-public qtsensors + (package (inherit qtsvg) + (name "qtsensors") + (version "5.6.1") + (source (origin + (method url-fetch) + (uri (string-append "https://download.qt.io/official_releases/qt/" + (version-major+minor version) "/" version + "/submodules/" name "-opensource-src-" + version ".tar.xz")) + (sha256 + (base32 + "0bll7ll6s5g8w89knyrc0famjwqyfzwpn512m1f96bf6xwacs967")))) + (native-inputs + `(("perl" ,perl) + ("qtdeclarative" ,qtdeclarative))) + (inputs `(("qtbase" ,qtbase))))) + (define-public qjson (package (name "qjson") -- cgit v1.2.3 From 15378f93b995ed9457ac85825846568d3222ab82 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 6 Jun 2016 21:50:41 +0300 Subject: gnu: Add qtmultimedia. * gnu/packages/qt.scm (qtmultimedia): New variable. --- gnu/packages/qt.scm | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 81334a3f78..70e6f71fe5 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -601,6 +601,30 @@ developers using C++ or QML, a CSS & JavaScript like language.") ("qtdeclarative" ,qtdeclarative))) (inputs `(("qtbase" ,qtbase))))) +(define-public qtmultimedia + (package (inherit qtsvg) + (name "qtmultimedia") + (version "5.6.1") + (source (origin + (method url-fetch) + (uri (string-append "https://download.qt.io/official_releases/qt/" + (version-major+minor version) "/" version + "/submodules/" name "-opensource-src-" + version ".tar.xz")) + (sha256 + (base32 + "058523c2qra3d8fq46ygcndnkrbwlh316zy28s2cr5pjr5gmnjyj")))) + (native-inputs + `(("perl" ,perl) + ("pkg-config" ,pkg-config) + ("python" ,python-2) + ("qtdeclarative" ,qtdeclarative))) + (inputs + `(("alsa-lib" ,alsa-lib) + ("mesa" ,mesa) + ("pulseaudio" ,pulseaudio) + ("qtbase" ,qtbase))))) + (define-public qjson (package (name "qjson") -- cgit v1.2.3 From bc8ede015021e5dcffd55e2eb6c6a6299d87e997 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Wed, 8 Jun 2016 20:21:16 +0300 Subject: gnu: Add qtwayland. * gnu/packages/qt.scm (qtwayland): New variable. --- gnu/packages/qt.scm | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 70e6f71fe5..8b84730569 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -35,6 +35,7 @@ #:use-module (gnu packages databases) #:use-module (gnu packages fontutils) #:use-module (gnu packages flex) + #:use-module (gnu packages freedesktop) #:use-module (gnu packages gl) #:use-module (gnu packages glib) #:use-module (gnu packages gnuzilla) @@ -625,6 +626,37 @@ developers using C++ or QML, a CSS & JavaScript like language.") ("pulseaudio" ,pulseaudio) ("qtbase" ,qtbase))))) +(define-public qtwayland + (package (inherit qtsvg) + (name "qtwayland") + (version "5.6.1") + (source (origin + (method url-fetch) + (uri (string-append "https://download.qt.io/official_releases/qt/" + (version-major+minor version) "/" version + "/submodules/" name "-opensource-src-" + version ".tar.xz")) + (sha256 + (base32 + "1jgghjfrg0wwyfzfwgwhagwxz9k936ylv3w2l9bwlpql8rgm8d11")))) + (native-inputs + `(("glib" ,glib) + ("perl" ,perl) + ("pkg-config" ,pkg-config) + ("qtdeclarative" ,qtdeclarative))) + (inputs + `(("fontconfig" ,fontconfig) + ("freetype" ,freetype) + ("libx11" ,libx11) + ("libxcomposite" ,libxcomposite) + ("libxext" ,libxext) + ("libxkbcommon" ,libxkbcommon) + ("libxrender" ,libxrender) + ("mesa" ,mesa) + ("mtdev" ,mtdev) + ("qtbase" ,qtbase) + ("wayland" ,wayland))))) + (define-public qjson (package (name "qjson") -- cgit v1.2.3 From 00806f2bb9fcfe76a0c37c6698a7af946d395ae6 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 9 Jun 2016 23:41:39 +0300 Subject: gnu: Add qtserialport. * gnu/packages/qt.scm (qtserialport): New variable. --- gnu/packages/qt.scm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 8b84730569..ba3f511d5f 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -657,6 +657,22 @@ developers using C++ or QML, a CSS & JavaScript like language.") ("qtbase" ,qtbase) ("wayland" ,wayland))))) +(define-public qtserialport + (package (inherit qtsvg) + (name "qtserialport") + (version "5.6.1") + (source (origin + (method url-fetch) + (uri (string-append "https://download.qt.io/official_releases/qt/" + (version-major+minor version) "/" version + "/submodules/" name "-opensource-src-" + version ".tar.xz")) + (sha256 + (base32 + "1hp63cgqhps6y1k041lzhcb2b0rcpcmszabnn293q5ilbvla4x0b")))) + (native-inputs `(("perl" ,perl))) + (inputs `(("qtbase" ,qtbase))))) + (define-public qjson (package (name "qjson") -- cgit v1.2.3 From f5377013d64fae24162eb85a6c3d607b3424c883 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 9 Jun 2016 23:56:18 +0300 Subject: gnu: Add qtwebchannel. * gnu/packages/qt.scm (qtwebchannel): New variable. --- gnu/packages/qt.scm | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index ba3f511d5f..706307d1e9 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -673,6 +673,25 @@ developers using C++ or QML, a CSS & JavaScript like language.") (native-inputs `(("perl" ,perl))) (inputs `(("qtbase" ,qtbase))))) +(define-public qtwebchannel + (package (inherit qtsvg) + (name "qtwebchannel") + (version "5.6.1") + (source (origin + (method url-fetch) + (uri (string-append "https://download.qt.io/official_releases/qt/" + (version-major+minor version) "/" version + "/submodules/" name "-opensource-src-" + version ".tar.xz")) + (sha256 + (base32 + "01q80917a1048hdhaii4v50dqs84h16lc9w3v99r9xvspk8vab7q")))) + (native-inputs + `(("perl" ,perl) + ("qtdeclarative" ,qtdeclarative) + ("qtwebsockets" ,qtwebsockets))) + (inputs `(("qtbase" ,qtbase))))) + (define-public qjson (package (name "qjson") -- cgit v1.2.3 From d5ca54ce475572c1126e1b91d5df2a05c614ec69 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Fri, 10 Jun 2016 07:49:43 +0300 Subject: gnu: Add qtlocation. * gnu/packages/qt.scm (qtlocation): New variable. --- gnu/packages/qt.scm | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 706307d1e9..7f169c0974 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -692,6 +692,26 @@ developers using C++ or QML, a CSS & JavaScript like language.") ("qtwebsockets" ,qtwebsockets))) (inputs `(("qtbase" ,qtbase))))) +(define-public qtlocation + (package (inherit qtsvg) + (name "qtlocation") + (version "5.6.1") + (source (origin + (method url-fetch) + (uri (string-append "https://download.qt.io/official_releases/qt/" + (version-major+minor version) "/" version + "/submodules/" name "-opensource-src-" + version ".tar.xz")) + (sha256 + (base32 + "0qahs7a2n3l4h0bl8bnwci9mzy1vra3zncnzr40csic9ys67ddfk")))) + (native-inputs + `(("perl" ,perl) + ("qtdeclarative" ,qtdeclarative) + ;("qtquickcontrols" ,qtquickcontrols) + ("qtserialport" ,qtserialport))) + (inputs `(("qtbase" ,qtbase))))) + (define-public qjson (package (name "qjson") -- cgit v1.2.3 From d438c9683bdd1cdc8f0f6f1bebe669433acc0aca Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Fri, 10 Jun 2016 14:36:30 +0300 Subject: gnu: Add qttools. * gnu/packages/qt.scm (qttools): New variable. --- gnu/packages/qt.scm | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 7f169c0974..cab1f30db5 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -712,6 +712,26 @@ developers using C++ or QML, a CSS & JavaScript like language.") ("qtserialport" ,qtserialport))) (inputs `(("qtbase" ,qtbase))))) +(define-public qttools + (package (inherit qtsvg) + (name "qttools") + (version "5.6.1") + (source (origin + (method url-fetch) + (uri (string-append "https://download.qt.io/official_releases/qt/" + (version-major+minor version) "/" version + "/submodules/" name "-opensource-src-" + version ".tar.xz")) + (sha256 + (base32 + "0wbzq60d7lkvlb7b5lqcw87qgy6kyjz1npjavz8f4grdxsaqi8vp")))) + (native-inputs + `(("perl" ,perl) + ("qtdeclarative" ,qtdeclarative))) + (inputs + `(("mesa" ,mesa) + ("qtbase" ,qtbase))))) + (define-public qjson (package (name "qjson") -- cgit v1.2.3 From e2788cef13eaf9634614f00044c9773e4a52a2d9 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Wed, 15 Jun 2016 11:26:10 +0300 Subject: gnu: pinentry-qt: Build with qtbase. * gnu/packages/gnupg.scm (pinentry-qt)[inputs]: Remove qt, add qtbase. --- gnu/packages/gnupg.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index e6583e5e6f..c5055b6647 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -611,7 +611,7 @@ passphrase when @code{gpg} or @code{gpg2} is run and needs it."))) (inherit pinentry-tty) (name "pinentry-qt") (inputs - `(("qt" ,qt) + `(("qtbase" ,qtbase) ,@(package-inputs pinentry-tty))) (description "Pinentry provides a console and a Qt GUI that allows users to enter a -- cgit v1.2.3 From 6dc554fa2a82ae049411af28facba2039e3db79e Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Wed, 15 Jun 2016 11:39:20 +0300 Subject: gnu: pumpa: Build with qtbase. * gnu/packages/pumpio.scm (pumpa)[inputs]: Remove qt, add qtbase. --- gnu/packages/pumpio.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/pumpio.scm b/gnu/packages/pumpio.scm index 821090790e..9d705ea3d5 100644 --- a/gnu/packages/pumpio.scm +++ b/gnu/packages/pumpio.scm @@ -60,7 +60,7 @@ %standard-phases))) (inputs `(("aspell" ,aspell) - ("qt" ,qt) + ("qtbase" ,qtbase) ("qjson" ,qjson) ("tidy" ,tidy))) (synopsis "Qt-based pump.io client") -- cgit v1.2.3 From 5257ab6de29b15e9d663311e8f3b291363d44344 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 14 Jun 2016 21:34:07 +0200 Subject: packages: Recognize the '.Z' extension. Reported by thomasd on #guix. * guix/packages.scm (patch-and-repack)[decompression-type]: Add "Z". --- guix/packages.scm | 1 + 1 file changed, 1 insertion(+) diff --git a/guix/packages.scm b/guix/packages.scm index d62d1f3343..5cba5a5121 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -406,6 +406,7 @@ IMPORTED-MODULES specify modules to use/import for use by SNIPPET." (define decompression-type (cond ((string-suffix? "gz" source-file-name) "gzip") + ((string-suffix? "Z" source-file-name) "gzip") ((string-suffix? "bz2" source-file-name) "bzip2") ((string-suffix? "lz" source-file-name) "lzip") ((string-suffix? "zip" source-file-name) "unzip") -- cgit v1.2.3 From 789510640d8ac30298c45d0edc80ec9078aa3afd Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 15 Jun 2016 10:16:56 +0200 Subject: packages: 'origin->derivation' expects an origin and nothing else. * guix/packages.scm (origin->derivation): Rename 'source' parameter to 'origin'. Move cases where SOURCE is a string to... (package-source-derivation): ... here. --- guix/packages.scm | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/guix/packages.scm b/guix/packages.scm index 5cba5a5121..1e816179a6 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -1129,12 +1129,10 @@ cross-compilation target triplet." (package->cross-derivation package target system) (package->derivation package system))) -(define* (origin->derivation source +(define* (origin->derivation origin #:optional (system (%current-system))) - "When SOURCE is an object, return its derivation for SYSTEM. When -SOURCE is a file name, return either the interned file name (if SOURCE is -outside of the store) or SOURCE itself (if SOURCE is already a store item.)" - (match source + "Return the derivation corresponding to ORIGIN." + (match origin (($ uri method sha256 name (= force ()) #f) ;; No patches, no snippet: this is a fixed-output derivation. (method uri 'sha256 sha256 name #:system system)) @@ -1155,18 +1153,24 @@ outside of the store) or SOURCE itself (if SOURCE is already a store item.)" #:system system #:modules modules #:imported-modules modules - #:guile-for-build guile))) - ((and (? string?) (? direct-store-path?) file) - (with-monad %store-monad - (return file))) - ((? string? file) - (interned-file file (basename file) - #:recursive? #t)))) + #:guile-for-build guile))))) (define-gexp-compiler (origin-compiler (origin origin?) system target) ;; Compile ORIGIN to a derivation for SYSTEM. This is used when referring ;; to an origin from within a gexp. (origin->derivation origin system)) -(define package-source-derivation - (store-lower origin->derivation)) +(define package-source-derivation ;somewhat deprecated + (let ((lower (store-lower origin->derivation))) + (lambda* (store source #:optional (system (%current-system))) + "Return the derivation or file corresponding to SOURCE, which can be an + or a file name. When SOURCE is a file name, return either the +interned file name (if SOURCE is outside of the store) or SOURCE itself (if +SOURCE is already a store item.)" + (match source + ((and (? string?) (? direct-store-path?) file) + file) + ((? string? file) + (add-to-store store (basename file) #t "sha256" file)) + (_ + (lower store source system)))))) -- cgit v1.2.3 From da675305ddf2ba574e309e515d18ae1f778297be Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 15 Jun 2016 10:38:46 +0200 Subject: packages: The 'source' can be any lowerable object. * guix/packages.scm (expand-input): Use 'struct?' instead of 'origin?' when matching SOURCE. (package-source-derivation): Use 'lower-object' instead of 'origin->derivation'. * tests/packages.scm ("package-source-derivation, local-file"): New test. * doc/guix.texi (package Reference): Update 'source' documentation accordingly. --- doc/guix.texi | 8 ++++++-- guix/packages.scm | 10 +++++----- tests/packages.scm | 15 +++++++++++++++ 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 0a30b52fca..18a1960cf7 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -2503,8 +2503,12 @@ The name of the package, as a string. The version of the package, as a string. @item @code{source} -An origin object telling how the source code for the package should be -acquired (@pxref{origin Reference}). +An object telling how the source code for the package should be +acquired. Most of the time, this is an @code{origin} object, which +denotes a file fetched from the Internet (@pxref{origin Reference}). It +can also be any other ``file-like'' object such as a @code{local-file}, +which denotes a file from the local file system (@pxref{G-Expressions, +@code{local-file}}). @item @code{build-system} The build system that should be used to build the package (@pxref{Build diff --git a/guix/packages.scm b/guix/packages.scm index 1e816179a6..05a632cf05 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -792,7 +792,7 @@ information in exceptions." ;; store path, it needs to be added anyway, so it can be used as a ;; source. (list name (intern file))) - (((? string? name) (? origin? source)) + (((? string? name) (? struct? source)) (list name (package-source-derivation store source system))) (x (raise (condition (&package-input-error @@ -1161,12 +1161,12 @@ cross-compilation target triplet." (origin->derivation origin system)) (define package-source-derivation ;somewhat deprecated - (let ((lower (store-lower origin->derivation))) + (let ((lower (store-lower lower-object))) (lambda* (store source #:optional (system (%current-system))) "Return the derivation or file corresponding to SOURCE, which can be an - or a file name. When SOURCE is a file name, return either the -interned file name (if SOURCE is outside of the store) or SOURCE itself (if -SOURCE is already a store item.)" +a file name or any object handled by 'lower-object', such as an . +When SOURCE is a file name, return either the interned file name (if SOURCE is +outside of the store) or SOURCE itself (if SOURCE is already a store item.)" (match source ((and (? string?) (? direct-store-path?) file) file) diff --git a/tests/packages.scm b/tests/packages.scm index 94e8150b75..d3f432ada2 100644 --- a/tests/packages.scm +++ b/tests/packages.scm @@ -21,6 +21,7 @@ #:use-module (guix store) #:use-module (guix monads) #:use-module (guix grafts) + #:use-module ((guix gexp) #:select (local-file local-file-file)) #:use-module ((guix utils) ;; Rename the 'location' binding to allow proper syntax ;; matching when setting the 'location' field of a package. @@ -295,6 +296,20 @@ (and (direct-store-path? source) (string-suffix? "utils.scm" source)))) +(test-assert "package-source-derivation, local-file" + (let* ((file (local-file "../guix/base32.scm")) + (package (package (inherit (dummy-package "p")) + (source file))) + (source (package-source-derivation %store + (package-source package)))) + (and (store-path? source) + (string-suffix? "base32.scm" source) + (valid-path? %store source) + (equal? (call-with-input-file source get-bytevector-all) + (call-with-input-file + (search-path %load-path "guix/base32.scm") + get-bytevector-all))))) + (unless (network-reachable?) (test-skip 1)) (test-equal "package-source-derivation, snippet" "OK" -- cgit v1.2.3 From 0fb9a15bb5faf34214689810ff98b23a4295f04e Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 15 Jun 2016 11:02:16 +0200 Subject: gnu: grue-hunter: Move to (gnu packages games). * gnu/packages/grue-hunter.scm: Remove. Move contents to... * gnu/packages/games.scm (grue-hunter): ... here. New variable. * gnu/local.mk (GNU_SYSTEM_MODULES): Adjust accordingly. --- gnu/local.mk | 1 - gnu/packages/games.scm | 58 ++++++++++++++++++++++++++++++ gnu/packages/grue-hunter.scm | 84 -------------------------------------------- 3 files changed, 58 insertions(+), 85 deletions(-) delete mode 100644 gnu/packages/grue-hunter.scm diff --git a/gnu/local.mk b/gnu/local.mk index 73aef0aa8e..df1e76979c 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -154,7 +154,6 @@ GNU_SYSTEM_MODULES = \ %D%/packages/graphviz.scm \ %D%/packages/groff.scm \ %D%/packages/grub.scm \ - %D%/packages/grue-hunter.scm \ %D%/packages/gsasl.scm \ %D%/packages/gstreamer.scm \ %D%/packages/gtk.scm \ diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 9f4a4f9e81..b0bf4e3546 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -20,6 +20,7 @@ ;;; Copyright © 2016 Albin Söderqvist ;;; Copyright © 2016 Kei Kebreau ;;; Copyright © 2016 Alex Griffin +;;; Copyright © 2013 Nikita Karetnikov ;;; ;;; This file is part of GNU Guix. ;;; @@ -2338,3 +2339,60 @@ Super Game Boy, BS-X Satellaview, and Sufami Turbo.") ;; - icarus/icarus.cpp ;; - higan/emulator/emulator.hpp (license license:gpl3))) + +(define-public grue-hunter + (package + (name "grue-hunter") + (version "1.0") + (source (origin + (method url-fetch) + (uri (string-append "https://jxself.org/" name ".tar.gz")) + (sha256 + (base32 + "1hjcpy5439qs3v2zykis7hsi0i17zjs62gks3zd8mnfw9ni4i2h3")))) + (build-system trivial-build-system) ; no Makefile.PL + (arguments `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils)) + (use-modules (srfi srfi-1)) + + (let* ((tarball (assoc-ref %build-inputs "tarball")) + (perl (string-append (assoc-ref %build-inputs + "perl") + "/bin")) + (gunzip (string-append (assoc-ref %build-inputs + "gzip") + "/bin/gunzip")) + (tar (string-append (assoc-ref %build-inputs + "tar") + "/bin/tar")) + (out (assoc-ref %outputs "out")) + (bin (string-append out "/bin")) + (doc (string-append out "/share/doc"))) + (begin + (mkdir out) + (copy-file tarball "grue-hunter.tar.gz") + (zero? (system* gunzip "grue-hunter.tar.gz")) + (zero? (system* tar "xvf" "grue-hunter.tar")) + + (mkdir-p bin) + (copy-file "grue-hunter/gh.pl" + (string-append bin "/grue-hunter")) + (patch-shebang (string-append bin "/grue-hunter") + (list perl)) + + (mkdir-p doc) + (copy-file "grue-hunter/AGPLv3.txt" + (string-append doc "/grue-hunter"))))))) + (inputs `(("perl" ,perl) + ("tar" ,tar) + ("gzip" ,gzip) + ("tarball" ,source))) + (home-page "http://jxself.org/grue-hunter.shtml") + (synopsis "Text adventure game") + (description + "Grue Hunter is a text adventure game written in Perl. You must make +your way through an underground cave system in search of the Grue. Can you +capture it and get out alive?") + (license license:agpl3+))) diff --git a/gnu/packages/grue-hunter.scm b/gnu/packages/grue-hunter.scm deleted file mode 100644 index 71eee96daf..0000000000 --- a/gnu/packages/grue-hunter.scm +++ /dev/null @@ -1,84 +0,0 @@ -;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013 Nikita Karetnikov -;;; -;;; 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 . - -(define-module (gnu packages grue-hunter) - #:use-module (guix licenses) - #:use-module (guix packages) - #:use-module (guix download) - #:use-module (guix build-system trivial) - #:use-module (gnu packages base) - #:use-module (gnu packages compression) - #:use-module (gnu packages perl)) - -(define-public grue-hunter - (package - (name "grue-hunter") - (version "1.0") - (source - (origin - (method url-fetch) - (uri (string-append "https://jxself.org/" name ".tar.gz")) - (sha256 - (base32 - "1hjcpy5439qs3v2zykis7hsi0i17zjs62gks3zd8mnfw9ni4i2h3")))) - (build-system trivial-build-system) ; no Makefile.PL - (arguments `(#:modules ((guix build utils)) - #:builder - (begin - (use-modules (guix build utils)) - (use-modules (srfi srfi-1)) - - (let* ((tarball (assoc-ref %build-inputs "tarball")) - (perl (string-append (assoc-ref %build-inputs - "perl") - "/bin")) - (gunzip (string-append (assoc-ref %build-inputs - "gzip") - "/bin/gunzip")) - (tar (string-append (assoc-ref %build-inputs - "tar") - "/bin/tar")) - (out (assoc-ref %outputs "out")) - (bin (string-append out "/bin")) - (doc (string-append out "/share/doc"))) - (begin - (mkdir out) - (copy-file tarball "grue-hunter.tar.gz") - (zero? (system* gunzip "grue-hunter.tar.gz")) - (zero? (system* tar "xvf" "grue-hunter.tar")) - - (mkdir-p bin) - (copy-file "grue-hunter/gh.pl" - (string-append bin "/grue-hunter")) - (patch-shebang (string-append bin "/grue-hunter") - (list perl)) - - (mkdir-p doc) - (copy-file "grue-hunter/AGPLv3.txt" - (string-append doc "/grue-hunter"))))))) - (inputs `(("perl" ,perl) - ("tar" ,tar) - ("gzip" ,gzip) - ("tarball" ,source))) - (home-page "http://jxself.org/grue-hunter.shtml") - (synopsis "Text adventure game") - (description - "Grue Hunter is a text adventure game written in Perl. You must make -your way through an underground cave system in search of the Grue. Can you -capture it and get out alive?") - (license agpl3+))) -- cgit v1.2.3 From 1ec32f4a9d35f235a9947f288370af1445f8ab8b Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 15 Jun 2016 11:51:16 +0200 Subject: store: Add #:select? parameter to 'add-to-store'. * guix/store.scm (write-arg): Remove 'file' case. (true): New procedure. (add-to-store): Add #:select? parameter and honor it. Use hand-coded stub instead of 'operation'. (interned-file): Add #:select? parameter and honor it. * doc/guix.texi (The Store Monad): Adjust 'interned-file' documentation accordingly. --- doc/guix.texi | 7 ++++++- guix/store.scm | 60 ++++++++++++++++++++++++++++++++++++++++------------------ 2 files changed, 48 insertions(+), 19 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 18a1960cf7..97c01be213 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -3502,7 +3502,7 @@ resulting text file refers to; it defaults to the empty list. @end deffn @deffn {Monadic Procedure} interned-file @var{file} [@var{name}] @ - [#:recursive? #t] + [#:recursive? #t] [#:select? (const #t)] Return the name of @var{file} once interned in the store. Use @var{name} as its store name, or the basename of @var{file} if @var{name} is omitted. @@ -3511,6 +3511,11 @@ When @var{recursive?} is true, the contents of @var{file} are added recursively; if @var{file} designates a flat file and @var{recursive?} is true, its contents are added, and its permission bits are kept. +When @var{recursive?} is true, call @code{(@var{select?} @var{file} +@var{stat})} for each directory entry, where @var{file} is the entry's +absolute file name and @var{stat} is the result of @code{lstat}; exclude +entries for which @var{select?} does not return true. + The example below adds a file to the store, under two different names: @example diff --git a/guix/store.scm b/guix/store.scm index e3033ee61a..a64016611d 100644 --- a/guix/store.scm +++ b/guix/store.scm @@ -263,14 +263,12 @@ (path-info deriver hash refs registration-time nar-size))) (define-syntax write-arg - (syntax-rules (integer boolean file string string-list string-pairs + (syntax-rules (integer boolean string string-list string-pairs store-path store-path-list base16) ((_ integer arg p) (write-int arg p)) ((_ boolean arg p) (write-int (if arg 1 0) p)) - ((_ file arg p) - (write-file arg p)) ((_ string arg p) (write-string arg p)) ((_ string-list arg p) @@ -653,30 +651,51 @@ path." (hash-set! cache args path) path)))))) +(define true + ;; Define it once and for all since we use it as a default value for + ;; 'add-to-store' and want to make sure two default values are 'eq?' for the + ;; purposes or memoization. + (lambda (file stat) + #t)) + (define add-to-store ;; A memoizing version of `add-to-store'. This is important because ;; `add-to-store' leads to huge data transfers to the server, and ;; because it's often called many times with the very same argument. - (let ((add-to-store (operation (add-to-store (string basename) - (boolean fixed?) ; obsolete, must be #t - (boolean recursive?) - (string hash-algo) - (file file-name)) - #f - store-path))) - (lambda (server basename recursive? hash-algo file-name) + (let ((add-to-store + (lambda* (server basename recursive? hash-algo file-name + #:key (select? true)) + ;; We don't use the 'operation' macro so we can pass SELECT? to + ;; 'write-file'. + (let ((port (nix-server-socket server))) + (write-int (operation-id add-to-store) port) + (write-string basename port) + (write-int 1 port) ;obsolete, must be #t + (write-int (if recursive? 1 0) port) + (write-string hash-algo port) + (write-file file-name port #:select? select?) + (let loop ((done? (process-stderr server))) + (or done? (loop (process-stderr server)))) + (read-store-path port))))) + (lambda* (server basename recursive? hash-algo file-name + #:key (select? true)) "Add the contents of FILE-NAME under BASENAME to the store. When RECURSIVE? is false, FILE-NAME must designate a regular file--not a directory nor a symlink. When RECURSIVE? is true and FILE-NAME designates a directory, the contents of FILE-NAME are added recursively; if FILE-NAME designates a flat file and RECURSIVE? is true, its contents are added, and its permission -bits are kept. HASH-ALGO must be a string such as \"sha256\"." +bits are kept. HASH-ALGO must be a string such as \"sha256\". + +When RECURSIVE? is true, call (SELECT? FILE STAT) for each directory entry, +where FILE is the entry's absolute file name and STAT is the result of +'lstat'; exclude entries for which SELECT? does not return true." (let* ((st (false-if-exception (lstat file-name))) - (args `(,st ,basename ,recursive? ,hash-algo)) + (args `(,st ,basename ,recursive? ,hash-algo ,select?)) (cache (nix-server-add-to-store-cache server))) (or (and st (hash-ref cache args)) - (let ((path (add-to-store server basename #t recursive? - hash-algo file-name))) + (let ((path (add-to-store server basename recursive? + hash-algo file-name + #:select? select?))) (hash-set! cache args path) path)))))) @@ -1111,16 +1130,21 @@ resulting text file refers to; it defaults to the empty list." store))) (define* (interned-file file #:optional name - #:key (recursive? #t)) + #:key (recursive? #t) (select? true)) "Return the name of FILE once interned in the store. Use NAME as its store name, or the basename of FILE if NAME is omitted. When RECURSIVE? is true, the contents of FILE are added recursively; if FILE designates a flat file and RECURSIVE? is true, its contents are added, and its -permission bits are kept." +permission bits are kept. + +When RECURSIVE? is true, call (SELECT? FILE STAT) for each directory entry, +where FILE is the entry's absolute file name and STAT is the result of +'lstat'; exclude entries for which SELECT? does not return true." (lambda (store) (values (add-to-store store (or name (basename file)) - recursive? "sha256" file) + recursive? "sha256" file + #:select? select?) store))) (define build -- cgit v1.2.3 From d3a858cb32b68bf2e2ebb97c67dfca97ab59690d Mon Sep 17 00:00:00 2001 From: Hartmut Goebel Date: Tue, 14 Jun 2016 23:14:13 +0200 Subject: gnu: Add teensy-loader-cli. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/flashing-tools.scm (teensy-loader-cli): New variable. * gnu/packages/patches/teensy-loader-cli-help.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. Co-authored-by: Ludovic Courtès --- gnu/local.mk | 1 + gnu/packages/flashing-tools.scm | 51 +++++++++++++++++++++++ gnu/packages/patches/teensy-loader-cli-help.patch | 33 +++++++++++++++ 3 files changed, 85 insertions(+) create mode 100644 gnu/packages/patches/teensy-loader-cli-help.patch diff --git a/gnu/local.mk b/gnu/local.mk index df1e76979c..834a6e5cee 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -774,6 +774,7 @@ dist_patch_DATA = \ %D%/packages/patches/tcl-mkindex-deterministic.patch \ %D%/packages/patches/tclxml-3.2-install.patch \ %D%/packages/patches/tcsh-fix-autotest.patch \ + %D%/packages/patches/teensy-loader-cli-help.patch \ %D%/packages/patches/texi2html-document-encoding.patch \ %D%/packages/patches/texi2html-i18n.patch \ %D%/packages/patches/tidy-CVE-2015-5522+5523.patch \ diff --git a/gnu/packages/flashing-tools.scm b/gnu/packages/flashing-tools.scm index 37a10726e3..0ab8bc57ee 100644 --- a/gnu/packages/flashing-tools.scm +++ b/gnu/packages/flashing-tools.scm @@ -160,3 +160,54 @@ With dfu-util you are able to download firmware to your device or upload firmware from it.") (home-page "http://dfu-util.sourceforge.net/") (license gpl2+))) + +(define-public teensy-loader-cli + ;; The repo does not tag versions nor does it use releases, but a commit + ;; message says "Importing 2.1", while the sourcce still says "2.0". So pin + ;; to a fixed commit. + (let ((commit "f289b7a2e5627464044249f0e5742830e052e360")) + (package + (name "teensy-loader-cli") + (version (string-append "2.1-1." (string-take commit 7))) + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/PaulStoffregen/" + "teensy_loader_cli/archive/" commit ".tar.gz")) + (sha256 (base32 "17wqc2q4fa473cy7f5m2yiyb9nq0qw7xal2kzrxzaikgm9rabsw8")) + (file-name (string-append "teensy-loader-cli-" version ".tar.gz" )) + (modules '((guix build utils))) + (snippet + `(begin + ;; Remove example flash files and teensy rebooter flash binaries. + (for-each delete-file (find-files "." "\\.(elf|hex)$")) + ;; Fix the version + (substitute* "teensy_loader_cli.c" + (("Teensy Loader, Command Line, Version 2.0\\\\n") + (string-append "Teensy Loader, Command Line, " ,version "\\n"))) + #t)) + (patches (search-patches "teensy-loader-cli-help.patch")))) + (build-system gnu-build-system) + (arguments + '(#:tests? #f ;; Makefile has no test target + #:make-flags (list "CC=gcc" (string-append "PREFIX=" %output)) + #:phases + (modify-phases %standard-phases + (delete 'configure) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin"))) + (install-file "teensy_loader_cli" bin) + #t)))))) + (inputs + `(("libusb-compat" ,libusb-compat))) + (synopsis "Command line firmware uploader for Teensy development boards") + (description + "The Teensy loader program communicates with your Teensy board when the +HalfKay bootloader is running, so you can upload new programs and run them. + +You need to add the udev rules to make the Teensy update available for +non-root users.") + (home-page "https://www.pjrc.com/teensy/loader_cli.html") + (license gpl3)))) diff --git a/gnu/packages/patches/teensy-loader-cli-help.patch b/gnu/packages/patches/teensy-loader-cli-help.patch new file mode 100644 index 0000000000..8b3fda128a --- /dev/null +++ b/gnu/packages/patches/teensy-loader-cli-help.patch @@ -0,0 +1,33 @@ +Add support for '-h' (help). + +https://github.com/PaulStoffregen/teensy_loader_cli/pull/26 + +--- + teensy_loader_cli.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/teensy_loader_cli.c b/teensy_loader_cli.c +index d4a6cc5..0a06209 100644 +--- a/teensy_loader_cli.c ++++ b/teensy_loader_cli.c +@@ -37,7 +37,8 @@ void usage(const char *err) + { + if(err != NULL) fprintf(stderr, "%s\n\n", err); + fprintf(stderr, +- "Usage: teensy_loader_cli --mcu= [-w] [-h] [-n] [-b] [-v] \n" ++ "Usage: teensy_loader_cli --mcu= [-h] [-w] [-n] [-b] [-v] \n" ++ "\t-h : Print this help message\n" + "\t-w : Wait for device to appear\n" + "\t-r : Use hard reboot if device not online\n" + "\t-s : Use soft reboot if device not online (Teensy3.x only)\n" +@@ -1081,6 +1082,7 @@ void parse_flag(char *arg) + int i; + for(i=1; arg[i]; i++) { + switch(arg[i]) { ++ case 'h': usage(NULL); break; + case 'w': wait_for_device_to_appear = 1; break; + case 'r': hard_reboot_device = 1; break; + case 's': soft_reboot_device = 1; break; +-- +2.7.4 + -- cgit v1.2.3 From ba6a996eacab58b1791feb69bc460777352d5039 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 14 Jun 2016 13:11:11 +0200 Subject: gnu: Add gengetopt. * gnu/packages/popt.scm (gengetopt): New variable. --- gnu/packages/popt.scm | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/gnu/packages/popt.scm b/gnu/packages/popt.scm index 0832766512..e940df1590 100644 --- a/gnu/packages/popt.scm +++ b/gnu/packages/popt.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2014, 2016 Ludovic Courtès -;;; Copyright © 2015 Ricardo Wurmus +;;; Copyright © 2015, 2016 Ricardo Wurmus ;;; ;;; This file is part of GNU Guix. ;;; @@ -119,3 +119,31 @@ meaningful to that file. Any application that links in that file will get the flags, and the gflags library will automatically handle that flag appropriately.") (license bsd-3))) + +(define-public gengetopt + (package + (name "gengetopt") + (version "2.22.6") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://gnu/gengetopt/gengetopt-" + version ".tar.gz")) + (sha256 + (base32 + "1xq1kcfs6hri101ss4dhym0jn96z4v6jdvx288mfywadc245mc1h")))) + (build-system gnu-build-system) + (arguments + `(#:parallel-build? #f)) ; not supported + (synopsis "Create parsers for command line options") + (description + "GNU Gengetopt is a program to generate a C/C++ function for parsing +command-line options using the getopt_long function found in GNU +libc, removing some of the tedium of this task for large programs +that accept many options. The options parsed by the generated +function may be in both short (e.g., \"-h\") and long (\"--help\") +formats, as specified by the GNU coding standards. Additionally, the +output of the standard options \"--help\" and \"--version\" is generated +automatically.") + (home-page "http://www.gnu.org/software/gengetopt/gengetopt.html") + (license gpl3+))) -- cgit v1.2.3 From ce9cf64b787aeb063823f0e9056db5b644ef5f75 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 14 Jun 2016 14:18:54 +0200 Subject: gnu: Add log4cpp. * gnu/packages/logging.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. --- gnu/local.mk | 1 + gnu/packages/logging.scm | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 gnu/packages/logging.scm diff --git a/gnu/local.mk b/gnu/local.mk index 834a6e5cee..8036c0ea4b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -211,6 +211,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/lisp.scm \ %D%/packages/llvm.scm \ %D%/packages/lout.scm \ + %D%/packages/logging.scm \ %D%/packages/lsh.scm \ %D%/packages/lsof.scm \ %D%/packages/lua.scm \ diff --git a/gnu/packages/logging.scm b/gnu/packages/logging.scm new file mode 100644 index 0000000000..68af09e08c --- /dev/null +++ b/gnu/packages/logging.scm @@ -0,0 +1,47 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2016 Ricardo Wurmus +;;; +;;; 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 . + +(define-module (gnu packages logging) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages) + #:use-module (guix utils) + #:use-module (guix download) + #:use-module (guix build-system gnu) + #:use-module (gnu packages)) + +(define-public log4cpp + (package + (name "log4cpp") + (version "1.1.1") + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/log4cpp/log4cpp-" + (version-major+minor version) ".x%20%28new%29" + "/log4cpp-" (version-major+minor version) + "/log4cpp-" version ".tar.gz")) + (sha256 + (base32 + "1l5yz5rfzzv6g3ynrj14mxfsk08cp5h1ssr7d74hjs0accrg7arm")))) + (build-system gnu-build-system) + (synopsis "Log library for C++") + (description + "Log4cpp is library of C++ classes for flexible logging to files, syslog, +IDSA and other destinations. It is modeled after the Log4j Java library, +staying as close to their API as is reasonable.") + (home-page "http://log4cpp.sourceforge.net/") + (license license:lgpl2.1+))) -- cgit v1.2.3 From a44fd439dcef88b33c00db94fb3419e097401fee Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Sun, 12 Jun 2016 17:40:06 +0200 Subject: gnu: Add python-wcwidth and python2-wcwidth. * gnu/packages/python.scm (python-wcwidth, python2-wcwidth): New variables. Co-authored-by: Leo Famulari --- gnu/packages/python.scm | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index fa06a128b9..4f18680d4c 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -9186,3 +9186,33 @@ are optionally backed by a C extension built on librdkafka.") (define-public python2-pykafka (package-with-python2 python-pykafka)) + +(define-public python-wcwidth + (package + (name "python-wcwidth") + (version "0.1.6") + (source + (origin + (method url-fetch) + (uri (string-append + "https://pypi.python.org/packages/" + "c2/d1/7689293086a8d5320025080cde0e3155b94ae0a7496fb89a3fbaa92c354a/" + "wcwidth-" version ".tar.gz")) + (sha256 + (base32 + "02wjrpf001gjdjsaxxbzcwfg19crlk2dbddayrfc2v06f53yrcyw")))) + (build-system python-build-system) + (home-page "https://github.com/jquast/wcwidth") + (synopsis "Measure number of terminal column cells of wide-character codes.") + (description "Wcwidth measures the number of terminal column cells of +wide-character codes. It is useful for those implementing a terminal emulator, +or programs that carefully produce output to be interpreted by one. It is a +Python implementation of the @code{wcwidth} and @code{wcswidth} C functions +specified in POSIX.1-2001 and POSIX.1-2008.") + (license license:expat))) + +(define-public python2-wcwidth + (package + (inherit (package-with-python2 + (strip-python2-variant python-wcwidth))) + (native-inputs `(("python2-setuptools" ,python2-setuptools))))) -- cgit v1.2.3 From 9c4a8514d621b6e2a19f56fa9b3396c940b968c5 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Mon, 13 Jun 2016 16:15:34 -0400 Subject: gnu: openssl: Fix CVE-2016-2177 and CVE-2016-2178. * gnu/packages/patches/openssl-CVE-2016-2177.patch, gnu/packages/patches/openssl-CVE-2016-2178.patch: New files. * gnu/local.mk (dist_patch_DATA): Add them. * gnu/packages/tls.scm (openssl/fixed): Use them. --- gnu/local.mk | 2 + gnu/packages/patches/openssl-CVE-2016-2177.patch | 286 +++++++++++++++++++++++ gnu/packages/patches/openssl-CVE-2016-2178.patch | 112 +++++++++ gnu/packages/tls.scm | 4 +- 4 files changed, 403 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/openssl-CVE-2016-2177.patch create mode 100644 gnu/packages/patches/openssl-CVE-2016-2178.patch diff --git a/gnu/local.mk b/gnu/local.mk index 8036c0ea4b..83f4218a6e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -686,6 +686,8 @@ dist_patch_DATA = \ %D%/packages/patches/openssh-CVE-2015-8325.patch \ %D%/packages/patches/openssl-runpath.patch \ %D%/packages/patches/openssl-c-rehash-in.patch \ + %D%/packages/patches/openssl-CVE-2016-2177.patch \ + %D%/packages/patches/openssl-CVE-2016-2178.patch \ %D%/packages/patches/orpheus-cast-errors-and-includes.patch \ %D%/packages/patches/ots-no-include-missing-file.patch \ %D%/packages/patches/patchelf-page-size.patch \ diff --git a/gnu/packages/patches/openssl-CVE-2016-2177.patch b/gnu/packages/patches/openssl-CVE-2016-2177.patch new file mode 100644 index 0000000000..f6465aeaa7 --- /dev/null +++ b/gnu/packages/patches/openssl-CVE-2016-2177.patch @@ -0,0 +1,286 @@ +Fix CVE-2016-2177. + + + +Source: + + +From a004e72b95835136d3f1ea90517f706c24c03da7 Mon Sep 17 00:00:00 2001 +From: Matt Caswell +Date: Thu, 5 May 2016 11:10:26 +0100 +Subject: [PATCH] Avoid some undefined pointer arithmetic + +A common idiom in the codebase is: + +if (p + len > limit) +{ + return; /* Too long */ +} + +Where "p" points to some malloc'd data of SIZE bytes and +limit == p + SIZE + +"len" here could be from some externally supplied data (e.g. from a TLS +message). + +The rules of C pointer arithmetic are such that "p + len" is only well +defined where len <= SIZE. Therefore the above idiom is actually +undefined behaviour. + +For example this could cause problems if some malloc implementation +provides an address for "p" such that "p + len" actually overflows for +values of len that are too big and therefore p + len < limit! + +Issue reported by Guido Vranken. + +CVE-2016-2177 + +Reviewed-by: Rich Salz +--- + ssl/s3_srvr.c | 14 +++++++------- + ssl/ssl_sess.c | 2 +- + ssl/t1_lib.c | 56 ++++++++++++++++++++++++++++++-------------------------- + 3 files changed, 38 insertions(+), 34 deletions(-) + +diff --git a/ssl/s3_srvr.c b/ssl/s3_srvr.c +index ab28702..ab7f690 100644 +--- a/ssl/s3_srvr.c ++++ b/ssl/s3_srvr.c +@@ -980,7 +980,7 @@ int ssl3_get_client_hello(SSL *s) + + session_length = *(p + SSL3_RANDOM_SIZE); + +- if (p + SSL3_RANDOM_SIZE + session_length + 1 >= d + n) { ++ if (SSL3_RANDOM_SIZE + session_length + 1 >= (d + n) - p) { + al = SSL_AD_DECODE_ERROR; + SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO, SSL_R_LENGTH_TOO_SHORT); + goto f_err; +@@ -998,7 +998,7 @@ int ssl3_get_client_hello(SSL *s) + /* get the session-id */ + j = *(p++); + +- if (p + j > d + n) { ++ if ((d + n) - p < j) { + al = SSL_AD_DECODE_ERROR; + SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO, SSL_R_LENGTH_TOO_SHORT); + goto f_err; +@@ -1054,14 +1054,14 @@ int ssl3_get_client_hello(SSL *s) + + if (SSL_IS_DTLS(s)) { + /* cookie stuff */ +- if (p + 1 > d + n) { ++ if ((d + n) - p < 1) { + al = SSL_AD_DECODE_ERROR; + SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO, SSL_R_LENGTH_TOO_SHORT); + goto f_err; + } + cookie_len = *(p++); + +- if (p + cookie_len > d + n) { ++ if ((d + n ) - p < cookie_len) { + al = SSL_AD_DECODE_ERROR; + SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO, SSL_R_LENGTH_TOO_SHORT); + goto f_err; +@@ -1131,7 +1131,7 @@ int ssl3_get_client_hello(SSL *s) + } + } + +- if (p + 2 > d + n) { ++ if ((d + n ) - p < 2) { + al = SSL_AD_DECODE_ERROR; + SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO, SSL_R_LENGTH_TOO_SHORT); + goto f_err; +@@ -1145,7 +1145,7 @@ int ssl3_get_client_hello(SSL *s) + } + + /* i bytes of cipher data + 1 byte for compression length later */ +- if ((p + i + 1) > (d + n)) { ++ if ((d + n) - p < i + 1) { + /* not enough data */ + al = SSL_AD_DECODE_ERROR; + SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO, SSL_R_LENGTH_MISMATCH); +@@ -1211,7 +1211,7 @@ int ssl3_get_client_hello(SSL *s) + + /* compression */ + i = *(p++); +- if ((p + i) > (d + n)) { ++ if ((d + n) - p < i) { + /* not enough data */ + al = SSL_AD_DECODE_ERROR; + SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO, SSL_R_LENGTH_MISMATCH); +diff --git a/ssl/ssl_sess.c b/ssl/ssl_sess.c +index b182998..54ee783 100644 +--- a/ssl/ssl_sess.c ++++ b/ssl/ssl_sess.c +@@ -573,7 +573,7 @@ int ssl_get_prev_session(SSL *s, unsigned char *session_id, int len, + int r; + #endif + +- if (session_id + len > limit) { ++ if (limit - session_id < len) { + fatal = 1; + goto err; + } +diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c +index fb64607..cdac011 100644 +--- a/ssl/t1_lib.c ++++ b/ssl/t1_lib.c +@@ -1867,11 +1867,11 @@ static void ssl_check_for_safari(SSL *s, const unsigned char *data, + 0x02, 0x03, /* SHA-1/ECDSA */ + }; + +- if (data >= (limit - 2)) ++ if (limit - data <= 2) + return; + data += 2; + +- if (data > (limit - 4)) ++ if (limit - data < 4) + return; + n2s(data, type); + n2s(data, size); +@@ -1879,7 +1879,7 @@ static void ssl_check_for_safari(SSL *s, const unsigned char *data, + if (type != TLSEXT_TYPE_server_name) + return; + +- if (data + size > limit) ++ if (limit - data < size) + return; + data += size; + +@@ -1887,7 +1887,7 @@ static void ssl_check_for_safari(SSL *s, const unsigned char *data, + const size_t len1 = sizeof(kSafariExtensionsBlock); + const size_t len2 = sizeof(kSafariTLS12ExtensionsBlock); + +- if (data + len1 + len2 != limit) ++ if (limit - data != (int)(len1 + len2)) + return; + if (memcmp(data, kSafariExtensionsBlock, len1) != 0) + return; +@@ -1896,7 +1896,7 @@ static void ssl_check_for_safari(SSL *s, const unsigned char *data, + } else { + const size_t len = sizeof(kSafariExtensionsBlock); + +- if (data + len != limit) ++ if (limit - data != (int)(len)) + return; + if (memcmp(data, kSafariExtensionsBlock, len) != 0) + return; +@@ -2053,19 +2053,19 @@ static int ssl_scan_clienthello_tlsext(SSL *s, unsigned char **p, + if (data == limit) + goto ri_check; + +- if (data > (limit - 2)) ++ if (limit - data < 2) + goto err; + + n2s(data, len); + +- if (data + len != limit) ++ if (limit - data != len) + goto err; + +- while (data <= (limit - 4)) { ++ while (limit - data >= 4) { + n2s(data, type); + n2s(data, size); + +- if (data + size > (limit)) ++ if (limit - data < size) + goto err; + # if 0 + fprintf(stderr, "Received extension type %d size %d\n", type, size); +@@ -2472,18 +2472,18 @@ static int ssl_scan_clienthello_custom_tlsext(SSL *s, + if (s->hit || s->cert->srv_ext.meths_count == 0) + return 1; + +- if (data >= limit - 2) ++ if (limit - data <= 2) + return 1; + n2s(data, len); + +- if (data > limit - len) ++ if (limit - data < len) + return 1; + +- while (data <= limit - 4) { ++ while (limit - data >= 4) { + n2s(data, type); + n2s(data, size); + +- if (data + size > limit) ++ if (limit - data < size) + return 1; + if (custom_ext_parse(s, 1 /* server */ , type, data, size, al) <= 0) + return 0; +@@ -2569,20 +2569,20 @@ static int ssl_scan_serverhello_tlsext(SSL *s, unsigned char **p, + SSL_TLSEXT_HB_DONT_SEND_REQUESTS); + # endif + +- if (data >= (d + n - 2)) ++ if ((d + n) - data <= 2) + goto ri_check; + + n2s(data, length); +- if (data + length != d + n) { ++ if ((d + n) - data != length) { + *al = SSL_AD_DECODE_ERROR; + return 0; + } + +- while (data <= (d + n - 4)) { ++ while ((d + n) - data >= 4) { + n2s(data, type); + n2s(data, size); + +- if (data + size > (d + n)) ++ if ((d + n) - data < size) + goto ri_check; + + if (s->tlsext_debug_cb) +@@ -3307,29 +3307,33 @@ int tls1_process_ticket(SSL *s, unsigned char *session_id, int len, + /* Skip past DTLS cookie */ + if (SSL_IS_DTLS(s)) { + i = *(p++); +- p += i; +- if (p >= limit) ++ ++ if (limit - p <= i) + return -1; ++ ++ p += i; + } + /* Skip past cipher list */ + n2s(p, i); +- p += i; +- if (p >= limit) ++ if (limit - p <= i) + return -1; ++ p += i; ++ + /* Skip past compression algorithm list */ + i = *(p++); +- p += i; +- if (p > limit) ++ if (limit - p < i) + return -1; ++ p += i; ++ + /* Now at start of extensions */ +- if ((p + 2) >= limit) ++ if (limit - p <= 2) + return 0; + n2s(p, i); +- while ((p + 4) <= limit) { ++ while (limit - p >= 4) { + unsigned short type, size; + n2s(p, type); + n2s(p, size); +- if (p + size > limit) ++ if (limit - p < size) + return 0; + if (type == TLSEXT_TYPE_session_ticket) { + int r; +-- +2.8.4 + diff --git a/gnu/packages/patches/openssl-CVE-2016-2178.patch b/gnu/packages/patches/openssl-CVE-2016-2178.patch new file mode 100644 index 0000000000..37cf2763af --- /dev/null +++ b/gnu/packages/patches/openssl-CVE-2016-2178.patch @@ -0,0 +1,112 @@ +Fix CVE-2016-2178. + + + +Source: + + + +From 621eaf49a289bfac26d4cbcdb7396e796784c534 Mon Sep 17 00:00:00 2001 +From: Cesar Pereida +Date: Mon, 23 May 2016 12:45:25 +0300 +Subject: [PATCH 1/2] Fix DSA, preserve BN_FLG_CONSTTIME + +Operations in the DSA signing algorithm should run in constant time in +order to avoid side channel attacks. A flaw in the OpenSSL DSA +implementation means that a non-constant time codepath is followed for +certain operations. This has been demonstrated through a cache-timing +attack to be sufficient for an attacker to recover the private DSA key. + +CVE-2016-2178 + +Reviewed-by: Richard Levitte +Reviewed-by: Matt Caswell +--- + crypto/dsa/dsa_ossl.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/crypto/dsa/dsa_ossl.c b/crypto/dsa/dsa_ossl.c +index efc4f1b..b29eb4b 100644 +--- a/crypto/dsa/dsa_ossl.c ++++ b/crypto/dsa/dsa_ossl.c +@@ -248,9 +248,6 @@ static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, + if (!BN_rand_range(&k, dsa->q)) + goto err; + while (BN_is_zero(&k)) ; +- if ((dsa->flags & DSA_FLAG_NO_EXP_CONSTTIME) == 0) { +- BN_set_flags(&k, BN_FLG_CONSTTIME); +- } + + if (dsa->flags & DSA_FLAG_CACHE_MONT_P) { + if (!BN_MONT_CTX_set_locked(&dsa->method_mont_p, +@@ -279,9 +276,12 @@ static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, + } + + K = &kq; ++ ++ BN_set_flags(K, BN_FLG_CONSTTIME); + } else { + K = &k; + } ++ + DSA_BN_MOD_EXP(goto err, dsa, r, dsa->g, K, dsa->p, ctx, + dsa->method_mont_p); + if (!BN_mod(r, r, dsa->q, ctx)) +-- +2.8.4 + +From b7d0f2834e139a20560d64c73e2565e93715ce2b Mon Sep 17 00:00:00 2001 +From: Matt Caswell +Date: Tue, 7 Jun 2016 09:12:51 +0100 +Subject: [PATCH 2/2] More fix DSA, preserve BN_FLG_CONSTTIME + +The previous "fix" still left "k" exposed to constant time problems in +the later BN_mod_inverse() call. Ensure both k and kq have the +BN_FLG_CONSTTIME flag set at the earliest opportunity after creation. + +CVE-2016-2178 + +Reviewed-by: Rich Salz +--- + crypto/dsa/dsa_ossl.c | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +diff --git a/crypto/dsa/dsa_ossl.c b/crypto/dsa/dsa_ossl.c +index b29eb4b..58013a4 100644 +--- a/crypto/dsa/dsa_ossl.c ++++ b/crypto/dsa/dsa_ossl.c +@@ -247,7 +247,12 @@ static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, + do + if (!BN_rand_range(&k, dsa->q)) + goto err; +- while (BN_is_zero(&k)) ; ++ while (BN_is_zero(&k)); ++ ++ if ((dsa->flags & DSA_FLAG_NO_EXP_CONSTTIME) == 0) { ++ BN_set_flags(&k, BN_FLG_CONSTTIME); ++ } ++ + + if (dsa->flags & DSA_FLAG_CACHE_MONT_P) { + if (!BN_MONT_CTX_set_locked(&dsa->method_mont_p, +@@ -261,6 +266,8 @@ static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, + if (!BN_copy(&kq, &k)) + goto err; + ++ BN_set_flags(&kq, BN_FLG_CONSTTIME); ++ + /* + * We do not want timing information to leak the length of k, so we + * compute g^k using an equivalent exponent of fixed length. (This +@@ -276,8 +283,6 @@ static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, + } + + K = &kq; +- +- BN_set_flags(K, BN_FLG_CONSTTIME); + } else { + K = &k; + } +-- +2.8.4 + diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index e543a7e3fe..513edcc1a6 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -316,7 +316,9 @@ required structures.") (base32 "06996ds1rk8xhnyb5y273a7xkcxhggp4bq1g02rab55d7bjhfh0x")) (patches (search-patches "openssl-runpath.patch" - "openssl-c-rehash-in.patch"))))))) + "openssl-c-rehash-in.patch" + "openssl-CVE-2016-2177.patch" + "openssl-CVE-2016-2178.patch"))))))) (define-public libressl (package -- cgit v1.2.3 From c4e48b68bdf41e7f6805473fc4f545b215251c6d Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 15 Jun 2016 10:38:10 +0200 Subject: guix: Add downloader for Mercurial repositories. * guix/build/hg.scm: New file. * guix/hg-download.scm: New file. * Makefile.am (MODULES): Add them. --- Makefile.am | 2 ++ guix/build/hg.scm | 51 +++++++++++++++++++++++++++++++ guix/hg-download.scm | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 137 insertions(+) create mode 100644 guix/build/hg.scm create mode 100644 guix/hg-download.scm diff --git a/Makefile.am b/Makefile.am index 50cde52701..8fd1c1b0b6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -43,6 +43,7 @@ MODULES = \ guix/sets.scm \ guix/download.scm \ guix/git-download.scm \ + guix/hg-download.scm \ guix/monads.scm \ guix/monad-repl.scm \ guix/gexp.scm \ @@ -82,6 +83,7 @@ MODULES = \ guix/build/cmake-build-system.scm \ guix/build/emacs-build-system.scm \ guix/build/git.scm \ + guix/build/hg.scm \ guix/build/glib-or-gtk-build-system.scm \ guix/build/gnu-build-system.scm \ guix/build/gnu-dist.scm \ diff --git a/guix/build/hg.scm b/guix/build/hg.scm new file mode 100644 index 0000000000..ae4574de57 --- /dev/null +++ b/guix/build/hg.scm @@ -0,0 +1,51 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2016 Ricardo Wurmus +;;; +;;; 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 . + +(define-module (guix build hg) + #:use-module (guix build utils) + #:export (hg-fetch)) + +;;; Commentary: +;;; +;;; This is the build-side support code of (guix hg-download). It allows a +;;; Mercurial repository to be cloned and checked out at a specific changeset +;;; identifier. +;;; +;;; Code: + +(define* (hg-fetch url changeset directory + #:key (hg-command "hg")) + "Fetch CHANGESET from URL into DIRECTORY. CHANGESET must be a valid +Mercurial changeset identifier. Return #t on success, #f otherwise." + + (and (zero? (system* hg-command + "clone" url + "--rev" changeset + ;; Disable TLS certificate verification. The hash of + ;; the checkout is known in advance anyway. + "--insecure" + directory)) + (with-directory-excursion directory + (begin + ;; The contents of '.hg' vary as a function of the current + ;; status of the Mercurial repo. Since we want a fixed + ;; output, this directory needs to be taken out. + (delete-file-recursively ".hg") + #t)))) + +;;; hg.scm ends here diff --git a/guix/hg-download.scm b/guix/hg-download.scm new file mode 100644 index 0000000000..f3e1d2906a --- /dev/null +++ b/guix/hg-download.scm @@ -0,0 +1,84 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2014, 2015 Ludovic Courtès +;;; Copyright © 2016 Ricardo Wurmus +;;; +;;; 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 . + +(define-module (guix hg-download) + #:use-module (guix gexp) + #:use-module (guix store) + #:use-module (guix monads) + #:use-module (guix records) + #:use-module (guix packages) + #:autoload (guix build-system gnu) (standard-packages) + #:use-module (ice-9 match) + #:export (hg-reference + hg-reference? + hg-reference-url + hg-reference-changeset + hg-reference-recursive? + + hg-fetch)) + +;;; Commentary: +;;; +;;; An method that fetches a specific changeset from a Mercurial +;;; repository. The repository URL and changeset ID are specified with a +;;; object. +;;; +;;; Code: + +(define-record-type* + hg-reference make-hg-reference + hg-reference? + (url hg-reference-url) + (changeset hg-reference-changeset)) + +(define (hg-package) + "Return the default Mercurial package." + (let ((distro (resolve-interface '(gnu packages version-control)))) + (module-ref distro 'mercurial))) + +(define* (hg-fetch ref hash-algo hash + #:optional name + #:key (system (%current-system)) (guile (default-guile)) + (hg (hg-package))) + "Return a fixed-output derivation that fetches REF, a +object. The output is expected to have recursive hash HASH of type +HASH-ALGO (a symbol). Use NAME as the file name, or a generic name if #f." + (define build + #~(begin + (use-modules (guix build hg) + (guix build utils) + (ice-9 match)) + + (hg-fetch '#$(hg-reference-url ref) + '#$(hg-reference-changeset ref) + #$output + #:hg-command (string-append #+hg "/bin/hg")))) + + (mlet %store-monad ((guile (package->derivation guile system))) + (gexp->derivation (or name "hg-checkout") build + #:system system + #:local-build? #t ;don't offload repo cloning + #:hash-algo hash-algo + #:hash hash + #:recursive? #t + #:modules '((guix build hg) + (guix build utils)) + #:guile-for-build guile))) + +;;; hg-download.scm ends here -- cgit v1.2.3 From 4714d521e3b5bcc6e2800ab377cb470cab09a595 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 14 Jun 2016 14:50:30 +0200 Subject: gnu: Add r-bsgenome-mmusculus-ucsc-mm10. * gnu/packages/bioinformatics.scm (r-bsgenome-mmusculus-ucsc-mm10): New variable. --- gnu/packages/bioinformatics.scm | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 58877f7c61..04ed769cd8 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -5019,6 +5019,38 @@ by UCSC (hg19, February 2009) and stored in Biostrings objects.") provided by UCSC (mm9, July 2007) and stored in Biostrings objects.") (license license:artistic2.0))) +(define-public r-bsgenome-mmusculus-ucsc-mm10 + (package + (name "r-bsgenome-mmusculus-ucsc-mm10") + (version "1.4.0") + (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 "http://www.bioconductor.org/packages/" + "release/data/annotation/src/contrib/" + "BSgenome.Mmusculus.UCSC.mm10_" + version ".tar.gz")) + (sha256 + (base32 + "12s0nm2na9brjad4rn9l7d3db2aj8qa1xvz0y1k7gk08wayb6bkf")))) + (properties + `((upstream-name . "BSgenome.Mmusculus.UCSC.mm10"))) + (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 + "http://www.bioconductor.org/packages/BSgenome.Mmusculus.UCSC.mm10/") + (synopsis "Full genome sequences for Mouse") + (description + "This package provides full genome sequences for Mus +musculus (Mouse) as provided by UCSC (mm10, December 2011) and stored +in Biostrings objects.") + (license license:artistic2.0))) + (define-public r-bsgenome-celegans-ucsc-ce6 (package (name "r-bsgenome-celegans-ucsc-ce6") -- cgit v1.2.3 From 26e08b4d33918a844a42fd0f859ee640990ca757 Mon Sep 17 00:00:00 2001 From: ng0 Date: Tue, 14 Jun 2016 13:00:59 +0000 Subject: gnu: Add emacs-lua-mode. * gnu/packages/emacs.scm (emacs-lua-mode): New variable. Signed-off-by: Alex Kost --- gnu/packages/emacs.scm | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 6a79412f7b..dfe2e2336f 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -13,6 +13,7 @@ ;;; Copyright © 2016 David Thompson ;;; Copyright © 2016 Matthew Jordan ;;; Copyright © 2016 Roel Janssen +;;; Copyright © 2016 ng0 ;;; ;;; This file is part of GNU Guix. ;;; @@ -2112,3 +2113,24 @@ There are plenty of differences between CIDER and SLIME, but the core ideas are pretty much the same (and SLIME served as the principle inspiration for CIDER).") (license license:gpl3+))) + +(define-public emacs-lua-mode + (package + (name "emacs-lua-mode") + (version "20151025") + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/immerrr/lua-mode/archive/v" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0sbhfny5ib65cnx6xcy6h9bbw27mw034s8m9cca00bhxqaqi6p4v")))) + (build-system emacs-build-system) + (home-page "http://github.com/immerrr/lua-mode/") + (synopsis "Major mode for lua") + (description + "This Emacs package provides a mode for @uref{https://www.lua.org/, +Lua programing language}.") + (license license:gpl2+))) -- cgit v1.2.3 From 0202612d14e8661e65788cd8e674f13dc3c6a80b Mon Sep 17 00:00:00 2001 From: ng0 Date: Tue, 14 Jun 2016 13:03:50 +0000 Subject: gnu: Add emacs-ebuild-mode. * gnu/packages/emacs.scm (emacs-ebuild-mode): New variable. Signed-off-by: Alex Kost --- gnu/packages/emacs.scm | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index dfe2e2336f..cb6464df9d 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -2134,3 +2134,24 @@ CIDER).") "This Emacs package provides a mode for @uref{https://www.lua.org/, Lua programing language}.") (license license:gpl2+))) + +(define-public emacs-ebuild-mode + (package + (name "emacs-ebuild-mode") + (version "1.30") + (source (origin + (method url-fetch) + (uri (string-append + "https://dev.gentoo.org/~ulm/emacs/ebuild-mode" + "-" version ".tar.xz")) + (file-name (string-append name "-" version ".tar.xz")) + (sha256 + (base32 + "0vp7lq1kvmh1b2bms2x1kf2k76dy9m02d7cirkxpiglwaxa0h9vz")))) + (build-system emacs-build-system) + (home-page "https://devmanual.gentoo.org") + (synopsis "Major modes for Gentoo package files") + (description + "This Emacs package provides modes for ebuild, eclass, eblit, GLEP42 +news items, openrc and runscripts.") + (license license:gpl2+))) -- cgit v1.2.3 From c73d4c59222ea80895bdd8265d8a112ebc0187d8 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Sat, 5 Mar 2016 00:19:01 -0500 Subject: gnu: telepathy-glib: Enable vala bindings. * gnu/packages/glib.scm (telepathy-glib)[arguments]: Add --enable-vala-bindings to #:configure-flags. [native-inputs]: Add vala. --- gnu/packages/glib.scm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index 70020520eb..a85a5659ba 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -33,6 +33,7 @@ #:use-module (gnu packages compression) #:use-module (gnu packages flex) #:use-module (gnu packages gettext) + #:use-module (gnu packages gnome) #:use-module (gnu packages gtk) #:use-module (gnu packages libffi) #:use-module (gnu packages pcre) @@ -635,11 +636,14 @@ useful for C++.") (base32 "0z261fwrszxb28ccg3hsg9rizig4s84zvwmx6y31a4pyv7bvs5w3"))))))) (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--enable-vala-bindings"))) (native-inputs `(("glib" ,glib "bin") ; uses glib-mkenums ("gobject-introspection" ,gobject-introspection) ("pkg-config" ,pkg-config) ("python" ,python-2) + ("vala" ,vala) ("xsltproc" ,libxslt))) (propagated-inputs ;; There are all in the Requires.private field of telepathy-glib.pc. -- cgit v1.2.3 From a73c1cf84aa1cf06b0aeb49214fe762be53a97c1 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Sat, 5 Mar 2016 00:42:39 -0500 Subject: gnu: evolution-data-server: Build Vala bindings. * gnu/packages/gnome.scm (evolution-data-server)[arguments]: Add --enable-vala-bindings to #:configure-flags. [native-inputs]: Add vala. --- gnu/packages/gnome.scm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 0b80ebb448..8a066ea2ba 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -4249,6 +4249,7 @@ Exchange, Last.fm, IMAP/SMTP, Jabber, SIP and Kerberos.") (list "--disable-uoa" ; disable Ubuntu Online Accounts support "--disable-google" ; disable Google Contacts support "--disable-google-auth" ; disable Google authentication + "--enable-vala-bindings" (string-append "--with-nspr-includes=" nspr "/include/nspr") (string-append "--with-nss-includes=" nss "/include/nss") (string-append "--with-nss-libs=" nss "/lib/nss"))) @@ -4265,6 +4266,7 @@ Exchange, Last.fm, IMAP/SMTP, Jabber, SIP and Kerberos.") ("gperf" ,gperf) ("intltool" ,intltool) ("pkg-config" ,pkg-config) + ("vala" ,vala) ("python" ,python))) (propagated-inputs ;; These are all in the Requires field of .pc files. -- cgit v1.2.3 From 6064a4e84af8ab1d799b687a63965ce7eef80af2 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Fri, 15 Apr 2016 22:06:05 -0400 Subject: gnu: Add folks. * gnu/packages/gnome.scm (folks): New variable. --- gnu/packages/gnome.scm | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 8a066ea2ba..e236e40e36 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -18,6 +18,7 @@ ;;; Copyright © 2016 Kei Kebreau ;;; Copyright © 2016 Jan Nieuwenhuizen ;;; Copyright © 2016 Roel Janssen +;;; Copyright © 2016 Leo Famulari ;;; ;;; This file is part of GNU Guix. ;;; @@ -5311,3 +5312,38 @@ style of the Arc GTK theme. Icons missing from the Arc theme are provided by the Moka icon theme.") (home-page "https://github.com/horst3180/arc-icon-theme") (license license:gpl3+))) + +(define-public folks + (package + (name "folks") + (version "0.11.2") + (source (origin + (method url-fetch) + (uri (string-append + "mirror://gnome/sources/" name "/" + (version-major+minor version) "/" + name "-" version ".tar.xz")) + (sha256 + (base32 + "1f51albxgfqxbax57i3pcgv2fx7i419xaapzdvldas6gw100ma1m")))) + (build-system glib-or-gtk-build-system) + (inputs + `(("bdb" ,bdb) + ("dbus-glib" ,dbus-glib) + ("evolution-data-server" ,evolution-data-server) + ("glib" ,glib) + ("libgee" ,libgee) + ("telepathy-glib" ,telepathy-glib))) + (native-inputs + `(("gobject-introspection" ,gobject-introspection) + ("intltool" ,intltool) + ("pkg-config" ,pkg-config) + ("vala" ,vala))) + (synopsis "Library to aggregate data about people") + (description "Libfolks is a library that aggregates information about people +from multiple sources (e.g., Telepathy connection managers for IM contacts, +Evolution Data Server for local contacts, libsocialweb for web service contacts, +etc.) to create metacontacts. It's written in Vala, which generates C code when +compiled.") + (home-page "https://wiki.gnome.org/Projects/Folks") + (license license:lgpl2.1+))) -- cgit v1.2.3 From 0a387b14f1179f2100b2fda301bf2844a5e90299 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Sat, 5 Mar 2016 00:32:52 -0500 Subject: gnu: vala: Build Vala API (.vapi) generator. * gnu/packages/gnome.scm (vala)[arguments]: Pass --enable-apigen to #:configure-flags. --- gnu/packages/gnome.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index e236e40e36..22e244bfeb 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -1729,7 +1729,9 @@ passwords in the GNOME keyring.") (setenv "CC" "gcc") ;; For missing '/etc/machine-id'. (setenv "DBUS_FATAL_WARNINGS" "0") - #t))))) + #t))) + ;; Build the Vala API generator + #:configure-flags '("--enable-vapigen"))) (native-inputs `(("pkg-config" ,pkg-config) ("flex" ,flex) -- cgit v1.2.3 From f7c6833f1cc178b399b19a7109ec49f2b87c0ea0 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Sat, 5 Mar 2016 00:39:47 -0500 Subject: gnu: libchamplain: Build Vala bindings. * gnu/packages/gnome.scm (libchamplain)[native-inputs]: Add gobject-introspection, vala. [arguments]: New field. --- gnu/packages/gnome.scm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 22e244bfeb..7660020662 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -2951,7 +2951,11 @@ GL based interactive canvas library.") (base32 "1arzd1hsgq14rbiwa1ih2g250x6ljna2s2kiqfrw155c612s9cxk")))) (build-system gnu-build-system) - (native-inputs `(("pkg-config" ,pkg-config))) + (arguments '(#:configure-flags '("--enable-vala"))) + (native-inputs + `(("gobject-introspection" ,gobject-introspection) + ("pkg-config" ,pkg-config) + ("vala" ,vala))) (propagated-inputs `(("libsoup" ,libsoup) ("sqlite" ,sqlite) -- cgit v1.2.3 From 01ea778f68971a4d918cf28dc17559002c345288 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Mon, 7 Mar 2016 02:17:22 -0500 Subject: gnu: Add gfbgraph. * gnu/packages/gnome.scm (gfbgraph): New variable. --- gnu/packages/gnome.scm | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 7660020662..74c4be6e24 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -5353,3 +5353,36 @@ etc.) to create metacontacts. It's written in Vala, which generates C code when compiled.") (home-page "https://wiki.gnome.org/Projects/Folks") (license license:lgpl2.1+))) + +(define-public gfbgraph + (package + (name "gfbgraph") + (version "0.2.3") + (source (origin + (method url-fetch) + (uri (string-append + "mirror://gnome/sources/" name "/" + (version-major+minor version) "/" + name "-" version ".tar.xz")) + (sha256 + (base32 + "1dp0v8ia35fxs9yhnqpxj3ir5lh018jlbiwifjfn8ayy7h47j4fs")))) + (build-system glib-or-gtk-build-system) + (arguments + `(#:tests? #f ; Tests appear to require the network. + ;; FIXME --enable-gtk-doc fails even with gtk-doc as a native-input. + #:configure-flags '("--disable-gtk-doc" + "--disable-static" + "--enable-introspection"))) + (native-inputs + `(("pkg-config" ,pkg-config) + ("gobject-introspection" ,gobject-introspection))) + (inputs + `(("json-glib" ,json-glib) + ("gnome-online-accounts" ,gnome-online-accounts) + ("rest" ,rest))) + (synopsis "GLib/GObject wrapper for the Facebook API") + (description "This library allows you to use the Facebook API from +GLib/GObject code.") + (home-page "https://wiki.gnome.org/Projects/GFBGraph") + (license license:lgpl2.1+))) -- cgit v1.2.3 From 03c1662e385bb339bbfe6cc02d7498f5891d0dc1 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Sat, 5 Mar 2016 02:33:09 -0500 Subject: gnu: Add gnome-maps. * gnu/packages/geo.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. --- gnu/local.mk | 1 + gnu/packages/geo.scm | 94 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 gnu/packages/geo.scm diff --git a/gnu/local.mk b/gnu/local.mk index 83f4218a6e..abd05ef01a 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -132,6 +132,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/gcc.scm \ %D%/packages/gd.scm \ %D%/packages/gdb.scm \ + %D%/packages/geo.scm \ %D%/packages/geeqie.scm \ %D%/packages/gettext.scm \ %D%/packages/ghostscript.scm \ diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm new file mode 100644 index 0000000000..1ef5eeb487 --- /dev/null +++ b/gnu/packages/geo.scm @@ -0,0 +1,94 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2016 Leo Famulari +;;; +;;; 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 . + +(define-module (gnu packages geo) + #:use-module (guix build-system glib-or-gtk) + #:use-module (guix download) + #:use-module (guix licenses) + #:use-module (guix packages) + #:use-module (guix utils) + #:use-module (gnu packages glib) + #:use-module (gnu packages gnome) + #:use-module (gnu packages gtk) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages webkit) + #:use-module (gnu packages xml)) + +;;; FIXME GNOME Maps only runs within GNOME. On i3, it fails with this error: +;;; (org.gnome.Maps:8568): GLib-GIO-ERROR **: Settings schema +;;; 'org.gnome.desktop.interface' is not installed +(define-public gnome-maps + (package + (name "gnome-maps") + (version "3.18.2") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnome/sources/" name "/" + (version-major+minor version) "/" + name "-" version ".tar.xz")) + (sha256 + (base32 + "0y4jmh5hwskh2mnladh9hxp9k8as7crm8wwwiifvxsjjj9az2gv9")))) + (build-system glib-or-gtk-build-system) + (arguments + `(#:configure-flags ; Ensure that geoclue is referred to by output. + (list (string-append "LDFLAGS=-L" + (assoc-ref %build-inputs "geoclue") "/lib") + (string-append "CFLAGS=-I" + (assoc-ref %build-inputs "geoclue") "/include")) + #:phases + (modify-phases %standard-phases + (add-after + 'install 'wrap + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (gi-typelib-path (getenv "GI_TYPELIB_PATH")) + (goa-path (string-append + (assoc-ref inputs "gnome-online-accounts") + "/lib"))) + (wrap-program (string-append out "/bin/gnome-maps") + `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)) + + ;; There seems to be no way to embed the path of libgoa-1.0.so.0. + `("LD_LIBRARY_PATH" ":" prefix (,goa-path))) + #t)))))) + (native-inputs + `(("gobject-introspection" ,gobject-introspection) + ("intltool" ,intltool) + ("pkg-config" ,pkg-config))) + (inputs + `(("folks" ,folks) + ("libchamplain" ,libchamplain) + ("libgee" ,libgee) + ("libxml2" ,libxml2) + ("geoclue" ,geoclue) + ("geocode-glib" ,geocode-glib) + ("gfbgraph" ,gfbgraph) + ("gjs" ,gjs) + ("glib" ,glib) + ("gnome-online-accounts" ,gnome-online-accounts) + ("rest" ,rest) + ("webkitgtk" ,webkitgtk))) + (propagated-inputs + `(("gtk+3" ,gtk+))) + (synopsis "Graphical map viewer and wayfinding program") + (description "GNOME Maps is a graphical map viewer. It uses map data from +the OpenStreetMap project. It can provide directions for walking, bicycling, +and driving.") + (home-page "https://wiki.gnome.org/Apps/Maps") + (license gpl2+))) -- cgit v1.2.3 From e1963db75051b10c2f995479ffab5a49376498ee Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Wed, 15 Jun 2016 16:33:01 +0300 Subject: gnu: oxygen-icons: Build with qtbase. * gnu/packages/kde-frameworks.scm (oxygen-icons)[inputs]: Remove qt, add qtbase. --- gnu/packages/kde-frameworks.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/kde-frameworks.scm b/gnu/packages/kde-frameworks.scm index 0b747def14..dc7c27ed4a 100644 --- a/gnu/packages/kde-frameworks.scm +++ b/gnu/packages/kde-frameworks.scm @@ -110,7 +110,7 @@ lower level classes for interaction with the X Windowing System.") `(("pkg-config" ,pkg-config))) (inputs `(("extra-cmake-modules" ,extra-cmake-modules) - ("qt" ,qt))) + ("qtbase" ,qtbase))) (home-page "https://community.kde.org/Frameworks") (synopsis "Oxygen provides the standard icon theme for the KDE desktop.") (description "Oxygen icon theme for the KDE desktop") -- cgit v1.2.3 From e2380269160a72d59c898961b20bc08edebc35c9 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Wed, 15 Jun 2016 20:17:10 +0300 Subject: gnu: offlineimap: Update to 6.7.0.1. * gnu/packages/mail.scm (offlineimap): Update to 6.7.0.1. --- gnu/packages/mail.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index b4563277aa..c3baa728ec 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -292,7 +292,7 @@ and corrections. It is based on a Bayesian filter.") (define-public offlineimap (package (name "offlineimap") - (version "6.7.0") + (version "6.7.0.1") (source (origin (method url-fetch) (uri (string-append "https://github.com/OfflineIMAP/offlineimap/" @@ -300,7 +300,7 @@ and corrections. It is based on a Bayesian filter.") (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "0462mal2fxvavxhwjk1a6vsnspx07yniifa687dwg46aplqznin4")))) + "1ys26v2w3vws08acjs7w5irjgahdxyad00pmj7fhcx91hbvizs80")))) (build-system python-build-system) (native-inputs `(("python" ,python-2))) (inputs `(("python2-pysqlite" ,python2-pysqlite))) -- cgit v1.2.3 From 9e786e8ba854d0e428e31648e140997beeac5bb7 Mon Sep 17 00:00:00 2001 From: Andreas Enge Date: Wed, 15 Jun 2016 21:59:26 +0200 Subject: gnu: avidemux: Update to 2.6.12. * gnu/packages/video.scm (avidemux): Update to 2.6.12. [arguments]: Adapt version number of bundled ffmpeg. --- gnu/packages/video.scm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index b447557d70..377caa920d 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -1058,7 +1058,7 @@ for use with HTML5 video.") (define-public avidemux (package (name "avidemux") - (version "2.6.10") + (version "2.6.12") (source (origin (method url-fetch) (uri (string-append @@ -1066,7 +1066,7 @@ for use with HTML5 video.") version ".tar.gz")) (sha256 (base32 - "1vas43bwb15q2wv3dpp7fgp8dc6szinmwl7i0ziq2vv5l2128v0p")) + "0nz52yih8sff53inndkh2dba759xjzsh4b8xjww419lcpk0qp6kn")) (patches (search-patches "avidemux-install-to-lib.patch")))) (build-system cmake-build-system) (native-inputs @@ -1100,19 +1100,19 @@ for use with HTML5 video.") 'patch-source-shebangs 'unpack-ffmpeg (lambda _ (with-directory-excursion "avidemux_core/ffmpeg_package" - (system* "tar" "xf" "ffmpeg-2.6.1.tar.bz2") - (delete-file "ffmpeg-2.6.1.tar.bz2"))) + (system* "tar" "xf" "ffmpeg-2.7.6.tar.bz2") + (delete-file "ffmpeg-2.7.6.tar.bz2"))) (alist-cons-after 'patch-source-shebangs 'repack-ffmpeg (lambda _ (with-directory-excursion "avidemux_core/ffmpeg_package" - (substitute* "ffmpeg-2.6.1/configure" + (substitute* "ffmpeg-2.7.6/configure" (("#! /bin/sh") (string-append "#!" (which "bash")))) - (system* "tar" "cjf" "ffmpeg-2.6.1.tar.bz2" "ffmpeg-2.6.1" + (system* "tar" "cjf" "ffmpeg-2.7.6.tar.bz2" "ffmpeg-2.7.6" ;; avoid non-determinism in the archive "--sort=name" "--mtime=@0" "--owner=root:0" "--group=root:0") - (delete-file-recursively "ffmpeg-2.6.1"))) + (delete-file-recursively "ffmpeg-2.7.6"))) (alist-replace 'configure (lambda _ ;; Copy-paste settings from the cmake build system. -- cgit v1.2.3 From b78997495474e07083744c1f3ce506ee04488548 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 15 Jun 2016 22:34:20 +0200 Subject: doc: Fix typos. Reported by ozzloy on #guix. * doc/guix.texi (package Reference): Add missing space. (G-Expressions, Invoking guix build): (Common Build Options): Fix typos. --- doc/guix.texi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 97c01be213..f85221d065 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -2561,7 +2561,7 @@ one @i{via} its @code{Requires} field. Another example where @code{propagated-inputs} is useful is for languages that lack a facility to record the run-time search path akin to the -@code{RUNPATH}of ELF files; this includes Guile, Python, Perl, GHC, and +@code{RUNPATH} of ELF files; this includes Guile, Python, Perl, GHC, and more. To ensure that libraries written in those languages can find library code they depend on at run time, run-time dependencies must be listed in @code{propagated-inputs} rather than @code{inputs}. @@ -3907,7 +3907,7 @@ like this: @end example In this example, the resulting @file{/gnu/store/@dots{}-profile.sh} file -will references @var{coreutils}, @var{grep}, and @var{sed}, thereby +will reference @var{coreutils}, @var{grep}, and @var{sed}, thereby preventing them from being garbage-collected during its lifetime. @end deffn @@ -4008,7 +4008,7 @@ for among the GNU distribution modules (@pxref{Package Modules}). Alternatively, the @code{--expression} option may be used to specify a Scheme expression that evaluates to a package; this is useful when -disambiguation among several same-named packages or package variants is +disambiguating among several same-named packages or package variants is needed. There may be zero or more @var{options}. The available options are @@ -4040,7 +4040,7 @@ the command-line tools. @item --keep-failed @itemx -K -Keep the build tree of failed builds. Thus, if a build fail, its build +Keep the build tree of failed builds. Thus, if a build fails, its build tree is kept under @file{/tmp}, in a directory whose name is shown at the end of the build log. This is useful when debugging build issues. -- cgit v1.2.3 From 07c8a98c3b45dca9fd36af7c4a300d3af58734dd Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 15 Jun 2016 23:08:05 +0200 Subject: gexp: Move 'current-source-directory' to (guix utils). * guix/gexp.scm (extract-directory, current-source-directory): Move to... * guix/utils.scm (extract-directory, current-source-directory): ... here. New procedures. --- guix/gexp.scm | 13 ------------- guix/utils.scm | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/guix/gexp.scm b/guix/gexp.scm index b4d737ecae..8e604ff7cf 100644 --- a/guix/gexp.scm +++ b/guix/gexp.scm @@ -202,19 +202,6 @@ cross-compiling.)" ;; %%LOCAL-FILE is not. (%%local-file file promise name recursive?)) -(define (extract-directory properties) - "Extract the directory name from source location PROPERTIES." - (match (assq 'filename properties) - (('filename . (? string? file-name)) - (dirname file-name)) - (_ - #f))) - -(define-syntax-rule (current-source-directory) - "Expand to the directory of the current source file or #f if it could not -be determined." - (extract-directory (current-source-location))) - (define (absolute-file-name file directory) "Return the canonical absolute file name for FILE, which lives in the vicinity of DIRECTORY." diff --git a/guix/utils.scm b/guix/utils.scm index 2d8bfd84b0..19fd0b0844 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -53,6 +53,8 @@ substitute-keyword-arguments ensure-keyword-arguments + current-source-directory + location location? @@ -700,6 +702,19 @@ output port, and PROC's result is returned." ;;; Source location. ;;; +(define (extract-directory properties) + "Extract the directory name from source location PROPERTIES." + (match (assq 'filename properties) + (('filename . (? string? file-name)) + (dirname file-name)) + (_ + #f))) + +(define-syntax-rule (current-source-directory) + "Expand to the directory of the current source file or #f if it could not +be determined." + (extract-directory (current-source-location))) + ;; A source location. (define-record-type (make-location file line column) -- cgit v1.2.3 From 0687fc9cd98e38feab80e2f9c8044e77ad52c7fd Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 16 Jun 2016 00:06:27 +0200 Subject: gexp: Add #:select? parameter to 'local-file'. * guix/gexp.scm ()[select?]: New field. (true): New procedure. (%local-file): Add #:select? and honor it. (local-file): Likewise. * tests/gexp.scm ("local-file, #:select?"): New test. * doc/guix.texi (G-Expressions): Adjust accordingly. --- doc/guix.texi | 7 ++++++- guix/gexp.scm | 20 ++++++++++++++------ tests/gexp.scm | 18 +++++++++++++++++- 3 files changed, 37 insertions(+), 8 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index f85221d065..227d861482 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -3804,7 +3804,7 @@ does not have any effect on what the G-expression does. content is directly passed as a string. @deffn {Scheme Procedure} local-file @var{file} [@var{name}] @ - [#:recursive? #f] + [#:recursive? #f] [#:select? (const #t)] Return an object representing local file @var{file} to add to the store; this object can be used in a gexp. If @var{file} is a relative file name, it is looked up relative to the source file where this form appears. @var{file} will be added to @@ -3814,6 +3814,11 @@ When @var{recursive?} is true, the contents of @var{file} are added recursively; designates a flat file and @var{recursive?} is true, its contents are added, and its permission bits are kept. +When @var{recursive?} is true, call @code{(@var{select?} @var{file} +@var{stat})} for each directory entry, where @var{file} is the entry's +absolute file name and @var{stat} is the result of @code{lstat}; exclude +entries for which @var{select?} does not return true. + This is the declarative counterpart of the @code{interned-file} monadic procedure (@pxref{The Store Monad, @code{interned-file}}). @end deffn diff --git a/guix/gexp.scm b/guix/gexp.scm index 8e604ff7cf..2bf1013b3c 100644 --- a/guix/gexp.scm +++ b/guix/gexp.scm @@ -189,18 +189,21 @@ cross-compiling.)" ;; absolute file name. We keep it in a promise to compute it lazily and avoid ;; repeated 'stat' calls. (define-record-type - (%%local-file file absolute name recursive?) + (%%local-file file absolute name recursive? select?) local-file? (file local-file-file) ;string (absolute %local-file-absolute-file-name) ;promise string (name local-file-name) ;string - (recursive? local-file-recursive?)) ;Boolean + (recursive? local-file-recursive?) ;Boolean + (select? local-file-select?)) ;string stat -> Boolean + +(define (true file stat) #t) (define* (%local-file file promise #:optional (name (basename file)) - #:key recursive?) + #:key recursive? (select? true)) ;; This intermediate procedure is part of our ABI, but the underlying ;; %%LOCAL-FILE is not. - (%%local-file file promise name recursive?)) + (%%local-file file promise name recursive? select?)) (define (absolute-file-name file directory) "Return the canonical absolute file name for FILE, which lives in the @@ -222,6 +225,10 @@ When RECURSIVE? is true, the contents of FILE are added recursively; if FILE designates a flat file and RECURSIVE? is true, its contents are added, and its permission bits are kept. +When RECURSIVE? is true, call (SELECT? FILE STAT) for each directory entry, +where FILE is the entry's absolute file name and STAT is the result of +'lstat'; exclude entries for which SELECT? does not return true. + This is the declarative counterpart of the 'interned-file' monadic procedure." (%local-file file (delay (absolute-file-name file (current-source-directory))) @@ -235,12 +242,13 @@ This is the declarative counterpart of the 'interned-file' monadic procedure." (define-gexp-compiler (local-file-compiler (file local-file?) system target) ;; "Compile" FILE by adding it to the store. (match file - (($ file (= force absolute) name recursive?) + (($ file (= force absolute) name recursive? select?) ;; Canonicalize FILE so that if it's a symlink, it is resolved. Failing ;; to do that, when RECURSIVE? is #t, we could end up creating a dangling ;; symlink in the store, and when RECURSIVE? is #f 'add-to-store' would ;; just throw an error, both of which are inconvenient. - (interned-file absolute name #:recursive? recursive?)))) + (interned-file absolute name + #:recursive? recursive? #:select? select?)))) (define-record-type (%plain-file name content references) diff --git a/tests/gexp.scm b/tests/gexp.scm index db0ffd2fdd..f504b92d84 100644 --- a/tests/gexp.scm +++ b/tests/gexp.scm @@ -33,7 +33,8 @@ #:use-module (rnrs io ports) #:use-module (ice-9 match) #:use-module (ice-9 regex) - #:use-module (ice-9 popen)) + #:use-module (ice-9 popen) + #:use-module (ice-9 ftw)) ;; Test the (guix gexp) module. @@ -132,6 +133,21 @@ (lambda () (false-if-exception (delete-file link)))))) +(test-assertm "local-file, #:select?" + (mlet* %store-monad ((select? -> (lambda (file stat) + (member (basename file) + '("guix.scm" "tests" + "gexp.scm")))) + (file -> (local-file ".." "directory" + #:recursive? #t + #:select? select?)) + (dir (lower-object file))) + (return (and (store-path? dir) + (equal? (scandir dir) + '("." ".." "guix.scm" "tests")) + (equal? (scandir (string-append dir "/tests")) + '("." ".." "gexp.scm")))))) + (test-assert "one plain file" (let* ((file (plain-file "hi" "Hello, world!")) (exp (gexp (display (ungexp file)))) -- cgit v1.2.3 From 4ff76a0a346e2b7e351d6c14da3484692f1c20e7 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 16 Jun 2016 09:33:24 +0200 Subject: gexp: Add 'local-file' file name resolution test. * tests/gexp.scm ("local-file, relative file name"): New test. --- tests/gexp.scm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/gexp.scm b/tests/gexp.scm index f504b92d84..f44f0eaf9a 100644 --- a/tests/gexp.scm +++ b/tests/gexp.scm @@ -24,6 +24,7 @@ #:use-module (guix derivations) #:use-module (guix packages) #:use-module (guix tests) + #:use-module ((guix build utils) #:select (with-directory-excursion)) #:use-module (gnu packages) #:use-module (gnu packages base) #:use-module (gnu packages bootstrap) @@ -133,6 +134,14 @@ (lambda () (false-if-exception (delete-file link)))))) +(test-equal "local-file, relative file name" + (canonicalize-path (search-path %load-path "guix/base32.scm")) + (let ((directory (dirname (search-path %load-path + "guix/build-system/gnu.scm")))) + (with-directory-excursion directory + (let ((file (local-file "../guix/base32.scm"))) + (local-file-absolute-file-name file))))) + (test-assertm "local-file, #:select?" (mlet* %store-monad ((select? -> (lambda (file stat) (member (basename file) -- cgit v1.2.3 From 20ccaecf7094f2ddd9efba24c8a87de1e30edab1 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 16 Jun 2016 13:08:57 +0200 Subject: gnu: Avoid #:prefix when importing (gnu packages …). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/lsh.scm: Remove #:prefix for (gnu packages compression). Add #:prefix for (guix licenses). --- gnu/packages/lsh.scm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gnu/packages/lsh.scm b/gnu/packages/lsh.scm index bb941365a9..2ea1591354 100644 --- a/gnu/packages/lsh.scm +++ b/gnu/packages/lsh.scm @@ -17,7 +17,7 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages lsh) - #:use-module (guix licenses) + #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu) @@ -25,7 +25,7 @@ #:use-module (gnu packages m4) #:use-module (gnu packages linux) #:use-module (gnu packages nettle) - #:use-module ((gnu packages compression) #:prefix guix:) + #:use-module (gnu packages compression) #:use-module (gnu packages multiprecision) #:use-module (gnu packages readline) #:use-module (gnu packages gperf) @@ -55,7 +55,7 @@ replaces the \"select() loop\" and allows the registration of event handlers for file and network I/O, timers and signals. Since processes use these mechanisms for almost all external communication, liboop can be used as the basis for almost any application.") - (license lgpl2.1+))) + (license license:lgpl2.1+))) (define-public lsh (package @@ -100,7 +100,7 @@ basis for almost any application.") ("readline" ,readline-6.2) ("liboop" ,liboop) - ("zlib" ,guix:zlib) + ("zlib" ,zlib) ("gmp" ,gmp) ;; The server (lshd) invokes xauth when X11 forwarding is requested. @@ -156,4 +156,4 @@ used to create a secure line of communication between two computers, providing shell access to the server system from the client. It provides both the server daemon and the client application, as well as tools for manipulating key files.") - (license gpl2+))) + (license license:gpl2+))) -- cgit v1.2.3 From 68a973024fc2a5c6c79d26e4f4fc4a275facf97d Mon Sep 17 00:00:00 2001 From: ng0 Date: Wed, 15 Jun 2016 21:04:05 +0000 Subject: gnu: perl-test-simple: Update to 1.302026. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/perl.scm (perl-test-simple): Update to 1.302026. Signed-off-by: Ludovic Courtès --- gnu/packages/perl.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm index e7e79671e3..e45db041e7 100644 --- a/gnu/packages/perl.scm +++ b/gnu/packages/perl.scm @@ -5374,14 +5374,14 @@ makes fork(2) safe to use in test cases.") (define-public perl-test-simple (package (name "perl-test-simple") - (version "1.001014") + (version "1.302026") (source (origin (method url-fetch) (uri (string-append "mirror://cpan/authors/id/E/EX/EXODIST/" "Test-Simple-" version ".tar.gz")) (sha256 (base32 - "0szi95shwwdvc4nqykzgx05g2m1001mjhvqqhjg5wypbi771992m")))) + "1mq1sykv48rgjamw4wxa290mnyjm0dw9w9lpzncnac9gfx18vm72")))) (build-system perl-build-system) (synopsis "Basic utilities for writing tests") (description -- cgit v1.2.3 From 3d1240aa2561792895795315c7783a28bf4412af Mon Sep 17 00:00:00 2001 From: Carlo Zancanaro Date: Wed, 15 Jun 2016 22:15:33 +1000 Subject: gnu: Add awesome. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/wm.scm (awesome): New variable. * gnu/packages/patches/awesome-reproducible-png.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. Co-authored-by: Ludovic Courtès --- gnu/local.mk | 1 + .../patches/awesome-reproducible-png.patch | 14 ++++ gnu/packages/wm.scm | 96 ++++++++++++++++++++++ 3 files changed, 111 insertions(+) create mode 100644 gnu/packages/patches/awesome-reproducible-png.patch diff --git a/gnu/local.mk b/gnu/local.mk index abd05ef01a..55fea0e855 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -439,6 +439,7 @@ dist_patch_DATA = \ %D%/packages/patches/avahi-localstatedir.patch \ %D%/packages/patches/avidemux-install-to-lib.patch \ %D%/packages/patches/avrdude-fix-libusb.patch \ + %D%/packages/patches/awesome-reproducible-png.patch \ %D%/packages/patches/bash-completion-directories.patch \ %D%/packages/patches/bigloo-gc-shebangs.patch \ %D%/packages/patches/binutils-ld-new-dtags.patch \ diff --git a/gnu/packages/patches/awesome-reproducible-png.patch b/gnu/packages/patches/awesome-reproducible-png.patch new file mode 100644 index 0000000000..0fae65bc71 --- /dev/null +++ b/gnu/packages/patches/awesome-reproducible-png.patch @@ -0,0 +1,14 @@ +Do not introduce timestamps in PNG files (for icons). +See . + +--- awesome-3.4.15/CMakeLists.txt 2013-02-11 14:50:21.000000000 +0100 ++++ awesome-3.4.15/CMakeLists.txt 2016-06-16 13:59:30.528125439 +0200 +@@ -295,7 +295,7 @@ macro(a_icon_convert match replacement i + set(ALL_ICONS ${ALL_ICONS} ${output}) + + add_custom_command( +- COMMAND ${CONVERT_EXECUTABLE} ${input} ${ARGN} ${output} ++ COMMAND ${CONVERT_EXECUTABLE} +set date:create +set date:modify -define png:exclude-chunk=time ${input} ${ARGN} ${output} + OUTPUT ${output} + DEPENDS ${input} + VERBATIM) diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm index 5f32fc478d..f385d2b4fb 100644 --- a/gnu/packages/wm.scm +++ b/gnu/packages/wm.scm @@ -7,6 +7,8 @@ ;;; Copyright © 2016 Danny Milosavljevic ;;; Copyright © 2016 Efraim Flashner ;;; Copyright © 2016 Al McElrath +;;; Copyright © 2016 Carlo Zancanaro +;;; Copyright © 2016 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -28,6 +30,7 @@ #:use-module (guix packages) #:use-module (gnu packages) #:use-module (gnu packages linux) + #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) #:use-module (guix build-system haskell) #:use-module (gnu packages haskell) @@ -49,6 +52,11 @@ #:use-module (gnu packages maths) #:use-module (gnu packages web) #:use-module (gnu packages fontutils) + #:use-module (gnu packages freedesktop) + #:use-module (gnu packages glib) + #:use-module (gnu packages gperf) + #:use-module (gnu packages imagemagick) + #:use-module (gnu packages lua) #:use-module (guix download) #:use-module (guix git-download)) @@ -370,3 +378,91 @@ and easy to handle yet full of features to make an easy and fast desktop experience.") (home-page "http://fluxbox.org/") (license license:expat))) + +(define-public awesome + (package + (name "awesome") + (version "3.4.15") + (source + (origin (method url-fetch) + (uri (string-append + "https://awesome.naquadah.org/download/awesome-" + version ".tar.xz")) + (sha256 + (base32 + "1m910lr7wkw2dgzmirfvz7dasfswhhccdf65l21iiciv24c3w1bb")) + (modules '((guix build utils) + (srfi srfi-19))) + (imported-modules '((guix build utils))) + (snippet + ;; Remove non-reproducible timestamp and use the date of the + ;; source file instead. + '(substitute* "common/version.c" + (("__DATE__ \" \" __TIME__") + (date->string + (time-utc->date + (make-time time-utc 0 + (stat:mtime (stat "awesome.c")))) + "\"~c\"")))) + (patches (search-patches "awesome-reproducible-png.patch")))) + (build-system cmake-build-system) + (native-inputs `(("asciidoc" ,asciidoc) + ("docbook-xsl" ,docbook-xsl) + ("doxygen" ,doxygen) + ("gperf" ,gperf) + ("imagemagick" ,imagemagick) + ("libxml2" ,libxml2) ;for XML_CATALOG_FILES + ("pkg-config" ,pkg-config) + ("xmlto" ,xmlto))) + (inputs `(("cairo" ,cairo) + ("dbus" ,dbus) + ("gdk-pixbuf" ,gdk-pixbuf) + ("glib" ,glib) + ("imlib2" ,imlib2) + ("libev" ,libev) + ("libxcb" ,libxcb) + ("libxcursor" ,libxcursor) + ("libxdg-basedir" ,libxdg-basedir) + ("lua" ,lua-5.1) + ("pango" ,pango) + ("startup-notification" ,startup-notification) + ("xcb-util" ,xcb-util) + ("xcb-util-cursor" ,xcb-util-cursor) + ("xcb-util-image" ,xcb-util-image) + ("xcb-util-keysyms" ,xcb-util-keysyms) + ("xcb-util-renderutil" ,xcb-util-renderutil) + ("xcb-util-wm" ,xcb-util-wm))) + (arguments + `(;; Let compression happen in our 'compress-documentation' phase so that + ;; '--no-name' is used, which removes timestamps from gzip output. + #:configure-flags '("-DCOMPRESS_MANPAGES=off") + + #:phases (modify-phases %standard-phases + (add-before 'build 'xmlto-skip-validation + (lambda _ + ;; We can't download the necessary schema, so so skip + ;; validation and assume they're valid. + (substitute* "../build/CMakeFiles/man.dir/build.make" + (("/xmlto") + (string-append "/xmlto --skip-validation"))) + #t)) + (replace 'check + (lambda _ + ;; There aren't any tests, so just make sure the binary + ;; gets built and can be run successfully. + (zero? (system* "../build/awesome" "-v"))))))) + (synopsis "Highly configurable window manager") + (description + "awesome is a window manager for X. It manages windows in different +layouts, like floating or tiled. Any layout can be applied dynamically, +optimizing the environment for the application in use and the task currently +being performed. + +In a tiled layout, windows are managed in a master and stacking area. In a +floating layout windows can be resized and moved freely. Dialog windows are +always managed as floating, regardless of the layout currently applied. + +Windows are grouped by tags in awesome. Each window can be tagged with one or +more tags. Selecting certain tags displays all windows with these tags.") + (license license:gpl2+) + (home-page "https://awesome.naquadah.org/"))) -- cgit v1.2.3 From a7db719f3dc16b6be7aaab45e718798902d82833 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 16 Jun 2016 14:31:52 +0200 Subject: packages: Disambiguate 'modules' and 'imported-modules' in . The two mistakes made here (confusion between 'modules' and 'imported-modules') were canceling each other. * guix/packages.scm (patch-and-repack): Use IMPORTED-MODULES, not MODULES, as the base of the module list passed as #:modules to 'gexp->derivation'. (origin->derivation): Pass IMPORTED-MODULES, not MODULES, as the #:imported-modules argument of 'patch-and-repack'. * gnu/packages/engineering.scm (fastcap)[source]: Add 'imported-modules' field. --- gnu/packages/engineering.scm | 1 + guix/packages.scm | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm index 02b1c4e9eb..7b21c11ad3 100644 --- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm @@ -232,6 +232,7 @@ optimizer; and it can produce photorealistic and design review images.") (modules '((guix build utils) (guix build download) (guix ftp-client))) + (imported-modules modules) (patches (search-patches "fastcap-mulSetup.patch" "fastcap-mulGlobal.patch")))) (build-system gnu-build-system) diff --git a/guix/packages.scm b/guix/packages.scm index 05a632cf05..acb8f34417 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -544,7 +544,8 @@ IMPORTED-MODULES specify modules to use/import for use by SNIPPET." "--files-from=.file_list"))))))))) (let ((name (tarxz-name original-file-name)) - (modules (delete-duplicates (cons '(guix build utils) modules)))) + (modules (delete-duplicates (cons '(guix build utils) + imported-modules)))) (gexp->derivation name build #:graft? #f #:system system @@ -1152,7 +1153,7 @@ cross-compilation target triplet." #:flags flags #:system system #:modules modules - #:imported-modules modules + #:imported-modules imported-modules #:guile-for-build guile))))) (define-gexp-compiler (origin-compiler (origin origin?) system target) -- cgit v1.2.3 From 78d2fd3230185120f07938ee0ffded18cf74fafd Mon Sep 17 00:00:00 2001 From: 宋文武 Date: Tue, 14 Jun 2016 21:03:12 +0800 Subject: gnu: mariadb: Update to 10.1.14. * gnu/packages/databases.scm (mariadb): Update to 10.1.14. --- gnu/packages/databases.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index 3a81a8ee8c..e99f1fb3a2 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -259,7 +259,7 @@ Language.") (define-public mariadb (package (name "mariadb") - (version "10.1.12") + (version "10.1.14") (source (origin (method url-fetch) (uri (string-append "https://downloads.mariadb.org/f/" @@ -267,7 +267,7 @@ Language.") name "-" version ".tar.gz")) (sha256 (base32 - "1rzlc2ns84x540asbkgdp9562haxhlszfpdqh64i9pz4q1m4cpvr")))) + "04ysdbvj2qapfpaj7s5d2j3m8k9l0yb5k0c2yaini8jrl1s1krqq")))) (build-system cmake-build-system) (arguments '(#:configure-flags -- cgit v1.2.3 From 6575183b2c4764c94da6de034dbc432272db1ead Mon Sep 17 00:00:00 2001 From: 宋文武 Date: Tue, 14 Jun 2016 22:01:24 +0800 Subject: gnu: services: Add mysql-service. * gnu/services/database.scm (): New record type. (%mysql-accounts, mysql-service-type): New variables. (mysql-configuration-file, %mysql-activation, mysql-shepherd-services) (mysql-services): New procedures. * doc/guix.texi (Database Services): Document it. --- doc/guix.texi | 23 ++++++++- gnu/services/databases.scm | 119 ++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 140 insertions(+), 2 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 227d861482..cbecc3e96f 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -8001,7 +8001,7 @@ web site} for more information. @node Database Services @subsubsection Database Services -The @code{(gnu services databases)} module provides the following service. +The @code{(gnu services databases)} module provides the following services. @deffn {Scheme Procedure} postgresql-service [#:postgresql postgresql] @ [#:config-file] [#:data-directory ``/var/lib/postgresql/data''] @@ -8013,6 +8013,27 @@ The PostgreSQL daemon loads its runtime configuration from @var{data-directory}. @end deffn +@deffn {Scheme Procedure} mysql-service [#:config (mysql-configuration)] +Return a service that runs @command{mysqld}, the MySQL or MariaDB +database server. + +The optional @var{config} argument specifies the configuration for +@command{mysqld}, which should be a @code{} object. +@end deffn + +@deftp {Data Type} mysql-configuration +Data type representing the configuration of @var{mysql-service}. + +@table @asis +@item @code{mysql} (default: @var{mariadb}) +Package object of the MySQL database server, can be either @var{mariadb} +or @var{mysql}. + +For MySQL, a temorary root password will be displayed at activation time. +For MariaDB, the root password is empty. +@end table +@end deftp + @node Mail Services @subsubsection Mail Services diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm index 690375eb09..e136d1e00b 100644 --- a/gnu/services/databases.scm +++ b/gnu/services/databases.scm @@ -27,7 +27,9 @@ #:use-module (guix records) #:use-module (guix gexp) #:use-module (ice-9 match) - #:export (postgresql-service)) + #:export (postgresql-service + mysql-service + mysql-configuration)) ;;; Commentary: ;;; @@ -143,3 +145,118 @@ and stores the database cluster in @var{data-directory}." (postgresql postgresql) (config-file config-file) (data-directory data-directory)))) + + +;;; +;;; MySQL. +;;; + +(define-record-type* + mysql-configuration make-mysql-configuration + mysql-configuration? + (mysql mysql-configuration-mysql (default mariadb))) + +(define %mysql-accounts + (list (user-group + (name "mysql") + (system? #t)) + (user-account + (name "mysql") + (group "mysql") + (system? #t) + (home-directory "/var/empty") + (shell #~(string-append #$shadow "/sbin/nologin"))))) + +(define mysql-configuration-file + (match-lambda + (($ mysql) + (plain-file "my.cnf" "[mysqld] +datadir=/var/lib/mysql +socket=/run/mysqld/mysqld.sock +")))) + +(define (%mysql-activation config) + "Return an activation gexp for the MySQL or MariaDB database server." + (let ((mysql (mysql-configuration-mysql config)) + (my.cnf (mysql-configuration-file config))) + #~(begin + (use-modules (ice-9 popen) + (guix build utils)) + (let* ((mysqld (string-append #$mysql "/bin/mysqld")) + (user (getpwnam "mysql")) + (uid (passwd:uid user)) + (gid (passwd:gid user)) + (datadir "/var/lib/mysql") + (rundir "/run/mysqld")) + (mkdir-p datadir) + (chown datadir uid gid) + (mkdir-p rundir) + (chown rundir uid gid) + ;; Initialize the database when it doesn't exist. + (when (not (file-exists? (string-append datadir "/mysql"))) + (if (string-prefix? "mysql-" (strip-store-file-name #$mysql)) + ;; For MySQL. + (system* mysqld + (string-append "--defaults-file=" #$my.cnf) + "--initialize" + "--user=mysql") + ;; For MariaDB. + ;; XXX: The 'mysql_install_db' script doesn't work directly + ;; due to missing 'mkdir' in PATH. + (let ((p (open-pipe* OPEN_WRITE mysqld + (string-append + "--defaults-file=" #$my.cnf) + "--bootstrap" + "--user=mysql"))) + ;; Create the system database, as does by 'mysql_install_db'. + (display "create database mysql;\n" p) + (display "use mysql;\n" p) + (for-each + (lambda (sql) + (call-with-input-file + (string-append #$mysql "/share/mysql/" sql) + (lambda (in) (dump-port in p)))) + '("mysql_system_tables.sql" + "mysql_performance_tables.sql" + "mysql_system_tables_data.sql" + "fill_help_tables.sql")) + ;; Remove the anonymous user and disable root access from + ;; remote machines, as does by 'mysql_secure_installation'. + (display " +DELETE FROM user WHERE User=''; +DELETE FROM user WHERE User='root' AND + Host NOT IN ('localhost', '127.0.0.1', '::1'); +FLUSH PRIVILEGES; +" p) + (close-pipe p)))))))) + +(define (mysql-shepherd-service config) + (list (shepherd-service + (provision '(mysql)) + (documentation "Run the MySQL server.") + (start (let ((mysql (mysql-configuration-mysql config)) + (my.cnf (mysql-configuration-file config))) + #~(make-forkexec-constructor + (list (string-append #$mysql "/bin/mysqld") + (string-append "--defaults-file=" #$my.cnf)) + #:user "mysql" #:group "mysql"))) + (stop #~(make-kill-destructor))))) + +(define mysql-service-type + (service-type + (name 'mysql) + (extensions + (list (service-extension account-service-type + (const %mysql-accounts)) + (service-extension activation-service-type + %mysql-activation) + (service-extension shepherd-root-service-type + mysql-shepherd-service))))) + +(define* (mysql-service #:key (config (mysql-configuration))) + "Return a service that runs @command{mysqld}, the MySQL or MariaDB +database server. + +The optional @var{config} argument specifies the configuration for +@command{mysqld}, which should be a @code{} object." + (service mysql-service-type config)) -- cgit v1.2.3 From 90a2309b74f5094eb04feee5b8f99a8fea9bfa0f Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 16 Jun 2016 05:36:09 +0300 Subject: gnu: obs: Build with modular qt. * gnu/packages/video.scm (obs)[inputs]: Remove qt, add qtbase, qtx11extras. --- gnu/packages/video.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index 377caa920d..5bed6e6591 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -1385,7 +1385,8 @@ be used for realtime video capture via Linux-specific APIs.") ("libxcomposite" ,libxcomposite) ("mesa" ,mesa) ("pulseaudio" ,pulseaudio) - ("qt" ,qt) + ("qtbase" ,qtbase) + ("qtx11extras" ,qtx11extras) ("v4l-utils" ,v4l-utils) ("zlib" ,zlib))) (synopsis "Live streaming software") -- cgit v1.2.3 From b37662e25c8603ccd1f907de0859aa6f035a3839 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 16 Jun 2016 06:17:52 +0300 Subject: gnu: v4l-utils: Build with qtbase. * gnu/packages/video.scm (v4l-utils)[inputs]: Remove qt, add qtbase. --- gnu/packages/video.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index 5bed6e6591..d0a9785b7c 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -1349,7 +1349,7 @@ tools, XML authoring components, and an extensible plug-in based API.") ("glu" ,glu) ("libjpeg" ,libjpeg) ("libx11" ,libx11) - ("qt" ,qt) + ("qtbase" ,qtbase) ("eudev" ,eudev))) (synopsis "Realtime video capture utilities for Linux") (description "The v4l-utils provide a series of libraries and utilities to -- cgit v1.2.3 From 9a5c0320f0158e2233a88701582f493f4d89f47b Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 16 Jun 2016 06:37:18 +0300 Subject: gnu: v4l-utils: Update to 1.10.1. * gnu/packages/video.scm (v4l-utils): Update to 1.10.1. --- gnu/packages/video.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index d0a9785b7c..451fdfcf6a 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -1328,14 +1328,14 @@ tools, XML authoring components, and an extensible plug-in based API.") (define-public v4l-utils (package (name "v4l-utils") - (version "1.10.0") + (version "1.10.1") (source (origin (method url-fetch) (uri (string-append "https://linuxtv.org/downloads/v4l-utils" "/v4l-utils-" version ".tar.bz2")) (sha256 (base32 - "0srkwh3r6f0bkb4kp0d7i0mlmp8babs3qc22cdy1sw4awmzd5skq")))) + "1h1nhg5cmmzlbipak526nk4bm6d0yb217mll75f3rpg7kz1cqiv1")))) (build-system gnu-build-system) (arguments '(#:configure-flags -- cgit v1.2.3 From 14ea30e47369b114f14f9f9a06a509d1aad5098f Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 16 Jun 2016 09:52:18 +0300 Subject: gnu: bitcoin-core: Update to 0.12.1. * gnu/packages/finance.scm (bitcoin-core): Update to 0.12.1. --- gnu/packages/finance.scm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm index 23faead747..4d6c7392fb 100644 --- a/gnu/packages/finance.scm +++ b/gnu/packages/finance.scm @@ -31,6 +31,7 @@ #:use-module (gnu packages emacs) #:use-module (gnu packages groff) #:use-module (gnu packages libedit) + #:use-module (gnu packages libevent) #:use-module (gnu packages linux) #:use-module (gnu packages multiprecision) #:use-module (gnu packages pkg-config) @@ -45,16 +46,15 @@ (define-public bitcoin-core (package (name "bitcoin-core") - (version "0.11.2") + (version "0.12.1") (source (origin (method url-fetch) (uri (string-append "https://bitcoin.org/bin/bitcoin-core-" - version "/bitcoin-" - version ".tar.gz")) + version "/bitcoin-" version ".tar.gz")) (sha256 (base32 - "1lwh0vhw1gf3h6zrhynvad9y9qbpmhc8cw1zvj11yzsz5rjbvlm4")))) + "16g1cnasy24275kxrs0cg48nbx1dk54xvxm1pdsvk7y30mn3pz08")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config) @@ -63,6 +63,7 @@ (inputs `(("bdb" ,bdb) ("boost" ,boost) + ("libevent" ,libevent) ("miniupnpc" ,miniupnpc) ("openssl" ,openssl) ("protobuf" ,protobuf) -- cgit v1.2.3 From e2814984afba5394212b3632b3f1693d6c991325 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 16 Jun 2016 10:16:48 +0300 Subject: gnu: gpsbabel: Build with modular qt. * gnu/packages/gps.scm (gpsbabel)[inputs]: Remove qt, add qtbase, qttools. --- gnu/packages/gps.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gnu/packages/gps.scm b/gnu/packages/gps.scm index fd045b1f1a..ccd9636ea0 100644 --- a/gnu/packages/gps.scm +++ b/gnu/packages/gps.scm @@ -63,7 +63,8 @@ (inputs `(("expat" ,expat) ("zlib" ,zlib) - ("qt" ,qt))) + ("qtbase" ,qtbase) + ("qttools" ,qttools))) (native-inputs `(("which" ,which) ("libxml2" ,libxml2))) ;'xmllint' needed for the KML tests -- cgit v1.2.3 From 0a0bfd685e15e9aecbb36c0ed370d796ba7df862 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 16 Jun 2016 11:20:23 +0300 Subject: gnu: powertabeditor: Build with qtbase. * gnu/packages/music.scm (powertabeditor)[inputs]: Remove qt, add qtbase. --- gnu/packages/music.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm index d491aa605e..d297f70312 100644 --- a/gnu/packages/music.scm +++ b/gnu/packages/music.scm @@ -667,7 +667,7 @@ your own lessons.") (inputs `(("boost" ,boost) ("alsa-lib" ,alsa-lib) - ("qt" ,qt) + ("qtbase" ,qtbase) ("withershins" ,withershins) ("libiberty" ,libiberty) ;for withershins ("binutils" ,binutils) ;for -lbfd and -liberty (for withershins) -- cgit v1.2.3 From e5f2afdbb52c832285dccae2831934058994a515 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 16 Jun 2016 11:31:54 +0300 Subject: gnu: synthv1: Build with modular qt. * gnu/packages/music.scm (synthv1)[inputs]: Remove qt, add qtbase, qttools. --- gnu/packages/music.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm index d297f70312..bd8a86cef0 100644 --- a/gnu/packages/music.scm +++ b/gnu/packages/music.scm @@ -706,7 +706,8 @@ Editor. It is compatible with Power Tab Editor 1.7 and Guitar Pro.") ("lv2" ,lv2) ("alsa-lib" ,alsa-lib) ("liblo" ,liblo) - ("qt" ,qt))) + ("qtbase" ,qtbase) + ("qttools" ,qttools))) (home-page "http://synthv1.sourceforge.net") (synopsis "Polyphonic subtractive synthesizer") (description -- cgit v1.2.3 From 07831f7a36924728b9cbf561b743b167604a436b Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 16 Jun 2016 11:42:26 +0300 Subject: gnu: vmpk: Build with modular qt. * gnu/packages/music.scm (vmpk)[inputs]: Remove qt, add qtbase, qtsvg, qttools, qtx11extras. --- gnu/packages/music.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm index bd8a86cef0..b8d70f2896 100644 --- a/gnu/packages/music.scm +++ b/gnu/packages/music.scm @@ -1133,7 +1133,10 @@ backends, including ALSA, OSS, Network and FluidSynth.") #t))))) (inputs `(("drumstick" ,drumstick) - ("qt" ,qt))) + ("qtbase" ,qtbase) + ("qtsvg" ,qtsvg) + ("qttools" ,qttools) + ("qtx11extras" ,qtx11extras))) (native-inputs `(("libxslt" ,libxslt) ;for xsltproc ("docbook-xsl" ,docbook-xsl) -- cgit v1.2.3 From ca1cab824336ba93825027435e1c0080daa2e45e Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 16 Jun 2016 11:56:00 +0300 Subject: gnu: drumstick: Build with modular qt. * gnu/packages/music.scm (drumstick)[inputs]: Remove qt, add qtbase, qtsvg. --- gnu/packages/music.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm index b8d70f2896..23fe9224c4 100644 --- a/gnu/packages/music.scm +++ b/gnu/packages/music.scm @@ -1086,7 +1086,8 @@ browser.") "/manpages/docbook.xsl"))) #t))))) (inputs - `(("qt" ,qt) + `(("qtbase" ,qtbase) + ("qtsvg" ,qtsvg) ("alsa-lib" ,alsa-lib) ("fluidsynth" ,fluidsynth))) (native-inputs -- cgit v1.2.3 From df9031e1689c62655422985f60d8ea3fdf541648 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 16 Jun 2016 12:23:43 +0300 Subject: gnu: alsa-modular-synth: Build with modular qt. * gnu/packages/audio.scm (alsa-modular-synth)[inputs]: Remove qt, add qtbase, qttools. --- gnu/packages/audio.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm index bcb3b77b88..144d7321b6 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2015 Andreas Enge ;;; Copyright © 2015 Alex Kost ;;; Copyright © 2015, 2016 Mark H Weaver +;;; Copyright © 2016 Efraim Flashner ;;; ;;; This file is part of GNU Guix. ;;; @@ -100,7 +101,8 @@ ("jack" ,jack-1) ("ladspa" ,ladspa) ("liblo" ,liblo) - ("qt" ,qt))) + ("qtbase" ,qtbase) + ("qttools" ,qttools))) (native-inputs `(("pkg-config" ,pkg-config))) (home-page "http://alsamodular.sourceforge.net/") -- cgit v1.2.3 From b13b9834f2a1231f3041cf891baf2ac12f7db85c Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 16 Jun 2016 14:49:11 +0300 Subject: gnu: scribus: Build with modular qt. * gnu/packages/scribus.scm (scribus)[inputs]: Remove qt, add qtbase, qtdeclarative, qttools. --- gnu/packages/scribus.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gnu/packages/scribus.scm b/gnu/packages/scribus.scm index a06054bede..68e57cd1e4 100644 --- a/gnu/packages/scribus.scm +++ b/gnu/packages/scribus.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 Ricardo Wurmus +;;; Copyright © 2016 Efraim Flashner ;;; ;;; This file is part of GNU Guix. ;;; @@ -59,7 +60,9 @@ ("libxml2" ,libxml2) ("python" ,python-2) ("freetype" ,freetype) - ("qt" ,qt) + ("qtbase" ,qtbase) + ("qtdeclarative" ,qtdeclarative) + ("qttools" ,qttools) ("zlib" ,zlib))) (native-inputs `(("util-linux" ,util-linux) -- cgit v1.2.3 From 77952b4c184427ac670ac8308d9fb10837168506 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 16 Jun 2016 14:57:27 +0300 Subject: gnu: openntpd: Update to 6.0p1. * gnu/packages/ntp.scm (openntpd): Update to 6.0p1. --- gnu/packages/ntp.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/ntp.scm b/gnu/packages/ntp.scm index bb8bffc40d..177eb8946a 100644 --- a/gnu/packages/ntp.scm +++ b/gnu/packages/ntp.scm @@ -97,7 +97,7 @@ computers over a network.") (define-public openntpd (package (name "openntpd") - (version "5.9p1") + (version "6.0p1") (source (origin (method url-fetch) ;; XXX Use mirror://openbsd @@ -106,7 +106,7 @@ computers over a network.") version ".tar.gz")) (sha256 (base32 - "1cwp6vxv7nj039kgbf0mgfm06f8zc4axawdc7ijl2r2ddl2h8310")))) + "1s3plmxmybwpfrimq6sc54wxnn6ca7rb2g5k2bdjm4c88w4q1axi")))) (build-system gnu-build-system) (home-page "http://www.openntpd.org/") (synopsis "NTP client and server by the OpenBSD Project") -- cgit v1.2.3 From f663e0972093b4ad07772b97dc39e6be8ec3cbc0 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 16 Jun 2016 15:16:05 +0300 Subject: gnu: libressl: Update to 2.3.6. * gnu/packages/tls.scm (libressl): Update to 2.3.6. --- gnu/packages/tls.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index 513edcc1a6..0add9ef96e 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -323,7 +323,7 @@ required structures.") (define-public libressl (package (name "libressl") - (version "2.3.5") + (version "2.3.6") (source (origin (method url-fetch) @@ -332,7 +332,7 @@ required structures.") version ".tar.gz")) (sha256 (base32 - "0fvmifz61zfq6byy4dh1qqdg9fpbdsyldjwx5hlcgg6ywxf2f9gl")))) + "1yipsp1ici207nbminbf1knh252kzvqg036v0xpx0fw1wrwlg2im")))) (build-system gnu-build-system) (native-search-paths ;; FIXME: These two variables must designate a single file or directory -- cgit v1.2.3 From 4cafe8adfe5355939e4678beeea3fb9423343416 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 16 Jun 2016 15:42:16 +0300 Subject: gnu: avidemux: Add hardware acceleration support. * gnu/packages/video.scm (avidemux)[inputs]: Add libva, libvdpau. --- gnu/packages/video.scm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index 451fdfcf6a..1decb37e8c 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -1080,6 +1080,8 @@ for use with HTML5 video.") ("glu" ,glu) ("jack" ,jack-1) ("lame" ,lame) + ("libva" ,libva) + ("libvdpau" ,libvdpau) ("libvorbis" ,libvorbis) ("libvpx" ,libvpx) ("libxv" ,libxv) -- cgit v1.2.3 From 1898900f1f7a743bfd951815862ae13bc4370df5 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 16 Jun 2016 15:53:32 +0300 Subject: gnu: avidemux: Use 'modify-phases'. * gnu/packages/video.scm (avidemux)[arguments]: Use 'modify-phases'. --- gnu/packages/video.scm | 93 +++++++++++++++++++++++++------------------------- 1 file changed, 46 insertions(+), 47 deletions(-) diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index 1decb37e8c..e28375181d 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -1098,14 +1098,13 @@ for use with HTML5 video.") #:phases ;; Make sure files inside the included ffmpeg tarball are ;; patch-shebanged. - (alist-cons-before - 'patch-source-shebangs 'unpack-ffmpeg - (lambda _ - (with-directory-excursion "avidemux_core/ffmpeg_package" - (system* "tar" "xf" "ffmpeg-2.7.6.tar.bz2") - (delete-file "ffmpeg-2.7.6.tar.bz2"))) - (alist-cons-after - 'patch-source-shebangs 'repack-ffmpeg + (modify-phases %standard-phases + (add-before 'patch-source-shebangs 'unpack-ffmpeg + (lambda _ + (with-directory-excursion "avidemux_core/ffmpeg_package" + (system* "tar" "xf" "ffmpeg-2.7.6.tar.bz2") + (delete-file "ffmpeg-2.7.6.tar.bz2")))) + (add-after 'patch-source-shebangs 'repack-ffmpeg (lambda _ (with-directory-excursion "avidemux_core/ffmpeg_package" (substitute* "ffmpeg-2.7.6/configure" @@ -1114,25 +1113,26 @@ for use with HTML5 video.") ;; avoid non-determinism in the archive "--sort=name" "--mtime=@0" "--owner=root:0" "--group=root:0") - (delete-file-recursively "ffmpeg-2.7.6"))) - (alist-replace 'configure - (lambda _ - ;; Copy-paste settings from the cmake build system. - (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH")) - (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))) - (alist-replace 'build - (lambda* (#:key inputs outputs #:allow-other-keys) - (let* - ((out (assoc-ref outputs "out")) - (lib (string-append out "/lib")) - (top (getcwd)) - (sdl (assoc-ref inputs "sdl")) - (build_component - (lambda* (component srcdir #:optional (args '())) - (let ((builddir (string-append "build_" component))) - (mkdir builddir) - (with-directory-excursion builddir - (zero? (and + (delete-file-recursively "ffmpeg-2.7.6")))) + (replace 'configure + (lambda _ + ;; Copy-paste settings from the cmake build system. + (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH")) + (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH")))) + (replace 'build + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* + ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib")) + (top (getcwd)) + (sdl (assoc-ref inputs "sdl")) + (build_component + (lambda* (component srcdir #:optional (args '())) + (let ((builddir (string-append "build_" component))) + (mkdir builddir) + (with-directory-excursion builddir + (zero? + (and (apply system* "cmake" "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE" (string-append "-DCMAKE_INSTALL_PREFIX=" out) @@ -1145,26 +1145,25 @@ for use with HTML5 video.") (string-append "../" srcdir) "-DENABLE_QT5=True" args) - (system* "make" "-j" - (number->string (parallel-job-count))) - (system* "make" "install")))))))) - (mkdir out) - (and (build_component "core" "avidemux_core") - (build_component "cli" "avidemux/cli") - (build_component "qt4" "avidemux/qt4") - (build_component "plugins_common" "avidemux_plugins" - '("-DPLUGIN_UI=COMMON")) - (build_component "plugins_cli" "avidemux_plugins" - '("-DPLUGIN_UI=CLI")) - (build_component "plugins_qt4" "avidemux_plugins" - '("-DPLUGIN_UI=QT4")) - (build_component "plugins_settings" "avidemux_plugins" - '("-DPLUGIN_UI=SETTINGS"))) - ;; Remove .exe and .dll file. - (delete-file-recursively - (string-append out "/share/ADM6_addons")))) - (alist-delete 'install - %standard-phases))))))) + (system* "make" "-j" + (number->string (parallel-job-count))) + (system* "make" "install")))))))) + (mkdir out) + (and (build_component "core" "avidemux_core") + (build_component "cli" "avidemux/cli") + (build_component "qt4" "avidemux/qt4") + (build_component "plugins_common" "avidemux_plugins" + '("-DPLUGIN_UI=COMMON")) + (build_component "plugins_cli" "avidemux_plugins" + '("-DPLUGIN_UI=CLI")) + (build_component "plugins_qt4" "avidemux_plugins" + '("-DPLUGIN_UI=QT4")) + (build_component "plugins_settings" "avidemux_plugins" + '("-DPLUGIN_UI=SETTINGS"))) + ;; Remove .exe and .dll file. + (delete-file-recursively + (string-append out "/share/ADM6_addons"))))) + (delete 'install)))) (home-page "http://fixounet.free.fr/avidemux/") (synopsis "Video editor") (description "Avidemux is a video editor designed for simple cutting, -- cgit v1.2.3 From 64e8be679cb757bab3955fbaa159c909d18100c7 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 16 Jun 2016 15:42:57 +0300 Subject: gnu: avidemux: Build with modular qt. * gnu/packages/video.scm (avidemux)[inputs]: Remove qt, add qtbase, qttools. --- gnu/packages/video.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index e28375181d..9685317bc0 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -1088,7 +1088,8 @@ for use with HTML5 video.") ("perl" ,perl) ("pulseaudio" ,pulseaudio) ("python" ,python-wrapper) - ("qt" ,qt) + ("qtbase" ,qtbase) + ("qttools" ,qttools) ("sdl" ,sdl) ("sqlite" ,sqlite) ("yasm" ,yasm) -- cgit v1.2.3 From 76806c54ed72f8f04079bbb187b186b833c103e1 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 16 Jun 2016 17:31:31 +0300 Subject: gnu: calibre: Build with qtbase. * gnu/packages/ebook.scm (calibre)[inputs]: Remove qt, add qtbase. [native-inputs]: Remove qt, add qtbase. --- gnu/packages/ebook.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/ebook.scm b/gnu/packages/ebook.scm index 2b450cabd6..f7e15584f3 100644 --- a/gnu/packages/ebook.scm +++ b/gnu/packages/ebook.scm @@ -83,7 +83,7 @@ (build-system python-build-system) (native-inputs `(("pkg-config" ,pkg-config) - ("qt" ,qt) ; for qmake + ("qtbase" ,qtbase) ; for qmake ;; xdg-utils is supposed to be used for desktop integration, but it ;; also creates lots of messages ;; mkdir: cannot create directory '/homeless-shelter': Permission denied @@ -121,7 +121,7 @@ ("python2-pillow" ,python2-pillow) ("python2-pyqt" ,python2-pyqt) ("python2-sip" ,python2-sip) - ("qt" ,qt) + ("qtbase" ,qtbase) ("sqlite" ,sqlite))) (arguments `(#:python ,python-2 -- cgit v1.2.3 From 654116c15868b76efc77848edfab0306fd485bbc Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 16 Jun 2016 17:50:26 +0300 Subject: gnu: starman: Update to 0.4014. * gnu/packages/web.scm (starman): Update to 0.4014. --- gnu/packages/web.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index 28f247cba6..9f36fce027 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -194,7 +194,7 @@ and as a proxy to reduce the load on back-end HTTP or mail servers.") (define-public starman (package (name "starman") - (version "0.4011") + (version "0.4014") (source (origin (method url-fetch) @@ -202,7 +202,7 @@ and as a proxy to reduce the load on back-end HTTP or mail servers.") "Starman-" version ".tar.gz")) (sha256 (base32 - "1337zhi6v1sg4gd9rs3giybc7g1ysw8ak2da0vy098k4dacxyb57")))) + "1sbb5rb3vs82rlh1fjkgkcmj5pj62b4y9si4ihh45sl9m8c2qxx5")))) (build-system perl-build-system) (native-inputs `(("perl-libwww" ,perl-libwww) -- cgit v1.2.3 From 3282442be9e2fcabfdd863db83e06576d84ba2ac Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 16 Jun 2016 19:10:12 +0300 Subject: gnu: lxqt: Update uris. * gnu/packages/lxqt.scm (libqtxdg, liblxqt, lxqt-common, lxqt-session)[source]: Project tarballs have been replaced with Github archive tarballs. --- gnu/packages/lxqt.scm | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/gnu/packages/lxqt.scm b/gnu/packages/lxqt.scm index 38a7aea137..420297065b 100644 --- a/gnu/packages/lxqt.scm +++ b/gnu/packages/lxqt.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2015 Andreas Enge ;;; Copyright © 2015 Sou Bunnbu ;;; Copyright © 2016 Mark H Weaver +;;; Copyright © 2016 Efraim Flashner ;;; ;;; This file is part of GNU Guix. ;;; @@ -37,8 +38,8 @@ (origin (method url-fetch) (uri - (string-append "https://downloads.lxqt.org/libqtxdg/" version "/" - name "-" version ".tar.xz")) + (string-append "https://github.com/lxde/libqtxdg/releases/" + "download/" version "/" name "-" version ".tar.xz")) (sha256 (base32 "1ncqs0lcll5nx69hxfg33m3jfkryjqrjhr2kdci0b8pyaqdv1jc8")))) @@ -64,11 +65,12 @@ in Qt.") (origin (method url-fetch) (uri - (string-append "https://downloads.lxqt.org/lxqt/" version "/" - name "-" version ".tar.xz")) + (string-append "https://github.com/lxde/" name + "/archive/" version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "0ljdzqavvy82qwwwnhg2bgbshl2ns0k2lcswxlx1cfc8rcdr9w5l")) + "0mbl3qc0yfgfsndqrw8vg8k5irsy0pg2wrad8nwv0aphphd4n7rg")) (patches (search-patches "liblxqt-include.patch")))) (build-system cmake-build-system) (arguments @@ -92,11 +94,12 @@ components of the LXQt desktop environment.") (origin (method url-fetch) (uri - (string-append "https://downloads.lxqt.org/lxqt/" version "/" - name "-" version ".tar.xz")) + (string-append "https://github.com/lxde/" name + "/archive/" version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "0kbkwmrdjhfbq60wf2yfbsjmci8xlw13ilxxa7yxq68n1aqjqmvf")))) + "1vd3zarvl44l3y6wn7kgxcd2f1bygsmk5bcfqwa3568cq3b57aw0")))) (build-system cmake-build-system) (arguments `(#:tests? #f ; no check target @@ -143,11 +146,12 @@ desktop environment.") (origin (method url-fetch) (uri - (string-append "https://downloads.lxqt.org/lxqt/" version "/" - name "-" version ".tar.xz")) + (string-append "https://github.com/lxde/" name + "/archive/" version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "01hxand1gqbcaw14lh7z6w5zssgfaffcjncv752c2c7272wzyhy5")))) + "1sdwcfrfqkg7ibrsncs1skdap9n8wm4rg6n9d0fgdz2q4d45h75a")))) (build-system cmake-build-system) (native-inputs `(("pkg-config" ,pkg-config))) -- cgit v1.2.3 From aa450b2bc41b0cedbebc4f8c0a51867a436cf02b Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 16 Jun 2016 19:11:16 +0300 Subject: gnu: libqtxdg: Build with qtbase. * gnu/packages/lxqt.scm (libqtxdg)[propagated-inputs]: Remove qt. [inputs]: Add qtbase. --- gnu/packages/lxqt.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/lxqt.scm b/gnu/packages/lxqt.scm index 420297065b..13856e71d8 100644 --- a/gnu/packages/lxqt.scm +++ b/gnu/packages/lxqt.scm @@ -49,8 +49,8 @@ #:configure-flags '("-DBUILD_TESTS=ON"))) (native-inputs `(("pkg-config" ,pkg-config))) - (propagated-inputs - `(("qt" ,qt))) ; according to Qt5Xdg.pc + (inputs + `(("qtbase" ,qtbase))) ; according to Qt5Xdg.pc (home-page "https://github.com/lxde/libqtxdg") (synopsis "Qt implementation of freedesktop.org xdg specifications") (description "Libqtxdg implements the freedesktop.org xdg specifications -- cgit v1.2.3 From 5c733afd4f39bf3696c2769aa9f9722662d4ec73 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 16 Jun 2016 19:24:28 +0300 Subject: gnu: liblxqt: Add missing inputs. * gnu/packages/lxqt.scm (liblxqt)[inputs]: Add qtbase, qttools, qtx11extras. --- gnu/packages/lxqt.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gnu/packages/lxqt.scm b/gnu/packages/lxqt.scm index 13856e71d8..2c8def35d1 100644 --- a/gnu/packages/lxqt.scm +++ b/gnu/packages/lxqt.scm @@ -78,7 +78,10 @@ in Qt.") (native-inputs `(("pkg-config" ,pkg-config))) (inputs `(("kwindowsystem" ,kwindowsystem) - ("libqtxdg" ,libqtxdg))) + ("libqtxdg" ,libqtxdg) + ("qtbase" ,qtbase) + ("qttools" ,qttools) + ("qtx11extras" ,qtx11extras))) (home-page "http://lxqt.org/") (synopsis "Core utility library for all LXQt components") (description "liblxqt provides the basic libraries shared by the -- cgit v1.2.3 From e099d2a66f53a8cc79d605e82f35a3d6a331a8b7 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 16 Jun 2016 20:24:16 +0300 Subject: gnu: lxqt-session: Add missing inputs. * gnu/packages/lxqt.scm (lxqt-session)[inputs]: Add qtbase, qttools, qtx11extras. --- gnu/packages/lxqt.scm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gnu/packages/lxqt.scm b/gnu/packages/lxqt.scm index 2c8def35d1..a528c71fc8 100644 --- a/gnu/packages/lxqt.scm +++ b/gnu/packages/lxqt.scm @@ -156,12 +156,14 @@ desktop environment.") (base32 "1sdwcfrfqkg7ibrsncs1skdap9n8wm4rg6n9d0fgdz2q4d45h75a")))) (build-system cmake-build-system) - (native-inputs - `(("pkg-config" ,pkg-config))) + (native-inputs `(("pkg-config" ,pkg-config))) (inputs `(("kwindowsystem" ,kwindowsystem) ("liblxqt" ,liblxqt) - ("libqtxdg" ,libqtxdg))) + ("libqtxdg" ,libqtxdg) + ("qtbase" ,qtbase) + ("qttools" ,qttools) + ("qtx11extras" ,qtx11extras))) (arguments `(#:tests? #f ; no check target #:phases -- cgit v1.2.3 From 1ccb3192419ed4fc88ec1ed6dddb73e0a2283be5 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 16 Jun 2016 21:00:32 +0300 Subject: gnu: lxqt-common: Add missing inputs. * gnu/packages/lxqt.scm (lxqt-common)[inputs]: Add qtbase, qttools, qtx11extras. --- gnu/packages/lxqt.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gnu/packages/lxqt.scm b/gnu/packages/lxqt.scm index a528c71fc8..35954ac32d 100644 --- a/gnu/packages/lxqt.scm +++ b/gnu/packages/lxqt.scm @@ -133,7 +133,10 @@ components of the LXQt desktop environment.") (inputs `(("kwindowsystem" ,kwindowsystem) ("liblxqt" ,liblxqt) - ("libqtxdg" ,libqtxdg))) + ("libqtxdg" ,libqtxdg) + ("qtbase" ,qtbase) + ("qttools" ,qttools) + ("qtx11extras" ,qtx11extras))) (home-page "http://lxqt.org/") (synopsis "Common files for LXQt") (description "lxqt-common provides the desktop integration files -- cgit v1.2.3 From 762e54b7b476982c007c9da96b3b17476a6f1d93 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 16 Jun 2016 14:51:49 +0200 Subject: doc: Recommend against marketing phrases in descriptions. * doc/guix.texi (Synopses and Descriptions): Add note about marketing phrases. --- doc/guix.texi | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index cbecc3e96f..4c8dbd1888 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -11172,9 +11172,15 @@ something like ``Manipulate nucleotide sequence alignments'', which hopefully gives the user a better idea of whether this is what they are looking for. -@cindex Texinfo markup, in package descriptions Descriptions should take between five and ten lines. Use full sentences, and avoid using acronyms without first introducing them. +Please avoid marketing phrases such as ``world-leading'', +``industrial-strength'', and ``next-generation'', and avoid superlatives +like ``the most advanced''---they are not helpful to users looking for a +package and may even sound suspicious. Instead, try to be factual, +mentioning use cases and features. + +@cindex Texinfo markup, in package descriptions Descriptions can include Texinfo markup, which is useful to introduce ornaments such as @code{@@code} or @code{@@dfn}, bullet lists, or hyperlinks (@pxref{Overview,,, texinfo, GNU Texinfo}). However you -- cgit v1.2.3 From 5dbae738f0ff83bf629b53d6f4e52a8384a97fb1 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 16 Jun 2016 22:05:10 +0200 Subject: utils: 'current-source-directory' is now purely an expansion-time thing. * guix/utils.scm (extract-directory): Remove. (current-source-directory): Rewrite as a 'syntax-case' macro. --- guix/utils.scm | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/guix/utils.scm b/guix/utils.scm index 19fd0b0844..8aadfb0075 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -702,18 +702,16 @@ output port, and PROC's result is returned." ;;; Source location. ;;; -(define (extract-directory properties) - "Extract the directory name from source location PROPERTIES." - (match (assq 'filename properties) - (('filename . (? string? file-name)) - (dirname file-name)) - (_ - #f))) - -(define-syntax-rule (current-source-directory) - "Expand to the directory of the current source file or #f if it could not -be determined." - (extract-directory (current-source-location))) +(define-syntax current-source-directory + (lambda (s) + "Return the current directory name or #f if it could not be determined." + (syntax-case s () + ((_) + (match (assq 'filename (syntax-source s)) + (('filename . (? string? file-name)) + (dirname file-name)) + (_ + #f)))))) ;; A source location. (define-record-type -- cgit v1.2.3 From d4dd37fc4614859461952a251a49c1abb2d71ddc Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 16 Jun 2016 22:24:14 +0200 Subject: utils: 'current-source-directory' returns the absolute directory name. * guix/utils.scm (current-source-directory): When FILE-NAME is relative, use 'search-path' to determine the absolute file name. --- guix/utils.scm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/guix/utils.scm b/guix/utils.scm index 8aadfb0075..a642bd3d62 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -704,12 +704,18 @@ output port, and PROC's result is returned." (define-syntax current-source-directory (lambda (s) - "Return the current directory name or #f if it could not be determined." + "Return the absolute name of the current directory, or #f if it could not +be determined." (syntax-case s () ((_) (match (assq 'filename (syntax-source s)) (('filename . (? string? file-name)) - (dirname file-name)) + ;; If %FILE-PORT-NAME-CANONICALIZATION is 'relative, then FILE-NAME + ;; can be relative. In that case, we try to find out the absolute + ;; file name by looking at %LOAD-PATH. + (if (string-prefix? "/" file-name) + (dirname file-name) + (and=> (search-path %load-path file-name) dirname))) (_ #f)))))) -- cgit v1.2.3 From 1ee4274c962b5b2cf1532b0fce20a27426b9d91a Mon Sep 17 00:00:00 2001 From: ng0 Date: Thu, 16 Jun 2016 20:45:23 +0000 Subject: gnu: gnupg: Update to 2.1.13. * gnu/packages/gnupg.scm (gnupg): Update to 2.1.13. Signed-off-by: Leo Famulari --- gnu/packages/gnupg.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index c5055b6647..b99a13cb05 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -208,14 +208,14 @@ compatible to GNU Pth.") (define-public gnupg (package (name "gnupg") - (version "2.1.12") + (version "2.1.13") (source (origin (method url-fetch) (uri (string-append "mirror://gnupg/gnupg/gnupg-" version ".tar.bz2")) (sha256 (base32 - "01n5py45x0r97l4dzmd803jpbpbcxr1591k3k4s8m9804jfr4d5c")))) + "0xcn46vcb5x5qx0bc803vpzhzhnn6wfhp7x71w9n1ahx4ak877ag")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config))) -- cgit v1.2.3 From 2e6973222d03200adb4c56adfd953aa46bba6e4c Mon Sep 17 00:00:00 2001 From: Ben Woodcroft Date: Sun, 10 Apr 2016 16:46:50 +1000 Subject: gnu: Add python-bz2file. * gnu/packages/python.scm (python-bz2file, python2-bz2file): New variables. --- gnu/packages/python.scm | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 4f18680d4c..97f4e6cdb7 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -8766,6 +8766,43 @@ LDFLAGS and parse the output to build extensions with setup.py.") (define-public python2-pkgconfig (package-with-python2 python-pkgconfig)) +(define-public python-bz2file + (package + (name "python-bz2file") + (version "0.98") + (source + (origin + (method url-fetch) + (uri (pypi-uri "bz2file" version)) + (sha256 + (base32 + "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + ;; python setup.py test does not work as of 0.98 + ;; but there is only the one test file + (replace 'check + (lambda _ (zero? (system* "python" "test_bz2file.py"))))))) + (home-page "https://github.com/nvawda/bz2file") + (synopsis "Read and write bzip2-compressed files") + (description + "Bz2file is a Python library for reading and writing bzip2-compressed +files. It contains a drop-in replacement for the I/O interface in the +standard library's @code{bz2} module, including features from the latest +development version of CPython that are not available in older releases.") + (license asl2.0) + (properties `((python2-variant . ,(delay python2-bz2file)))))) + +(define-public python2-bz2file + (let ((base (package-with-python2 + (strip-python2-variant python-bz2file)))) + (package + (inherit base) + (native-inputs + `(("python2-setuptools" ,python2-setuptools)))))) + (define-public python-cysignals (package (name "python-cysignals") -- cgit v1.2.3 From feabb770e168d026a672a1bf9df2435efdae9288 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 16 Jun 2016 22:25:55 +0300 Subject: gnu: python-efl: Rebuild generated C files. * gnu/packages/enlightenment.scm (python-efl)[arguments]: Replace 'build phase to set 'ENABLE_CYTHON=1'. [native-inputs]: python-cython. --- gnu/packages/enlightenment.scm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gnu/packages/enlightenment.scm b/gnu/packages/enlightenment.scm index c487fc1020..ee017277ee 100644 --- a/gnu/packages/enlightenment.scm +++ b/gnu/packages/enlightenment.scm @@ -324,13 +324,18 @@ embedded systems.") (arguments '(#:phases (modify-phases %standard-phases + (replace 'build + (lambda _ + (zero? + (system* "env" "ENABLE_CYTHON=1" "python" "setup.py" "build")))) (add-before 'build 'set-flags (lambda _ (setenv "CFLAGS" (string-append "-I" (assoc-ref %build-inputs "python-dbus") "/include/dbus-1.0"))))))) (native-inputs - `(("pkg-config" ,pkg-config))) + `(("pkg-config" ,pkg-config) + ("python-cython" ,python-cython))) (inputs `(("efl" ,efl) ("elementary" ,elementary) -- cgit v1.2.3 From 668d2352e02606ad11abd3772f106ee89ab02ab4 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 16 Jun 2016 22:54:25 +0300 Subject: gnu: enlightenment: Update to 0.20.9. * gnu/packages/enlightenment.scm (enlightenment): Update to 0.20.9. [home-page]: Use https. --- gnu/packages/enlightenment.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gnu/packages/enlightenment.scm b/gnu/packages/enlightenment.scm index ee017277ee..5531dcd367 100644 --- a/gnu/packages/enlightenment.scm +++ b/gnu/packages/enlightenment.scm @@ -273,7 +273,7 @@ Libraries with some extra bells and whistles.") (define-public enlightenment (package (name "enlightenment") - (version "0.20.8") + (version "0.20.9") (source (origin (method url-fetch) (uri @@ -281,7 +281,7 @@ Libraries with some extra bells and whistles.") name "/" name "-" version ".tar.xz")) (sha256 (base32 - "17fi3frq4a73i0x7v7244g9m0fbjfamw0cfb4zhqs2rp1z8nq1iy")))) + "1gniy7i3mg3q9cgqf004lvnv397yncdr2b7w1gzj69bvv7a2lyfv")))) (build-system gnu-build-system) (arguments `(#:configure-flags '("--enable-mount-eeze"))) @@ -300,7 +300,7 @@ Libraries with some extra bells and whistles.") ;; both these inputs are present in pkgconfig file in Require section `(("efl" ,efl) ; enlightenment.pc ("elementary" ,elementary))) ; enlightenment.pc - (home-page "http://www.enlightenment.org") + (home-page "https://www.enlightenment.org") (synopsis "Lightweight desktop environment") (description "Enlightenment is resource friendly desktop environment with integrated -- cgit v1.2.3 From 025597393c0fbdab17d1784e365330b9326c027f Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Fri, 17 Jun 2016 09:14:12 +0300 Subject: gnu: libqtxdg: Move qtbase to propagated-inputs. * gnu/packages/lxqt.scm (libqtxdg)[inputs]: Move qtbase ... [propagated-inputs]: ... to here. This is a follow-up to aa450b2bc41b0cedbebc4f8c0a51867a436cf02b. --- gnu/packages/lxqt.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/lxqt.scm b/gnu/packages/lxqt.scm index 35954ac32d..a2c95674d9 100644 --- a/gnu/packages/lxqt.scm +++ b/gnu/packages/lxqt.scm @@ -49,7 +49,7 @@ #:configure-flags '("-DBUILD_TESTS=ON"))) (native-inputs `(("pkg-config" ,pkg-config))) - (inputs + (propagated-inputs `(("qtbase" ,qtbase))) ; according to Qt5Xdg.pc (home-page "https://github.com/lxde/libqtxdg") (synopsis "Qt implementation of freedesktop.org xdg specifications") -- cgit v1.2.3 From a1b484654af07303813a215d4e04c0e4e7b199e5 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 17 Jun 2016 11:09:46 +0200 Subject: services: dicod: Add 'interfaces' configuration field. This makes 'dicod' listen on 'localhost' by default, whereas it was previously listening on all the interfaces, which is not a good default security-wise. * gnu/services/dict.scm ()[interfaces]: New field. (dicod-configuration-file)[database->text]: New procedure, with code formerly in 'dicod-configuration->text'. [dicod-configuration->text]: Rename to... [configuration->text]: ... this. Honor 'interfaces'. * doc/guix.texi (Various Services): Document 'interfaces'. --- doc/guix.texi | 5 +++++ gnu/services/dict.scm | 24 ++++++++++++++++-------- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 4c8dbd1888..a47d37667e 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -9465,6 +9465,11 @@ Data type representing the configuration of dicod. @item @code{dico} (default: @var{dico}) Package object of the GNU Dico dictionary server. +@item @code{interfaces} (default: @var{'("localhost")}) +This is the list of IP addresses and ports and possibly socket file +names to listen to (@pxref{Server Settings, @code{listen} directive,, +dico, GNU Dico Manual}). + @item @code{databases} (default: @var{(list %dicod-database:gcide)}) List of @code{} objects denoting dictionaries to be served. @end table diff --git a/gnu/services/dict.scm b/gnu/services/dict.scm index abab6a3eba..9c06d5713a 100644 --- a/gnu/services/dict.scm +++ b/gnu/services/dict.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016 Sou Bunnbu +;;; Copyright © 2016 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -42,6 +43,8 @@ dicod-configuration make-dicod-configuration dicod-configuration? (dico dicod-configuration-dico (default dico)) + (interfaces dicod-configuration-interfaces ;list of strings + (default '("localhost"))) (databases dicod-configuration-databases ;; list of (default (list %dicod-database:gcide)))) @@ -72,20 +75,25 @@ (shell #~(string-append #$shadow "/sbin/nologin"))))) (define (dicod-configuration-file config) - (define dicod-configuration->text + (define database->text (match-lambda - (($ dico databases) - (append-map (match-lambda - (($ name module options) - `(" + (($ name module options) + `(" load-module " ,module "; database { name \"" ,name "\"; handler \"" ,module (string-join (list ,@options) " " 'prefix) "\"; -}\n"))) - databases)))) - (apply mixed-text-file "dicod.conf" (dicod-configuration->text config))) +}\n")))) + + (define configuration->text + (match-lambda + (($ dico (interfaces ...) databases) + (append `("listen (" + ,(string-join interfaces ", ") ");\n") + (append-map database->text databases))))) + + (apply mixed-text-file "dicod.conf" (configuration->text config))) (define %dicod-activation #~(begin -- cgit v1.2.3