diff --git a/Makefile.am b/Makefile.am index 74bc8b5948..1ede6d4057 100644 --- a/Makefile.am +++ b/Makefile.am @@ -240,8 +240,10 @@ SCM_TESTS = \ tests/challenge.scm \ tests/cve.scm \ tests/file-systems.scm \ + tests/system.scm \ tests/services.scm \ - tests/containers.scm + tests/containers.scm \ + tests/import-utils.scm if HAVE_GUILE_JSON diff --git a/build-aux/hydra/gnu-system.scm b/build-aux/hydra/gnu-system.scm index d586d90ae2..c3cb9cc7fa 100644 --- a/build-aux/hydra/gnu-system.scm +++ b/build-aux/hydra/gnu-system.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès +;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -78,6 +78,9 @@ (define* (package->alist store package system (license . ,(package-license package)) (home-page . ,(package-home-page package)) (maintainers . ("bug-guix@gnu.org")) + (max-silent-time . ,(or (assoc-ref (package-properties package) + 'max-silent-time) + 3600)) ; 1 hour by default (timeout . ,(or (assoc-ref (package-properties package) 'timeout) 72000)))) ; 20 hours by default diff --git a/doc/guix.texi b/doc/guix.texi index 592ec3cb1d..a650a55d51 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -399,6 +399,21 @@ for instance with: # ln -s /var/guix/profiles/per-user/root/guix-profile/bin/guix @end example +It is also a good idea to make the Info version of this manual available +there: + +@example +# mkdir -p /usr/local/share/info +# cd /usr/local/share/info +# for i in /var/guix/profiles/per-user/root/guix-profile/share/info/* ; + do ln -s $i ; done +@end example + +That way, assuming @file{/usr/local/share/info} is in the search path, +running @command{info guix} will open this manual (@pxref{Other Info +Directories,,, texinfo, GNU Texinfo}, for more details on changing the +Info search path.) + @item To use substitutes from @code{hydra.gnu.org} (@pxref{Substitutes}), authorize them: @@ -754,7 +769,7 @@ machines, since offloading works by invoking the @code{guix archive} and this is the case by running: @example -lsh build-machine guile -c '(use-modules (guix config))' +lsh build-machine guile -c "'(use-modules (guix config))'" @end example There's one last thing to do once @file{machines.scm} is in place. As @@ -3973,6 +3988,14 @@ Keep the build tree of failed builds. Thus, if a build fail, 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. +@item --keep-going +@itemx -k +Keep going when some of the derivations fail to build; return only once +all the builds have either completed or failed. + +The default behavior is to stop as soon as one of the specified +derivations has failed. + @item --dry-run @itemx -n Do not build the derivations. @@ -4271,11 +4294,12 @@ guix import cpan Acme::Boolean @item cran @cindex CRAN +@cindex Bioconductor Import meta-data from @uref{http://cran.r-project.org/, CRAN}, the central repository for the @uref{http://r-project.org, GNU@tie{}R statistical and graphical environment}. -Information is extracted from the package's DESCRIPTION file. +Information is extracted from the package's @code{DESCRIPTION} file. The command command below imports meta-data for the @code{Cairo} R package: @@ -4284,6 +4308,21 @@ R package: guix import cran Cairo @end example +When @code{--archive=bioconductor} is added, meta-data is imported from +@uref{http://www.bioconductor.org/, Bioconductor}, a repository of R +packages for for the analysis and comprehension of high-throughput +genomic data in bioinformatics. + +Information is extracted from a package's @code{DESCRIPTION} file +published on the web interface of the Bioconductor SVN repository. + +The command command below imports meta-data for the @code{GenomicRanges} +R package: + +@example +guix import cran --archive=bioconductor GenomicRanges +@end example + @item nix Import meta-data from a local copy of the source of the @uref{http://nixos.org/nixpkgs/, Nixpkgs distribution}@footnote{This @@ -4482,6 +4521,8 @@ the updater for GNOME packages; the updater for @uref{http://elpa.gnu.org/, ELPA} packages; @item cran the updater for @uref{http://cran.r-project.org/, CRAN} packages; +@item bioconductor +the updater for @uref{http://www.bioconductor.org/, Bioconductor} R packages; @item pypi the updater for @uref{https://pypi.python.org, PyPI} packages. @end table @@ -5674,17 +5715,23 @@ above, such as @code{host-name} and @code{bootloader}, are mandatory. Others, such as @code{packages} and @code{services}, can be omitted, in which case they get a default value. +Below we discuss the effect of some of the most important fields +(@pxref{operating-system Reference}, for details about all the available +fields), and how to @dfn{instantiate} the operating system using +@command{guix system}. + +@unnumberedsubsubsec Globally-Visible Packages + @vindex %base-packages -The @code{packages} field lists -packages that will be globally visible on the system, for all user -accounts---i.e., in every user's @code{PATH} environment variable---in -addition to the per-user profiles (@pxref{Invoking guix package}). The -@var{%base-packages} variable provides all the tools one would expect -for basic user and administrator tasks---including the GNU Core -Utilities, the GNU Networking Utilities, the GNU Zile lightweight text -editor, @command{find}, @command{grep}, etc. The example above adds -tcpdump to those, taken from the @code{(gnu packages admin)} module -(@pxref{Package Modules}). +The @code{packages} field lists packages that will be globally visible +on the system, for all user accounts---i.e., in every user's @code{PATH} +environment variable---in addition to the per-user profiles +(@pxref{Invoking guix package}). The @var{%base-packages} variable +provides all the tools one would expect for basic user and administrator +tasks---including the GNU Core Utilities, the GNU Networking Utilities, +the GNU Zile lightweight text editor, @command{find}, @command{grep}, +etc. The example above adds tcpdump to those, taken from the @code{(gnu +packages admin)} module (@pxref{Package Modules}). @findex specification->package Referring to packages by variable name, like @var{tcpdump} above, has @@ -5706,6 +5753,8 @@ version: %base-packages))) @end lisp +@unnumberedsubsubsec System Services + @vindex %base-services The @code{services} field lists @dfn{system services} to be made available when the system starts (@pxref{Services}). @@ -5754,10 +5803,24 @@ more, would look like this: @xref{Desktop Services}, for the exact list of services provided by @var{%desktop-services}. @xref{X.509 Certificates}, for background information about the @code{nss-certs} package that is used here. -@xref{operating-system Reference}, for details about all the available -@code{operating-system} fields. -Assuming the above snippet is stored in the @file{my-system-config.scm} +Again, @var{%desktop-services} is just a list of service objects. If +you want to remove services from there, you can do so using the +procedures for list filtering (@pxref{SRFI-1 Filtering and +Partitioning,,, guile, GNU Guile Reference Manual}). For instance, the +following expression returns a list that contains all the services in +@var{%desktop-services} minus the Avahi service: + +@example +(remove (lambda (service) + (eq? (service-kind service) avahi-service-type)) + %desktop-services) +@end example + +@unnumberedsubsubsec Instantiating the System + +Assuming the @code{operating-system} declaration +is stored in the @file{my-system-config.scm} file, the @command{guix system reconfigure my-system-config.scm} command instantiates that configuration, and makes it the default GRUB boot entry (@pxref{Invoking guix system}). @@ -5779,6 +5842,8 @@ something went wrong with the latest generation. Reassuring, no? The @command{guix system list-generations} command lists the system generations available on disk. +@unnumberedsubsubsec The Programming Interface + At the Scheme level, the bulk of an @code{operating-system} declaration is instantiated with the following monadic procedure (@pxref{The Store Monad}): @@ -5792,6 +5857,11 @@ the packages, configuration files, and other supporting files needed to instantiate @var{os}. @end deffn +This procedure is provided by the @code{(gnu system)} module. Along +with @code{(gnu services)} (@pxref{Services}), this module contains the +guts of GuixSD. Make sure to visit it! + + @node operating-system Reference @subsection @code{operating-system} Reference @@ -6288,7 +6358,7 @@ using the @code{locale} field of the @code{operating-system} declaration That locale must be among the @dfn{locale definitions} that are known to the system---and these are specified in the @code{locale-definitions} slot of @code{operating-system}. The default value includes locale -definition for some widely used locales, but not for all the available +definitions for some widely used locales, but not for all the available locales, in order to save space. If the locale specified in the @code{locale} field is not among the @@ -6762,13 +6832,14 @@ and lines for hidden services added via @code{tor-hidden-service}. Run @command{man tor} for information about the configuration file. @end deffn +@cindex hidden service @deffn {Scheme Procedure} tor-hidden-service @var{name} @var{mapping} Define a new Tor @dfn{hidden service} called @var{name} and implementing @var{mapping}. @var{mapping} is a list of port/host tuples, such as: @example - '((22 \"127.0.0.1:22\") - (80 \"127.0.0.1:8080\")) + '((22 "127.0.0.1:22") + (80 "127.0.0.1:8080")) @end example In this example, port 22 of the hidden service is mapped to local port 22, and @@ -8907,7 +8978,7 @@ Now that you know all the features that initial RAM disks produced by further. @deffn {Monadic Procedure} base-initrd @var{file-systems} @ - [#:qemu-networking? #f] [#:virtio? #f] [#:volatile-root? #f] @ + [#:qemu-networking? #f] [#:virtio? #t] [#:volatile-root? #f] @ [#:extra-modules '()] [#:mapped-devices '()] Return a monadic derivation that builds a generic initrd. @var{file-systems} is a list of file-systems to be mounted by the initrd, possibly in addition to @@ -10060,6 +10131,40 @@ If we also wanted GTK+ 3.8.2, this would be packaged as ...)) @end example +@c See , +@c for a discussion of what follows. +@cindex version number, for VCS snapshots +Occasionally, we package snapshots of upstream's version control system +(VCS) instead of formal releases. This should remain exceptional, +because it is up to upstream developers to clarify what the stable +release is. Yet, it is sometimes necessary. So, what should we put in +the @code{version} field? + +Clearly, we need to make the commit identifier of the VCS snapshot +visible in the version string, but we also need to make sure that the +version string is monotonically increasing so that @command{guix package +--upgrade} can determine which version is newer. Since commit +identifiers, notably with Git, are not monotonically increasing, we add +a revision number that we increase each time we upgrade to a newer +snapshot. The resulting version string looks like this: + +@example +2.0.11-3.cabba9e + ^ ^ ^ + | | `-- upstream commit ID + | | + | `--- Guix package revision + | +latest upstream version +@end example + +It is a good idea to strip commit identifiers in the @code{version} +field to, say, 7 digits. It avoids an aesthetic annoyance (assuming +aesthetics have a role to play here) as well as problems related to OS +limits such as the maximum shebang length (127 bytes for the Linux +kernel.) It is best to use the full commit identifiers in +@code{origin}s, though, to avoid ambiguities. + @node Synopses and Descriptions @subsection Synopses and Descriptions diff --git a/gnu-system.am b/gnu-system.am index d37775d235..297f40a50e 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -1,6 +1,6 @@ # GNU Guix --- Functional package management for GNU # Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès -# Copyright © 2013, 2014, 2015 Andreas Enge +# Copyright © 2013, 2014, 2015, 2016 Andreas Enge # Copyright © 2013, 2014, 2015, 2016 Mark H Weaver # # This file is part of GNU Guix. @@ -177,6 +177,7 @@ GNU_SYSTEM_MODULES = \ gnu/packages/kodi.scm \ gnu/packages/language.scm \ gnu/packages/ldc.scm \ + gnu/packages/lego.scm \ gnu/packages/less.scm \ gnu/packages/lesstif.scm \ gnu/packages/libcanberra.scm \ @@ -408,6 +409,7 @@ dist_patch_DATA = \ gnu/packages/patches/agg-am_c_prototype.patch \ gnu/packages/patches/alsa-lib-mips-atomic-fix.patch \ gnu/packages/patches/apr-skip-getservbyname-test.patch \ + gnu/packages/patches/arb-ldconfig.patch \ gnu/packages/patches/asymptote-gsl2.patch \ gnu/packages/patches/ath9k-htc-firmware-binutils.patch \ gnu/packages/patches/ath9k-htc-firmware-gcc.patch \ @@ -568,6 +570,7 @@ dist_patch_DATA = \ gnu/packages/patches/libwmf-CVE-2015-4695.patch \ gnu/packages/patches/libwmf-CVE-2015-4696.patch \ gnu/packages/patches/libxslt-CVE-2015-7995.patch \ + gnu/packages/patches/linux-libre-CVE-2016-0728.patch \ gnu/packages/patches/lirc-localstatedir.patch \ gnu/packages/patches/libpthread-glibc-preparation.patch \ gnu/packages/patches/lm-sensors-hwmon-attrs.patch \ @@ -686,6 +689,7 @@ dist_patch_DATA = \ gnu/packages/patches/tidy-CVE-2015-5522+5523.patch \ gnu/packages/patches/tinyxml-use-stl.patch \ gnu/packages/patches/tk-find-library.patch \ + gnu/packages/patches/tophat-build-with-later-seqan.patch \ gnu/packages/patches/torsocks-dns-test.patch \ gnu/packages/patches/tvtime-gcc41.patch \ gnu/packages/patches/tvtime-pngoutput.patch \ diff --git a/gnu/build/linux-container.scm b/gnu/build/linux-container.scm index eb5dbf94a3..ec68679f0b 100644 --- a/gnu/build/linux-container.scm +++ b/gnu/build/linux-container.scm @@ -41,7 +41,7 @@ (define (unprivileged-user-namespace-supported?) "Return #t if user namespaces can be created by unprivileged users." (let ((userns-file "/proc/sys/kernel/unprivileged_userns_clone")) (if (file-exists? userns-file) - (string=? "1" (call-with-input-file userns-file read-string)) + (eqv? #\1 (call-with-input-file userns-file read-char)) #t))) (define (setgroups-supported?) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 1f2d0fbf95..953c5b4cf8 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -6,6 +6,7 @@ ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer ;;; Copyright © 2015 Alex Sassmannshausen ;;; Copyright © 2015 Eric Dvorsak +;;; Copyright © 2016 Leo Famulari ;;; ;;; This file is part of GNU Guix. ;;; @@ -392,7 +393,7 @@ (define-public isc-dhcp (bind-minor-version "9") (bind-patch-version "8") (bind-release-type "-P") - (bind-release-version "2") + (bind-release-version "3") (bind-version (string-append bind-major-version "." bind-minor-version @@ -508,7 +509,7 @@ (define-public isc-dhcp "/bind-" bind-version ".tar.gz")) (sha256 (base32 - "0agkpmpna7s67la13krn4xlhwhdjpazmljxlq0zbjdwnw4k1k17m")))) + "01qa17479jghy90lb2j8b1bpg3ay6k6aaajpigyirwzsvyc9yj3a")))) ;; When cross-compiling, we need the cross Coreutils and sed. ;; Otherwise just use those from %FINAL-INPUTS. @@ -1377,3 +1378,25 @@ (define-public autojump you use the most from the command line and allows you to \"jump\" to frequently used directories by typing only a small pattern.") (license license:gpl3+))) + +(define-public iftop + (package + (name "iftop") + (version "1.0pre4") + (source (origin + (method url-fetch) + (uri (string-append "http://www.ex-parrot.com/~pdw/iftop/download" + "/iftop-" version ".tar.gz")) + (sha256 + (base32 + "15sgkdyijb7vbxpxjavh5qm5nvyii3fqcg9mzvw7fx8s6zmfwczp")))) + (build-system gnu-build-system) + (inputs + `(("libpcap" ,libpcap) + ("ncurses" ,ncurses))) + (synopsis "Monitor network usage") + (description "Iftop does for network usage what @command{top} does +for CPU usage. It listens to network traffic on a named interface and +displays a table of current bandwidth usage by pairs of hosts.") + (home-page "http://www.ex-parrot.com/~pdw/iftop/") + (license license:gpl3))) diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm index dd6838140b..0f17403868 100644 --- a/gnu/packages/algebra.scm +++ b/gnu/packages/algebra.scm @@ -238,7 +238,7 @@ (define-public flint (define-public arb (package (name "arb") - (version "2.7.0") + (version "2.8.1") (source (origin (method url-fetch) (uri (string-append @@ -247,7 +247,8 @@ (define-public arb (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "1rwkffs57v8mry63rq8l2dyw69zfs9rg5fpbfllqp3nkjnkp1fly")))) + "04hhcpshfkcq9fr4hixbhpps50yf9drk62xgkvlcaj5kb4nyrx7l")) + (patches (map search-patch '("arb-ldconfig.patch"))))) (build-system gnu-build-system) (propagated-inputs `(("flint" ,flint))) ; flint.h is included by arf.h diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm index 3cc5cebc2c..0823aad91e 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm @@ -3,7 +3,7 @@ ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer ;;; Copyright © 2015 Andreas Enge ;;; Copyright © 2015 Alex Kost -;;; Copyright © 2015 Mark H Weaver +;;; Copyright © 2015, 2016 Mark H Weaver ;;; ;;; This file is part of GNU Guix. ;;; @@ -1535,14 +1535,14 @@ (define-public libmodplug (define-public libxmp (package (name "libxmp") - (version "4.3.8") + (version "4.3.10") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/xmp/libxmp/" name "-" version ".tar.gz")) (sha256 (base32 - "0h06091hlpgc6ds4pjmfq8sx4snw7av3nhny180q4pwfyasjb6ny")))) + "1gm5xa0ca7ypcbj3bkmj3k1vvzl7nkch8gjyrm8p1a9vgzr0n761")))) (build-system gnu-build-system) (home-page "http://xmp.sourceforge.net/") (synopsis "Module player library") diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 314d0ad322..a9df676fc6 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -654,6 +654,73 @@ (define-public bowtie (supported-systems '("x86_64-linux")) (license license:gpl3+))) +(define-public tophat + (package + (name "tophat") + (version "2.1.0") + (source (origin + (method url-fetch) + (uri (string-append + "http://ccb.jhu.edu/software/tophat/downloads/tophat-" + version ".tar.gz")) + (sha256 + (base32 + "168zlzykq622zbgkh90a90f1bdgsxkscq2zxzbj8brq80hbjpyp7")) + (patches (list (search-patch "tophat-build-with-later-seqan.patch"))) + (modules '((guix build utils))) + (snippet + '(begin + ;; Remove bundled SeqAn and samtools + (delete-file-recursively "src/SeqAn-1.3") + (delete-file-recursively "src/samtools-0.1.18") + #t)))) + (build-system gnu-build-system) + (arguments + '(#:parallel-build? #f ; not supported + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'use-system-samtools + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "src/Makefile.in" + (("(noinst_LIBRARIES = )\\$\\(SAMLIB\\)" _ prefix) prefix) + (("\\$\\(SAMPROG\\): \\$\\(SAMLIB\\)") "") + (("SAMPROG = samtools_0\\.1\\.18") "") + (("\\$\\(samtools_0_1_18_SOURCES\\)") "") + (("am__EXEEXT_1 = samtools_0\\.1\\.18\\$\\(EXEEXT\\)") "")) + (substitute* '("src/common.cpp" + "src/tophat.py") + (("samtools_0.1.18") (which "samtools"))) + (substitute* '("src/common.h" + "src/bam2fastx.cpp") + (("#include \"bam.h\"") "#include ") + (("#include \"sam.h\"") "#include ")) + (substitute* '("src/bwt_map.h" + "src/map2gtf.h" + "src/align_status.h") + (("#include ") "#include ") + (("#include ") "#include ")) + #t))))) + (inputs + `(("boost" ,boost) + ("bowtie" ,bowtie) + ("samtools" ,samtools-0.1) + ("ncurses" ,ncurses) + ("python" ,python-2) + ("perl" ,perl) + ("zlib" ,zlib) + ("seqan" ,seqan))) + (home-page "http://ccb.jhu.edu/software/tophat/index.shtml") + (synopsis "Spliced read mapper for RNA-Seq data") + (description + "TopHat is a fast splice junction mapper for nucleotide sequence +reads produced by the RNA-Seq method. It aligns RNA-Seq reads to +mammalian-sized genomes using the ultra high-throughput short read +aligner Bowtie, and then analyzes the mapping results to identify +splice junctions between exons.") + ;; TopHat is released under the Boost Software License, Version 1.0 + ;; See https://github.com/infphilo/tophat/issues/11#issuecomment-121589893 + (license license:boost1.0))) + (define-public bwa (package (name "bwa") @@ -915,6 +982,64 @@ (define-public crossmap file formats including SAM/BAM, Wiggle/BigWig, BED, GFF/GTF, VCF.") (license license:gpl2+))) +(define-public cufflinks + (package + (name "cufflinks") + (version "2.2.1") + (source (origin + (method url-fetch) + (uri (string-append "http://cole-trapnell-lab.github.io/" + "cufflinks/assets/downloads/cufflinks-" + version ".tar.gz")) + (sha256 + (base32 + "1bnm10p8m7zq4qiipjhjqb24csiqdm1pwc8c795z253r2xk6ncg8")))) + (build-system gnu-build-system) + (arguments + `(#:make-flags + (list + ;; The includes for "eigen" are located in a subdirectory. + (string-append "EIGEN_CPPFLAGS=" + "-I" (assoc-ref %build-inputs "eigen") + "/include/eigen3/") + ;; Cufflinks must be linked with various boost libraries. + (string-append "LDFLAGS=" + (string-join '("-lboost_system" + "-lboost_serialization" + "-lboost_thread")))) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'fix-search-for-bam + (lambda _ + (substitute* '("ax_bam.m4" + "configure" + "src/hits.h") + (("") "") + (("") "") + (("") "")) + #t))) + #:configure-flags + (list (string-append "--with-bam=" + (assoc-ref %build-inputs "samtools"))))) + (inputs + `(("eigen" ,eigen) + ("samtools" ,samtools-0.1) + ("htslib" ,htslib) + ("boost" ,boost) + ("python" ,python-2) + ("zlib" ,zlib))) + (home-page "http://cole-trapnell-lab.github.io/cufflinks/") + (synopsis "Transcriptome assembly and RNA-Seq expression analysis") + (description + "Cufflinks assembles RNA transcripts, estimates their abundances, +and tests for differential expression and regulation in RNA-Seq +samples. It accepts aligned RNA-Seq reads and assembles the +alignments into a parsimonious set of transcripts. Cufflinks then +estimates the relative abundances of these transcripts based on how +many reads support each one, taking into account biases in library +preparation protocols.") + (license license:boost1.0))) + (define-public cutadapt (package (name "cutadapt") @@ -3016,40 +3141,107 @@ (define-public snap-aligner of these reads to align data quickly through a hash-based indexing scheme.") (license license:asl2.0))) +(define-public sortmerna + (package + (name "sortmerna") + (version "2.0") + (source + (origin + (method url-fetch) + (uri (string-append + "https://github.com/biocore/sortmerna/archive/" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1670a92x1vvkacnvgr2i5xac3ls6lp4pc3n0bccnmllsnymggcf0")))) + (build-system gnu-build-system) + (outputs '("out" ;for binaries + "db")) ;for sequence databases + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (db (assoc-ref outputs "db")) + (share + (string-append db "/share/sortmerna/rRNA_databases"))) + (install-file "sortmerna" bin) + (install-file "indexdb_rna" bin) + (for-each (lambda (file) + (install-file file share)) + (find-files "rRNA_databases" ".*fasta")) + #t)))))) + (home-page "http://bioinfo.lifl.fr/RNA/sortmerna") + (synopsis "Biological sequence analysis tool for NGS reads") + (description + "SortMeRNA is a biological sequence analysis tool for filtering, mapping +and operational taxonomic unit (OTU) picking of next generation +sequencing (NGS) reads. The core algorithm is based on approximate seeds and +allows for fast and sensitive analyses of nucleotide sequences. The main +application of SortMeRNA is filtering rRNA from metatranscriptomic data.") + (license license:lgpl3))) + (define-public star (package (name "star") - (version "2.4.2a") + (version "2.5.1b") (source (origin (method url-fetch) - (uri (string-append - "https://github.com/alexdobin/STAR/archive/STAR_" - version ".tar.gz")) + (uri (string-append "https://github.com/alexdobin/STAR/archive/" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "1c3rnm7r5l0kl3d04gl1g7938xqf1c2l0mla87rlplqg1hcns5mc")) + "0wzcfhkg10apnh0y73xlarfa79xxwxdizicbdl11wb48awk44iq4")) (modules '((guix build utils))) (snippet - '(substitute* "source/Makefile" - (("/bin/rm") "rm"))))) + '(begin + (substitute* "source/Makefile" + (("/bin/rm") "rm")) + ;; Remove pre-built binaries and bundled htslib sources. + (delete-file-recursively "bin/MacOSX_x86_64") + (delete-file-recursively "bin/Linux_x86_64") + (delete-file-recursively "source/htslib") + #t)))) (build-system gnu-build-system) (arguments '(#:tests? #f ;no check target #:make-flags '("STAR") #:phases - (alist-cons-after - 'unpack 'enter-source-dir (lambda _ (chdir "source")) - (alist-replace - 'install - (lambda* (#:key outputs #:allow-other-keys) - (let ((bin (string-append (assoc-ref outputs "out") "/bin/"))) - (install-file "STAR" bin))) - (alist-delete - 'configure %standard-phases))))) + (modify-phases %standard-phases + (add-after 'unpack 'enter-source-dir + (lambda _ (chdir "source") #t)) + (add-after 'enter-source-dir 'do-not-use-bundled-htslib + (lambda _ + (substitute* "Makefile" + (("(Depend.list: \\$\\(SOURCES\\) parametersDefault\\.xxd) htslib" + _ prefix) prefix)) + (substitute* '("BAMfunctions.cpp" + "signalFromBAM.h" + "bam_cat.h" + "bam_cat.c" + "STAR.cpp" + "bamRemoveDuplicates.cpp") + (("#include \"htslib/([^\"]+\\.h)\"" _ header) + (string-append "#include <" header ">"))) + (substitute* "IncludeDefine.h" + (("\"htslib/(htslib/[^\"]+.h)\"" _ header) + (string-append "<" header ">"))) + #t)) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((bin (string-append (assoc-ref outputs "out") "/bin/"))) + (install-file "STAR" bin)) + #t)) + (delete 'configure)))) (native-inputs `(("vim" ,vim))) ; for xxd (inputs - `(("zlib" ,zlib))) + `(("htslib" ,htslib) + ("zlib" ,zlib))) (home-page "https://github.com/alexdobin/STAR") (synopsis "Universal RNA-seq aligner") (description @@ -4002,7 +4194,7 @@ (define-public r-genomation (define-public r-qtl (package (name "r-qtl") - (version "1.37-11") + (version "1.38-4") (source (origin (method url-fetch) @@ -4010,7 +4202,7 @@ (define-public r-qtl version ".tar.gz")) (sha256 (base32 - "0h20d36mww7ljp51pfs66xq33yq4b4fwq9nsh02dpmfhlaxgx1xi")))) + "0rv9xhp8lyldpgwxqirhyjqvg07dr5x4x1x2jpyj37dada9ccyx3")))) (build-system r-build-system) (home-page "http://rqtl.org/") (synopsis "R package for analyzing QTL experiments in genetics") diff --git a/gnu/packages/bittorrent.scm b/gnu/packages/bittorrent.scm index 967580d158..94383dba20 100644 --- a/gnu/packages/bittorrent.scm +++ b/gnu/packages/bittorrent.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014 Taylan Ulrich Bayirli/Kammer ;;; Copyright © 2014, 2015 Ludovic Courtès +;;; Copyright © 2016 Leo Famulari ;;; ;;; This file is part of GNU Guix. ;;; @@ -21,6 +22,7 @@ (define-module (gnu packages bittorrent) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu) + #:use-module (guix build-system python) #:use-module (guix build-system glib-or-gtk) #:use-module ((guix licenses) #:prefix l:) #:use-module (gnu packages libevent) @@ -33,6 +35,7 @@ (define-module (gnu packages bittorrent) #:use-module (gnu packages gtk) #:use-module (gnu packages check) #:use-module (gnu packages ncurses) + #:use-module (gnu packages python) #:use-module (gnu packages curl) #:use-module (gnu packages cyrus-sasl) #:use-module (gnu packages tls)) @@ -148,3 +151,44 @@ (define-public rtorrent XML-RPC over SCGI.") (home-page "https://github.com/rakshasa/rtorrent") (license l:gpl2+))) + +(define-public transmission-remote-cli + (package + (name "transmission-remote-cli") + (version "1.7.1") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/fagga/" + "transmission-remote-cli/archive/v" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1y0hkpcjf6jw9xig8yf484hbhy63nip0pkchx401yxj81m25l4z9")))) + (build-system python-build-system) + (arguments + `(#:python ,python-2 ; only supports Python 2 + #:tests? #f ; no test suite + #:phases (modify-phases %standard-phases + ;; The software is just a Python script that must be + ;; copied into place. + (delete 'build) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (man (string-append out "/share/man/man1")) + ;; FIXME install zsh completions + (completions (string-append out "/etc/bash_completion.d"))) + (install-file "transmission-remote-cli" bin) + (install-file "transmission-remote-cli.1" man) + (install-file + (string-append + "completion/bash/" + "transmission-remote-cli-bash-completion.sh") + completions))))))) + (synopsis "Console client for the Transmission BitTorrent daemon") + (description "Transmission-remote-cli is a console client, with a curses +interface, for the Transmission BitTorrent daemon.") + (home-page "https://github.com/fagga/transmission-remote-cli") + (license l:gpl3+))) diff --git a/gnu/packages/debug.scm b/gnu/packages/debug.scm index dc94f97657..72fd993037 100644 --- a/gnu/packages/debug.scm +++ b/gnu/packages/debug.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014, 2015 Eric Bavier +;;; Copyright © 2014, 2015, 2016 Eric Bavier ;;; ;;; This file is part of GNU Guix. ;;; @@ -169,7 +169,7 @@ (define-public american-fuzzy-lop (_ "UNSUPPORTED")))) (package (name "american-fuzzy-lop") - (version "1.86b") ;It seems all releases have the 'b' suffix + (version "1.96b") ;It seems all releases have the 'b' suffix (source (origin (method url-fetch) @@ -177,7 +177,7 @@ (define-public american-fuzzy-lop "afl-" version ".tgz")) (sha256 (base32 - "1by9ncf6lgcyibzqwyla34jv64sd66mn8zhgjz2pcgsds51qwn0r")))) + "0z7j231p6v2h1dxxijgdzj1lq1lxr8cxllwf6iyv7p4ki5pv1gh3")))) (build-system gnu-build-system) (inputs `(("custom-qemu" @@ -190,11 +190,13 @@ (define-public american-fuzzy-lop ;; afl only supports using a single afl-qemu-trace executable, so ;; we only build qemu for the native target. (arguments - `(#:configure-flags - (list (string-append "--target-list=" ,machine "-linux-user")) - #:modules ((srfi srfi-1) + `(#:modules ((srfi srfi-1) ,@%gnu-build-system-modules) ,@(substitute-keyword-arguments (package-arguments qemu-2.3.0) + ((#:configure-flags config-flags) + ``(,(string-append "--target-list=" ,machine "-linux-user") + ,@(remove (λ (f) (string-prefix? "--target-list=" f)) + ,config-flags))) ((#:phases qemu-phases) `(modify-phases ,qemu-phases (add-after @@ -236,8 +238,8 @@ (define-public american-fuzzy-lop (lambda* (#:key inputs outputs #:allow-other-keys) (let ((qemu (assoc-ref inputs "custom-qemu")) (out (assoc-ref outputs "out"))) - (copy-file (string-append qemu "/bin/qemu-" ,machine) - (string-append out "/bin/afl-qemu-trace")) + (symlink (string-append qemu "/bin/qemu-" ,machine) + (string-append out "/bin/afl-qemu-trace")) #t))) (delete 'check)))) (supported-systems (fold delete diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm index 8357dad21e..ef07f30adf 100644 --- a/gnu/packages/dns.scm +++ b/gnu/packages/dns.scm @@ -1,5 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer +;;; Copyright © 2016 Mark H Weaver +;;; Copyright © 2016 Ricardo Wurmus ;;; ;;; This file is part of GNU Guix. ;;; @@ -63,14 +65,14 @@ (define-public dnsmasq (define-public bind-utils (package (name "bind-utils") - (version "9.10.3-P2") + (version "9.10.3-P3") (source (origin (method url-fetch) (uri (string-append "http://ftp.isc.org/isc/bind9/" version "/bind-" version ".tar.gz")) (sha256 (base32 - "1kbfzml37sx4r2xi4gq48ji8w5kckd1f6gdn6pk6njqdmh8ijv2a")))) + "10yblk8qbb85qxakzdjy5qmqvqj4rlcqsqvlkriglampzg8i0239")))) (build-system gnu-build-system) (inputs ;; it would be nice to add GeoIP and gssapi once there is package @@ -89,20 +91,24 @@ (define-public bind-utils (assoc-ref %build-inputs "mysql")) (string-append "--with-pkcs11=" (assoc-ref %build-inputs "p11-kit"))) + #:modules ((srfi srfi-1) + (srfi srfi-26) + ,@%gnu-build-system-modules) #:phases - (alist-replace - 'build - (lambda _ - (and (zero? (system* "make" "-C" "lib/dns")) - (zero? (system* "make" "-C" "lib/isc")) - (zero? (system* "make" "-C" "lib/bind9")) - (zero? (system* "make" "-C" "lib/isccfg")) - (zero? (system* "make" "-C" "lib/lwres")) - (zero? (system* "make" "-C" "bin/dig")))) - (alist-replace - 'install - (lambda _ (zero? (system* "make" "-C" "bin/dig" "install"))) - %standard-phases)))) + (let ((libs '("dns" "isc" "bind9" "isccfg" "lwres")) + (bins '("dig" "nsupdate"))) + (modify-phases %standard-phases + (replace 'build + (lambda _ + (every (lambda (dir) + (zero? (system* "make" "-C" dir))) + (append (map (cut string-append "lib/" <>) libs) + (map (cut string-append "bin/" <>) bins))))) + (replace 'install + (lambda _ + (every (lambda (dir) + (zero? (system* "make" "-C" dir "install"))) + (map (cut string-append "bin/" <>) bins)))))))) (home-page "https://www.isc.org/downloads/bind/") (synopsis "Tools for querying nameservers") (description diff --git a/gnu/packages/ebook.scm b/gnu/packages/ebook.scm index 718e8b3e50..a551c1d075 100644 --- a/gnu/packages/ebook.scm +++ b/gnu/packages/ebook.scm @@ -60,7 +60,7 @@ (define-public chmlib (define-public calibre (package (name "calibre") - (version "2.48.0") + (version "2.49.0") (source (origin (method url-fetch) @@ -69,7 +69,7 @@ (define-public calibre version ".tar.xz")) (sha256 (base32 - "0bjzw806czqxkhq9qqkhff8bhfc428pijkidb1h6gr47jqdp4hpg")) + "0jc476pg07c0nwccprhwgjdlvvb2fdzza9xrjqzc0c42c5v7qzxa")) ;; Remove non-free or doubtful code, see ;; https://lists.gnu.org/archive/html/guix-devel/2015-02/msg00478.html (modules '((guix build utils))) diff --git a/gnu/packages/enlightenment.scm b/gnu/packages/enlightenment.scm index 9fdcd42a27..3fec6c6fc7 100644 --- a/gnu/packages/enlightenment.scm +++ b/gnu/packages/enlightenment.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 Tomáš Čech ;;; Copyright © 2015 Daniel Pimentel -;;; Copyright © 2015 Efraim Flashner +;;; Copyright © 2015, 2016 Efraim Flashner ;;; ;;; This file is part of GNU Guix. ;;; @@ -271,7 +271,7 @@ (define-public rage (define-public enlightenment (package (name "enlightenment") - (version "0.20.2") + (version "0.20.3") (source (origin (method url-fetch) (uri @@ -279,7 +279,7 @@ (define-public enlightenment name "/" name "-" version ".tar.xz")) (sha256 (base32 - "0faxky7lqd133jjjkr4c40kwwjhqc51ww10l3yy63671rfjhj424")))) + "19z3bwdzwpzwi330l5g5mj7xy6wy8xrc39zivjhm0d1ql3fh649j")))) (build-system gnu-build-system) (arguments `(#:configure-flags '("--enable-mount-eeze"))) diff --git a/gnu/packages/grue-hunter.scm b/gnu/packages/grue-hunter.scm index 29404fcfb4..71eee96daf 100644 --- a/gnu/packages/grue-hunter.scm +++ b/gnu/packages/grue-hunter.scm @@ -32,7 +32,7 @@ (define-public grue-hunter (source (origin (method url-fetch) - (uri (string-append "http://jxself.org/" name ".tar.gz")) + (uri (string-append "https://jxself.org/" name ".tar.gz")) (sha256 (base32 "1hjcpy5439qs3v2zykis7hsi0i17zjs62gks3zd8mnfw9ni4i2h3")))) diff --git a/gnu/packages/lego.scm b/gnu/packages/lego.scm new file mode 100644 index 0000000000..d47be5dfb4 --- /dev/null +++ b/gnu/packages/lego.scm @@ -0,0 +1,67 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2016 Eric Bavier +;;; +;;; 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 lego) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix download) + #:use-module (guix packages) + #:use-module (guix build-system gnu) + #:use-module (gnu packages) + #:use-module (gnu packages bison) + #:use-module (gnu packages flex)) + +(define-public nqc + (package + (name "nqc") + (version "3.1.r6") + (source (origin + (method url-fetch) + (uri (string-append "http://bricxcc.sourceforge.net/nqc/release/" + "nqc-" version ".tgz")) + (sha256 + (base32 + "0rp7pzr8xrdxpv75c2mi8zszzz2ypli4vvzxiic7mbrryrafdmdz")))) + (build-system gnu-build-system) + (native-inputs + `(("bison" ,bison) + ("flex" ,flex))) + (arguments + '(#:tests? #f ;no tests + #:make-flags (list (string-append "PREFIX=" %output)) + #:phases (modify-phases %standard-phases + (delete 'configure) + (add-before 'build 'rm-generated + ;; Regenerating compiler/lexer.cpp avoids an 'undefined + ;; reference to `isatty(int)'' error. + (lambda _ + (for-each delete-file + '("compiler/lexer.cpp" + "compiler/parse.cpp")) + #t)) + (add-after 'unpack 'deal-with-tarbomb + (lambda _ + (chdir "..") ;tarbomb + #t))))) + (home-page "http://bricxcc.sourceforge.net/nqc/") + (synopsis "C-like language for Lego's MINDSTORMS") + (description + "Not Quite C (NQC) is a simple language for programming several Lego +MINDSTORMS products. The preprocessor and control structures of NQC are very +similar to C. NQC is not a general purpose language -- there are many +restrictions that stem from limitations of the standard RCX firmware.") + (license license:mpl1.0))) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 3ca4ef1868..6500aa51f5 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -2,10 +2,10 @@ ;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès ;;; Copyright © 2013, 2014, 2015 Andreas Enge ;;; Copyright © 2012 Nikita Karetnikov -;;; Copyright © 2014, 2015 Mark H Weaver +;;; Copyright © 2014, 2015, 2016 Mark H Weaver ;;; Copyright © 2015 Federico Beffa ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer -;;; Copyright © 2015 Efraim Flashner +;;; Copyright © 2015, 2016 Efraim Flashner ;;; Copyright © 2016 Christopher Allan Webber ;;; ;;; This file is part of GNU Guix. @@ -286,7 +286,9 @@ (define-public linux-libre (uri (linux-libre-urls version)) (sha256 (base32 - "1839xsaifs7vvyblzin8jps0gqi10xmz1l9p4x0j27vmdj39jgpm")))) + "1839xsaifs7vvyblzin8jps0gqi10xmz1l9p4x0j27vmdj39jgpm")) + (patches + (list (search-patch "linux-libre-CVE-2016-0728.patch"))))) (build-system gnu-build-system) (supported-systems '("x86_64-linux" "i686-linux")) (native-inputs `(("perl" ,perl) @@ -1234,7 +1236,7 @@ (define-public iotop (define-public fuse (package (name "fuse") - (version "2.9.4") + (version "2.9.5") (source (origin (method url-fetch) (uri (let ((version-with-underscores @@ -1245,7 +1247,7 @@ (define-public fuse "/fuse-" version ".tar.gz"))) (sha256 (base32 - "1qbwp63a2bp0bchabkwiyzszi9x5krlk2pwk2is6g35gyszw1sbb")))) + "1dfvbi1p57svbv2sfnbqwpnsk219spvjnlapf35azhgzqlf3g7sp")))) (build-system gnu-build-system) (inputs `(("util-linux" ,util-linux))) (arguments diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index 1057564b39..d41479e83f 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -8,7 +8,8 @@ ;;; Copyright © 2015 Paul van der Walt ;;; Copyright © 2015 Eric Bavier ;;; Copyright © 2015 Andreas Enge -;;; Copyright © 2015 Efraim Flashner +;;; Copyright © 2015, 2016 Efraim Flashner +;;; Copyright © 2016 Christopher Allan Webber ;;; ;;; This file is part of GNU Guix. ;;; @@ -519,7 +520,7 @@ (define-public libetpan (define-public claws-mail (package (name "claws-mail") - (version "3.13.1") + (version "3.13.2") (source (origin (method url-fetch) (uri (string-append @@ -527,7 +528,7 @@ (define-public claws-mail ".tar.xz")) (sha256 (base32 - "049av7r0xhjjjm1p93l2ns3xisvn125v3ncqar23cqjzgcichg5d")))) + "1l8ankx0qpq1ix1an8viphcf11ksh53jsrm1xjmq8cjbh5910wva")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config))) (inputs `(("bogofilter" ,bogofilter) @@ -1014,4 +1015,32 @@ (define-public esmtp @command{newaliases} commands.") (license gpl2+))) +(define-public fdm + (package + (name "fdm") + (version "1.9") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/nicm/fdm/releases/download/" + version "/fdm-" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "054rscijahiza5f9qha79rg3siji3bk5mk10f8c2vqx7m4w6qh8n")))) + (build-system gnu-build-system) + (inputs + `(("tdb" ,tdb) + ("openssl" ,openssl) + ("zlib" ,zlib))) + (home-page "https://github.com/nicm/fdm") + (synopsis "Mail Retrieval Agent (MRA) and Mail Delivery Agent (MDA)") + (description "fdm is a program designed to fetch mail from POP3 +or IMAP servers, or receive local mail from stdin, and +deliver it in various ways.") + (license + ;; Why point to a source file? Well, all the individual files have a + ;; copy of this license in their headers, but there's no seprate file + ;; with that information. + (non-copyleft "https://github.com/nicm/fdm/blob/master/command.c")))) + ;;; mail.scm ends here diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm index 956045d420..23c7a0bbdd 100644 --- a/gnu/packages/messaging.scm +++ b/gnu/packages/messaging.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014, 2015 Mark H Weaver +;;; Copyright © 2014, 2015, 2016 Mark H Weaver ;;; Copyright © 2014 Julien Lepiller ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer ;;; Copyright © 2015 Andreas Enge @@ -425,7 +425,7 @@ (define-public python2-nbxmpp (define-public gajim (package (name "gajim") - (version "0.16.4") + (version "0.16.5") (source (origin (method url-fetch) (uri (string-append "https://gajim.org/downloads/" @@ -433,10 +433,17 @@ (define-public gajim "/gajim-" version ".tar.bz2")) (sha256 (base32 - "0zyfs7q1qg8iqszr8l1gb18gqla6zrrfsgpmbxblpi9maqxas5i1")))) + "14fhcqnkqygh91132dnf1idayj4r3iqbwb44sd3mxv20n6ribh55")))) (build-system gnu-build-system) (arguments - `(#:phases + `(;; The only check done by gajim-0.16.x is to check that the + ;; translations are up-to-date, and in 0.16.5 they are not, so + ;; "make check" fails. Therefore, we disable tests for now. + ;; + ;; XXX TODO Try re-enabling tests in gajim-0.16.6 or later. + ;; + #:tests? #f + #:phases (modify-phases %standard-phases (add-after 'install 'wrap-program (lambda* (#:key outputs #:allow-other-keys) diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm index bfc90c1eeb..a60ba4bccd 100644 --- a/gnu/packages/music.scm +++ b/gnu/packages/music.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014 Eric Bavier -;;; Copyright © 2015 Ricardo Wurmus +;;; Copyright © 2015, 2016 Ricardo Wurmus ;;; Copyright © 2015 Paul van der Walt ;;; ;;; This file is part of GNU Guix. @@ -328,7 +328,11 @@ (define-public lilypond music. Music is input in a text file containing control sequences which are interpreted by LilyPond to produce the final document. It is extendable with Guile.") - (license license:gpl3+))) + (license license:gpl3+) + + ;; On armhf and mips64el, building the documentation sometimes leads to + ;; more than an hour of silence, so double the max silent time. + (properties `((max-silent-time . 7200))))) (define-public non-sequencer ;; The latest tagged release is three years old and uses a custom build @@ -957,7 +961,7 @@ (define-public zynaddsubfx (define-public yoshimi (package (name "yoshimi") - (version "1.3.7.1") + (version "1.3.8.2") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/yoshimi/" @@ -965,7 +969,7 @@ (define-public yoshimi "/yoshimi-" version ".tar.bz2")) (sha256 (base32 - "13xc1x8jrr2rn26jx4dini692ww3771d5j5xf7f56ixqr7mmdhvz")))) + "0wl4ln6v1nkkx56kfah23chyrhga2vi93i82g0s200c4s4184xr8")))) (build-system cmake-build-system) (arguments `(#:tests? #f ; there are no tests @@ -1036,3 +1040,41 @@ (define-public cursynth synthesis engine. Notes and parameter changes may be entered via MIDI or the computer's keyboard.") (license license:gpl3+))) + +(define-public qtractor + (package + (name "qtractor") + (version "0.7.3") + (source (origin + (method url-fetch) + (uri (string-append "http://downloads.sourceforge.net/qtractor/" + "qtractor-" version ".tar.gz")) + (sha256 + (base32 + "1vy4297myyqk0k58nzybgvgklckhngpdcnmp98k0rq98dirclbl7")))) + (build-system gnu-build-system) + (arguments `(#:tests? #f)) ; no "check" target + (inputs + `(("qt" ,qt) + ("alsa-lib" ,alsa-lib) + ("jack" ,jack-1) + ("libsndfile" ,libsndfile) + ("ladspa" ,ladspa) + ("lv2" ,lv2) + ("lilv" ,lilv) + ("suil" ,suil) + ("libsamplerate" ,libsamplerate) + ("libvorbis" ,libvorbis) + ("libmad" ,libmad) + ("rubberband" ,rubberband) + ("liblo" ,liblo) + ("zlib" ,zlib))) + (native-inputs + `(("pkg-config" ,pkg-config))) + (home-page "http://qtractor.sourceforge.net/") + (synopsis "Audio/MIDI multi-track sequencer") + (description + "Qtractor is an Audio/MIDI multi-track sequencer application. It uses +JACK for audio and ALSA sequencer for MIDI as multimedia infrastructures and +follows a traditional multi-track tape recorder control paradigm.") + (license license:gpl2+))) diff --git a/gnu/packages/nano.scm b/gnu/packages/nano.scm index f58f3d9328..352e2b47e0 100644 --- a/gnu/packages/nano.scm +++ b/gnu/packages/nano.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012 Nikita Karetnikov -;;; Copyright © 2015 Efraim Flashner +;;; Copyright © 2015, 2016 Efraim Flashner ;;; ;;; This file is part of GNU Guix. ;;; @@ -28,7 +28,7 @@ (define-module (gnu packages nano) (define-public nano (package (name "nano") - (version "2.5.0") + (version "2.5.1") (source (origin (method url-fetch) @@ -36,7 +36,7 @@ (define-public nano version ".tar.gz")) (sha256 (base32 - "1vl9bim56k1b4zwc3icxp46w6pn6gb042j1h4jlz1jklxxpkwcpz")))) + "1piv8prj6w3rvsrrx41ra8c10b8fzkgjhnm6399lsgqqpw0wlvz0")))) (build-system gnu-build-system) (inputs `(("gettext" ,gnu-gettext) diff --git a/gnu/packages/patches/arb-ldconfig.patch b/gnu/packages/patches/arb-ldconfig.patch new file mode 100644 index 0000000000..478ec5a6f0 --- /dev/null +++ b/gnu/packages/patches/arb-ldconfig.patch @@ -0,0 +1,22 @@ +diff -u -r arb-2.8.1.orig/configure arb-2.8.1/configure +--- arb-2.8.1.orig/configure 2015-12-31 17:30:01.000000000 +0100 ++++ arb-2.8.1/configure 2016-01-20 16:41:41.336726596 +0100 +@@ -647,6 +647,7 @@ + echo "ARB_SHARED=$SHARED" >> Makefile + echo "ARB_LIB=$ARB_LIB" >> Makefile + echo "ARB_LIBNAME=$ARB_LIBNAME" >> Makefile ++echo "ARB_MAJOR=$ARB_MAJOR" >> Makefile + echo "ARB_SOLIB=$ARB_SOLIB" >> Makefile + echo "EXEEXT=$EXEEXT" >> Makefile + echo "PREFIX=$PREFIX" >> Makefile +diff -u -r arb-2.8.1.orig/Makefile.in arb-2.8.1/Makefile.in +--- arb-2.8.1.orig/Makefile.in 2015-12-31 17:30:01.000000000 +0100 ++++ arb-2.8.1/Makefile.in 2016-01-20 16:30:32.575298517 +0100 +@@ -101,6 +101,7 @@ + $(LDCONFIG) -n "$(CURDIR)"; \ + fi + ln -sf "$(ARB_LIB)" "$(ARB_LIBNAME)"; \ ++ ln -sf "$(ARB_LIB)" "$(ARB_LIBNAME).$(ARB_MAJOR)"; \ + + libarb.a: $(OBJS) $(LIB_SOURCES) $(EXT_SOURCES) $(HEADERS) $(EXT_HEADERS) | build build/interfaces + $(AT)$(foreach ext, $(EXTENSIONS), $(foreach dir, $(patsubst $(ext)/%.h, %, $(wildcard $(ext)/*.h)), mkdir -p build/$(dir); BUILD_DIR=$(CURDIR)/build/$(dir); export BUILD_DIR; MOD_DIR=$(dir); export MOD_DIR; $(MAKE) -f $(CURDIR)/Makefile.subdirs -C $(ext)/$(dir) static || exit $$?;)) diff --git a/gnu/packages/patches/linux-libre-CVE-2016-0728.patch b/gnu/packages/patches/linux-libre-CVE-2016-0728.patch new file mode 100644 index 0000000000..254d6c1aea --- /dev/null +++ b/gnu/packages/patches/linux-libre-CVE-2016-0728.patch @@ -0,0 +1,84 @@ +Copied from +https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/patch/?id=23567fd052a9abb6d67fe8e7a9ccdd9800a540f2 + +From 23567fd052a9abb6d67fe8e7a9ccdd9800a540f2 Mon Sep 17 00:00:00 2001 +From: Yevgeny Pats +Date: Tue, 19 Jan 2016 22:09:04 +0000 +Subject: KEYS: Fix keyring ref leak in join_session_keyring() + +This fixes CVE-2016-0728. + +If a thread is asked to join as a session keyring the keyring that's already +set as its session, we leak a keyring reference. + +This can be tested with the following program: + + #include + #include + #include + #include + + int main(int argc, const char *argv[]) + { + int i = 0; + key_serial_t serial; + + serial = keyctl(KEYCTL_JOIN_SESSION_KEYRING, + "leaked-keyring"); + if (serial < 0) { + perror("keyctl"); + return -1; + } + + if (keyctl(KEYCTL_SETPERM, serial, + KEY_POS_ALL | KEY_USR_ALL) < 0) { + perror("keyctl"); + return -1; + } + + for (i = 0; i < 100; i++) { + serial = keyctl(KEYCTL_JOIN_SESSION_KEYRING, + "leaked-keyring"); + if (serial < 0) { + perror("keyctl"); + return -1; + } + } + + return 0; + } + +If, after the program has run, there something like the following line in +/proc/keys: + +3f3d898f I--Q--- 100 perm 3f3f0000 0 0 keyring leaked-keyring: empty + +with a usage count of 100 * the number of times the program has been run, +then the kernel is malfunctioning. If leaked-keyring has zero usages or +has been garbage collected, then the problem is fixed. + +Reported-by: Yevgeny Pats +Signed-off-by: David Howells +Acked-by: Don Zickus +Acked-by: Prarit Bhargava +Acked-by: Jarod Wilson +Signed-off-by: James Morris +--- + security/keys/process_keys.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/security/keys/process_keys.c b/security/keys/process_keys.c +index a3f85d2..e6d50172 100644 +--- a/security/keys/process_keys.c ++++ b/security/keys/process_keys.c +@@ -794,6 +794,7 @@ long join_session_keyring(const char *name) + ret = PTR_ERR(keyring); + goto error2; + } else if (keyring == new->session_keyring) { ++ key_put(keyring); + ret = 0; + goto error2; + } +-- +cgit v0.12 + diff --git a/gnu/packages/patches/tophat-build-with-later-seqan.patch b/gnu/packages/patches/tophat-build-with-later-seqan.patch new file mode 100644 index 0000000000..fc742e2a7d --- /dev/null +++ b/gnu/packages/patches/tophat-build-with-later-seqan.patch @@ -0,0 +1,24 @@ +This patch resolves a build failure when building TopHat 2.1.0 with SeqAn 1.4. +This is the relevant part of a patch originally posted here: +https://lists.fu-berlin.de/pipermail/seqan-dev/2014-July/msg00001.html + +--- a/src/segment_juncs.cpp ++++ b/src/segment_juncs.cpp +@@ -2050,10 +2050,13 @@ void juncs_from_ref_segs(RefSequenceTabl + typedef map MotifMap; + + MotifMap ims; +- +- seqan::DnaStringReverseComplement rev_donor_dinuc(donor_dinuc); +- seqan::DnaStringReverseComplement rev_acceptor_dinuc(acceptor_dinuc); +- ++ ++ typedef seqan::ModifiedString< ++ seqan::ModifiedString > >, ++ seqan::ModReverse> ConstDnaStringReverseComplement; ++ ConstDnaStringReverseComplement rev_donor_dinuc(donor_dinuc); ++ ConstDnaStringReverseComplement rev_acceptor_dinuc(acceptor_dinuc); ++ + if (talkative) + fprintf(stderr, "Collecting potential splice sites in islands\n"); + diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index c10d1cbfc7..be48b25c9a 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -339,13 +339,13 @@ (define-public libressl (define-public acme (package (name "acme") - (version "0.1.1") + (version "0.2.0") (source (origin (method url-fetch) (uri (pypi-uri "acme" version)) (sha256 (base32 - "1yv0gy8akaqp5p2wjpfj8r5i0da04a9qdmlh06rczdkrmk6q680w")))) + "1xcbywzrwrj2cmqhaj4k6b11wfkbm3i7za2k9j1sd74rs1zh5abl")))) (build-system python-build-system) (arguments `(#:python ,python-2)) @@ -371,13 +371,13 @@ (define-public acme (define-public letsencrypt (package (name "letsencrypt") - (version "0.1.1") + (version "0.2.0") (source (origin (method url-fetch) (uri (pypi-uri "letsencrypt" version)) (sha256 (base32 - "1kia3wk66lxyi2fghp9sd7cqgr5qiwdfayz153hi4wpa3q1q8rwf")))) + "0q57ylx00b6kl9zvawgag5yl03vlv1cjhp18xm96682pdibbgjci")))) (build-system python-build-system) (arguments `(#:python ,python-2)) diff --git a/gnu/packages/tor.scm b/gnu/packages/tor.scm index e6e8876597..5fb8f954aa 100644 --- a/gnu/packages/tor.scm +++ b/gnu/packages/tor.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2014, 2015 Ludovic Courtès ;;; Copyright © 2014, 2015 Mark H Weaver +;;; Copyright © 2016 Efraim Flashner ;;; ;;; This file is part of GNU Guix. ;;; @@ -36,14 +37,14 @@ (define-module (gnu packages tor) (define-public tor (package (name "tor") - (version "0.2.7.5") + (version "0.2.7.6") (source (origin (method url-fetch) (uri (string-append "https://www.torproject.org/dist/tor-" version ".tar.gz")) (sha256 (base32 - "0pxayvcab4cb107ynbpzx4g0qyr1mjfba2an76wdx6dxn56rwakx")))) + "0p8hjlfi8dwghlyjif5s0q98cmpgz9kn9jja25430l04z5wqcfj9")))) (build-system gnu-build-system) (native-inputs `(("python" ,python-2))) ; for tests @@ -103,7 +104,7 @@ (define-public torsocks (define-public privoxy (package (name "privoxy") - (version "3.0.21") + (version "3.0.24") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/ijbswa/Sources/" @@ -111,7 +112,7 @@ (define-public privoxy version "-stable-src.tar.gz")) (sha256 (base32 - "1f6xb7aa47p90c26vqaw74y6drs9gpnhxsgby3mx0awdjh0ydisy")))) + "04mhkz5g713i2crvjd6s783hhrlsjjjlfb9llbaf13ghg3fgd0d3")))) (build-system gnu-build-system) (arguments '(;; The default 'sysconfdir' is $out/etc; change that to diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index 1edf9f8d9c..e0626cb3ac 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -6,7 +6,7 @@ ;;; Copyright © 2015 Mathieu Lirzin ;;; Copyright © 2014, 2015 Mark H Weaver ;;; Copyright © 2014 Eric Bavier -;;; Copyright © 2015 Efraim Flashner +;;; Copyright © 2015, 2016 Efraim Flashner ;;; Copyright © 2015 Kyle Meyer ;;; Copyright © 2015 Ricardo Wurmus ;;; @@ -1004,7 +1004,7 @@ (define-public findnewest (define-public myrepos (package (name "myrepos") - (version "1.20151022") + (version "1.20160123") (source (origin (method url-fetch) @@ -1013,7 +1013,7 @@ (define-public myrepos version ".tar.gz")) (file-name (string-append name "-" version ".tar.gz")) (sha256 - (base32 "0c93lqsngpsxsca7nygk4qhidr40ijgih86q81x1mfcwbs0gbds8")))) + (base32 "1723cg5haplz2w9dwdzp6ds1ip33cx3awmj4wnb0h4yq171v5lqk")))) (build-system gnu-build-system) (inputs `(("perl" ,perl))) diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index 12f10b9915..636f76584d 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2014, 2015 Andreas Enge -;;; Copyright © 2014, 2015 David Thompson +;;; Copyright © 2014, 2015, 2016 David Thompson ;;; Copyright © 2014, 2015, 2016 Mark H Weaver ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer ;;; Copyright © 2015, 2016 Efraim Flashner @@ -1265,6 +1265,39 @@ (define-public mlt tools, XML authoring components, and an extensible plug-in based API.") (license license:lgpl2.1+))) +(define-public v4l-utils + (package + (name "v4l-utils") + (version "1.8.1") + (source (origin + (method url-fetch) + (uri (string-append "http://linuxtv.org/downloads/v4l-utils" + "/v4l-utils-" version ".tar.bz2")) + (sha256 + (base32 + "0cqv8drw0z0kfmz4f50a8kzbrz6vbj6j6q78030hgshr7yq1jqig")))) + (build-system gnu-build-system) + (arguments + '(#:configure-flags + (list (string-append "--with-udevdir=" + (assoc-ref %outputs "out") + "/lib/udev")))) + (native-inputs + `(("pkg-config" ,pkg-config))) + (inputs + `(("alsa-lib" ,alsa-lib) + ("glu" ,glu) + ("libjpeg" ,libjpeg) + ("libx11" ,libx11) + ("qt" ,qt) + ("eudev" ,eudev))) + (synopsis "Realtime video capture utilities for Linux") + (description "The v4l-utils provide a series of libraries and utilities to +be used for realtime video capture via Linux-specific APIs.") + (home-page "https://linuxtv.org/wiki/index.php/V4l-utils") + ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only. + (license (list license:lgpl2.1+ license:gpl2)))) + (define-public obs (package (name "obs") @@ -1293,6 +1326,7 @@ (define-public obs ("mesa" ,mesa) ("pulseaudio" ,pulseaudio) ("qt" ,qt) + ("v4l-utils" ,v4l-utils) ("zlib" ,zlib))) (synopsis "Live streaming software") (description "Open Broadcaster Software provides a graphical interface for diff --git a/gnu/packages/xiph.scm b/gnu/packages/xiph.scm index bc2294e58c..cca0c14c1b 100644 --- a/gnu/packages/xiph.scm +++ b/gnu/packages/xiph.scm @@ -5,7 +5,7 @@ ;;; Copyright © 2014 Sree Harsha Totakura ;;; Copyright © 2014 Mark H Weaver ;;; Copyright © 2015 Paul van der Walt -;;; Copyright © 2015 Efraim Flashner +;;; Copyright © 2015, 2016 Efraim Flashner ;;; ;;; This file is part of GNU Guix. ;;; @@ -293,7 +293,7 @@ (define vorbis-tools (define opus (package (name "opus") - (version "1.1.1") + (version "1.1.2") (source (origin (method url-fetch) (uri (string-append @@ -301,7 +301,7 @@ (define opus ".tar.gz")) (sha256 (base32 - "07iplfwim26b6k1bqjyciaqvihps9rk5gi8385axa83ppmbgz14v")))) + "1z87x5c5x951lhnm70iqr2gqn15wns5cqsw8nnkvl48jwdw00a8f")))) (build-system gnu-build-system) (synopsis "Versatile audio codec") (description @@ -349,7 +349,7 @@ (define opus-tools (define opusfile (package (name "opusfile") - (version "0.6") + (version "0.7") (source (origin (method url-fetch) (uri (string-append @@ -357,7 +357,7 @@ (define opusfile ".tar.gz")) (sha256 (base32 - "19iys2kld75k0210b807i4illrdmj3cmmnrgxlc9y4vf6mxp2a14")))) + "00f3wwjv3hxwg05g22s6mkkxikz80ljsn70g39cmi43jph9ysawy")))) (build-system gnu-build-system) (propagated-inputs `(("opus" ,opus))) @@ -409,7 +409,7 @@ (define-public icecast (define-public libshout (package (name "libshout") - (version "2.3.1") + (version "2.4.1") (source (origin (method url-fetch) (uri (string-append @@ -417,7 +417,7 @@ (define-public libshout name "-" version ".tar.gz")) (sha256 (base32 - "0vlj4dxfxg06xhvv0z2zjjlrjh5di2m28w7v16zcygsy99mmyg6g")))) + "0kgjpf8jkgyclw11nilxi8vyjk4s8878x23qyxnvybbgqbgbib7k")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config))) diff --git a/gnu/services/avahi.scm b/gnu/services/avahi.scm index 49a737f090..909abeffe6 100644 --- a/gnu/services/avahi.scm +++ b/gnu/services/avahi.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014, 2015 Ludovic Courtès +;;; Copyright © 2014, 2015, 2016 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -26,7 +26,8 @@ (define-module (gnu services avahi) #:use-module (gnu packages admin) #:use-module (guix records) #:use-module (guix gexp) - #:export (avahi-service)) + #:export (avahi-service + avahi-service-type)) ;;; Commentary: ;;; diff --git a/gnu/system.scm b/gnu/system.scm index ee0280c069..edcfaf66fe 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -79,6 +79,7 @@ (define-module (gnu system) operating-system-locale-libcs operating-system-mapped-devices operating-system-file-systems + operating-system-store-file-system operating-system-activation-script operating-system-derivation @@ -678,12 +679,34 @@ (define (kernel->grub-label kernel) (package-version kernel) " (alpha)")) +(define (store-file-system file-systems) + "Return the file system object among FILE-SYSTEMS that contains the store." + (match (filter (lambda (fs) + (and (file-system-mount? fs) + (not (memq 'bind-mount (file-system-flags fs))) + (string-prefix? (file-system-mount-point fs) + (%store-prefix)))) + file-systems) + ((and candidates (head . tail)) + (reduce (lambda (fs1 fs2) + (if (> (string-length (file-system-mount-point fs1)) + (string-length (file-system-mount-point fs2))) + fs1 + fs2)) + head + candidates)))) + +(define (operating-system-store-file-system os) + "Return the file system that contains the store of OS." + (store-file-system (operating-system-file-systems os))) + (define* (operating-system-grub.cfg os #:optional (old-entries '())) "Return the GRUB configuration file for OS. Use OLD-ENTRIES to populate the \"old entries\" menu." (mlet* %store-monad ((system (operating-system-derivation os)) (root-fs -> (operating-system-root-file-system os)) + (store-fs -> (operating-system-store-file-system os)) (kernel -> (operating-system-kernel os)) (root-device -> (if (eq? 'uuid (file-system-title root-fs)) (uuid->string (file-system-device root-fs)) @@ -698,7 +721,8 @@ (define* (operating-system-grub.cfg os #:optional (old-entries '())) "/boot") (operating-system-kernel-arguments os))) (initrd #~(string-append #$system "/initrd")))))) - (grub-configuration-file (operating-system-bootloader os) entries + (grub-configuration-file (operating-system-bootloader os) + store-fs entries #:old-entries old-entries))) (define (operating-system-parameters-file os) diff --git a/gnu/system/grub.scm b/gnu/system/grub.scm index 5b824820b1..45b46cae6f 100644 --- a/gnu/system/grub.scm +++ b/gnu/system/grub.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014, 2015 Ludovic Courtès +;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -25,6 +25,7 @@ (define-module (gnu system grub) #:use-module (guix gexp) #:use-module (guix download) #:use-module (gnu artwork) + #:use-module (gnu system file-systems) #:autoload (gnu packages grub) (grub) #:autoload (gnu packages inkscape) (inkscape) #:autoload (gnu packages imagemagick) (imagemagick) @@ -153,10 +154,12 @@ (define* (grub-background-image config #:key (width 1024) (height 768)) (with-monad %store-monad (return #f))))) -(define (eye-candy config system port) +(define (eye-candy config root-fs system port) "Return in %STORE-MONAD a gexp that writes to PORT (a port-valued gexp) the 'grub.cfg' part concerned with graphics mode, background images, colors, and -all that." +all that. ROOT-FS is a file-system object denoting the root file system where +the store is. SYSTEM must be the target system string---e.g., +\"x86_64-linux\"." (define setup-gfxterm-body ;; Intel systems need to be switched into graphics mode, whereas most ;; other modern architectures have no other mode and therefore don't need @@ -179,15 +182,18 @@ (define (theme-colors type) (string-append (symbol->string (assoc-ref colors 'fg)) "/" (symbol->string (assoc-ref colors 'bg))))) + (define font-file + #~(string-append #$grub "/share/grub/unicode.pf2")) + (mlet* %store-monad ((image (grub-background-image config))) (return (and image #~(format #$port " function setup_gfxterm {~a} # Set 'root' to the partition that contains /gnu/store. -search --file --set ~a/share/grub/unicode.pf2 +~a -if loadfont ~a/share/grub/unicode.pf2; then +if loadfont ~a; then setup_gfxterm fi @@ -200,7 +206,9 @@ (define (theme-colors type) set menu_color_highlight=white/blue fi~%" #$setup-gfxterm-body - #$grub #$grub + #$(grub-root-search root-fs font-file) + #$font-file + #$image #$(theme-colors grub-theme-color-normal) #$(theme-colors grub-theme-color-highlight)))))) @@ -210,13 +218,31 @@ (define (theme-colors type) ;;; Configuration file. ;;; -(define* (grub-configuration-file config entries +(define (grub-root-search root-fs file) + "Return the GRUB 'search' command to look for ROOT-FS, which contains FILE, +a gexp. The result is a gexp that can be inserted in the grub.cfg-generation +code." + (case (file-system-title root-fs) + ;; Preferably refer to ROOT-FS by its UUID or label. This is more + ;; efficient and less ambiguous, see <>. + ((uuid) + (format #f "search --fs-uuid --set ~a" + (uuid->string (file-system-device root-fs)))) + ((label) + (format #f "search --label --set ~a" + (file-system-device root-fs))) + (else + ;; As a last resort, look for any device containing FILE. + #~(format #f "search --file --set ~a" #$file)))) + +(define* (grub-configuration-file config store-fs entries #:key (system (%current-system)) (old-entries '())) "Return the GRUB configuration file corresponding to CONFIG, a - object. OLD-ENTRIES is taken to be a list of menu -entries corresponding to old generations of the system." + object, and where the store is available at STORE-FS, a + object. OLD-ENTRIES is taken to be a list of menu entries +corresponding to old generations of the system." (define linux-image-name (if (string-prefix? "mips" system) "vmlinuz" @@ -229,18 +255,18 @@ (define entry->gexp (match-lambda (($ label linux arguments initrd) #~(format port "menuentry ~s { - # Set 'root' to the partition that contains the kernel. - search --file --set ~a/~a~% - + ~a linux ~a/~a ~a initrd ~a }~%" #$label - #$linux #$linux-image-name + #$(grub-root-search store-fs + #~(string-append #$linux "/" + #$linux-image-name)) #$linux #$linux-image-name (string-join (list #$@arguments)) #$initrd)))) - (mlet %store-monad ((sugar (eye-candy config system #~port))) + (mlet %store-monad ((sugar (eye-candy config store-fs system #~port))) (define builder #~(call-with-output-file #$output (lambda (port) diff --git a/guix/import/cran.scm b/guix/import/cran.scm index 1c30da89c7..f36e9482cf 100644 --- a/guix/import/cran.scm +++ b/guix/import/cran.scm @@ -29,12 +29,14 @@ (define-module (guix import cran) #:use-module (guix base32) #:use-module ((guix download) #:select (download-to-store)) #:use-module (guix import utils) - #:use-module ((guix build-system r) #:select (cran-uri)) + #:use-module ((guix build-system r) #:select (cran-uri bioconductor-uri)) #:use-module (guix upstream) #:use-module (guix packages) #:use-module (gnu packages) #:export (cran->guix-package - %cran-updater)) + bioconductor->guix-package + %cran-updater + %bioconductor-updater)) ;;; Commentary: ;;; @@ -108,6 +110,15 @@ (define* (maybe-inputs package-inputs #:optional (type 'inputs)) `((,type (,'quasiquote ,(format-inputs package-inputs))))))) (define %cran-url "http://cran.r-project.org/web/packages/") +(define %bioconductor-url "http://bioconductor.org/packages/") + +;; The latest Bioconductor release is 3.2. Bioconductor packages should be +;; updated together. +(define %bioconductor-svn-url + (string-append "https://readonly:readonly@" + "hedgehog.fhcrc.org/bioconductor/branches/RELEASE_3_2/" + "madman/Rpacks/")) + (define (fetch-description base-url name) "Return an alist of the contents of the DESCRIPTION file for the R package @@ -136,24 +147,31 @@ (define (listify meta field) (string-any char-set:whitespace item))) (map string-trim-both items)))))) -(define (description->package meta) - "Return the `package' s-expression for a CRAN package from the alist META, -which was derived from the R package's DESCRIPTION file." +(define (description->package repository meta) + "Return the `package' s-expression for an R package published on REPOSITORY +from the alist META, which was derived from the R package's DESCRIPTION file." (define (guix-name name) (if (string-prefix? "r-" name) (string-downcase name) (string-append "r-" (string-downcase name)))) - (let* ((name (assoc-ref meta "Package")) + (let* ((base-url (case repository + ((cran) %cran-url) + ((bioconductor) %bioconductor-url))) + (uri-helper (case repository + ((cran) cran-uri) + ((bioconductor) bioconductor-uri))) + (name (assoc-ref meta "Package")) (synopsis (assoc-ref meta "Title")) (version (assoc-ref meta "Version")) (license (string->license (assoc-ref meta "License"))) ;; Some packages have multiple home pages. Some have none. (home-page (match (listify meta "URL") ((url rest ...) url) - (_ (string-append %cran-url name)))) - (source-url (match (cran-uri name version) + (_ (string-append base-url name)))) + (source-url (match (uri-helper name version) ((url rest ...) url) + ((? string? url) url) (_ #f))) (tarball (with-store store (download-to-store store source-url))) (sysdepends (map string-downcase (listify meta "SystemRequirements"))) @@ -167,26 +185,32 @@ (define (guix-name name) (version ,version) (source (origin (method url-fetch) - (uri (cran-uri ,name version)) + (uri (,(procedure-name uri-helper) ,name version)) (sha256 (base32 ,(bytevector->nix-base32-string (file-sha256 tarball)))))) - (properties ,`(,'quasiquote ((,'upstream-name . ,name)))) + ,@(if (not (equal? (string-append "r-" name) + (guix-name name))) + `((properties ,`(,'quasiquote ((,'upstream-name . ,name))))) + '()) (build-system r-build-system) ,@(maybe-inputs sysdepends) ,@(maybe-inputs propagate 'propagated-inputs) (home-page ,(if (string-null? home-page) - (string-append %cran-url name) + (string-append base-url name) home-page)) (synopsis ,synopsis) (description ,(beautify-description (assoc-ref meta "Description"))) (license ,license)))) -(define (cran->guix-package package-name) - "Fetch the metadata for PACKAGE-NAME from cran.r-project.org, and return the -`package' s-expression corresponding to that package, or #f on failure." - (let ((module-meta (fetch-description %cran-url package-name))) - (and=> module-meta description->package))) +(define* (cran->guix-package package-name #:optional (repo 'cran)) + "Fetch the metadata for PACKAGE-NAME from REPO and return the `package' +s-expression corresponding to that package, or #f on failure." + (let* ((url (case repo + ((cran) %cran-url) + ((bioconductor) %bioconductor-svn-url))) + (module-meta (fetch-description url package-name))) + (and=> module-meta (cut description->package repo <>)))) ;;; @@ -212,7 +236,7 @@ (define (package->upstream-name package) (_ #f))) (_ #f))))) -(define (latest-release package) +(define (latest-cran-release package) "Return an for the latest release of PACKAGE." (define upstream-name @@ -229,16 +253,55 @@ (define meta (version version) (urls (cran-uri upstream-name version)))))) +(define (latest-bioconductor-release package) + "Return an for the latest release of PACKAGE." + + (define upstream-name + (package->upstream-name (specification->package package))) + + (define meta + (fetch-description %bioconductor-svn-url upstream-name)) + + (and meta + (let ((version (assoc-ref meta "Version"))) + ;; Bioconductor does not provide signatures. + (upstream-source + (package package) + (version version) + (urls (bioconductor-uri upstream-name version)))))) + (define (cran-package? package) "Return true if PACKAGE is an R package from CRAN." - ;; Assume all R packages are available on CRAN. - (string-prefix? "r-" (package-name package))) + (and (string-prefix? "r-" (package-name package)) + (match (and=> (package-source package) origin-uri) + ((? string? uri) + (string-prefix? "mirror://cran" uri)) + ((? list? uris) + (any (cut string-prefix? "mirror://cran" <>) uris)) + (_ #f)))) + +(define (bioconductor-package? package) + "Return true if PACKAGE is an R package from Bioconductor." + (and (string-prefix? "r-" (package-name package)) + (match (and=> (package-source package) origin-uri) + ((? string? uri) + (string-prefix? "http://bioconductor.org" uri)) + ((? list? uris) + (any (cut string-prefix? "http://bioconductor.org" <>) uris)) + (_ #f)))) (define %cran-updater (upstream-updater (name 'cran) (description "Updater for CRAN packages") (pred cran-package?) - (latest latest-release))) + (latest latest-cran-release))) + +(define %bioconductor-updater + (upstream-updater + (name 'bioconductor) + (description "Updater for Bioconductor packages") + (pred bioconductor-package?) + (latest latest-bioconductor-release))) ;;; cran.scm ends here diff --git a/guix/import/gem.scm b/guix/import/gem.scm index 3c42052f1a..4b2a253130 100644 --- a/guix/import/gem.scm +++ b/guix/import/gem.scm @@ -77,7 +77,7 @@ (define (read-byte i) (bytevector-u8-set! bv i (read-byte i)) (loop (1+ i))))))) -(define (make-gem-sexp name version hash home-page description +(define (make-gem-sexp name version hash home-page synopsis description dependencies licenses) "Return the `package' s-expression for a Ruby package with the given NAME, VERSION, HASH, HOME-PAGE, DESCRIPTION, DEPENDENCIES, and LICENSES." @@ -101,7 +101,7 @@ (define (make-gem-sexp name version hash home-page description (,'unquote ,(string->symbol name)))) dependencies))))) - (synopsis ,description) ; nothing better to use + (synopsis ,synopsis) (description ,description) (home-page ,home-page) (license ,(match licenses @@ -117,6 +117,7 @@ (define* (gem->guix-package package-name #:optional version) (let ((name (assoc-ref package "name")) (version (assoc-ref package "version")) (hash (assoc-ref package "sha")) + (synopsis (assoc-ref package "info")) ; nothing better to use (description (beautify-description (assoc-ref package "info"))) (home-page (assoc-ref package "homepage_uri")) @@ -129,5 +130,5 @@ (define* (gem->guix-package package-name #:optional version) "runtime"))) (licenses (map string->license (assoc-ref package "licenses")))) - (make-gem-sexp name version hash home-page + (make-gem-sexp name version hash home-page synopsis description dependencies licenses))))) diff --git a/guix/licenses.scm b/guix/licenses.scm index 9ace7f543b..1def1acb3e 100644 --- a/guix/licenses.scm +++ b/guix/licenses.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2012, 2013 Nikita Karetnikov ;;; Copyright © 2015 Mark H Weaver ;;; Copyright © 2015 Ricardo Wurmus +;;; Copyright © 2016 Eric Bavier ;;; ;;; This file is part of GNU Guix. ;;; @@ -49,7 +50,7 @@ (define-module (guix licenses) imlib2 ipa lgpl2.0 lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3 lgpl3+ - mpl1.1 mpl2.0 + mpl1.0 mpl1.1 mpl2.0 ms-pl ncsa openldap2.8 openssl @@ -302,6 +303,11 @@ (define lgpl3+ "https://www.gnu.org/licenses/lgpl.html" "https://www.gnu.org/licenses/license-list#LGPLv3")) +(define mpl1.0 + (license "MPL 1.0" + "http://www.mozilla.org/MPL/1.0/" + "https://www.gnu.org/licenses/license-list.html#MPL")) + (define mpl1.1 (license "MPL 1.1" "http://directory.fsf.org/wiki/License:MPLv1.1" diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm index 9193ad32b2..7ca2c6ebc8 100644 --- a/guix/scripts/build.scm +++ b/guix/scripts/build.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès +;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès ;;; Copyright © 2013 Mark H Weaver ;;; ;;; This file is part of GNU Guix. @@ -153,6 +153,8 @@ (define (show-build-options-help) (display (_ " -K, --keep-failed keep build tree of failed builds")) (display (_ " + -k, --keep-going keep going when some of the derivations fail")) + (display (_ " -n, --dry-run do not build the derivations")) (display (_ " --fallback fall back to building when the substituter fails")) @@ -183,6 +185,7 @@ (define (set-build-options-from-command-line store opts) ;; TODO: Add more options. (set-build-options store #:keep-failed? (assoc-ref opts 'keep-failed?) + #:keep-going? (assoc-ref opts 'keep-going?) #:rounds (assoc-ref opts 'rounds) #:build-cores (or (assoc-ref opts 'cores) 0) #:max-build-jobs (or (assoc-ref opts 'max-jobs) 1) @@ -214,6 +217,11 @@ (define %standard-build-options (apply values (alist-cons 'keep-failed? #t result) rest))) + (option '(#\k "keep-going") #f #f + (lambda (opt name arg result . rest) + (apply values + (alist-cons 'keep-going? #t result) + rest))) (option '("rounds") #t #f (lambda (opt name arg result . rest) (apply values diff --git a/guix/scripts/import/cran.scm b/guix/scripts/import/cran.scm index 8d001ac494..ace1123b90 100644 --- a/guix/scripts/import/cran.scm +++ b/guix/scripts/import/cran.scm @@ -41,6 +41,8 @@ (define %default-options (define (show-help) (display (_ "Usage: guix import cran PACKAGE-NAME Import and convert the CRAN package for PACKAGE-NAME.\n")) + (display (_ " + -a, --archive=ARCHIVE specify the archive repository")) (display (_ " -h, --help display this help and exit")) (display (_ " @@ -57,6 +59,10 @@ (define %options (option '(#\V "version") #f #f (lambda args (show-version-and-exit "guix import cran"))) + (option '(#\a "archive") #t #f + (lambda (opt name arg result) + (alist-cons 'repo (string->symbol arg) + (alist-delete 'repo result)))) %standard-import-options)) @@ -82,7 +88,8 @@ (define (parse-options) (reverse opts)))) (match args ((package-name) - (let ((sexp (cran->guix-package package-name))) + (let ((sexp (cran->guix-package package-name + (or (assoc-ref opts 'repo) 'cran)))) (unless sexp (leave (_ "failed to download description for package '~a'~%") package-name)) diff --git a/guix/scripts/refresh.scm b/guix/scripts/refresh.scm index a5834d12cc..f9e3f31a03 100644 --- a/guix/scripts/refresh.scm +++ b/guix/scripts/refresh.scm @@ -195,6 +195,7 @@ (define %updaters %gnome-updater %elpa-updater %cran-updater + %bioconductor-updater ((guix import pypi) => %pypi-updater))) (define (lookup-updater name) diff --git a/tests/cran.scm b/tests/cran.scm index 0a4a2fdd8f..83d2e7f554 100644 --- a/tests/cran.scm +++ b/tests/cran.scm @@ -86,16 +86,6 @@ (define simple-alist '() ((@@ (guix import cran) listify) simple-alist "BadList")) -(test-equal "beautify-description: use double spacing" - "This is a package. It is great. Trust me Mr. Hendrix." - ((@@ (guix import cran) beautify-description) - "This is a package. It is great. Trust me Mr. Hendrix.")) - -(test-equal "beautify-description: transform fragment into sentence" - "This package provides a function to establish world peace" - ((@@ (guix import cran) beautify-description) - "A function to establish world peace")) - (test-assert "description->package" ;; Replace network resources with sample data. (mock ((guix build download) url-fetch @@ -107,7 +97,7 @@ (define simple-alist ("mirror://cran/src/contrib/My-Example_1.2.3.tar.gz" "source") (_ (error "Unexpected URL: " url)))))))) - (match ((@@ (guix import cran) description->package) description-alist) + (match ((@@ (guix import cran) description->package) 'cran description-alist) (('package ('name "r-my-example") ('version "1.2.3") diff --git a/tests/derivations.scm b/tests/derivations.scm index 64cc8a94c9..db96e26ab1 100644 --- a/tests/derivations.scm +++ b/tests/derivations.scm @@ -151,6 +151,33 @@ (define prefix-len (string-length dir)) ;; the contents. (valid-path? %store (derivation->output-path drv))))) +(test-assert "derivation fails but keep going" + ;; In keep-going mode, 'build-derivations' should fail because of D1, but it + ;; must return only after D2 has succeeded. + (with-store store + (let* ((d1 (derivation %store "fails" + %bash `("-c" "false") + #:inputs `((,%bash)))) + (d2 (build-expression->derivation %store "sleep-then-succeed" + `(begin + ,(random-text) + ;; XXX: Hopefully that's long + ;; enough that D1 has already + ;; failed. + (sleep 2) + (mkdir %output))))) + (set-build-options %store + #:use-substitutes? #f + #:keep-going? #t) + (guard (c ((nix-protocol-error? c) + (and (= 100 (nix-protocol-error-status c)) + (string-contains (nix-protocol-error-message c) + (derivation-file-name d1)) + (not (valid-path? %store (derivation->output-path d1))) + (valid-path? %store (derivation->output-path d2))))) + (build-derivations %store (list d1 d2)) + #f)))) + (test-assert "identical files are deduplicated" (let* ((build1 (add-text-to-store %store "one.sh" "echo hello, world > \"$out\"\n" diff --git a/tests/gem.scm b/tests/gem.scm index 9efbda31fe..ebce809840 100644 --- a/tests/gem.scm +++ b/tests/gem.scm @@ -69,7 +69,7 @@ (define test-json (("bundler" ('unquote 'bundler)) ("ruby-bar" ('unquote 'ruby-bar))))) ('synopsis "A cool gem") - ('description "A cool gem") + ('description "This package provides a cool gem") ('home-page "https://example.com") ('license ('list 'expat 'asl2.0))) #t) diff --git a/tests/import-utils.scm b/tests/import-utils.scm new file mode 100644 index 0000000000..08365816d4 --- /dev/null +++ b/tests/import-utils.scm @@ -0,0 +1,39 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2015 Ricardo Wurmus +;;; Copyright © 2016 Ben Woodcroft +;;; +;;; 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 (test-import-utils) + #:use-module (guix tests) + #:use-module (guix import utils) + #:use-module (srfi srfi-64)) + +(test-begin "import-utils") + +(test-equal "beautify-description: use double spacing" + "This is a package. It is great. Trust me Mr. Hendrix." + (beautify-description + "This is a package. It is great. Trust me Mr. Hendrix.")) + +(test-equal "beautify-description: transform fragment into sentence" + "This package provides a function to establish world peace" + (beautify-description "A function to establish world peace")) + +(test-end "import-utils") + + +(exit (= (test-runner-fail-count (test-runner-current)) 0)) diff --git a/tests/lint.scm b/tests/lint.scm index df82593a9e..b8dad13ceb 100644 --- a/tests/lint.scm +++ b/tests/lint.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012, 2013 Cyril Roelandt ;;; Copyright © 2014, 2015 Eric Bavier -;;; Copyright © 2014, 2015 Ludovic Courtès +;;; Copyright © 2014, 2015, 2016 Ludovic Courtès ;;; Copyright © 2015 Mathieu Lirzin ;;; ;;; This file is part of GNU Guix. @@ -19,6 +19,9 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;; Avoid interference. +(unsetenv "http_proxy") + (define-module (test-lint) #:use-module (guix tests) #:use-module (guix download) diff --git a/tests/publish.scm b/tests/publish.scm index 4d72fdc468..0b92390900 100644 --- a/tests/publish.scm +++ b/tests/publish.scm @@ -16,6 +16,9 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;; Avoid interference. +(unsetenv "http_proxy") + (define-module (test-publish) #:use-module (guix scripts publish) #:use-module (guix tests) @@ -62,6 +65,7 @@ (define (publish-uri route) (connect conn AF_INET (inet-pton AF_INET "127.0.0.1") 6789)) (loop)))) + (test-begin "publish") (test-equal "/nix-cache-info" diff --git a/tests/system.scm b/tests/system.scm new file mode 100644 index 0000000000..7e016a610b --- /dev/null +++ b/tests/system.scm @@ -0,0 +1,77 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2016 Ludovic Courtès +;;; +;;; 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 (test-system) + #:use-module (gnu) + #:use-module (guix store) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-64)) + +;; Test the (gnu system) module. + +(define %root-fs + (file-system + (device "my-root") + (title 'label) + (mount-point "/") + (type "ext4"))) + +(define %os + (operating-system + (host-name "komputilo") + (timezone "Europe/Berlin") + (locale "en_US.utf8") + (bootloader (grub-configuration (device "/dev/sdX"))) + (file-systems (cons %root-fs %base-file-systems)) + + (users %base-user-accounts))) + +(test-begin "system") + +(test-assert "operating-system-store-file-system" + ;; %BASE-FILE-SYSTEMS defines a bind-mount for /gnu/store, but this + ;; shouldn't be a problem. + (eq? %root-fs + (operating-system-store-file-system %os))) + +(test-assert "operating-system-store-file-system, prefix" + (let* ((gnu (file-system + (device "foobar") + (mount-point (dirname (%store-prefix))) + (type "ext5"))) + (os (operating-system + (inherit %os) + (file-systems (cons* gnu %root-fs + %base-file-systems))))) + (eq? gnu (operating-system-store-file-system os)))) + +(test-assert "operating-system-store-file-system, store" + (let* ((gnu (file-system + (device "foobar") + (mount-point (%store-prefix)) + (type "ext5"))) + (os (operating-system + (inherit %os) + (file-systems (cons* gnu %root-fs + %base-file-systems))))) + (eq? gnu (operating-system-store-file-system os)))) + +(test-end) + + +(exit (= (test-runner-fail-count (test-runner-current)) 0))