Merge branch 'master' into core-updates

This commit is contained in:
Ludovic Courtès 2016-06-27 09:30:01 +02:00
parent 74c8b174e8
commit 01497dfe6c
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
72 changed files with 5029 additions and 1340 deletions

View file

@ -328,7 +328,6 @@ check-local:
endif !CAN_RUN_TESTS
check-system: $(GOBJECTS)
$(AM_V_at)echo "Running system tests..."
$(AM_V_at)$(top_builddir)/pre-inst-env \
$(GUILE) --no-auto-compile \
-e '(@@ (run-system-tests) run-system-tests)' \

View file

@ -49,6 +49,17 @@ (define (call-with-time-display thunk)
(/ (time-nanosecond time) 1e9)))
(apply values results))))
(define (assert-valid-job job thing)
"Raise an error if THING is not an alist with a valid 'derivation' entry.
Otherwise return THING."
(unless (and (list? thing)
(and=> (assoc-ref thing 'derivation)
(lambda (value)
(and (string? value)
(string-suffix? ".drv" value)))))
(error "job did not produce a valid alist" job thing))
thing)
;; Without further ado...
(match (command-line)
@ -83,7 +94,9 @@ (define (call-with-time-display thunk)
(map (lambda (job thunk)
(format (current-error-port) "evaluating '~a'... " job)
(force-output (current-error-port))
(cons job (call-with-time-display thunk)))
(cons job
(assert-valid-job job
(call-with-time-display thunk))))
names thunks)))
port))))
((command _ ...)

View file

@ -59,6 +59,7 @@
(gnu system)
(gnu system vm)
(gnu system install)
(gnu tests)
(srfi srfi-1)
(srfi srfi-26)
(ice-9 match))
@ -129,6 +130,9 @@ (define (demo-os)
(file (string-append dir "/demo-os.scm")))
(read-operating-system file)))
(define %guixsd-supported-systems
'("x86_64-linux" "i686-linux"))
(define (qemu-jobs store system)
"Return a list of jobs that build QEMU images for SYSTEM."
(define (->alist drv)
@ -150,7 +154,7 @@ (define (->job name drv)
(define MiB
(expt 2 20))
(if (member system '("x86_64-linux" "i686-linux"))
(if (member system %guixsd-supported-systems)
(list (->job 'qemu-image
(run-with-store store
(mbegin %store-monad
@ -167,6 +171,36 @@ (define MiB
(* 1024 MiB))))))
'()))
(define (system-test-jobs store system)
"Return a list of jobs for the system tests."
(define (test->thunk test)
(lambda ()
(define drv
(run-with-store store
(mbegin %store-monad
(set-current-system system)
(set-grafting #f)
(set-guile-for-build (default-guile))
(system-test-value test))))
`((derivation . ,(derivation-file-name drv))
(description . ,(format #f "GuixSD '~a' system test"
(system-test-name test)))
(long-description . ,(system-test-description test))
(license . ,gpl3+)
(home-page . ,%guix-home-page-url)
(maintainers . ("bug-guix@gnu.org")))))
(define (->job test)
(let ((name (string->symbol
(string-append "test." (system-test-name test)
"." system))))
(cons name (test->thunk test))))
(if (member system %guixsd-supported-systems)
(map ->job (all-system-tests))
'()))
(define (tarball-jobs store system)
"Return Hydra jobs to build the self-contained Guix binary tarball."
(define (->alist drv)
@ -274,6 +308,7 @@ (define (either proc1 proc2)
system))))
(append (filter-map job all)
(qemu-jobs store system)
(system-test-jobs store system)
(tarball-jobs store system)
(cross-jobs system))))
((core)

View file

@ -17,13 +17,14 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (run-system-tests)
#:use-module (gnu tests base)
#:use-module (gnu tests)
#:use-module (guix store)
#:use-module (guix monads)
#:use-module (guix derivations)
#:use-module (guix ui)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-34)
#:use-module (ice-9 match)
#:export (run-system-tests))
(define (built-derivations* drv)
@ -44,13 +45,26 @@ (define (filterm mproc lst) ;XXX: move to (guix monads)
lst)
(lift1 reverse %store-monad))))
(define %system-tests
(list %test-basic-os))
(define (run-system-tests . args)
(define tests
;; Honor the 'TESTS' environment variable so that one can select a subset
;; of tests to run in the usual way:
;;
;; make check-system TESTS=installed-os
(match (getenv "TESTS")
(#f
(all-system-tests))
((= string-tokenize (tests ...))
(filter (lambda (test)
(member (system-test-name test) tests))
(all-system-tests)))))
(format (current-error-port) "Running ~a system tests...~%"
(length tests))
(with-store store
(run-with-store store
(mlet* %store-monad ((drv (sequence %store-monad %system-tests))
(mlet* %store-monad ((drv (mapm %store-monad system-test-value tests))
(out -> (map derivation->output-path drv)))
(mbegin %store-monad
(show-what-to-build* drv)

View file

@ -69,16 +69,16 @@ then
fi
# The configuration directory, for import/export signing keys.
NIX_CONF_DIR="@GUIX_TEST_ROOT@/etc"
if [ ! -d "$NIX_CONF_DIR" ]
GUIX_CONFIGURATION_DIRECTORY="@GUIX_TEST_ROOT@/etc"
if [ ! -d "$GUIX_CONFIGURATION_DIRECTORY" ]
then
# Copy the keys so that the secret key has the right permissions (the
# daemon errors out when this is not the case.)
mkdir -p "$NIX_CONF_DIR"
mkdir -p "$GUIX_CONFIGURATION_DIRECTORY"
cp "@abs_top_srcdir@/tests/signing-key.sec" \
"@abs_top_srcdir@/tests/signing-key.pub" \
"$NIX_CONF_DIR"
chmod 400 "$NIX_CONF_DIR/signing-key.sec"
"$GUIX_CONFIGURATION_DIRECTORY"
chmod 400 "$GUIX_CONFIGURATION_DIRECTORY/signing-key.sec"
fi
# A place to store data of the substituter.
@ -100,7 +100,7 @@ then
NIX_LOCALSTATE_DIR NIX_LOG_DIR NIX_STATE_DIR NIX_DB_DIR \
NIX_ROOT_FINDER GUIX_BINARY_SUBSTITUTE_URL \
GUIX_ALLOW_UNAUTHENTICATED_SUBSTITUTES \
NIX_CONF_DIR XDG_CACHE_HOME NIXPKGS
GUIX_CONFIGURATION_DIRECTORY XDG_CACHE_HOME NIXPKGS
# Launch the daemon without chroot support because is may be
# unavailable, for instance if we're not running as root.

View file

@ -204,6 +204,7 @@ System Configuration
Services
* Base Services:: Essential system services.
* Scheduled Job Execution:: The mcron service.
* Networking Services:: Network setup, SSH daemon, etc.
* X Window:: Graphical display.
* Desktop Services:: D-Bus and desktop services.
@ -619,6 +620,31 @@ Upon failure, please email @email{bug-guix@@gnu.org} and attach the
as well as version numbers of the dependencies (@pxref{Requirements}) in
your message.
Guix also comes with a whole-system test suite that tests complete
GuixSD operating system instances. It can only run on systems where
Guix is already installed, using:
@example
make check-system
@end example
@noindent
or, again, by defining @code{TESTS} to select a subset of tests to run:
@example
make check-system TESTS="basic mcron"
@end example
These system tests are defined in the @code{(gnu tests @dots{})}
modules. They work by running the operating systems under test with
lightweight instrumentation in a virtual machine (VM). They can be
computationally intensive or rather cheap, depending on whether
substitutes are available for their dependencies (@pxref{Substitutes}).
Some of them require a lot of storage space to hold VM images.
Again in case of test failures, please send @email{bug-guix@@gnu.org}
all the details.
@node Setting Up the Daemon
@section Setting Up the Daemon
@ -682,8 +708,13 @@ Bash syntax and the @code{shadow} commands):
@noindent
The number of build users determines how many build jobs may run in
parallel, as specified by the @option{--max-jobs} option
(@pxref{Invoking guix-daemon, @option{--max-jobs}}). The
@code{guix-daemon} program may then be run as @code{root} with the
(@pxref{Invoking guix-daemon, @option{--max-jobs}}). To use
@command{guix system vm} and related commands, you may need to add the
build users to the @code{kvm} group so they can access @file{/dev/kvm},
using @code{-G guixbuild,kvm} instead of @code{-G guixbuild}
(@pxref{Invoking guix system}).
The @code{guix-daemon} program may then be run as @code{root} with the
following command@footnote{If your machine uses the systemd init system,
dropping the @file{@var{prefix}/lib/systemd/system/guix-daemon.service}
file in @file{/etc/systemd/system} will ensure that
@ -7185,6 +7216,7 @@ declaration.
@menu
* Base Services:: Essential system services.
* Scheduled Job Execution:: The mcron service.
* Networking Services:: Network setup, SSH daemon, etc.
* X Window:: Graphical display.
* Desktop Services:: D-Bus and desktop services.
@ -7463,6 +7495,100 @@ archive}). If that is not the case, the service will fail to start.
@end deffn
@node Scheduled Job Execution
@subsubsection Scheduled Job Execution
@cindex cron
@cindex scheduling jobs
The @code{(gnu services mcron)} module provides an interface to
GNU@tie{}mcron, a daemon to run jobs at scheduled times (@pxref{Top,,,
mcron, GNU@tie{}mcron}). GNU@tie{}mcron is similar to the traditional
Unix @command{cron} daemon; the main difference is that it is
implemented in Guile Scheme, which provides a lot of flexibility when
specifying the scheduling of jobs and their actions.
The example below defines an operating system that runs the
@command{updatedb} (@pxref{Invoking updatedb,,, find, Finding Files})
and the @command{guix gc} commands (@pxref{Invoking guix gc}) daily, as
well as the @command{mkid} command on behalf of an unprivileged user
(@pxref{mkid invocation,,, idutils, ID Database Utilities}). It uses
gexps to introduce job definitions that are passed to mcron
(@pxref{G-Expressions}).
@lisp
(use-modules (guix) (gnu) (gnu services mcron))
(use-package-modules base idutils)
(define updatedb-job
;; Run 'updatedb' at 3AM every day. Here we write the
;; job's action as a Scheme procedure.
#~(job '(next-hour '(3))
(lambda ()
(execl (string-append #$findutils "/bin/updatedb")
"updatedb"
"--prunepaths=/tmp /var/tmp /gnu/store"))))
(define garbage-collector-job
;; Collect garbage 5 minutes after midnight every day.
;; The job's action is a shell command.
#~(job "5 0 * * *" ;Vixie cron syntax
"guix gc -F 1G"))
(define idutils-jobs
;; Update the index database as user "charlie" at 12:15PM
;; and 19:15PM. This runs from the user's home directory.
#~(job '(next-minute-from (next-hour '(12 19)) '(15))
(string-append #$idutils "/bin/mkid src")
#:user "charlie"))
(operating-system
;; @dots{}
(services (cons (mcron-service (list garbage-collector-job
updatedb-job
idutils-job))
%base-services)))
@end lisp
@xref{Guile Syntax, mcron job specifications,, mcron, GNU@tie{}mcron},
for more information on mcron job specifications. Below is the
reference of the mcron service.
@deffn {Scheme Procedure} mcron-service @var{jobs} [#:mcron @var{mcron2}]
Return an mcron service running @var{mcron} that schedules @var{jobs}, a
list of gexps denoting mcron job specifications.
This is a shorthand for:
@example
(service mcron-service-type
(mcron-configuration (mcron mcron) (jobs jobs)))
@end example
@end deffn
@defvr {Scheme Variable} mcron-service-type
This is the type of the @code{mcron} service, whose value is an
@code{mcron-configuration} object.
This service type can be the target of a service extension that provides
it additional job specifications (@pxref{Service Composition}). In
other words, it is possible to define services that provide addition
mcron jobs to run.
@end defvr
@deftp {Data Type} mcron-configuration
Data type representing the configuration of mcron.
@table @asis
@item @code{mcron} (default: @var{mcron2})
The mcron package to use.
@item @code{jobs}
This is a list of gexps (@pxref{G-Expressions}), where each gexp
corresponds to an mcron job specification (@pxref{Syntax, mcron job
specifications,, mcron, GNU@tie{}mcron}).
@end table
@end deftp
@node Networking Services
@subsubsection Networking Services
@ -10121,12 +10247,14 @@ a list of available debugging commands.
@end table
@end table
Note that all the actions above, except @code{build} and @code{init},
rely on KVM support in the Linux-Libre kernel. Specifically, the
machine should have hardware virtualization support, the corresponding
@quotation Note
All the actions above, except @code{build} and @code{init},
can use KVM support in the Linux-libre kernel. Specifically, if the
machine has hardware virtualization support, the corresponding
KVM kernel module should be loaded, and the @file{/dev/kvm} device node
must exist and be readable and writable by the user and by the
build users of the daemon.
build users of the daemon (@pxref{Build Environment Setup}).
@end quotation
Once you have built, configured, re-configured, and re-re-configured
your GuixSD installation, you may find it useful to list the operating

View file

@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
;;;
@ -55,8 +55,8 @@ (define-module (gnu build vm)
(define* (qemu-command #:optional (system %host-type))
"Return the default name of the QEMU command for SYSTEM."
(let ((cpu (substring %host-type 0
(string-index %host-type #\-))))
(let ((cpu (substring system 0
(string-index system #\-))))
(string-append "qemu-system-"
(if (string-match "^i[3456]86$" cpu)
"i386"

View file

@ -41,6 +41,7 @@ GNU_SYSTEM_MODULES = \
%D%/packages/apl.scm \
%D%/packages/apr.scm \
%D%/packages/aspell.scm \
%D%/packages/assembly.scm \
%D%/packages/attr.scm \
%D%/packages/audacity.scm \
%D%/packages/audio.scm \
@ -108,6 +109,7 @@ GNU_SYSTEM_MODULES = \
%D%/packages/engineering.scm \
%D%/packages/enlightenment.scm \
%D%/packages/entr.scm \
%D%/packages/erlang.scm \
%D%/packages/fcitx.scm \
%D%/packages/feh.scm \
%D%/packages/figlet.scm \
@ -205,7 +207,6 @@ GNU_SYSTEM_MODULES = \
%D%/packages/libusb.scm \
%D%/packages/libunwind.scm \
%D%/packages/libupnp.scm \
%D%/packages/lightning.scm \
%D%/packages/links.scm \
%D%/packages/linux.scm \
%D%/packages/lirc.scm \
@ -363,7 +364,6 @@ GNU_SYSTEM_MODULES = \
%D%/packages/xdisorg.scm \
%D%/packages/xorg.scm \
%D%/packages/xfce.scm \
%D%/packages/yasm.scm \
%D%/packages/yubico.scm \
%D%/packages/zile.scm \
%D%/packages/zip.scm \
@ -378,6 +378,7 @@ GNU_SYSTEM_MODULES = \
%D%/services/dict.scm \
%D%/services/lirc.scm \
%D%/services/mail.scm \
%D%/services/mcron.scm \
%D%/services/networking.scm \
%D%/services/shepherd.scm \
%D%/services/herd.scm \
@ -409,7 +410,8 @@ GNU_SYSTEM_MODULES = \
%D%/build/vm.scm \
\
%D%/tests.scm \
%D%/tests/base.scm
%D%/tests/base.scm \
%D%/tests/install.scm
patchdir = $(guilemoduledir)/%D%/packages/patches
@ -442,6 +444,7 @@ dist_patch_DATA = \
%D%/packages/patches/avrdude-fix-libusb.patch \
%D%/packages/patches/awesome-reproducible-png.patch \
%D%/packages/patches/bash-completion-directories.patch \
%D%/packages/patches/beets-image-test-failure.patch \
%D%/packages/patches/bigloo-gc-shebangs.patch \
%D%/packages/patches/binutils-ld-new-dtags.patch \
%D%/packages/patches/binutils-loongson-workaround.patch \
@ -656,6 +659,7 @@ dist_patch_DATA = \
%D%/packages/patches/mumps-build-parallelism.patch \
%D%/packages/patches/mupen64plus-ui-console-notice.patch \
%D%/packages/patches/mutt-store-references.patch \
%D%/packages/patches/nasm-no-ps-pdf.patch \
%D%/packages/patches/net-tools-bitrot.patch \
%D%/packages/patches/netcdf-config-date.patch \
%D%/packages/patches/ngircd-handle-zombies.patch \
@ -741,6 +745,7 @@ dist_patch_DATA = \
%D%/packages/patches/rpm-CVE-2014-8118.patch \
%D%/packages/patches/rsem-makefile.patch \
%D%/packages/patches/ruby-concurrent-ignore-broken-test.patch \
%D%/packages/patches/ruby-puma-ignore-broken-test.patch \
%D%/packages/patches/ruby-symlinkfix.patch \
%D%/packages/patches/ruby-tzinfo-data-ignore-broken-test.patch\
%D%/packages/patches/rush-CVE-2013-6889.patch \

View file

@ -45,6 +45,7 @@ (define-module (gnu packages)
%package-module-path
fold-packages
scheme-modules ;XXX: for lack of a better place
find-packages-by-name
find-best-packages-by-name
@ -158,8 +159,8 @@ (define file-name->module-name
(map string->symbol
(string-tokenize (string-drop-right file 4) not-slash)))))
(define* (package-modules directory #:optional sub-directory)
"Return the list of modules that provide packages for the distribution.
(define* (scheme-modules directory #:optional sub-directory)
"Return the list of Scheme modules available under DIRECTORY.
Optionally, narrow the search to SUB-DIRECTORY."
(define prefix-len
(string-length directory))
@ -184,9 +185,9 @@ (define* (all-package-modules #:optional (path (%package-module-path)))
(fold-right (lambda (spec result)
(match spec
((? string? directory)
(append (package-modules directory) result))
(append (scheme-modules directory) result))
((directory . sub-directory)
(append (package-modules directory sub-directory)
(append (scheme-modules directory sub-directory)
result))))
'()
path))

View file

@ -1681,3 +1681,30 @@ (define-public dstat
throughput (in the same interval).")
(home-page "http://dag.wiee.rs/home-made/dstat/")
(license license:gpl2+)))
(define-public thefuck
(package
(name "thefuck")
(version "3.9")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/nvbn/thefuck/archive/"
version ".tar.gz"))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0g4s2vkpl0mqhkdkbzib07qr4xf0cq25fvhdhna52290qgd69pwf"))))
(build-system python-build-system)
(native-inputs
`(("python-setuptools" ,python-setuptools)))
(inputs
`(("python-colorama" ,python-colorama)
("python-decorator" ,python-decorator)
("python-psutil" ,python-psutil)
("python-six" ,python-six)))
(home-page "https://github.com/nvbn/thefuck")
(synopsis "Correct mistyped console command")
(description
"The Fuck tries to match a rule for a previous, mistyped command, creates
a new command using the matched rule, and runs it.")
(license license:x11)))

View file

@ -128,7 +128,7 @@ (define-public fplll
(define-public pari-gp
(package
(name "pari-gp")
(version "2.7.5")
(version "2.7.6")
(source (origin
(method url-fetch)
(uri (string-append
@ -136,7 +136,7 @@ (define-public pari-gp
version ".tar.gz"))
(sha256
(base32
"0c8l83a0gjq73r9hndsrzkypwxvnnm4pxkkzbg6jm95m80nzwh11"))))
"04dqi697czd8mmw8aiwzrkgbvkjassqagg6lfy3lkf1k5qi9g9rr"))))
(build-system gnu-build-system)
(native-inputs `(("texlive" ,texlive-minimal)))
(inputs `(("gmp" ,gmp)

114
gnu/packages/assembly.scm Normal file
View file

@ -0,0 +1,114 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2013, 2015 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages assembly)
#:use-module (guix build-system gnu)
#:use-module (guix download)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (gnu packages)
#:use-module (gnu packages perl)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages python)
#:use-module (gnu packages xml))
(define-public nasm
(package
(name "nasm")
(version "2.12.01")
(source (origin
(method url-fetch)
(uri (string-append "http://www.nasm.us/pub/nasm/releasebuilds/"
version "/" name "-" version ".tar.xz"))
(sha256
(base32
"12bl6vc5sjp9nnhf0iwy6l27vq783y0rxrjpp8sy84h5cb7a3fwx"))
(patches (search-patches "nasm-no-ps-pdf.patch"))))
(build-system gnu-build-system)
(native-inputs `(("perl" ,perl) ;for doc and test target
("texinfo" ,texinfo)))
(arguments
`(#:test-target "test"
#:phases (modify-phases %standard-phases
(add-after 'install 'install-info
(lambda _
(zero? (system* "make" "install_doc")))))))
(home-page "http://www.nasm.us/")
(synopsis "80x86 and x86-64 assembler")
(description
"NASM, the Netwide Assembler, is an 80x86 and x86-64 assembler designed
for portability and modularity. It supports a range of object file formats,
including Linux and *BSD a.out, ELF, COFF, Mach-O, Microsoft 16-bit OBJ,
Windows32 and Windows64. It will also output plain binary files. Its syntax
is designed to be simple and easy to understand, similar to Intel's but less
complex. It supports all currently known x86 architectural extensions, and
has strong support for macros.")
(supported-systems '("x86_64-linux" "i686-linux"))
(license license:bsd-3)))
(define-public yasm
(package
(name "yasm")
(version "1.3.0")
(source (origin
(method url-fetch)
(uri (string-append
"http://www.tortall.net/projects/yasm/releases/yasm-"
version ".tar.gz"))
(sha256
(base32
"0gv0slmm0qpq91za3v2v9glff3il594x5xsrbgab7xcmnh0ndkix"))))
(build-system gnu-build-system)
(inputs
`(("python" ,python-wrapper)
("xmlto" ,xmlto)))
(home-page "http://yasm.tortall.net/")
(synopsis "Rewrite of the NASM assembler")
(description
"Yasm is a complete rewrite of the NASM assembler.
Yasm currently supports the x86 and AMD64 instruction sets, accepts NASM
and GAS assembler syntaxes, outputs binary, ELF32, ELF64, 32 and 64-bit
Mach-O, RDOFF2, COFF, Win32, and Win64 object formats, and generates source
debugging information in STABS, DWARF 2, and CodeView 8 formats.")
(license (license:non-copyleft "file://COPYING"
"See COPYING in the distribution."))))
(define-public lightning
(package
(name "lightning")
(version "2.1.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/lightning/lightning-"
version ".tar.gz"))
(sha256
(base32
"19j9nwl88k660045s40cbz5zrl1wpd2mcxnnc8qqnnaj311a58qz"))))
(build-system gnu-build-system)
(synopsis "Library for generating assembly code at runtime")
(description
"GNU Lightning is a library that generates assembly language code at
run-time. Thus, it is useful in creating Just-In-Time compilers. It
abstracts over the target CPU by exposing a standardized RISC instruction set
to the clients.")
(home-page "http://www.gnu.org/software/lightning/")
(license license:gpl3+)))

View file

@ -1482,7 +1482,7 @@ (define-public deeptools
(define-public diamond
(package
(name "diamond")
(version "0.8.5")
(version "0.8.7")
(source (origin
(method url-fetch)
(uri (string-append
@ -1491,7 +1491,7 @@ (define-public diamond
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"18zx8k3axnsrg016kikl8xs1ifnjmj36dk1sv3fq1jgpg9j9584b"))))
"15r7gcrqc4pv5d4kvv530zc3xnni92c74y63zrxzidriss7591yx"))))
(build-system cmake-build-system)
(arguments
'(#:tests? #f ; no "check" target
@ -3815,10 +3815,61 @@ (define-public vcftools
;; at https://vcftools.github.io/license.html
(license license:lgpl3)))
(define-public r-vegan
(package
(name "r-vegan")
(version "2.4-0")
(source
(origin
(method url-fetch)
(uri (cran-uri "vegan" version))
(sha256
(base32
"10cygzkyg2m0y054ygivqxrkvqz792qsg6bmbdfzaqq37qv4wc7z"))))
(build-system r-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'revert-test-deletion
;; The distributed sources do not include tests with the CRAN
;; package. Here we revert the commit
;; `591d0e8ba1deaaf82445474ec6619c0b43db4e63' which deletes these
;; tests. There are plans to not delete tests in future as
;; documented at https://github.com/vegandevs/vegan/issues/181.
(lambda* (#:key inputs #:allow-other-keys)
(zero?
(system* "patch" "-R" "-p1" "-i"
(assoc-ref inputs "r-vegan-delete-tests-patch"))))))))
(native-inputs
`(("gfortran" ,gfortran)
("r-knitr" ,r-knitr)
("r-vegan-delete-tests-patch"
,(origin
(method url-fetch)
(uri (string-append
"https://github.com/vegandevs/vegan/commit/"
"591d0e8ba1deaaf82445474ec6619c0b43db4e63.patch"))
(sha256
(base32
"0b1bi7y4jjdl3ph721vm9apm51dr2z9piwvhy4355sf2b4kyyj5a"))))))
(propagated-inputs
`(("r-cluster" ,r-cluster)
("r-lattice" ,r-lattice)
("r-mgcv" ,r-mgcv)
("r-permute" ,r-permute)))
(home-page "https://cran.r-project.org/web/packages/vegan")
(synopsis "Functions for community ecology")
(description
"The vegan package provides tools for descriptive community ecology. It
has most basic functions of diversity analysis, community ordination and
dissimilarity analysis. Most of its multivariate tools can be used for other
data types as well.")
(license license:gpl2+)))
(define-public vsearch
(package
(name "vsearch")
(version "1.11.1")
(version "2.0.0")
(source
(origin
(method url-fetch)
@ -3828,7 +3879,7 @@ (define-public vsearch
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1pdvm3znjgq3zryy240yj9gc0bf1z31k6vf9jxrxgdgkvzgw85c7"))
"1sd57abgx077icqrbj36jq9q7pdpzc6dbics2pn1555kisq2jhfh"))
(modules '((guix build utils)))
(snippet
'(begin

View file

@ -2,6 +2,7 @@
;;; Copyright © 2014 David Thompson <davet@gnu.org>
;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox>
;;;
;;; This file is part of GNU Guix.
;;;
@ -20,8 +21,14 @@
(define-module (gnu packages crypto)
#:use-module (gnu packages)
#:use-module (gnu packages autotools)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages libbsd)
#:use-module (gnu packages nettle)
#:use-module (gnu packages password-utils)
#:use-module (gnu packages readline)
#:use-module (gnu packages serialization)
#:use-module (gnu packages tls)
#:use-module (guix licenses)
#:use-module (guix packages)
#:use-module (guix download)
@ -88,3 +95,55 @@ (define-public signify
(non-copyleft "file://base64.c"
"See base64.c in the distribution for
the license from IBM.")))))
(define-public opendht
(package
(name "opendht")
(version "0.6.1")
(source
(origin
(method url-fetch)
(uri
(string-append
"https://github.com/savoirfairelinux/" name
"/archive/" version ".tar.gz"))
(file-name (string-append name "-" version ".tar.gz"))
(modules '((guix build utils)))
(snippet
'(begin
(delete-file-recursively "src/argon2")
(substitute* "src/Makefile.am"
(("./argon2/libargon2.la") "")
(("SUBDIRS = argon2") ""))
(substitute* "src/crypto.cpp"
(("argon2/argon2.h") "argon2.h"))
(substitute* "configure.ac"
(("src/argon2/Makefile") ""))))
(sha256
(base32
"09yvkmbqbym3b5md4n96qc1s9sf2n8ji404hagih45rmsj49599x"))))
(build-system gnu-build-system)
(inputs
`(("gnutls" ,gnutls)
("nettle" ,nettle)
("msgpack" ,msgpack)
("readline" ,readline)
("argon2" ,argon2)))
(native-inputs
`(("autoconf" ,autoconf)
("pkg-config" ,pkg-config)
("automake" ,automake)
("libtool" ,libtool)))
(arguments
`(#:configure-flags '("--disable-tools" "--disable-python")
#:phases (modify-phases %standard-phases
(add-before 'configure 'autoconf
(lambda _
(zero? (system* "autoreconf" "-vfi")))))))
(home-page "https://github.com/savoirfairelinux/opendht/")
(synopsis "Distributed Hash Table (DHT) library")
(description "OpenDHT is a Distributed Hash Table (DHT) library. It may
be used to manage peer-to-peer network connections as needed for real time
communication.")
(license gpl3)))

View file

@ -52,16 +52,16 @@ (define-public radicale
(define-public vdirsyncer
(package
(name "vdirsyncer")
(version "0.11.0")
(version "0.11.2")
(source (origin
(method url-fetch)
(uri (string-append
"https://pypi.python.org/packages/"
"39/e5/1e7097b5f0cd6de79ec9014f162a6000b77ca2a369ea8a1588a2eebff570/"
"6c/fb/20c32861134579fdce67060bf4cc074e171d30c70590137adc73924f94a6/"
name "-" version ".tar.gz"))
(sha256
(base32
"1bf0vk29qdswar0q4267aamfriq3134302i2p3qcqxpmmcwx3qfv"))))
"15isw2jhjfxi213wdj9d8mwq2m58k8bwf831qnxrjcz7j7bwy7mj"))))
(build-system python-build-system)
(arguments
`(#:phases (modify-phases %standard-phases

View file

@ -169,7 +169,7 @@ (define-public american-fuzzy-lop
(_ "UNSUPPORTED"))))
(package
(name "american-fuzzy-lop")
(version "1.96b") ;It seems all releases have the 'b' suffix
(version "2.15b") ;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
"0z7j231p6v2h1dxxijgdzj1lq1lxr8cxllwf6iyv7p4ki5pv1gh3"))))
"04n2jfkchpz6a07w694b0im1vcmc3220ryqcaasa7vix7784wzs2"))))
(build-system gnu-build-system)
(inputs
`(("custom-qemu"

View file

@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
;;;
@ -22,6 +22,7 @@ (define-module (gnu packages dictionaries)
#:use-module (guix licenses)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system gnu)
#:use-module (guix build-system trivial)
#:use-module (gnu packages base)
#:use-module (gnu packages texinfo)
@ -115,3 +116,25 @@ (define-public gcide
http://gcide.gnu.org.ua/")
(home-page "http://gcide.gnu.org.ua/")
(license gpl3+)))
(define-public diction
;; Not quite a dictionary, not quite a spell checker either…
(package
(name "diction")
(version "1.11")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/diction/diction-"
version ".tar.gz"))
(sha256
(base32
"1xi4l1x1vvzmzmbhpx0ghmfnwwrhabjwizrpyylmy3fzinzz3him"))))
(build-system gnu-build-system)
(synopsis "Identifies wordy and commonly misused phrases")
(description
"A package providing two classic Unix commands, style and diction.
Diction is used to identify wordy and commonly misused phrases in a
body of text. Style instead analyzes surface aspects of a written
work, such as sentence length and other readability measures.")
(home-page "https://www.gnu.org/software/diction/")
(license gpl3+)))

View file

@ -1638,6 +1638,27 @@ (define-public emacs-ffap-rfc-space
number.")
(license license:gpl3+)))
(define-public emacs-org-bullets
(package
(name "emacs-org-bullets")
(version "0.2.4")
(source
(origin
(method url-fetch)
(uri (string-append "https://github.com/sabof/org-bullets/archive/"
version ".tar.gz"))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1dyxvpb73vj80v8br2q9rf255hfphrgaw91fbvwdcd735np9pcnh"))))
(build-system emacs-build-system)
(home-page "https://github.com/sabof/org-bullets")
(synopsis "Show bullets in org-mode as UTF-8 characters")
(description
"This package provides an Emacs minor mode causing bullets in
@code{org-mode} to be rendered as UTF-8 characters.")
(license license:gpl3+)))
(define-public emacs-zenburn-theme
(package
(name "emacs-zenburn-theme")
@ -1688,6 +1709,170 @@ (define-public emacs-smartparens
well as completely new features.")
(license license:gpl3+)))
(define-public emacs-hydra
(package
(name "emacs-hydra")
(version "0.13.0")
(source
(origin
(method url-fetch)
(uri (string-append "https://github.com/abo-abo/hydra/archive/"
version ".tar.gz"))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"19ynkjlg3jj7x90xxbz885324h6nkxmzlb2c2c95xkr20zckn0lk"))))
(build-system emacs-build-system)
(home-page "https://github.com/abo-abo/hydra")
(synopsis "Make Emacs bindings that stick around")
(description
"This package can be used to tie related commands into a family of short
bindings with a common prefix---a Hydra. Once you summon the Hydra (through
the prefixed binding), all the heads can be called in succession with only a
short extension. Any binding that isn't the Hydra's head vanquishes the
Hydra. Note that the final binding, besides vanquishing the Hydra, will still
serve its original purpose, calling the command assigned to it. This makes
the Hydra very seamless; it's like a minor mode that disables itself
automatically.")
(license license:gpl3+)))
(define-public emacs-ivy
(package
(name "emacs-ivy")
(version "0.8.0")
(source
(origin
(method url-fetch)
(uri (string-append "https://github.com/abo-abo/swiper/archive/"
version ".tar.gz"))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"18nqwl05is71dzswnvpfhlg7b0v3apvbsfxrwab9c0apwavi892q"))))
(build-system emacs-build-system)
(propagated-inputs
`(("emacs-hydra" ,emacs-hydra)))
(home-page "http://oremacs.com/swiper/")
(synopsis "Incremental vertical completion for Emacs")
(description
"This package provides @code{ivy-read} as an alternative to
@code{completing-read} and similar functions. No attempt is made to determine
the best candidate. Instead, the user can navigate candidates with
@code{ivy-next-line} and @code{ivy-previous-line}. The matching is done by
splitting the input text by spaces and re-building it into a regular
expression.")
(license license:gpl3+)))
(define-public emacs-avy
(package
(name "emacs-avy")
(version "0.4.0")
(source
(origin
(method url-fetch)
(uri (string-append "https://github.com/abo-abo/avy/archive/"
version ".tar.gz"))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1wdrq512h25ymzjbf2kbsdymvd2ryfwzb6bh5bc3yv7q203im796"))))
(build-system emacs-build-system)
(home-page "https://github.com/abo-abo/avy")
(synopsis "Tree-based completion for Emacs")
(description
"This package provides a generic completion method based on building a
balanced decision tree with each candidate being a leaf. To traverse the tree
from the root to a desired leaf, typically a sequence of @code{read-key} can
be used.
In order for @code{read-key} to make sense, the tree needs to be visualized
appropriately, with a character at each branch node. So this completion
method works only for things that you can see on your screen, all at once,
such as the positions of characters, words, line beginnings, links, or
windows.")
(license license:gpl3+)))
(define-public emacs-ace-window
(package
(name "emacs-ace-window")
(version "0.9.0")
(source
(origin
(method url-fetch)
(uri (string-append "https://github.com/abo-abo/ace-window/archive/"
version ".tar.gz"))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1p2sgfl5dml4zbd6ldql6lm2m9vmd236ah996ni32x254s48j5pn"))))
(build-system emacs-build-system)
(propagated-inputs
`(("emacs-avy" ,emacs-avy)))
(home-page "https://github.com/abo-abo/ace-window")
(synopsis "Quickly switch windows in Emacs")
(description
"@code{ace-window} is meant to replace @code{other-window}.
In fact, when there are only two windows present, @code{other-window} is
called. If there are more, each window will have its first character
highlighted. Pressing that character will switch to that window.")
(license license:gpl3+)))
(define-public emacs-iedit
(package
(name "emacs-iedit")
(version "0.9.9")
(source
(origin
(method url-fetch)
(uri (string-append "https://github.com/victorhge/iedit/archive/v"
version ".tar.gz"))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"00v86zllcsivmiibigbr91qij2zdf1lr9db8z8again1sn63wkdj"))))
(build-system emacs-build-system)
(home-page "http://www.emacswiki.org/emacs/Iedit")
(synopsis "Edit multiple regions in the same way simultaneously")
(description
"This package is an Emacs minor mode and allows you to edit one
occurrence of some text in a buffer (possibly narrowed) or region, and
simultaneously have other occurrences edited in the same way.
You can also use Iedit mode as a quick way to temporarily show only the buffer
lines that match the current text being edited. This gives you the effect of
a temporary @code{keep-lines} or @code{occur}.")
(license license:gpl3+)))
(define-public emacs-lispy
(package
(name "emacs-lispy")
(version "0.26.0")
(source
(origin
(method url-fetch)
(uri (string-append "https://github.com/abo-abo/lispy/archive/"
version ".tar.gz"))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"15gig95cvamw5zlw99cxggd27c18b9scznjj97gvjn2zbljcaqzl"))))
(build-system emacs-build-system)
(propagated-inputs
`(("emacs-ace-window" ,emacs-ace-window)
("emacs-iedit" ,emacs-iedit)
("emacs-ivy" ,emacs-ivy)
("emacs-hydra" ,emacs-hydra)))
(home-page "https://github.com/abo-abo/lispy")
(synopsis "Modal S-expression editing")
(description
"Due to the structure of Lisp syntax it's very rare for the programmer to
want to insert characters right before \"(\" or right after \")\". Thus
unprefixed printable characters can be used to call commands when the point is
at one of these special locations. Lispy provides unprefixed keybindings for
S-expression editing when point is at the beginning or end of an
S-expression.")
(license license:gpl3+)))
(define-public emacs-clojure-mode
(package
(name "emacs-clojure-mode")
@ -2191,3 +2376,25 @@ (define-public emacs-ebuild-mode
"This Emacs package provides modes for ebuild, eclass, eblit, GLEP42
news items, openrc and runscripts.")
(license license:gpl2+)))
(define-public emacs-writegood-mode
(package
(name "emacs-writegood-mode")
(version "2.0.2")
(home-page "http://github.com/bnbeckwith/writegood-mode")
(source (origin
(method git-fetch)
(uri (git-reference
(url home-page)
(commit (string-append "v" version))))
(sha256
(base32
"1nnjn1r669hvvzfycllwap4w04m8rfsk4nzcg8057m1f263kj31b"))
(file-name (string-append name "-checkout"))))
(build-system emacs-build-system)
(synopsis "Polish up poor writing on the fly")
(description
"This minor mode tries to find and highlight problems with your writing
in English as you type. It primarily detects \"weasel words\" and abuse of
passive voice.")
(license license:gpl3+)))

View file

@ -54,7 +54,7 @@ (define-module (gnu packages enlightenment)
(define-public efl
(package
(name "efl")
(version "1.17.1")
(version "1.17.2")
(source (origin
(method url-fetch)
(uri (string-append
@ -62,7 +62,7 @@ (define-public efl
version ".tar.xz"))
(sha256
(base32
"0d58bhvwg7c5hp07wywlwnqi01k4jhmpgac7gkx9lil1x6kmahqs"))))
"1dpq5flygrjg931nzsr2ra8icqffzrzbs1lnrzarbpsbmgq3zacs"))))
(build-system gnu-build-system)
(native-inputs
`(("pkg-config" ,pkg-config)))

179
gnu/packages/erlang.scm Normal file
View file

@ -0,0 +1,179 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016 Steve Sprang <scs@stevesprang.com>
;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
;;; Copyright © 2016 Pjotr Prins <pjotr.public12@thebird.nl>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages erlang)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix build-system gnu)
#:use-module (guix download)
#:use-module (guix packages)
#:use-module (gnu packages autotools)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages gl)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages perl)
#:use-module (gnu packages tls)
#:use-module (gnu packages wxwidgets))
(define-public erlang
(package
(name "erlang")
;; When updating, remember to update the hash of erlang-manpages!
(version "19.0")
(source (origin
(method url-fetch)
;; The tarball from http://erlang.org/download contains many
;; pre-compiled files, so we use this snapshot of the source
;; repository.
(uri (string-append "https://github.com/erlang/otp/archive/OTP-"
version ".tar.gz"))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1dxyz6x1yfv33fd0xfry2ihylkyfa2d655q1vxvbz8dflyd64yqh"))))
(build-system gnu-build-system)
(native-inputs
`(("perl" ,perl)
("autoconf" ,autoconf)
("automake" ,automake)
;; Erlang's documentation is distributed in a separate tarball.
("erlang-manpages"
,(origin
(method url-fetch)
(uri (string-append "http://erlang.org/download/otp_doc_man_"
version ".tar.gz"))
(sha256
(base32
"07j0l7ary936hil38xr3hvfw6j74pshkyyi98kc9cassbbcdd8y7"))))))
(inputs
`(("ncurses" ,ncurses)
("openssl" ,openssl)
("wxwidgets" ,wxwidgets)))
(propagated-inputs
`(("fontconfig" ,fontconfig)
("glu" ,glu)
("mesa" ,mesa)))
(arguments
`(#:test-target "release_tests"
#:configure-flags
(list "--disable-saved-compile-time"
"--enable-dynamic-ssl-lib"
"--enable-native-libs"
"--enable-shared-zlib"
"--enable-smp-support"
"--enable-threads"
"--enable-wx"
(string-append "--with-ssl=" (assoc-ref %build-inputs "openssl")))
#:modules ((srfi srfi-19) ; make-time, et cetera.
(guix build utils)
(guix build gnu-build-system))
#:phases
(modify-phases %standard-phases
;; The are several code fragments that embed timestamps into the
;; output. Here, we alter those fragments to use the value of
;; SOURCE_DATE_EPOCH instead.
(add-after 'unpack 'remove-timestamps
(lambda _
(let ((source-date-epoch
(time-utc->date
(make-time time-utc 0 (string->number
(getenv "SOURCE_DATE_EPOCH"))))))
(substitute* "lib/reltool/src/reltool_target.erl"
(("Date = date\\(\\),")
(string-append "Date = "
(date->string source-date-epoch
"'{~Y,~m,~d}',"))))
(substitute* "lib/reltool/src/reltool_target.erl"
(("Time = time\\(\\),")
(string-append "Time = "
(date->string source-date-epoch
"'{~H,~M,~S}',"))))
(substitute* '("lib/reltool/src/reltool_target.erl"
"lib/sasl/src/systools_make.erl")
(("date\\(\\), time\\(\\),")
(date->string source-date-epoch
"{~Y,~m,~d}, {~H,~M,~S},")))
(substitute* '("lib/dialyzer/test/small_SUITE_data/src/gs_make.erl"
"lib/gs/src/gs_make.erl")
(("tuple_to_list\\(date\\(\\)\\),tuple_to_list\\(time\\(\\)\\)")
(date->string
source-date-epoch
"tuple_to_list({~Y,~m,~d}), tuple_to_list({~H,~M,~S})")))
(substitute* "lib/snmp/src/compile/snmpc_mib_to_hrl.erl"
(("\\{Y,Mo,D\\} = date\\(\\),")
(date->string source-date-epoch
"{Y,Mo,D} = {~Y,~m,~d},")))
(substitute* "lib/snmp/src/compile/snmpc_mib_to_hrl.erl"
(("\\{H,Mi,S\\} = time\\(\\),")
(date->string source-date-epoch
"{H,Mi,S} = {~H,~M,~S},"))))))
(add-after 'patch-source-shebangs 'patch-source-env
(lambda _
(let ((escripts
(append
(find-files "." "\\.escript")
(find-files "lib/stdlib/test/escript_SUITE_data/")
'("erts/lib_src/utils/make_atomics_api"
"erts/preloaded/src/add_abstract_code"
"lib/diameter/bin/diameterc"
"lib/reltool/examples/display_args"
"lib/reltool/examples/mnesia_core_dump_viewer"
"lib/snmp/src/compile/snmpc.src"
"make/verify_runtime_dependencies"
"make/emd2exml.in"))))
(substitute* escripts
(("/usr/bin/env") (which "env"))))))
(add-before 'configure 'set-erl-top
(lambda _
(setenv "ERL_TOP" (getcwd))))
(add-before 'configure 'autoconf
(lambda _ (zero? (system* "./otp_build" "autoconf"))))
(add-after 'install 'patch-erl
;; This only works after install.
(lambda _
(substitute* (string-append (assoc-ref %outputs "out") "/bin/erl")
(("sed") (which "sed")))))
(add-after 'install 'install-doc
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(manpages (assoc-ref inputs "erlang-manpages"))
(share (string-append out "/share/")))
(mkdir-p share)
(mkdir-p (string-append share "/misc/erlang"))
(with-directory-excursion share
(and
(zero? (system* "tar" "xvf" manpages))
(rename-file "COPYRIGHT"
(string-append share "/misc/erlang/COPYRIGHT"))
;; Delete superfluous files.
(for-each delete-file '("PR.template"
"README"))))))))))
(home-page "http://erlang.org/")
(synopsis "The Erlang programming language")
(description
"Erlang is a programming language used to build massively
scalable soft real-time systems with requirements on high
availability. Some of its uses are in telecoms, banking, e-commerce,
computer telephony and instant messaging. Erlang's runtime system has
built-in support for concurrency, distribution and fault tolerance.")
;; Erlang is distributed under the Apache License 2.0, but some components
;; have other licenses. See 'system/COPYRIGHT' in the source distribution.
(license (list license:asl2.0 license:bsd-2 license:bsd-3 license:expat
license:lgpl2.0+ license:tcl/tk license:zlib))))

View file

@ -34,6 +34,8 @@ (define-module (gnu packages game-development)
#:use-module (gnu packages curl)
#:use-module (gnu packages databases)
#:use-module (gnu packages documentation)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages fribidi)
#:use-module (gnu packages glib)
#:use-module (gnu packages gnunet)
#:use-module (gnu packages guile)
@ -432,3 +434,28 @@ (define-public qqwing
import into a database.
@end enumerate")
(license license:gpl2+)))
(define-public quesoglc
(package
(name "quesoglc")
(version "0.7.2")
(source (origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/" name "/" version "/"
name "-" version "-free.tar.bz2"))
(sha256
(base32
"08ddhywdy2qg17m592ng3yr0p1ih96irg8wg729g75hsxxq9ipks"))))
(build-system gnu-build-system)
(native-inputs `(("pkg-config" ,pkg-config)))
(inputs `(("fontconfig" ,fontconfig)
("freeglute" ,freeglut)
("fribidi" ,fribidi)
("glew" ,glew)))
(home-page "http://quesoglc.sourceforge.net")
(synopsis "Implementation of the OpenGL Character Renderer (GLC)")
(description
"The OpenGL Character Renderer (GLC) is a state machine that provides
OpenGL programs with character rendering services via an application programming
interface (API).")
(license (list license:expat license:lgpl2.1+))))

View file

@ -2396,3 +2396,99 @@ (define-public grue-hunter
your way through an underground cave system in search of the Grue. Can you
capture it and get out alive?")
(license license:agpl3+)))
(define-public warzone2100
(package
(name "warzone2100")
(version "3.1.5")
(source (origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/" name
"/releases/" version "/" name "-" version
".tar.xz"))
(sha256
(base32
"0hm49i2knvvg3wlnryv7h4m84s3qa7jfyym5yy6365sx8wzcrai1"))))
(build-system gnu-build-system)
(arguments
`(#:phases (modify-phases %standard-phases
(add-after 'set-paths 'set-sdl-paths
(lambda* (#:key inputs #:allow-other-keys)
(setenv "CPATH"
(string-append (assoc-ref inputs "sdl-union")
"/include/SDL"))
#t)))))
(native-inputs `(("pkg-config" ,pkg-config)
("unzip" ,unzip)
("zip" ,zip)))
(inputs `(("fontconfig" ,fontconfig)
("freetype" ,freetype)
("fribidi" ,fribidi)
("glew" ,glew)
("libtheora" ,libtheora)
("libvorbis" ,libvorbis)
("libxrandr" ,libxrandr)
("openal" ,openal)
("physfs" ,physfs)
("qt", qt-4)
("quesoglc" ,quesoglc)
("sdl-union" ,(sdl-union))))
(home-page "http://wz2100.net")
(synopsis "3D Real-time strategy and real-time tactics game")
(description
"Warzone 2100 offers campaign, multi-player, and single-player skirmish
modes. An extensive tech tree with over 400 different technologies, combined
with the unit design system, allows for a wide variety of possible units and
tactics.")
; Everything is GPLv2+ unless otherwise specified in COPYING.NONGPL
(license (list license:bsd-3
license:cc0
license:cc-by-sa3.0
license:expat
license:gpl2+
license:lgpl2.1+))))
(define-public starfighter
(package
(name "starfighter")
(version "1.5.1.1")
(source (origin
(method url-fetch)
(uri (string-append
"mirror://savannah/starfighter/"
(version-major+minor version) "/"
name "-" version "-src.tar.gz"))
(sha256
(base32
"1qc0hhw9m8sy3n9fips52c7aph3w8a8pdl4n45yaasgxzbvpn9xg"))))
(build-system gnu-build-system)
(arguments
'(#:tests? #f ; no check target
#:make-flags
(let ((out (assoc-ref %outputs "out")))
(list (string-append "PREFIX=" out)
(string-append "BINDIR=" out "/bin/")))
#:phases
(modify-phases %standard-phases
;; no configure script
(delete 'configure))))
(native-inputs
`(("pkg-config" ,pkg-config)))
(inputs
`(("sdl2" ,sdl2)
("sdl2-image" ,sdl2-image)
("sdl2-mixer" ,sdl2-mixer)))
(home-page "http://starfighter.nongnu.org/")
(synopsis "2D scrolling shooter game")
(description
"In the year 2579, the intergalactic weapons corporation, WEAPCO, has
dominated the galaxy. Guide Chris Bainfield and his friend Sid Wilson on
their quest to liberate the galaxy from the clutches of WEAPCO. Along the
way, you will encounter new foes, make new allies, and assist local rebels
in strikes against the evil corporation.")
;; gfx and music are under CC-BY 3.0, CC-BY-SA 3.0, CC0 or Public Domain.
(license (list license:gpl3+
license:cc-by3.0
license:cc-by-sa3.0
license:cc0
license:public-domain))))

View file

@ -2,7 +2,7 @@
;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2014, 2016 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
;;; Copyright © 2015, 2016 Sou Bunnbu <iyzsong@gmail.com>
;;; Copyright © 2015 Mathieu Lirzin <mthl@openmailbox.org>
@ -3840,7 +3840,7 @@ (define-public gexiv2
(define-public shotwell
(package
(name "shotwell")
(version "0.22.1")
(version "0.23.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
@ -3848,7 +3848,7 @@ (define-public shotwell
name "-" version ".tar.xz"))
(sha256
(base32
"1a9lx9a7p6fgaf838xlw98f73xxyxmg6jmm29830lsl8ynbhq9bk"))))
"12imip32mav0zqg1fh4xm6zk4qsgg2435xsyb6ljz47i37zk6kg2"))))
(build-system glib-or-gtk-build-system)
(arguments
`(#:tests? #f ;no "check" target
@ -3876,7 +3876,7 @@ (define-public shotwell
("libraw" ,libraw)
("json-glib" ,json-glib)
("rest" ,rest)
("webkitgtk" ,webkitgtk-2.4)
("webkitgtk" ,webkitgtk)
("sqlite" ,sqlite)
("libsoup" ,libsoup)
("libxml2" ,libxml2)

View file

@ -48,7 +48,7 @@ (define-module (gnu packages gnuzilla)
#:use-module (gnu packages python)
#:use-module (gnu packages xorg)
#:use-module (gnu packages gl)
#:use-module (gnu packages yasm)
#:use-module (gnu packages assembly)
#:use-module (gnu packages icu4c)
#:use-module (gnu packages video)
#:use-module (gnu packages xdisorg)

View file

@ -57,7 +57,7 @@ (define-module (gnu packages gstreamer)
#:use-module (gnu packages telephony)
#:use-module (gnu packages tls)
#:use-module (gnu packages version-control)
#:use-module (gnu packages yasm)
#:use-module (gnu packages assembly)
#:use-module (gnu packages xml))
(define-public orc

View file

@ -42,6 +42,7 @@ (define-module (gnu packages guile)
#:use-module (gnu packages ed)
#:use-module (gnu packages base)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages man)
#:use-module (gnu packages gettext)
#:use-module (gnu packages databases)
#:use-module (gnu packages python)
@ -200,14 +201,14 @@ (define-public guile-2.0/fixed
(define-public guile-next
(package (inherit guile-2.0)
(name "guile-next")
(version "2.1.2")
(version "2.1.3")
(source (origin
(method url-fetch)
(uri (string-append "ftp://alpha.gnu.org/gnu/guile/guile-"
version ".tar.xz"))
(sha256
(base32
"0p971k3v04jj5klnv145g4172cpcp90arf0wvxxj2aqkg16j9m9c"))
"1k48wqca2hrsbfq4ssiv4pg9jwlqncs5iwwxklk2bnczi7lavv78"))
(modules '((guix build utils)))
;; Remove the pre-built object files. Instead, build everything
@ -422,6 +423,55 @@ (define-public mcron
format is also supported.")
(license gpl3+)))
(define-public mcron2
;; This is mthl's mcron development branch, not yet merged in mcron.
(let ((commit "31baff1a5187d8ddc89324cbe42dbeffc309c962"))
(package
(inherit mcron)
(name "mcron2")
(version (string-append (package-version mcron) "-0."
(string-take commit 7)))
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://notabug.org/mthl/mcron/")
(commit commit)))
(sha256
(base32
"1h5wxy997hxi718hpx419c23q09939kbxrjbbq54lv0cgw1bb63z"))
(file-name (string-append name "-" version "-checkout"))))
(native-inputs
`(("autoconf" ,autoconf)
("automake" ,automake)
("pkg-config" ,pkg-config)
("texinfo" ,texinfo)
("help2man" ,help2man)))
(arguments
`(#:modules ((ice-9 match) (ice-9 ftw)
,@%gnu-build-system-modules)
#:phases (modify-phases %standard-phases
(add-after 'unpack 'bootstrap
(lambda _
(zero? (system* "autoreconf" "-vfi"))))
(add-after 'install 'wrap-mcron
(lambda* (#:key outputs #:allow-other-keys)
;; Wrap the 'mcron' command to refer to the right
;; modules.
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin"))
(site (string-append
out "/share/guile/site")))
(match (scandir site)
(("." ".." version)
(let ((modules (string-append site "/" version)))
(wrap-program (string-append bin "/mcron")
`("GUILE_LOAD_PATH" ":" prefix
(,modules))
`("GUILE_LOAD_COMPILED_PATH" ":" prefix
(,modules)))
#t))))))))))))
(define-public guile-lib
(package
(name "guile-lib")
@ -1008,4 +1058,69 @@ (define-public g-wrap
(home-page "http://www.nongnu.org/g-wrap/index.html")
(license lgpl2.1+)))
(define-public guile-dbi
(package
(name "guile-dbi")
(version "2.1.6")
(source (origin
(method url-fetch)
(uri (string-append
"http://download.gna.org/guile-dbi/guile-dbi-"
version ".tar.gz"))
(sha256
(base32
"116njrprhgrsv1qm904sp3b02rq01fx639r433d657gyhw3x159n"))))
(build-system gnu-build-system)
(arguments
'(#:configure-flags
(list (string-append
"--with-guile-site-dir=" %output "/share/guile/site/2.0"))
#:phases
(modify-phases %standard-phases
(add-after 'install 'patch-extension-path
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(dbi.scm (string-append
out "/share/guile/site/2.0/dbi/dbi.scm"))
(ext (string-append out "/lib/libguile-dbi")))
(substitute* dbi.scm (("libguile-dbi") ext))
#t))))))
(propagated-inputs
`(("guile" ,guile-2.0)))
(synopsis "Guile database abstraction layer")
(home-page "http://home.gna.org/guile-dbi/guile-dbi.html")
(description
"guile-dbi is a library for Guile that provides a convenient interface to
SQL databases. Database programming with guile-dbi is generic in that the same
programming interface is presented regardless of which database system is used.
It currently supports MySQL, Postgres and SQLite3.")
(license gpl2+)))
(define-public guile-dbd-sqlite3
(package
(name "guile-dbd-sqlite3")
(version "2.1.6")
(source (origin
(method url-fetch)
(uri (string-append
"http://download.gna.org/guile-dbi/guile-dbd-sqlite3-"
version ".tar.gz"))
(sha256
(base32
"0rg71jchxd2y8x496s8zmfmikr5g8zxi8zv2ar3f7a23pph92iw2"))))
(build-system gnu-build-system)
(native-inputs
`(("pkg-config" ,pkg-config)))
(inputs
`(("sqlite" ,sqlite)
("zlib" ,(@ (gnu packages compression) zlib))))
(propagated-inputs
`(("guile-dbi" ,guile-dbi)))
(synopsis "Guile DBI driver for SQLite")
(home-page "https://github.com/jkalbhenn/guile-dbd-sqlite3")
(description
"guile-dbi is a library for Guile that provides a convenient interface to
SQL databases. This package implements the interface for SQLite.")
(license gpl2+)))
;;; guile.scm ends here

File diff suppressed because it is too large Load diff

View file

@ -41,14 +41,14 @@ (define-module (gnu packages imagemagick)
(define-public imagemagick
(package
(name "imagemagick")
(version "6.9.4-9")
(version "6.9.4-10")
(source (origin
(method url-fetch)
(uri (string-append "mirror://imagemagick/ImageMagick-"
version ".tar.xz"))
(sha256
(base32
"0js5l6inar2p7zi5qhr8g34qs0gm2x03gs8k8yjh4cnzzac18d82"))))
"0bbac9zdjl2g8x127jx5jisih9r49980w7ar6m8xj3nyh3m83jd2"))))
(build-system gnu-build-system)
(arguments
`(#:configure-flags '("--with-frozenpaths")

View file

@ -58,15 +58,15 @@ (define-module (gnu packages java)
(define-public java-swt
(package
(name "java-swt")
(version "4.5")
(version "4.6")
(source
;; The types of many variables and procedures differ in the sources
;; dependent on whether the target architecture is a 32-bit system or a
;; 64-bit system. Instead of patching the sources on demand in a build
;; phase we download either the 32-bit archive (which mostly uses "int"
;; types) or the 64-bit archive (which mostly uses "long" types).
(let ((hash32 "03mhzraikcs4fsz7d3h5af9pw1bbcfd6dglsvbk2ciwimy9zj30q")
(hash64 "1qq0pjll6030v4ml0hifcaaik7sx3fl7ghybfdw95vsvxafwp2ff")
(let ((hash32 "0jmx1h65wqxsyjzs64i2z6ryiynllxzm13cq90fky2qrzagcw1ir")
(hash64 "0wnd01xssdq9pgx5xqh5lfiy3dmk60dzzqdxzdzf883h13692lgy")
(file32 "x86")
(file64 "x86_64"))
(let-values (((hash file)
@ -78,7 +78,7 @@ (define-public java-swt
(uri (string-append
"http://ftp-stud.fht-esslingen.de/pub/Mirrors/"
"eclipse/eclipse/downloads/drops4/R-" version
"-201506032000/swt-" version "-gtk-linux-" file ".zip"))
"-201606061100/swt-" version "-gtk-linux-" file ".zip"))
(sha256 (base32 hash))))))
(build-system ant-build-system)
(arguments

View file

@ -66,7 +66,7 @@ (define-module (gnu packages kodi)
#:use-module (gnu packages xiph)
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
#:use-module (gnu packages yasm)
#:use-module (gnu packages assembly)
#:use-module (gnu packages zip))
(define-public crossguid

View file

@ -1,44 +0,0 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages lightning)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system gnu)
#:use-module (guix licenses))
(define-public lightning
(package
(name "lightning")
(version "2.1.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/lightning/lightning-"
version ".tar.gz"))
(sha256
(base32
"19j9nwl88k660045s40cbz5zrl1wpd2mcxnnc8qqnnaj311a58qz"))))
(build-system gnu-build-system)
(synopsis "Library for generating assembly code at runtime")
(description
"GNU Lightning is a library that generates assembly language code at
run-time. Thus, it is useful in creating Just-In-Time compilers. It
abstracts over the target CPU by exposing a standardized RISC instruction set
to the clients.")
(home-page "http://www.gnu.org/software/lightning/")
(license gpl3+)))

View file

@ -225,7 +225,7 @@ (define* (kernel-config system #:key variant)
(search-path %load-path file)))
(define-public linux-libre
(let* ((version "4.6.2")
(let* ((version "4.6.3")
(build-phase
'(lambda* (#:key system inputs #:allow-other-keys #:rest args)
;; Avoid introducing timestamps
@ -303,7 +303,7 @@ (define-public linux-libre
(uri (linux-libre-urls version))
(sha256
(base32
"1sq75sbs85kwngq8l0n5v5v1z973l71by98k3wbw1mfq3g0s323b"))))
"1ajhdk9jq0pfxlhvzwarbxc23418yqav1v0z0mnfs575y5lq2gmp"))))
(build-system gnu-build-system)
(supported-systems '("x86_64-linux" "i686-linux"))
(native-inputs `(("perl" ,perl)
@ -340,13 +340,13 @@ (define-public linux-libre
(define-public linux-libre-4.4
(package
(inherit linux-libre)
(version "4.4.13")
(version "4.4.14")
(source (origin
(method url-fetch)
(uri (linux-libre-urls version))
(sha256
(base32
"1qcgnprgl9hy4g51bkx4bjs1cdsyy9kpwqymxggwghrzdid41x9l"))))
"1yfmzrjrkj8mn2dfd7p98w13afchrkpz26gwfcm2fhsmla16n1my"))))
(native-inputs
(let ((conf (kernel-config (or (%current-target-system)
(%current-system))
@ -357,13 +357,13 @@ (define-public linux-libre-4.4
(define-public linux-libre-4.1
(package
(inherit linux-libre)
(version "4.1.26")
(version "4.1.27")
(source (origin
(method url-fetch)
(uri (linux-libre-urls version))
(sha256
(base32
"1vrqz7z0b9zl6g8nbvz1hb2jhgy5zpnbdwc1v3zc4wjc35i2c4i4"))))
"0bbp782gdj8kz986a8hfygdrj7is0c8wgbb2mpb9gqhkfxcg74kf"))))
(native-inputs
(let ((conf (kernel-config (or (%current-target-system)
(%current-system))

View file

@ -1474,13 +1474,17 @@ (define-public python2-pylast
(define-public beets
(package
(name "beets")
(version "1.3.17")
(version "1.3.18")
(source (origin
(method url-fetch)
(uri (pypi-uri name version))
(uri (string-append
"https://pypi.python.org/packages/"
"14/6f/c9c79c5339ab3ecced265ca18adbf5bae3d4058bae737b6164d738fb4d2c/"
name "-" version ".tar.gz"))
(patches (search-patches "beets-image-test-failure.patch"))
(sha256
(base32
"0yg7sp18sdpszkinhb0bi6yinbn316jy1baxrwiw0m4byrj3rr6c"))))
"09pgyywa5llbc36y0lrr21ywgsp8m2zx6p8ncf8hxik28knd5kld"))))
(build-system python-build-system)
(arguments
`(#:python ,python-2 ; only Python 2 is supported
@ -1504,7 +1508,7 @@ (define-public beets
("python2-rarfile" ,python2-rarfile)
("python2-responses" ,python2-responses)))
;; TODO: Install optional plugins and dependencies.
(propagated-inputs
(inputs
`(("python2-enum34" ,python2-enum34)
("python2-jellyfish" ,python2-jellyfish)
("python2-munkres" ,python2-munkres)

View file

@ -21,9 +21,11 @@ (define-module (gnu packages package-management)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix gexp)
#:use-module (guix utils)
#:use-module (guix build-system gnu)
#:use-module (guix build-system python)
#:use-module ((guix build utils) #:select (with-directory-excursion))
#:use-module ((guix licenses) #:select (gpl2+ gpl3+ lgpl2.1+ asl2.0))
#:use-module (gnu packages)
#:use-module (gnu packages guile)
@ -48,7 +50,12 @@ (define-module (gnu packages package-management)
#:use-module (gnu packages popt)
#:use-module (gnu packages gnuzilla)
#:use-module (gnu packages cpio)
#:use-module (gnu packages tls))
#:use-module (gnu packages tls)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
#:use-module (ice-9 popen)
#:use-module (ice-9 rdelim)
#:use-module (ice-9 match))
(define (boot-guile-uri arch)
"Return the URI for the bootstrap Guile tarball for ARCH."
@ -246,6 +253,73 @@ (define guix-devel
(define-public guix guix-devel)
(define (source-file? file stat)
"Return true if FILE is likely a source file, false if it is a typical
generated file."
(define (wrong-extension? file)
(or (string-suffix? "~" file)
(member (file-extension file)
'("o" "a" "lo" "so" "go"))))
(match (basename file)
((or ".git" "autom4te.cache" "configure" "Makefile" "Makefile.in" ".libs")
#f)
((? wrong-extension?)
#f)
(_
#t)))
(define (make-git-predicate directory)
"Return a predicate that returns true if a file is part of the Git checkout
living at DIRECTORY. Upon Git failure, return #f instead of a predicate."
(define (parent-directory? thing directory)
;; Return #t if DIRECTORY is the parent of THING.
(or (string-suffix? thing directory)
(and (string-index thing #\/)
(parent-directory? (dirname thing) directory))))
(let* ((pipe (with-directory-excursion directory
(open-pipe* OPEN_READ "git" "ls-files")))
(files (let loop ((lines '()))
(match (read-line pipe)
((? eof-object?)
(reverse lines))
(line
(loop (cons line lines))))))
(status (close-pipe pipe)))
(and (zero? status)
(lambda (file stat)
(match (stat:type stat)
('directory
;; 'git ls-files' does not list directories, only regular files,
;; so we need this special trick.
(any (cut parent-directory? <> file) files))
((or 'regular 'symlink)
(any (cut string-suffix? <> file) files))
(_
#f))))))
(define-public current-guix
(let ((select? (delay (or (make-git-predicate
(string-append (current-source-directory)
"/../.."))
source-file?))))
(lambda ()
"Return a package representing Guix built from the current source tree.
This works by adding the current source tree to the store (after filtering it
out) and returning a package that uses that as its 'source'."
(package
(inherit guix)
(version (string-append (package-version guix) "+"))
(source (local-file "../.." "guix-current"
#:recursive? #t
#:select? (force select?)))))))
;;;
;;; Other tools.
;;;
(define-public nix
(package
(name "nix")

View file

@ -5,6 +5,7 @@
;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
;;; Copyright © 2016 Jessica Tallon <tsyesika@tsyesika.se>
;;; Copyright © 2016 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
;;;
;;; This file is part of GNU Guix.
;;;
@ -295,3 +296,39 @@ (define-public password-store
changes to your password database to a git repository that can be managed
through the pass command.")
(license license:gpl2+)))
(define-public argon2
(package
(name "argon2")
(version "20160406")
(source
(origin
(method url-fetch)
(uri
(string-append
"https://codeload.github.com/P-H-C/phc-winner-"
name "/tar.gz/" version))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0g6wa94sh639xl1qc8z21q43r1mp8y77r1zf8nwx5pfsxd8fmyzv"))))
(build-system gnu-build-system)
(arguments
`(#:test-target "test"
#:make-flags '("CC=gcc")
#:phases
(modify-phases %standard-phases
(delete 'configure)
(replace 'install
(lambda _
(let ((out (assoc-ref %outputs "out")))
(install-file "argon2" (string-append out "/bin"))
(install-file "libargon2.a" (string-append out "/lib"))
(install-file "libargon2.so" (string-append out "/lib"))
(copy-recursively "include"
(string-append out "/include"))))))))
(home-page "https://www.argon2.com/")
(synopsis "Password hashing library")
(description "Argon2 provides a key derivation function that was declared
winner of the 2015 Password Hashing Competition.")
(license license:cc0)))

View file

@ -0,0 +1,46 @@
Fix test failure due to missing image library backend.
Cherry-picked from upstream:
https://github.com/beetbox/beets/commit/07c95a1bf16bf86c640436208dda828cc7df0181
From 07c95a1bf16bf86c640436208dda828cc7df0181 Mon Sep 17 00:00:00 2001
From: Adrian Sampson <adrian@radbox.org>
Date: Thu, 2 Jun 2016 11:39:05 -0700
Subject: [PATCH] Require an imaging backend for fuzzy ratio tests
These fail outright if we don't have a way to get image sizes (e.g.,
ImageMagick).
---
test/test_art.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/test/test_art.py b/test/test_art.py
index 02d26f4..1b12b76 100644
--- a/test/test_art.py
+++ b/test/test_art.py
@@ -561,21 +561,25 @@ def test_respect_enforce_ratio_no(self):
self._assertImageIsValidArt(self.IMG_500x490, True)
def test_respect_enforce_ratio_px_above(self):
+ self._require_backend()
self.plugin.enforce_ratio = True
self.plugin.margin_px = 5
self._assertImageIsValidArt(self.IMG_500x490, False)
def test_respect_enforce_ratio_px_below(self):
+ self._require_backend()
self.plugin.enforce_ratio = True
self.plugin.margin_px = 15
self._assertImageIsValidArt(self.IMG_500x490, True)
def test_respect_enforce_ratio_percent_above(self):
+ self._require_backend()
self.plugin.enforce_ratio = True
self.plugin.margin_percent = (500 - 490) / 500 * 0.5
self._assertImageIsValidArt(self.IMG_500x490, False)
def test_respect_enforce_ratio_percent_below(self):
+ self._require_backend()
self.plugin.enforce_ratio = True
self.plugin.margin_percent = (500 - 490) / 500 * 1.5
self._assertImageIsValidArt(self.IMG_500x490, True)

View file

@ -23,7 +23,7 @@ Automake's parallel test harness.
- HYDRA_HOME="$(top_srcdir)/src" \
- HYDRA_CONFIG= \
- NIX_REMOTE= \
- NIX_CONF_DIR="$(abs_builddir)/nix/etc/nix" \
- GUIX_CONFIGURATION_DIRECTORY="$(abs_builddir)/nix/etc/nix" \
- NIX_STATE_DIR="$(abs_builddir)/nix/var/nix" \
- NIX_MANIFESTS_DIR="$(abs_builddir)/nix/var/nix/manifests" \
- NIX_STORE_DIR="$(abs_builddir)/nix/store" \
@ -39,7 +39,7 @@ Automake's parallel test harness.
+ HYDRA_HOME="$(top_srcdir)/src"; export HYDRA_HOME; \
+ HYDRA_CONFIG=; export HYDRA_CONFIG; \
+ NIX_REMOTE=; export NIX_REMOTE; \
+ NIX_CONF_DIR="$(abs_builddir)/nix/etc/nix"; export NIX_CONF_DIR; \
+ GUIX_CONFIGURATION_DIRECTORY="$(abs_builddir)/nix/etc/nix"; export GUIX_CONFIGURATION_DIRECTORY; \
+ NIX_STATE_DIR="$(abs_builddir)/nix/var/nix"; export NIX_STATE_DIR; \
+ NIX_MANIFESTS_DIR="$(abs_builddir)/nix/var/nix/manifests"; export NIX_MANIFESTS_DIR; \
+ NIX_STORE_DIR="$(abs_builddir)/nix/store"; export NIX_STORE_DIR; \

View file

@ -0,0 +1,20 @@
Avoid building PS and PDF docs, which do not build bit-reproducible. NASM
already installs doc in info and html.
--- nasm-2.12.01/doc/Makefile.in.orig 2016-06-21 18:02:59.483484829 +0200
+++ nasm-2.12.01/doc/Makefile.in 2016-06-21 18:03:46.700151410 +0200
@@ -27,7 +27,7 @@
PS2PDF = @PS2PDF@ # Part of GhostScript
SRCS = nasmdoc.src inslist.src changes.src
-OUT = info html nasmdoc.txt nasmdoc.ps nasmdoc.pdf
+OUT = info html nasmdoc.txt
# exports
export srcdir
@@ -100,4 +100,4 @@
$(INSTALL_DATA) info/* $(INSTALLROOT)$(infodir)
mkdir -p $(INSTALLROOT)$(docdir)/html
$(INSTALL_DATA) html/* $(INSTALLROOT)$(docdir)/html
- $(INSTALL_DATA) nasmdoc.ps nasmdoc.pdf nasmdoc.txt $(INSTALLROOT)$(docdir)
+ $(INSTALL_DATA) nasmdoc.txt $(INSTALLROOT)$(docdir)

View file

@ -0,0 +1,13 @@
diff --git a/test/test_integration.rb b/test/test_integration.rb
index d9b189c..6e21180 100644
--- a/test/test_integration.rb
+++ b/test/test_integration.rb
@@ -115,7 +115,7 @@ class TestIntegration < Test::Unit::TestCase
assert_kind_of Thread, t.join(1), "server didn't stop"
end
- def test_phased_restart_via_pumactl
+ def no_test_phased_restart_via_pumactl
if Puma.jruby? || Puma.windows?
assert true
return

View file

@ -7,6 +7,7 @@
;;; Copyright © 2016 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016 Jochem Raat <jchmrt@riseup.net>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;; Coypright © 2016 ng0 <ng0@we.make.ritual.n0.is>
;;;
;;; This file is part of GNU Guix.
;;;
@ -5092,7 +5093,7 @@ (define-public perl-test-fatal
(define-public perl-test-harness
(package
(name "perl-test-harness")
(version "3.35")
(version "3.36")
(source
(origin
(method url-fetch)
@ -5100,7 +5101,7 @@ (define-public perl-test-harness
"Test-Harness-" version ".tar.gz"))
(sha256
(base32
"06l29y1bpizb9vd9g49lgi0wzj1xy4rsk42ahdj3fpgqnvb9wp05"))))
"0gmnjss0hjkyiwvgby50nl5nzv254pn7fjqqdysjil21n09nymp7"))))
(build-system perl-build-system)
(arguments
`(#:phases (alist-cons-before

View file

@ -21,6 +21,7 @@
;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@ -2182,13 +2183,17 @@ (define-public python2-certifi
(define-public python-click
(package
(name "python-click")
(version "6.2")
(version "6.6")
(source
(origin
(method url-fetch)
(uri (pypi-uri "click" version))
(uri (string-append
"https://pypi.python.org/packages/"
"7a/00/c14926d8232b36b08218067bcd5853caefb4737cda3f0a47437151344792/"
"click-" version ".tar.gz"))
(sha256
(base32 "10kavbisnk9m93jl2wi34pw7ryr2qbxshh2cysxwxd7bymqgz87v"))))
(base32
"1sggipyz52crrybwbr9xvwxd4aqigvplf53k9w3ygxmzivd1jsnc"))))
(build-system python-build-system)
(native-inputs
`(("python-setuptools" ,python-setuptools)))
@ -6942,13 +6947,16 @@ (define-public python2-atomicwrites
(define-public python-requests-toolbelt
(package
(name "python-requests-toolbelt")
(version "0.6.0")
(version "0.6.2")
(source (origin
(method url-fetch)
(uri (pypi-uri "requests-toolbelt" version))
(uri (string-append
"https://pypi.python.org/packages/"
"e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
"requests-toolbelt-" version ".tar.gz"))
(sha256
(base32
"07slish560haspn0hpwgy2izhk2snqq06s6acp8xzmhhz079qknc"))))
"15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
(build-system python-build-system)
(propagated-inputs
`(("python-requests" ,python-requests)))
@ -6961,13 +6969,16 @@ (define-public python-requests-toolbelt
(define-public python-click-threading
(package
(name "python-click-threading")
(version "0.1.2")
(version "0.2.0")
(source (origin
(method url-fetch)
(uri (pypi-uri "click-threading" version))
(uri (string-append
"https://pypi.python.org/packages/"
"fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
"click-threading-" version ".tar.gz"))
(sha256
(base32
"0jmrv4334lfxa2ss53c06dafdwqbk1pb3ihd26izn5igw1bm8145"))))
"18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
(build-system python-build-system)
(propagated-inputs
`(("python-click" ,python-click)))
@ -7117,13 +7128,16 @@ (define-public python-pytest-localserver
(define-public python-wsgi-intercept
(package
(name "python-wsgi-intercept")
(version "1.1.2")
(version "1.2.2")
(source (origin
(method url-fetch)
(uri (pypi-uri "wsgi_intercept" version))
(uri (string-append
"https://pypi.python.org/packages/"
"38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
"wsgi_intercept-" version ".tar.gz"))
(sha256
(base32
"14ajy415ch5d0dnspg4b592p66wlgzah7ay218flp13517fp49zl"))))
"0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
(build-system python-build-system)
(native-inputs
`(("python-pytest" ,python-pytest)
@ -9103,10 +9117,7 @@ (define-public python-twisted
(version "16.2.0")
(source (origin
(method url-fetch)
(uri (list (pypi-uri "Twisted" version ".tar.bz2") ; 404
(string-append
"https://pypi.io/packages/source/T/Twisted/"
"Twisted-" version ".tar.bz2")))
(uri (pypi-uri "Twisted" version ".tar.bz2"))
(sha256
(base32
"0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
@ -9300,3 +9311,366 @@ (define-public python2-jsonrpclib
new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
etc.")
(license asl2.0)))
(define-public python-chai
(package
(name "python-chai")
(version "1.1.1")
(source (origin
(method url-fetch)
(uri (pypi-uri "chai" version))
(sha256
(base32
"016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
(build-system python-build-system)
(native-inputs
`(("python-setuptools" ,python-setuptools)))
(home-page "https://github.com/agoragames/chai")
(synopsis "Mocking framework for Python")
(description
"Chai provides an api for mocking, stubbing and spying your python
objects, patterned after the Mocha library for Ruby.")
(license bsd-3)))
(define-public python2-chai
(package-with-python2 python-chai))
(define-public python-arrow
(package
(name "python-arrow")
(version "0.8.0")
(source (origin
(method url-fetch)
(uri (pypi-uri "arrow" version))
(sha256
(base32
"1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
(build-system python-build-system)
(native-inputs
`(("python-setuptools" ,python-setuptools)
("python-dateutil" ,python-dateutil-2)
;; For testing
("python-chai" ,python-chai)
("python-simplejson" ,python-simplejson)))
(home-page "https://github.com/crsmithdev/arrow/")
(synopsis "Dates and times for Python")
(description
"Arrow is a Python library to creating, manipulating, formatting and
converting dates, times, and timestamps. It implements and updates the
datetime type.")
(license asl2.0)))
(define-public python2-arrow
(package-with-python2 python-arrow))
(define-public python-inflection
(package
(name "python-inflection")
(version "0.3.1")
(source
(origin (method url-fetch)
(uri (pypi-uri "inflection" version))
(sha256
(base32
"1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
(build-system python-build-system)
(native-inputs
`(("python-setuptools" ,python-setuptools)))
(home-page "http://github.com/jpvanhal/inflection")
(synopsis "Python string transformation library")
(description
"Inflection is a string transformation library. It singularizes
and pluralizes English words, and transforms strings from CamelCase to
underscored string.")
(license license:expat)))
(define-public python2-inflection
(package-with-python2 python-inflection))
(define-public python-pylev
(package
(name "python-pylev")
(version "1.3.0")
(source (origin
(method url-fetch)
(uri (pypi-uri "pylev" version))
(sha256
(base32
"1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
(build-system python-build-system)
(native-inputs
`(("python-setuptools" ,python-setuptools)))
(home-page "http://github.com/toastdriven/pylev")
(synopsis "Levenshtein distance implementation in Python")
(description "Pure Python Levenshtein implementation, based off the
Wikipedia code samples at
@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
(license bsd-3)))
(define-public python2-pylev
(package-with-python2 python-pylev))
(define-public python-cleo
(package
(name "python-cleo")
(version "0.4.1")
(source (origin
(method url-fetch)
(uri (pypi-uri "cleo" version))
(sha256
(base32
"1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
(build-system python-build-system)
(native-inputs
`(("python-psutil" ,python-psutil)
("python-pylev" ,python-pylev)
("python-setuptools" ,python-setuptools)
;; For testing
("python-mock" ,python-mock)
("python-pytest" ,python-pytest)))
(home-page "https://github.com/sdispater/cleo")
(synopsis "Command-line arguments library for Python")
(description
"Cleo allows you to create command-line commands with signature in
docstring and colored output.")
(license license:expat)))
(define-public python2-cleo
(package-with-python2 python-cleo))
(define-public python-lazy-object-proxy
(package
(name "python-lazy-object-proxy")
(version "1.2.2")
(source (origin
(method url-fetch)
(uri (pypi-uri "lazy-object-proxy" version))
(sha256
(base32
"0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
(build-system python-build-system)
(native-inputs
`(("python-setuptools" ,python-setuptools)))
(home-page "https://github.com/ionelmc/python-lazy-object-proxy")
(synopsis "Lazy object proxy for python")
(description
"Lazy object proxy is an object that wraps a callable but defers the call
until the object is actually required, and caches the result of said call.")
(license bsd-2)))
(define-public python2-lazy-object-proxy
(package-with-python2 python-lazy-object-proxy))
(define-public python-dnspython
(package
(name "python-dnspython")
(version "1.14.0")
(source (origin
(method url-fetch)
(uri (string-append "http://www.dnspython.org/kits/"
version "/dnspython-" version ".tar.gz"))
(sha256
(base32
"1z472r63gdqsxhsxj3plr5vs478yf4303vrqxxpsccc940g441hl"))))
(build-system python-build-system)
(arguments '(#:tests? #f)) ; XXX: requires internet access
(native-inputs
`(("python-setuptools" ,python-setuptools)))
(home-page "http://www.dnspython.org")
(synopsis "DNS toolkit for Python")
(description
"dnspython is a DNS toolkit for Python. It supports almost all record
types. It can be used for queries, zone transfers, and dynamic updates.
It supports TSIG authenticated messages and EDNS0.")
(license license:expat)))
(define-public python2-dnspython
(package-with-python2 python-dnspython))
(define-public python-email-validator
(package
(name "python-email-validator")
(version "1.0.1")
(source
(origin (method url-fetch)
(uri (pypi-uri "email_validator" version))
(sha256
(base32
"0mn8jg5h8ifl8w6a6m0hq8kbk0mzw9vm054qfamkn89b3npz52qw"))))
(build-system python-build-system)
(arguments
'(#:phases
(modify-phases %standard-phases
(add-before 'build 'use-dnspython
(lambda _
(substitute* "setup.py"
(("dnspython3") "dnspython"))
#t)))))
(native-inputs
`(("python-dnspython" ,python-dnspython)
("python-idna" ,python-idna)
("python-setuptools" ,python-setuptools)))
(home-page "https://github.com/JoshData/python-email-validator")
(synopsis "Email address validation library for Python")
(description
"This library validates email address syntax and deliverability.")
(license cc0)))
(define-public python2-email-validator
(package-with-python2 python-email-validator))
(define-public python-ukpostcodeparser
(package
(name "python-ukpostcodeparser")
(version "1.0.3")
(source (origin
(method url-fetch)
(uri (pypi-uri "UkPostcodeParser" version))
(sha256
(base32
"1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
(build-system python-build-system)
(native-inputs
`(("python-setuptools" ,python-setuptools)))
(home-page "https://github.com/hamstah/ukpostcodeparser")
(synopsis "UK Postcode parser for Python")
(description
"This library provides the @code{parse_uk_postcode} function for
parsing UK postcodes.")
(license license:expat)))
(define-public python2-ukpostcodeparser
(package-with-python2 python-ukpostcodeparser))
(define-public python-fake-factory
(package
(name "python-fake-factory")
(version "0.5.7")
(source (origin
(method url-fetch)
(uri (pypi-uri "fake-factory" version))
(sha256
(base32
"1chmarnrdzn4r017n8qlic0m0bbnhw04s3hkwribjvm3mqpb6pa0"))))
(build-system python-build-system)
(arguments
'(#:phases
(modify-phases %standard-phases
(add-before 'check 'disable-failing-test
;; XXX: faker/tests/ne_np/__init__.py, line 40, in test_names
;; first_name, last_name = name.split()
;; ValueError: too many values to unpack (expected 2)
(lambda _
(delete-file "faker/tests/ne_np/__init__.py")
#t)))))
(native-inputs
`(("python-dateutil" ,python-dateutil-2)
("python-setuptools" ,python-setuptools)
("python-six" ,python-six)
;; For testing
("python-email-validator" ,python-email-validator)
("python-mock" ,python-mock)
("python-ukpostcodeparser" ,python-ukpostcodeparser)))
(home-page "http://github.com/joke2k/faker")
(synopsis "Python package that generates fake data")
(description
"Faker is a Python package that generates fake data such as names,
addresses, and phone numbers.")
(license license:expat)
(properties `((python2-variant . ,(delay python2-fake-factory))))))
(define-public python2-fake-factory
(let ((base (package-with-python2 (strip-python2-variant
python-fake-factory))))
(package
(inherit base)
(native-inputs
`(("python2-ipaddress" ,python2-ipaddress)
,@(package-native-inputs base))))))
(define-public python-pyaml
(package
(name "python-pyaml")
(version "15.8.2")
(source (origin
(method url-fetch)
(uri (pypi-uri "pyaml" version))
(sha256
(base32
"1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
(build-system python-build-system)
(native-inputs
`(("python-setuptools" ,python-setuptools)))
(propagated-inputs
`(("python-pyyaml" ,python-pyyaml)))
(home-page "https://github.com/mk-fg/pretty-yaml")
(synopsis "YAML pretty-print library for Python")
(description
"pyaml is a PyYAML based python module to produce pretty and readable
YAML-serialized data.")
(license (non-copyleft "http://www.wtfpl.net/txt/copying/"))))
(define-public python2-pyaml
(package-with-python2 python-pyaml))
(define-public python-flexmock
(package
(name "python-flexmock")
(version "0.10.2")
(source (origin
(method url-fetch)
(uri (pypi-uri "flexmock" version))
(sha256
(base32
"0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
(build-system python-build-system)
(native-inputs
`(("python-setuptools" ,python-setuptools)))
(home-page "https://flexmock.readthedocs.org")
(synopsis "Testing library for Python")
(description
"flexmock is a testing library for Python that makes it easy to create
mocks, stubs and fakes.")
(license bsd-3)))
(define-public python2-flexmock
(package-with-python2 python-flexmock))
(define-public python-orator
(package
(name "python-orator")
(version "0.8.2")
(source (origin
(method url-fetch)
(uri (pypi-uri "orator" version))
(sha256
(base32
"1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
(build-system python-build-system)
(arguments '(#:tests? #f)) ; no tests
(native-inputs
`(("python-arrow" ,python-arrow)
("python-blinker" ,python-blinker)
("python-cleo" ,python-cleo)
("python-fake-factory" ,python-fake-factory)
("python-inflection" ,python-inflection)
("python-lazy-object-proxy" ,python-lazy-object-proxy)
("python-pyaml" ,python-pyaml)
("python-setuptools" ,python-setuptools)
("python-simplejson" ,python-simplejson)
("python-wrapt" ,python-wrapt)))
(home-page "https://orator-orm.com/")
(synopsis "ActiveRecord ORM for Python")
(description
"Orator provides a simple ActiveRecord-like Object Relational Mapping
implementation for Python.")
(license license:expat)
(properties `((python2-variant . ,(delay python2-orator))))))
(define-public python2-orator
(let ((base (package-with-python2 (strip-python2-variant python-orator))))
(package
(inherit base)
(native-inputs
`(("python2-ipaddress" ,python2-ipaddress)
,@(package-native-inputs base))))))

View file

@ -3939,6 +3939,70 @@ (define-public ruby-ttfunk
;; for details."
(license (list license:gpl2 license:gpl3 license:ruby))))
(define-public ruby-puma
(package
(name "ruby-puma")
(version "3.4.0")
(source
(origin
(method url-fetch)
;; Fetch from GitHub because distributed gem does not contain tests.
(uri (string-append "https://github.com/puma/puma/archive/v"
version ".tar.gz"))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"10svyj2jk949y1dmkxyzipk1ddzl4iz9limrcws1zhpganpvq3j8"))
;; Ignore broken test reported upstream.
;; https://github.com/puma/puma/issues/995
(patches (search-patches "ruby-puma-ignore-broken-test.patch"))))
(build-system ruby-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(add-before 'build 'fix-gemspec
(lambda _
(substitute* "puma.gemspec"
(("git ls-files") "find * |sort"))
#t)))))
(native-inputs
`(("ruby-hoe" ,ruby-hoe)
("ruby-rake-compiler" ,ruby-rake-compiler)
("ruby-hoe-git" ,ruby-hoe-git)
("ruby-rack" ,ruby-rack)))
(synopsis "Simple, concurrent HTTP server for Ruby/Rack")
(description
"Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server
for Ruby/Rack applications. Puma is intended for use in both development and
production environments. In order to get the best throughput, it is highly
recommended that you use a Ruby implementation with real threads like Rubinius
or JRuby.")
(home-page "http://puma.io")
(license license:expat)))
(define-public ruby-hoe-git
(package
(name "ruby-hoe-git")
(version "1.6.0")
(source
(origin
(method url-fetch)
(uri (rubygems-uri "hoe-git" version))
(sha256
(base32
"10jmmbjm0lkglwxbn4rpqghgg1ipjxrswm117n50adhmy8yij650"))))
(build-system ruby-build-system)
(propagated-inputs
`(("ruby-hoe" ,ruby-hoe)
("git" ,git)))
(synopsis "Hoe plugins for tighter Git integration")
(description
"This package provides a set of Hoe plugins for tighter Git integration.
It provides tasks to automate release tagging and pushing and changelog
generation.")
(home-page "http://github.com/jbarnette/hoe-git")
(license license:expat)))
(define-public ruby-sequel
(package
(name "ruby-sequel")

View file

@ -323,14 +323,14 @@ (define-public hop
(define-public chicken
(package
(name "chicken")
(version "4.10.0")
(version "4.11.0")
(source (origin
(method url-fetch)
(uri (string-append "http://code.call-cc.org/releases/"
version "/chicken-" version ".tar.gz"))
(sha256
(base32
"16w96jrhb6qf62fgznk53f55yhfv81damghdjn31k5hirnmza1qf"))))
"12ddyiikqknpr8h6llsxbg2fz75xnayvcnsvr1cwv8xnjn7jpp73"))))
(build-system gnu-build-system)
(arguments
`(#:modules ((guix build gnu-build-system)

View file

@ -34,13 +34,13 @@ (define-module (gnu packages screen)
(define-public screen
(package
(name "screen")
(version "4.3.1")
(version "4.4.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/screen/screen-"
version ".tar.gz"))
(sha256
(base32 "0qwxd4axkgvxjigz9xs0kcv6qpfkrzr2gm43w9idx0z2mvw4jh7s"))))
(base32 "12r12xwhsg59mlprikbbmn60gh8lqhrvyar7mlxg4fwsfma2lwpg"))))
(build-system gnu-build-system)
(native-inputs
`(("makeinfo" ,texinfo)))

View file

@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
;;;
;;; This file is part of GNU Guix.
;;;
@ -21,8 +22,13 @@ (define-module (gnu packages serialization)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
#:use-module (gnu packages)
#:use-module (gnu packages documentation))
#:use-module (gnu packages autotools)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
#:use-module (gnu packages documentation)
#:use-module (gnu packages pkg-config))
(define-public cereal
(package
@ -72,3 +78,48 @@ (define-public cereal
arbitrary data types and reversibly turns them into different representations,
such as compact binary encodings, XML, or JSON.")
(license license:bsd-3)))
(define-public msgpack
(package
(name "msgpack")
(version "1.4.1")
(source
(origin
(method url-fetch)
(uri
(string-append
"https://github.com/msgpack/msgpack-c/releases/download/"
"cpp-" version "/msgpack-" version ".tar.gz"))
(snippet
'(let ((p (open-file "msgpack.pc.in" "a")))
(begin
(display
(string-append "Requires: " "zlib" "\n") p)
(close-output-port p))))
(sha256
(base32
"0bpjfh9vz0n2k93mph3x15clmigkgs223xfn8h12ymrh5gsi5ica"))))
(build-system gnu-build-system)
(native-inputs
`(("googletest" ,googletest)
("autoconf" ,autoconf)
("automake" ,automake)
("libtool" ,libtool)
("pkg-config" ,pkg-config)))
(propagated-inputs
`(("zlib" ,zlib))) ;; Msgpack installs two headers (zbuffer.h,
;; zbuffer.hpp) which #include <zlib.h>. However, 'guix gc --references'
;; does not detect a store reference to zlib since these headers are not
;; compiled.
(arguments
`(#:phases
(modify-phases %standard-phases
(add-before 'configure 'autoconf
(lambda _
(system* "autoreconf" "-vfi"))))))
(home-page "http://www.msgpack.org")
(synopsis "Binary serialization library")
(description "Msgpack is a library for C/C++ that implements binary
serialization.")
(license license:boost1.0)))

View file

@ -378,6 +378,50 @@ (define-public r-rcpp
'citation(\"Rcpp\")' for details on these last two.")
(license license:gpl2+)))
(define-public r-mgcv
(package
(name "r-mgcv")
(version "1.8-12")
(source
(origin
(method url-fetch)
(uri (cran-uri "mgcv" version))
(sha256
(base32
"1khzy36nn6xbnzqfc2953ng0sv8w91mns1ymhibaqn1150x1qid0"))))
(build-system r-build-system)
(home-page "http://cran.r-project.org/web/packages/mgcv")
(synopsis "Mixed generalised additive model computation")
(description
"GAMs, GAMMs and other generalized ridge regression with multiple smoothing
parameter estimation by GCV, REML or UBRE/AIC. The library includes a
@code{gam()} function, a wide variety of smoothers, JAGS support and
distributions beyond the exponential family.")
(license license:gpl2+)))
(define-public r-permute
(package
(name "r-permute")
(version "0.9-0")
(source
(origin
(method url-fetch)
(uri (cran-uri "permute" version))
(sha256
(base32
"0w68cqw6s4pixix8bh1qzsy1pm64jqh1cjznw74h82ygp8sj7p73"))))
(build-system r-build-system)
;; Tests do not run correctly, but running them properly would entail a
;; circular dependency with vegan.
(home-page "https://github.com/gavinsimpson/permute")
(synopsis "Functions for Generating Restricted Permutations of Data")
(description
"This package provides a set of restricted permutation designs for freely
exchangeable, line transects (time series), spatial grid designs and permutation
of blocks (groups of samples). @code{permute} also allows split-plot designs,
in which the whole-plots or split-plots or both can be freely exchangeable.")
(license license:gpl2+)))
(define-public r-plyr
(package
(name "r-plyr")

View file

@ -3,6 +3,7 @@
;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;;
;;; This file is part of GNU Guix.
;;;
@ -55,27 +56,27 @@ (define-module (gnu packages tex)
(define texlive-extra-src
(origin
(method url-fetch)
(uri "ftp://tug.org/historic/systems/texlive/2015/texlive-20150523-extra.tar.xz")
(uri "ftp://tug.org/historic/systems/texlive/2016/texlive-20160523-extra.tar.xz")
(sha256 (base32
"1dkhhacga8h1v2m9xv1w02glbdda2m8lfp1la1y1zb9yjj8jsa6i"))))
"0q4a92zmwhn4ry6xgrp4k8wq11ax2sg9rg9yrsrdkr719y0x887a"))))
(define texlive-texmf-src
(origin
(method url-fetch)
(uri "ftp://tug.org/historic/systems/texlive/2015/texlive-20150523-texmf.tar.xz")
(uri "ftp://tug.org/historic/systems/texlive/2016/texlive-20160523-texmf.tar.xz")
(sha256 (base32
"1a3hpcg6x69ysqx432v6sk4alg0x34813cwk41frmvzprdajpyqy"))))
"0mfp6kq1p2ys5ni9czx9xl0xh264axri25vqw37yzk8jn3py9l08"))))
(define texlive-bin
(package
(name "texlive-bin")
(version "2015")
(version "2016")
(source
(origin
(method url-fetch)
(uri "ftp://tug.org/historic/systems/texlive/2015/texlive-20150521-source.tar.xz")
(uri "ftp://tug.org/historic/systems/texlive/2016/texlive-20160523-source.tar.xz")
(sha256 (base32
"0sa6kmz4jwhv6lw702gxszhhjkvw071wba0ngk1c76g8vixwv6zd"))))
"07kb8rsw8d42wy3fj1qgqj26y92spx1lbhx6z73wwdb3msnvh4i9"))))
(build-system gnu-build-system)
(inputs
`(("texlive-extra-src" ,texlive-extra-src)
@ -171,7 +172,7 @@ (define texlive-bin
(define texlive-texmf
(package
(name "texlive-texmf")
(version "2015")
(version "2016")
(source texlive-texmf-src)
(build-system gnu-build-system)
(inputs
@ -220,6 +221,7 @@ (define texlive-texmf
(system* "updmap-sys" "--nohash" "--syncwithtrees")
(system* "mktexlsr")
(system* "fmtutil-sys" "--all")))))))
(properties `((max-silent-time . 9600))) ; don't time out while grafting
(synopsis "TeX Live, a package of the TeX typesetting system")
(description
"TeX Live provides a comprehensive TeX document production system.
@ -234,7 +236,7 @@ (define texlive-texmf
(define-public texlive
(package
(name "texlive")
(version "2015")
(version "2016")
(source #f)
(build-system trivial-build-system)
(inputs `(("bash" ,bash) ; for wrap-program

View file

@ -112,14 +112,14 @@ (define-public git
;; Keep in sync with 'git-manpages'!
(package
(name "git")
(version "2.8.4")
(version "2.9.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://kernel.org/software/scm/git/git-"
version ".tar.xz"))
(sha256
(base32
"0mqnzs4wz2x1fa6kq2ckgf42fgx6qwp64ra1lgg73245l4r9l3hj"))))
"02dl8yvvl7m4zy39s0xmqr958ah7krvkv94lmx4vz3wl95wsj7zl"))))
(build-system gnu-build-system)
(native-inputs
`(("native-perl" ,perl)
@ -292,7 +292,7 @@ (define-public git-manpages
version ".tar.xz"))
(sha256
(base32
"1xdpp1i8sgdzk708vnxrm1z6dg4mip12fswihb8hlg2v5qqgrpfj"))))
"0ic4zs4axkkwa44nqv5iihj3q2nm42kx0j8scnfp1z93m6pw31fw"))))
(build-system trivial-build-system)
(arguments
'(#:modules ((guix build utils))

View file

@ -77,7 +77,7 @@ (define-module (gnu packages video)
#:use-module (gnu packages xiph)
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
#:use-module (gnu packages yasm)
#:use-module (gnu packages assembly)
#:use-module (gnu packages zip))
(define-public aalib
@ -755,7 +755,7 @@ (define-public mplayer
(define-public mpv
(package
(name "mpv")
(version "0.17.0")
(version "0.18.0")
(source (origin
(method url-fetch)
(uri (string-append
@ -763,7 +763,7 @@ (define-public mpv
".tar.gz"))
(sha256
(base32
"0vms3viwqcwl1mrgmf2yy4c69fvv7xpbkyrl693l6zpwynqd4b30"))
"0az0zqb2rakak51zsvfqzj9a8jiqpvc61jxap8hjdkkb9y6n6mmn"))
(file-name (string-append name "-" version ".tar.gz"))))
(build-system waf-build-system)
(native-inputs
@ -818,7 +818,7 @@ (define-public mpv
(lambda* (#:key inputs #:allow-other-keys)
(copy-file (assoc-ref inputs "waf") "waf")
(setenv "CC" "gcc"))))
#:configure-flags (list "--enable-gpl3" "--enable-zsh-comp")
#:configure-flags (list "--enable-zsh-comp")
;; No check function defined.
#:tests? #f))
(home-page "https://mpv.io/")

View file

@ -13,6 +13,7 @@
;;; Copyright © 2016 Rene Saavedra <rennes@openmailbox.org>
;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
;;; Copyright © 2016 Clément Lassieur <clement@lassieur.org>
;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
;;;
;;; This file is part of GNU Guix.
;;;
@ -2899,14 +2900,14 @@ (define-public perl-test-www-mechanize-psgi
(define-public perl-uri
(package
(name "perl-uri")
(version "1.67")
(version "1.71")
(source (origin
(method url-fetch)
(uri (string-append "mirror://cpan/authors/id/E/ET/ETHER/"
"URI-" version ".tar.gz"))
(sha256
(base32
"0ki7i830gs0cwwwjsyv3s6yy1l76ym8pfqp0lp7vw0j9bwyx923h"))))
"05a1ck1bhvqkkk690xhsxf7276dnagk96qkh2jy4prrrgw6wm3lw"))))
(build-system perl-build-system)
(license (package-license perl))
(synopsis "Perl Uniform Resource Identifiers (absolute and relative)")

File diff suppressed because it is too large Load diff

View file

@ -1,55 +0,0 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages yasm)
#:use-module (gnu packages)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system gnu)
#:use-module (gnu packages python)
#:use-module (gnu packages xml))
(define-public yasm
(package
(name "yasm")
(version "1.3.0")
(source
(origin
(method url-fetch)
(uri (string-append "http://www.tortall.net/projects/yasm/releases/yasm-"
version ".tar.gz"))
(sha256
(base32
"0gv0slmm0qpq91za3v2v9glff3il594x5xsrbgab7xcmnh0ndkix"))))
(build-system gnu-build-system)
(inputs
`(("python" ,python-wrapper)
("xmlto" ,xmlto)))
(home-page "http://yasm.tortall.net/")
(synopsis "Rewrite of the NASM assembler")
(description
"Yasm is a complete rewrite of the NASM assembler.
Yasm currently supports the x86 and AMD64 instruction sets, accepts NASM
and GAS assembler syntaxes, outputs binary, ELF32, ELF64, 32 and 64-bit
Mach-O, RDOFF2, COFF, Win32, and Win64 object formats, and generates source
debugging information in STABS, DWARF 2, and CodeView 8 formats.")
(license (license:non-copyleft "file://COPYING"
"See COPYING in the distribution."))))

View file

@ -73,6 +73,7 @@ (define-module (gnu services)
setuid-program-service-type
profile-service-type
firmware-service-type
gc-root-service-type
%boot-service
%activation-service
@ -489,6 +490,33 @@ (define firmware-service-type
(compose concatenate)
(extend append)))
(define (gc-roots->system-entry roots)
"Return an entry in the system's output containing symlinks to ROOTS."
(mlet %store-monad ((entry (gexp->derivation
"gc-roots"
#~(let ((roots '#$roots))
(mkdir #$output)
(chdir #$output)
(for-each symlink
roots
(map number->string
(iota (length roots))))))))
(return (if (null? roots)
'()
`(("gc-roots" ,entry))))))
(define gc-root-service-type
;; A service to associate extra garbage-collector roots to the system. This
;; is a simple hack that guarantees that the system retains references to
;; the given list of roots. Roots must be "lowerable" objects like
;; packages, or derivations.
(service-type (name 'gc-roots)
(extensions
(list (service-extension system-service-type
gc-roots->system-entry)))
(compose concatenate)
(extend append)))
;;;
;;; Service folding.

115
gnu/services/mcron.scm Normal file
View file

@ -0,0 +1,115 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu services mcron)
#:use-module (gnu services)
#:use-module (gnu services base)
#:use-module (gnu services shepherd)
#:autoload (gnu packages guile) (mcron2)
#:use-module (guix records)
#:use-module (guix gexp)
#:use-module (srfi srfi-1)
#:use-module (ice-9 match)
#:use-module (ice-9 vlist)
#:export (mcron-configuration
mcron-configuration?
mcron-configuration-mcron
mcron-configuration-jobs
mcron-service-type
mcron-service))
;;; Commentary:
;;;
;;; This module implements a service that to run instances of GNU mcron, a
;;; periodic job execution daemon. Example of a service:
;;
;; (service mcron-service-type
;; (mcron-configuration
;; (jobs (list #~(job next-second-from
;; (lambda ()
;; (call-with-output-file "/dev/console"
;; (lambda (port)
;; (display "hello!\n" port)))))))))
;;;
;;; Code:
(define-record-type* <mcron-configuration> mcron-configuration
make-mcron-configuration
mcron-configuration?
(mcron mcron-configuration-mcron ;package
(default mcron2))
(jobs mcron-configuration-jobs ;list of <mcron-job>
(default '())))
(define (job-file job)
(scheme-file "mcron-job" job))
(define mcron-shepherd-services
(match-lambda
(($ <mcron-configuration> mcron ()) ;nothing to do!
'())
(($ <mcron-configuration> mcron jobs)
(list (shepherd-service
(provision '(mcron))
(requirement '(user-processes))
(modules `((srfi srfi-1)
(srfi srfi-26)
,@%default-modules))
(start #~(make-forkexec-constructor
(list (string-append #$mcron "/bin/mcron")
#$@(map job-file jobs))
;; Disable auto-compilation of the job files and set a
;; sane value for 'PATH'.
#:environment-variables
(cons* "GUILE_AUTO_COMPILE=0"
"PATH=/run/current-system/profile/bin"
(remove (cut string-prefix? "PATH=" <>)
(environ)))))
(stop #~(make-kill-destructor)))))))
(define mcron-service-type
(service-type (name 'mcron)
(extensions
(list (service-extension shepherd-root-service-type
mcron-shepherd-services)
(service-extension profile-service-type
(compose list
mcron-configuration-mcron))))
(compose concatenate)
(extend (lambda (config jobs)
(mcron-configuration
(inherit config)
(jobs (append (mcron-configuration-jobs config)
jobs)))))))
(define* (mcron-service jobs #:optional (mcron mcron2))
"Return an mcron service running @var{mcron} that schedules @var{jobs}, a
list of gexps denoting mcron job specifications.
This is a shorthand for:
@example
(service mcron-service-type
(mcron-configuration (mcron mcron) (jobs jobs)))
@end example
"
(service mcron-service-type
(mcron-configuration (mcron mcron) (jobs jobs))))
;;; mcron.scm ends here

View file

@ -208,8 +208,7 @@ (define (/etc/configuration-files _)
"Return a list of tuples representing configuration templates to add to
/etc."
(define (file f)
(local-file (search-path %load-path
(string-append "gnu/system/examples/" f))))
(local-file (string-append "examples/" f)))
(define directory
(computed-file "configuration-templates"

View file

@ -18,11 +18,28 @@
(define-module (gnu tests)
#:use-module (guix gexp)
#:use-module (guix utils)
#:use-module (guix records)
#:use-module (gnu system)
#:use-module (gnu services)
#:use-module (gnu services shepherd)
#:export (backdoor-service-type
marionette-operating-system))
#:use-module ((gnu packages) #:select (scheme-modules))
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-9 gnu)
#:use-module (ice-9 match)
#:export (marionette-service-type
marionette-operating-system
define-os-with-source
system-test
system-test?
system-test-name
system-test-value
system-test-description
system-test-location
fold-system-tests
all-system-tests))
;;; Commentary:
;;;
@ -112,7 +129,7 @@ (define (self-quoting? x)
(define marionette-service-type
;; This is the type of the "marionette" service, allowing a guest system to
;; be manipulated from the host. This marionette REPL is essentially a
;; universal marionette.
;; universal backdoor.
(service-type (name 'marionette-repl)
(extensions
(list (service-extension shepherd-root-service-type
@ -127,4 +144,73 @@ (define* (marionette-operating-system os
(services (cons (service marionette-service-type imported-modules)
(operating-system-user-services os)))))
(define-syntax define-os-with-source
(syntax-rules (use-modules operating-system)
"Define two variables: OS containing the given operating system, and
SOURCE containing the source to define OS as an sexp.
This is convenient when we need both the <operating-system> object so we can
instantiate it, and the source to create it so we can store in in a file in
the system under test."
((_ (os source)
(use-modules modules ...)
(operating-system fields ...))
(begin
(define os
(operating-system fields ...))
(define source
'(begin
(use-modules modules ...)
(operating-system fields ...)))))))
;;;
;;; Tests.
;;;
(define-record-type* <system-test> system-test make-system-test
system-test?
(name system-test-name) ;string
(value system-test-value) ;%STORE-MONAD value
(description system-test-description) ;string
(location system-test-location (innate) ;<location>
(default (and=> (current-source-location)
source-properties->location))))
(define (write-system-test test port)
(match test
(($ <system-test> name _ _ ($ <location> file line))
(format port "#<system-test ~a ~a:~a ~a>"
name file line
(number->string (object-address test) 16)))
(($ <system-test> name)
(format port "#<system-test ~a ~a>" name
(number->string (object-address test) 16)))))
(set-record-type-printer! <system-test> write-system-test)
(define (test-modules)
"Return the list of modules that define system tests."
(scheme-modules (dirname (search-path %load-path "guix.scm"))
"gnu/tests"))
(define (fold-system-tests proc seed)
"Invoke PROC on each system test, passing it the test and the previous
result."
(fold (lambda (module result)
(fold (lambda (thing result)
(if (system-test? thing)
(proc thing result)
result))
result
(module-map (lambda (sym var)
(false-if-exception (variable-ref var)))
module)))
'()
(test-modules)))
(define (all-system-tests)
"Return the list of system tests."
(reverse (fold-system-tests cons '())))
;;; tests.scm ends here

View file

@ -24,13 +24,16 @@ (define-module (gnu tests base)
#:use-module (gnu system shadow)
#:use-module (gnu system vm)
#:use-module (gnu services)
#:use-module (gnu services mcron)
#:use-module (gnu services shepherd)
#:use-module (guix gexp)
#:use-module (guix store)
#:use-module (guix monads)
#:use-module (guix packages)
#:use-module (srfi srfi-1)
#:export (%test-basic-os))
#:export (run-basic-test
%test-basic-os
%test-mcron))
(define %simple-os
(operating-system
@ -56,109 +59,227 @@ (define %simple-os
%base-user-accounts))))
(define %test-basic-os
;; Monadic derivation that instruments %SIMPLE-OS, runs it in a VM, and runs
;; a series of basic functionality tests.
(mlet* %store-monad ((os -> (marionette-operating-system
%simple-os
#:imported-modules '((gnu services herd)
(guix combinators))))
(run (system-qemu-image/shared-store-script
os #:graphic? #f)))
(define test
#~(begin
(use-modules (gnu build marionette)
(srfi srfi-1)
(srfi srfi-26)
(srfi srfi-64)
(ice-9 match))
(define* (run-basic-test os command #:optional (name "basic"))
"Return a derivation called NAME that tests basic features of the OS started
using COMMAND, a gexp that evaluates to a list of strings. Compare some
properties of running system to what's declared in OS, an <operating-system>."
(define test
#~(begin
(use-modules (gnu build marionette)
(srfi srfi-1)
(srfi srfi-26)
(srfi srfi-64)
(ice-9 match))
(define marionette
(make-marionette (list #$run)))
(define marionette
(make-marionette #$command))
(mkdir #$output)
(chdir #$output)
(mkdir #$output)
(chdir #$output)
(test-begin "basic")
(test-begin "basic")
(test-assert "uname"
(match (marionette-eval '(uname) marionette)
(#("Linux" "komputilo" version _ "x86_64")
(string-prefix? #$(package-version
(operating-system-kernel os))
version))))
(test-assert "uname"
(match (marionette-eval '(uname) marionette)
(#("Linux" host-name version _ architecture)
(and (string=? host-name
#$(operating-system-host-name os))
(string-prefix? #$(package-version
(operating-system-kernel os))
version)
(string-prefix? architecture %host-type)))))
(test-assert "shell and user commands"
;; Is everything in $PATH?
(zero? (marionette-eval '(system "
(test-assert "shell and user commands"
;; Is everything in $PATH?
(zero? (marionette-eval '(system "
. /etc/profile
set -e -x
guix --version
ls --version
grep --version
info --version")
marionette)))
marionette)))
(test-assert "accounts"
(let ((users (marionette-eval '(begin
(use-modules (ice-9 match))
(let loop ((result '()))
(match (getpw)
(#f (reverse result))
(x (loop (cons x result))))))
marionette)))
(lset= string=?
(map passwd:name users)
(list
#$@(map user-account-name
(operating-system-user-accounts os))))))
(test-assert "accounts"
(let ((users (marionette-eval '(begin
(use-modules (ice-9 match))
(let loop ((result '()))
(match (getpw)
(#f (reverse result))
(x (loop (cons x result))))))
marionette)))
(lset= string=?
(map passwd:name users)
(list
#$@(map user-account-name
(operating-system-user-accounts os))))))
(test-assert "shepherd services"
(let ((services (marionette-eval '(begin
(use-modules (gnu services herd))
(call-with-values current-services
append))
marionette)))
(lset= eq?
(pk 'services services)
'(root #$@(operating-system-shepherd-service-names
(virtualized-operating-system os '()))))))
(test-assert "shepherd services"
(let ((services (marionette-eval '(begin
(use-modules (gnu services herd))
(call-with-values current-services
append))
marionette)))
(lset= eq?
(pk 'services services)
'(root #$@(operating-system-shepherd-service-names os)))))
(test-equal "login on tty1"
"root\n"
(begin
(marionette-control "sendkey ctrl-alt-f1" marionette)
;; Wait for the 'term-tty1' service to be running (using
;; 'start-service' is the simplest and most reliable way to do
;; that.)
(marionette-eval
'(begin
(use-modules (gnu services herd))
(start-service 'term-tty1))
marionette)
(test-equal "login on tty1"
"root\n"
(begin
(marionette-control "sendkey ctrl-alt-f1" marionette)
;; Wait for the 'term-tty1' service to be running (using
;; 'start-service' is the simplest and most reliable way to do
;; that.)
(marionette-eval
'(begin
(use-modules (gnu services herd))
(start-service 'term-tty1))
marionette)
;; Now we can type.
(marionette-type "root\n\nid -un > logged-in\n" marionette)
;; Now we can type.
(marionette-type "root\n\nid -un > logged-in\n" marionette)
;; It can take a while before the shell commands are executed.
(let loop ((i 0))
(unless (or (file-exists? "/root/logged-in") (> i 15))
(sleep 1)
(loop (+ i 1))))
(marionette-eval '(use-modules (rnrs io ports)) marionette)
(marionette-eval '(call-with-input-file "/root/logged-in"
get-string-all)
marionette)))
;; It can take a while before the shell commands are executed.
(let loop ((i 0))
(unless (or (file-exists? "/root/logged-in") (> i 15))
(sleep 1)
(loop (+ i 1))))
(marionette-eval '(use-modules (rnrs io ports)) marionette)
(marionette-eval '(call-with-input-file "/root/logged-in"
get-string-all)
marionette)))
(test-assert "screendump"
(begin
(marionette-control (string-append "screendump " #$output
"/tty1.ppm")
marionette)
(file-exists? "tty1.ppm")))
(test-assert "screendump"
(begin
(marionette-control (string-append "screendump " #$output
"/tty1.ppm")
marionette)
(file-exists? "tty1.ppm")))
(test-end)
(exit (= (test-runner-fail-count (test-runner-current)) 0))))
(gexp->derivation name test
#:modules '((gnu build marionette))))
(define %test-basic-os
(system-test
(name "basic")
(description
"Instrument %SIMPLE-OS, run it in a VM, and run a series of basic
functionality tests.")
(value
(mlet* %store-monad ((os -> (marionette-operating-system
%simple-os
#:imported-modules '((gnu services herd)
(guix combinators))))
(run (system-qemu-image/shared-store-script
os #:graphic? #f)))
;; XXX: Add call to 'virtualized-operating-system' to get the exact same
;; set of services as the OS produced by
;; 'system-qemu-image/shared-store-script'.
(run-basic-test (virtualized-operating-system os '())
#~(list #$run))))))
;;;
;;; Mcron.
;;;
(define %mcron-os
;; System with an mcron service, with one mcron job for "root" and one mcron
;; job for an unprivileged user (note: #:user is an 'mcron2' thing.)
(let ((job1 #~(job next-second-from
(lambda ()
(call-with-output-file "witness"
(lambda (port)
(display (list (getuid) (getgid)) port))))))
(job2 #~(job next-second-from
(lambda ()
(call-with-output-file "witness"
(lambda (port)
(display (list (getuid) (getgid)) port))))
#:user "alice"))
(job3 #~(job next-second-from ;to test $PATH
"touch witness-touch")))
(operating-system
(inherit %simple-os)
(services (cons (mcron-service (list job1 job2 job3))
(operating-system-user-services %simple-os))))))
(define (run-mcron-test name)
(mlet* %store-monad ((os -> (marionette-operating-system
%mcron-os
#:imported-modules '((gnu services herd)
(guix combinators))))
(command (system-qemu-image/shared-store-script
os #:graphic? #f)))
(define test
#~(begin
(use-modules (gnu build marionette)
(srfi srfi-64)
(ice-9 match))
(define marionette
(make-marionette (list #$command)))
(define (wait-for-file file)
;; Wait until FILE exists in the guest; 'read' its content and
;; return it.
(marionette-eval
`(let loop ((i 10))
(cond ((file-exists? ,file)
(call-with-input-file ,file read))
((> i 0)
(sleep 1)
(loop (- i 1)))
(else
(error "file didn't show up" ,file))))
marionette))
(mkdir #$output)
(chdir #$output)
(test-begin "mcron")
(test-eq "service running"
'running!
(marionette-eval
'(begin
(use-modules (gnu services herd))
(start-service 'mcron)
'running!)
marionette))
;; Make sure root's mcron job runs, has its cwd set to "/root", and
;; runs with the right UID/GID.
(test-equal "root's job"
'(0 0)
(wait-for-file "/root/witness"))
;; Likewise for Alice's job. We cannot know what its GID is since
;; it's chosen by 'groupadd', but it's strictly positive.
(test-assert "alice's job"
(match (wait-for-file "/home/alice/witness")
((1000 gid)
(>= gid 100))))
;; Last, the job that uses a command; allows us to test whether
;; $PATH is sane. (Note that 'marionette-eval' stringifies objects
;; that don't have a read syntax, hence the string.)
(test-equal "root's job with command"
"#<eof>"
(wait-for-file "/root/witness-touch"))
(test-end)
(exit (= (test-runner-fail-count (test-runner-current)) 0))))
(gexp->derivation "basic" test
(gexp->derivation name test
#:modules '((gnu build marionette)))))
(define %test-mcron
(system-test
(name "mcron")
(description "Make sure the mcron service works as advertised.")
(value (run-mcron-test name))))

212
gnu/tests/install.scm Normal file
View file

@ -0,0 +1,212 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu tests install)
#:use-module (gnu)
#:use-module (gnu tests)
#:use-module (gnu tests base)
#:use-module (gnu system)
#:use-module (gnu system install)
#:use-module (gnu system vm)
#:use-module ((gnu build vm) #:select (qemu-command))
#:use-module (gnu packages qemu)
#:use-module (gnu packages package-management)
#:use-module (guix store)
#:use-module (guix monads)
#:use-module (guix packages)
#:use-module (guix grafts)
#:use-module (guix gexp)
#:use-module (guix utils)
#:export (%test-installed-os))
;;; Commentary:
;;;
;;; Test the installation of GuixSD using the documented approach at the
;;; command line.
;;;
;;; Code:
(define-os-with-source (%minimal-os %minimal-os-source)
;; The OS we want to install.
(use-modules (gnu) (gnu tests) (srfi srfi-1))
(operating-system
(host-name "liberigilo")
(timezone "Europe/Paris")
(locale "en_US.UTF-8")
(bootloader (grub-configuration (device "/dev/vdb")))
(kernel-arguments '("console=ttyS0"))
(file-systems (cons (file-system
(device "my-root")
(title 'label)
(mount-point "/")
(type "ext4"))
%base-file-systems))
(users (cons (user-account
(name "alice")
(comment "Bob's sister")
(group "users")
(supplementary-groups '("wheel" "audio" "video"))
(home-directory "/home/alice"))
%base-user-accounts))
(services (cons (service marionette-service-type
'((gnu services herd)
(guix combinators)))
%base-services))))
(define (operating-system-with-current-guix os)
"Return a variant of OS that uses the current Guix."
(operating-system
(inherit os)
(services (modify-services (operating-system-user-services os)
(guix-service-type config =>
(guix-configuration
(inherit config)
(guix (current-guix))))))))
(define (operating-system-with-gc-roots os roots)
"Return a variant of OS where ROOTS are registered as GC roots."
(operating-system
(inherit os)
(services (cons (service gc-root-service-type roots)
(operating-system-user-services os)))))
(define MiB (expt 2 20))
(define* (run-install #:key
(os (marionette-operating-system
;; Since the image has no network access, use the
;; current Guix so the store items we need are in
;; the image.
(operating-system
(inherit (operating-system-with-current-guix
installation-os))
(kernel-arguments '("console=ttyS0")))
#:imported-modules '((gnu services herd)
(guix combinators))))
(target-size (* 1200 MiB)))
"Run the GuixSD installation procedure from OS and return a VM image of
TARGET-SIZE bytes containing the installed system."
(mlet* %store-monad ((_ (set-grafting #f))
(system (current-system))
(target (operating-system-derivation %minimal-os))
;; Since the installation system has no network access,
;; we cheat a little bit by adding TARGET to its GC
;; roots. This way, we know 'guix system init' will
;; succeed.
(image (system-disk-image
(operating-system-with-gc-roots
os (list target))
#:disk-image-size (* 1500 MiB))))
(define install
#~(begin
(use-modules (guix build utils)
(gnu build marionette))
(set-path-environment-variable "PATH" '("bin")
(list #$qemu-minimal))
(system* "qemu-img" "create" "-f" "qcow2"
#$output #$(number->string target-size))
(define marionette
(make-marionette
(cons (which #$(qemu-command system))
(cons* "-no-reboot" "-m" "800"
"-drive"
(string-append "file=" #$image
",if=virtio,readonly")
"-drive"
(string-append "file=" #$output ",if=virtio")
(if (file-exists? "/dev/kvm")
'("-enable-kvm")
'())))))
(pk 'uname (marionette-eval '(uname) marionette))
;; Wait for tty1.
(marionette-eval '(begin
(use-modules (gnu services herd))
(start 'term-tty1))
marionette)
(marionette-eval '(call-with-output-file "/etc/litl-config.scm"
(lambda (port)
(write '#$%minimal-os-source port)))
marionette)
(exit (marionette-eval '(zero? (system "
. /etc/profile
set -e -x;
guix --version
guix gc --list-live | grep isc-dhcp
export GUIX_BUILD_OPTIONS=--no-grafts
guix build isc-dhcp
parted --script /dev/vdb mklabel gpt \\
mkpart primary ext2 1M 3M \\
mkpart primary ext2 3M 1G \\
set 1 boot on \\
set 1 bios_grub on
mkfs.ext4 -L my-root /dev/vdb2
ls -l /dev/vdb
mount /dev/vdb2 /mnt
df -h /mnt
herd start cow-store /mnt
mkdir /mnt/etc
cp /etc/litl-config.scm /mnt/etc/config.scm
guix system init /mnt/etc/config.scm /mnt --no-substitutes
sync
reboot\n"))
marionette))))
(gexp->derivation "installation" install
#:modules '((guix build utils)
(gnu build marionette)))))
(define %test-installed-os
(system-test
(name "installed-os")
(description
"Test basic functionality of an OS installed like one would do by hand.
This test is expensive in terms of CPU and storage usage since we need to
build (current-guix) and then store a couple of full system images.")
(value
(mlet %store-monad ((image (run-install))
(system (current-system)))
(run-basic-test %minimal-os
#~(let ((image #$image))
;; First we need a writable copy of the image.
(format #t "copying image '~a'...~%" image)
(copy-file image "disk.img")
(chmod "disk.img" #o644)
`(,(string-append #$qemu-minimal "/bin/"
#$(qemu-command system))
,@(if (file-exists? "/dev/kvm")
'("-enable-kvm")
'())
"-no-reboot" "-m" "256"
"-drive" "file=disk.img,if=virtio"))
"installed-os")))))
;;; install.scm ends here

View file

@ -48,7 +48,7 @@ (define* (pypi-uri name version #:optional (extension ".tar.gz"))
"Return a URI string for the Python package hosted on the Python Package
Index (PyPI) corresponding to NAME and VERSION. EXTENSION is the file name
extension, such as '.tar.gz'."
(string-append "https://pypi.python.org/packages/source/"
(string-append "https://pypi.io/packages/source/"
(string-take name 1) "/" name "/"
name "-" version extension))

View file

@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;;
;;; This file is part of GNU Guix.
;;;
@ -25,6 +26,7 @@ (define-module (guix build bournish)
#:use-module (ice-9 match)
#:use-module (ice-9 ftw)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-11)
#:use-module (srfi srfi-26)
#:export (%bournish-language))
@ -103,6 +105,63 @@ (define (cat-command file)
((@ (guix build utils) dump-port) port (current-output-port))
*unspecified*)))
(define (lines+chars port)
"Return the number of lines and number of chars read from PORT."
(let loop ((lines 0) (chars 0))
(match (read-char port)
((? eof-object?) ;done!
(values lines chars))
(#\newline ;recurse
(loop (1+ lines) (1+ chars)))
(_ ;recurse
(loop lines (1+ chars))))))
(define (file-exists?* file)
"Like 'file-exists?' but emits a warning if FILE is not accessible."
(catch 'system-error
(lambda ()
(stat file))
(lambda args
(let ((errno (system-error-errno args)))
(format (current-error-port) "~a: ~a~%"
file (strerror errno))
#f))))
(define (wc-print file)
(let-values (((lines chars)
(call-with-input-file file lines+chars)))
(format #t "~a ~a ~a~%" lines chars file)))
(define (wc-l-print file)
(let-values (((lines chars)
(call-with-input-file file lines+chars)))
(format #t "~a ~a~%" lines file)))
(define (wc-c-print file)
(let-values (((lines chars)
(call-with-input-file file lines+chars)))
(format #t "~a ~a~%" chars file)))
(define (wc-command-implementation . files)
(for-each wc-print (filter file-exists?* files)))
(define (wc-l-command-implementation . files)
(for-each wc-l-print (filter file-exists?* files)))
(define (wc-c-command-implementation . files)
(for-each wc-c-print (filter file-exists?* files)))
(define (wc-command . args)
"Emit code for the 'wc' command."
(cond ((member "-l" args)
`((@@ (guix build bournish) wc-l-command-implementation)
,@(delete "-l" args)))
((member "-c" args)
`((@@ (guix build bournish) wc-c-command-implementation)
,@(delete "-c" args)))
(else
`((@@ (guix build bournish) wc-command-implementation) ,@args))))
(define (help-command . _)
(display "\
Hello, this is Bournish, a minimal Bourne-like shell in Guile!
@ -129,7 +188,8 @@ (define %commands
("help" ,help-command)
("ls" ,ls-command)
("which" ,which-command)
("cat" ,cat-command)))
("cat" ,cat-command)
("wc" ,wc-command)))
(define (read-bournish port env)
"Read a Bournish expression from PORT, and return the corresponding Scheme

View file

@ -1,5 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
;;; Copyright © 2016 David Thompson <davet@gnu.org>
;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@ -152,10 +154,11 @@ (define (emacs-inputs-directories inputs)
(define (emacs-inputs-el-directories dirs)
"Build the list of Emacs Lisp directories from the Emacs package directory
DIRS."
(map (lambda (d)
(string-append d %install-suffix "/"
(store-directory->elpa-name-version d)))
dirs))
(append-map (lambda (d)
(list (string-append d "/share/emacs/site-lisp")
(string-append d %install-suffix "/"
(store-directory->elpa-name-version d))))
dirs))
(define (package-name-version->elpa-name-version name-ver)
"Convert the Guix package NAME-VER to the corresponding ELPA name-version

View file

@ -59,8 +59,8 @@ (define %state-directory
(or (getenv "NIX_STATE_DIR") "@guix_localstatedir@/guix"))
(define %config-directory
;; This must match `NIX_CONF_DIR' as defined in `nix/local.mk'.
(or (getenv "NIX_CONF_DIR") "@guix_sysconfdir@/guix"))
;; This must match `GUIX_CONFIGURATION_DIRECTORY' as defined in `nix/local.mk'.
(or (getenv "GUIX_CONFIGURATION_DIRECTORY") "@guix_sysconfdir@/guix"))
(define %guix-register-program
;; The 'guix-register' program.

View file

@ -856,8 +856,10 @@ (define (substitute-references exp substs)
(define %utils-module
;; This file provides 'mkdir-p', needed to implement 'imported-files' and
;; other primitives below.
(local-file (search-path %load-path "guix/build/utils.scm")
;; other primitives below. Note: We give the file name relative to this
;; file you are currently reading; 'search-path' could return a file name
;; relative to the current working directory.
(local-file "build/utils.scm"
"build-utils.scm"))
(define* (imported-files files

View file

@ -175,8 +175,10 @@ (define (read-wheel-metadata wheel-archive)
(lambda (port)
(let* ((metadata (json->scm port))
(run_requires (hash-ref metadata "run_requires"))
(requirements (hash-ref (list-ref run_requires 0)
"requires")))
(requirements (if run_requires
(hash-ref (list-ref run_requires 0)
"requires")
'())))
(map (lambda (r)
(python->package-name (clean-requirement r)))
requirements)))))

View file

@ -94,10 +94,15 @@ (define-module (guix scripts substitute)
;;; Code:
(define %narinfo-cache-directory
;; A local cache of narinfos, to avoid going to the network.
(or (and=> (getenv "XDG_CACHE_HOME")
(cut string-append <> "/guix/substitute"))
(string-append %state-directory "/substitute/cache")))
;; A local cache of narinfos, to avoid going to the network. Most of the
;; time, 'guix substitute' is called by guix-daemon as root and stores its
;; cached data in /var/guix/…. However, when invoked from 'guix challenge'
;; as a user, it stores its cache in ~/.cache.
(if (zero? (getuid))
(or (and=> (getenv "XDG_CACHE_HOME")
(cut string-append <> "/guix/substitute"))
(string-append %state-directory "/substitute/cache"))
(string-append (cache-directory) "/substitute")))
(define %allow-unauthenticated-substitutes?
;; Whether to allow unchecked substitutes. This is useful for testing
@ -501,17 +506,10 @@ (define (cache-entry cache-uri narinfo)
(value ,(and=> narinfo narinfo->string))))
(let ((file (narinfo-cache-file cache-url path)))
(catch 'system-error
(lambda ()
(mkdir-p (dirname file))
(with-atomic-file-output file
(lambda (out)
(write (cache-entry cache-url narinfo) out))))
(lambda args
;; We may not have write access to the local cache when called from an
;; unprivileged process such as 'guix challenge'.
(unless (= EACCES (system-error-errno args))
(apply throw args)))))
(mkdir-p (dirname file))
(with-atomic-file-output file
(lambda (out)
(write (cache-entry cache-url narinfo) out))))
narinfo)

View file

@ -1061,24 +1061,19 @@ (define* (register-path path
Use with care as it directly modifies the store! This is primarily meant to
be used internally by the daemon's build hook."
;; Currently this is implemented by calling out to the fine C++ blob.
(catch 'system-error
(lambda ()
(let ((pipe (apply open-pipe* OPEN_WRITE %guix-register-program
`(,@(if prefix
`("--prefix" ,prefix)
'())
,@(if state-directory
`("--state-directory" ,state-directory)
'())))))
(and pipe
(begin
(format pipe "~a~%~a~%~a~%"
path (or deriver "") (length references))
(for-each (cut format pipe "~a~%" <>) references)
(zero? (close-pipe pipe))))))
(lambda args
;; Failed to run %GUIX-REGISTER-PROGRAM.
#f)))
(let ((pipe (apply open-pipe* OPEN_WRITE %guix-register-program
`(,@(if prefix
`("--prefix" ,prefix)
'())
,@(if state-directory
`("--state-directory" ,state-directory)
'())))))
(and pipe
(begin
(format pipe "~a~%~a~%~a~%"
path (or deriver "") (length references))
(for-each (cut format pipe "~a~%" <>) references)
(zero? (close-pipe pipe))))))
;;;

View file

@ -637,10 +637,11 @@ (define (with-atomic-file-output file proc)
(define (cache-directory)
"Return the cache directory for Guix, by default ~/.cache/guix."
(or (getenv "XDG_CONFIG_HOME")
(and=> (or (getenv "HOME")
(passwd:dir (getpwuid (getuid))))
(cut string-append <> "/.cache/guix"))))
(string-append (or (getenv "XDG_CACHE_HOME")
(and=> (or (getenv "HOME")
(passwd:dir (getpwuid (getuid))))
(cut string-append <> "/.cache")))
"/guix"))
(define (readlink* file)
"Call 'readlink' until the result is not a symlink."
@ -702,6 +703,18 @@ (define (read! bv start n)
;;; Source location.
;;;
(define (absolute-dirname file)
"Return the absolute name of the directory containing FILE, or #f upon
failure."
(match (search-path %load-path file)
(#f #f)
((? string? file)
;; If there are relative names in %LOAD-PATH, FILE can be relative and
;; needs to be canonicalized.
(if (string-prefix? "/" file)
(dirname file)
(canonicalize-path (dirname file))))))
(define-syntax current-source-directory
(lambda (s)
"Return the absolute name of the current directory, or #f if it could not
@ -711,11 +724,16 @@ (define-syntax current-source-directory
(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)))
;; can be relative. In that case, we try to find out at run time
;; the absolute file name by looking at %LOAD-PATH; doing this at
;; run time rather than expansion time is necessary to allow files
;; to be moved on the file system.
(cond ((not file-name)
#f) ;raising an error would upset Geiser users
((string-prefix? "/" file-name)
(dirname file-name))
(else
#`(absolute-dirname #,file-name))))
(_
#f))))))

View file

@ -67,7 +67,7 @@ void Settings::processEnvironment()
nixLogDir = canonPath(getEnv("NIX_LOG_DIR", NIX_LOG_DIR));
nixStateDir = canonPath(getEnv("NIX_STATE_DIR", NIX_STATE_DIR));
nixDBPath = getEnv("NIX_DB_DIR", nixStateDir + "/db");
nixConfDir = canonPath(getEnv("NIX_CONF_DIR", NIX_CONF_DIR));
nixConfDir = canonPath(getEnv("GUIX_CONFIGURATION_DIRECTORY", GUIX_CONFIGURATION_DIRECTORY));
nixLibexecDir = canonPath(getEnv("NIX_LIBEXEC_DIR", NIX_LIBEXEC_DIR));
nixBinDir = canonPath(getEnv("NIX_BIN_DIR", NIX_BIN_DIR));
nixDaemonSocketFile = canonPath(nixStateDir + DEFAULT_SOCKET_PATH);

View file

@ -106,7 +106,7 @@ libstore_a_CPPFLAGS = \
-DNIX_DATA_DIR=\"$(datadir)\" \
-DNIX_STATE_DIR=\"$(localstatedir)/guix\" \
-DNIX_LOG_DIR=\"$(localstatedir)/log/guix\" \
-DNIX_CONF_DIR=\"$(sysconfdir)/guix\" \
-DGUIX_CONFIGURATION_DIRECTORY=\"$(sysconfdir)/guix\" \
-DNIX_LIBEXEC_DIR=\"$(libexecdir)\" \
-DNIX_BIN_DIR=\"$(bindir)\" \
-DOPENSSL_PATH="\"guix-authenticate\"" \

File diff suppressed because it is too large Load diff

View file

@ -30,15 +30,18 @@ (define (assert-exit x)
;; Skip these tests unless user namespaces are available and the setgroups
;; file (introduced in Linux 3.19 to address a security issue) exists.
(unless (and (user-namespace-supported?)
(unprivileged-user-namespace-supported?)
(setgroups-supported?))
(test-skip 7))
(define (skip-if-unsupported)
(unless (and (user-namespace-supported?)
(unprivileged-user-namespace-supported?)
(setgroups-supported?))
(test-skip 1)))
(skip-if-unsupported)
(test-assert "call-with-container, exit with 0 when there is no error"
(zero?
(call-with-container '() (const #t) #:namespaces '(user))))
(skip-if-unsupported)
(test-assert "call-with-container, user namespace"
(zero?
(call-with-container '()
@ -47,6 +50,7 @@ (define (assert-exit x)
(assert-exit (and (zero? (getuid)) (zero? (getgid)))))
#:namespaces '(user))))
(skip-if-unsupported)
(test-assert "call-with-container, uts namespace"
(zero?
(call-with-container '()
@ -57,6 +61,7 @@ (define (assert-exit x)
(primitive-exit 0))
#:namespaces '(user uts))))
(skip-if-unsupported)
(test-assert "call-with-container, pid namespace"
(zero?
(call-with-container '()
@ -72,6 +77,7 @@ (define (assert-exit x)
(status:exit-val status)))))))
#:namespaces '(user pid))))
(skip-if-unsupported)
(test-assert "call-with-container, mnt namespace"
(zero?
(call-with-container '(("none" device "/testing" "tmpfs" () #f #f))
@ -79,6 +85,7 @@ (define (assert-exit x)
(assert-exit (file-exists? "/testing")))
#:namespaces '(user mnt))))
(skip-if-unsupported)
(test-equal "call-with-container, mnt namespace, wrong bind mount"
`(system-error ,ENOENT)
;; An exception should be raised; see <http://bugs.gnu.org/23306>.
@ -91,12 +98,14 @@ (define (assert-exit x)
(lambda args
(list 'system-error (system-error-errno args)))))
(skip-if-unsupported)
(test-assert "call-with-container, all namespaces"
(zero?
(call-with-container '()
(lambda ()
(primitive-exit 0)))))
(skip-if-unsupported)
(test-assert "container-excursion"
(call-with-temporary-directory
(lambda (root)

View file

@ -797,7 +797,7 @@ (define read-at
#:guile-for-build (%guile-for-build))))
(build-derivations %store (list prof))
(string-match (format #f "^export XML_CATALOG_FILES=\"~a/xml/+bar/baz/catalog\\.xml\"\n"
(derivation->output-path prof))
(regexp-quote (derivation->output-path prof)))
(with-output-to-string
(lambda ()
(guix-package "-p" (derivation->output-path prof)