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/doc/guix.texi b/doc/guix.texi index 46d9e77fe6..a47d37667e 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 @@ -2557,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}. @@ -3498,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. @@ -3507,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 @@ -3795,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 @@ -3805,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 @@ -3898,7 +3912,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 @@ -3999,7 +4013,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 @@ -4031,7 +4045,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. @@ -4545,7 +4559,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: @@ -7985,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''] @@ -7997,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 @@ -9428,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 @@ -11135,9 +11177,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 diff --git a/gnu/local.mk b/gnu/local.mk index ec88bd8ecf..4b83de2f2a 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 \ @@ -154,7 +155,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 \ @@ -212,6 +212,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 \ @@ -439,6 +440,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 \ @@ -673,6 +675,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 \ @@ -761,6 +765,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/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 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/") diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 6a90aa9456..04ed769cd8 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") @@ -4991,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") @@ -5127,68 +5187,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 diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index a912166e84..2fbb439083 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -264,7 +264,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/" @@ -272,7 +272,7 @@ Language.") name "-" version ".tar.gz")) (sha256 (base32 - "1rzlc2ns84x540asbkgdp9562haxhlszfpdqh64i9pz4q1m4cpvr")))) + "04ysdbvj2qapfpaj7s5d2j3m8k9l0yb5k0c2yaini8jrl1s1krqq")))) (build-system cmake-build-system) (arguments '(#:configure-flags @@ -558,7 +558,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 @@ -566,11 +566,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 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 diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index a8b5018edb..ae3ebc1504 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. ;;; @@ -2104,3 +2105,45 @@ 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+))) + +(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+))) 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/gnu/packages/enlightenment.scm b/gnu/packages/enlightenment.scm index c487fc1020..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 @@ -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) 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) 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/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 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/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+))) 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. diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index c87c371423..74c4be6e24 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. ;;; @@ -1728,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) @@ -2948,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) @@ -4249,6 +4256,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 +4273,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. @@ -5183,6 +5192,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") @@ -5282,3 +5318,71 @@ 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+))) + +(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+))) diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index dd9519bf84..2ef241036a 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -209,14 +209,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))) @@ -612,7 +612,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 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 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+))) 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) 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") 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+))) 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+))) diff --git a/gnu/packages/lxqt.scm b/gnu/packages/lxqt.scm index 38a7aea137..a2c95674d9 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")))) @@ -49,7 +50,7 @@ (native-inputs `(("pkg-config" ,pkg-config))) (propagated-inputs - `(("qt" ,qt))) ; according to Qt5Xdg.pc + `(("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 @@ -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 @@ -76,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 @@ -92,11 +97,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 @@ -127,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 @@ -143,18 +152,21 @@ 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))) + (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 diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index a1993bc3a5..cea4c44e50 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))) diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm index d491aa605e..23fe9224c4 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) @@ -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 @@ -1085,7 +1086,8 @@ browser.") "/manpages/docbook.xsl"))) #t))))) (inputs - `(("qt" ,qt) + `(("qtbase" ,qtbase) + ("qtsvg" ,qtsvg) ("alsa-lib" ,alsa-lib) ("fluidsynth" ,fluidsynth))) (native-inputs @@ -1132,7 +1134,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) 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") 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/") 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/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/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 + diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm index 1b5ca134fe..e2b39c7d12 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. ;;; @@ -2056,22 +2057,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 @@ -4974,14 +4974,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))) @@ -4991,8 +4991,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 @@ -5394,14 +5393,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 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' 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 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+))) 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") diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index c21a5f7eec..dbc4533a52 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -5735,6 +5735,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") @@ -8728,6 +8785,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") @@ -9122,7 +9216,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")))) @@ -9145,3 +9242,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))))) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index c79160f05c..cab1f30db5 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) @@ -431,6 +432,306 @@ 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 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 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 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 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 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 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 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 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 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 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 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 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 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") 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) diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index d3ab981056..74cbb16ebb 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -195,7 +195,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")))) (build-system gnu-build-system) (outputs '("out" "doc" ;1.5MiB of man3 pages @@ -322,7 +324,7 @@ required structures.") (define-public libressl (package (name "libressl") - (version "2.3.5") + (version "2.3.6") (source (origin (method url-fetch) @@ -331,7 +333,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 diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index ecdf4c35e6..c77a7e1529 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 @@ -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 @@ -1080,13 +1080,16 @@ for use with HTML5 video.") ("glu" ,glu) ("jack" ,jack-1) ("lame" ,lame) + ("libva" ,libva) + ("libvdpau" ,libvdpau) ("libvorbis" ,libvorbis) ("libvpx" ,libvpx) ("libxv" ,libxv) ("perl" ,perl) ("pulseaudio" ,pulseaudio) ("python" ,python-wrapper) - ("qt" ,qt) + ("qtbase" ,qtbase) + ("qttools" ,qttools) ("sdl" ,sdl) ("sqlite" ,sqlite) ("yasm" ,yasm) @@ -1096,41 +1099,41 @@ 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.6.1.tar.bz2") - (delete-file "ffmpeg-2.6.1.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" - (substitute* "ffmpeg-2.6.1/configure" + (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" (("#! /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"))) - (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) @@ -1143,26 +1146,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, @@ -1328,14 +1330,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 @@ -1349,7 +1351,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 @@ -1385,7 +1387,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") 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) 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) 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/"))) diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm index e2d031dbd3..ef7f257139 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, 2016 Mark H Weaver -;;; Copyright © 2015 Efraim Flashner +;;; Copyright © 2015, 2016 Efraim Flashner ;;; Copyright © 2015 Raimon Grau ;;; Copyright © 2016 Mathieu Lirzin ;;; Copyright © 2016 Leo Famulari @@ -207,7 +207,7 @@ module.") (define-public perl-xml-libxml (package (name "perl-xml-libxml") - (version "2.0118") + (version "2.0125") (source (origin (method url-fetch) @@ -215,7 +215,7 @@ module.") "XML-LibXML-" version ".tar.gz")) (sha256 (base32 - "170c8dbk4p6jw9is0cria73021yp3hpmhb19p9j0zg2yxwkawr6c")))) + "1mvbv1pwpdqni9ia9b6brg8brnnvfxr8j5x872qsngc92gipyh01")))) (build-system perl-build-system) (propagated-inputs `(("perl-xml-namespacesupport" ,perl-xml-namespacesupport) @@ -225,7 +225,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)))) @@ -332,7 +332,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 @@ -340,17 +340,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 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)) 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 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/build/syscalls.scm b/guix/build/syscalls.scm index 48ff227e10..c663899160 100644 --- a/guix/build/syscalls.scm +++ b/guix/build/syscalls.scm @@ -64,6 +64,7 @@ processes mkdtemp! + fdatasync pivot-root fcntl-flock @@ -493,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'." @@ -506,6 +506,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 @@ -611,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 @@ -818,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 @@ -1060,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." @@ -1078,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" '(*))) ;;; diff --git a/guix/gexp.scm b/guix/gexp.scm index b4d737ecae..2bf1013b3c 100644 --- a/guix/gexp.scm +++ b/guix/gexp.scm @@ -189,31 +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?)) - -(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))) + (%%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 @@ -235,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))) @@ -248,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/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 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 (compute-inputs source-url tarball) + (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 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/guix/packages.scm b/guix/packages.scm index d62d1f3343..acb8f34417 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") @@ -543,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 @@ -791,7 +793,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 @@ -1128,12 +1130,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)) @@ -1153,19 +1153,25 @@ outside of the store) or SOURCE itself (if SOURCE is already a store item.)" #:flags flags #: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)))) + #:imported-modules imported-modules + #: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 lower-object))) + (lambda* (store source #:optional (system (%current-system))) + "Return the derivation or file corresponding to SOURCE, which can be an +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) + ((? string? file) + (add-to-store store (basename file) #t "sha256" file)) + (_ + (lower store source system)))))) 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 diff --git a/guix/utils.scm b/guix/utils.scm index c77da5d846..a642bd3d62 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*) @@ -53,6 +53,8 @@ substitute-keyword-arguments ensure-keyword-arguments + current-source-directory + location location? @@ -625,11 +627,13 @@ 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) - (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." @@ -698,6 +702,23 @@ output port, and PROC's result is returned." ;;; Source location. ;;; +(define-syntax current-source-directory + (lambda (s) + "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)) + ;; 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)))))) + ;; A source location. (define-record-type (make-location file line column) diff --git a/tests/gexp.scm b/tests/gexp.scm index db0ffd2fdd..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) @@ -33,7 +34,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 +134,29 @@ (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) + '("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)))) 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" 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