Empty file in hydra store?

2017-01-03 Thread John Darrington
I got this error (twice) when attempting "guix system init":

Downloading 
https://mirror.hydra.gnu.org/nar/ciqw5z470c8ihl1kfswj1j3ix6hs092d-module-import 
(1KiB installed)...
^[[K module-import  0B/s 00:00 | 0B 
transferred
bzip2: Compressed file ends unexpectedly;
perhaps it is corrupted?  *Possible* reason follows.
bzip2: Inappropriate ioctl for device
Input file = (stdin), output file = (stdout)
It is possible that the compressed file(s) have become corrupted.
You can use the -tvv option to test integrity of such files.
You can use the `bzip2recover' program to attempt to recover
data from undamaged sections of corrupted files.
guix substitute: error: corrupt input while restoring 
'/gnu/store/ciqw5z470c8ihl1kfswj1j3ix6hs092d-module-import' from #{read pipe}#
killing process 1013
guix system: error: build failed:
some substitutes for the outputs of derivation 
`/gnu/store/9h4nc2fdy2dnklc7rnf61d7993dzsnks-module-import.drv' failed
(usually happens due to networking issues); try `--fallback' to build 
derivation from source


and if I try to manually download 
https://mirror.hydra.gnu.org/nar/ciqw5z470c8ihl1kfswj1j3ix6hs092d-module-import

I get a zero length file. :(

Can it be that hydra is losing files?

J'

-- 
Avoid eavesdropping.  Send strong encrypted email.
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://sks-keyservers.net or any PGP keyserver for public key.



signature.asc
Description: Digital signature


Re: Per-package updaters?

2017-01-03 Thread Efraim Flashner
On Sat, Dec 31, 2016 at 01:29:15AM +0100, Ludovic Courtès wrote:
> Hello Guix!
> 
> Ricardo Wurmus  skribis:
> 
> > we have a couple of generic package updaters (CPAN, CRAN, Bioconductor,
> > Github, GNU, etc), but they don’t nearly cover all of our packages.  I
> > wonder if we should add one-off updaters for individual packages that
> > don’t fall into any of the generic classes of updaters.
> >
> > Another question is how to implement them.  Would there be another
> > optional field in package expressions containing a Guile script to run
> > to determine updates for the current package?
> >
> > What are your opinions on this?
> 
> Currently we have ways to provide the generic updates with additional
> hints.  For instance, we can provide hints to the ‘gnu’ updater:
> 
>   (define-public guile-next
> (package (inherit guile-2.0)
>   (name "guile-next")
>   ;; …
>   (properties '((upstream-name . "guile")
> (ftp-server . "alpha.gnu.org")
> (ftp-directory . "/gnu/guile")
> 
> I suspect that one-off updaters would most likely use methods very
> close to the existing updaters.  For instance, we could have a generic
> FTP updater that would apply to all packages available on FTP; or we
> could have a generic updater that crawls HTML pages for release numbers
> and such things.  Then we would have optional properties in packages to
> specify which method to use, or something along these lines.
> 
> WDYT?  Do you have examples in mind?
> 

Sourceforge has an rss feed for each project they host. For example, for
libcddb: https://sourceforge.net/projects/libcddb/rss

Another example is Debian, which has a "watch file" that does something™,
for example cairo's:
https://sources.debian.net/src/cairo/1.14.8-1/debian/watch/

-- 
Efraim Flashner  אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted


signature.asc
Description: PGP signature


Re: Creating a docker image with Guix

2017-01-03 Thread Ricardo Wurmus

Ludovic Courtès  writes:

> Ricardo Wurmus  skribis:
>
>> I just played around with Docker and built up a command to create a
>> Docker image for Emacs.
>
> Fun!
>
>> Can anyone find a more elegant way to do this?
>>
>> guix environment --ad-hoc \
>> coreutils bash emacs-no-x-toolkit -- \
>> sh -c 'tar -c $(guix gc --requisites $GUIX_ENVIRONMENT) | \
>>docker import -c "ONBUILD RUN [\"$GUIX_ENVIRONMENT/bin/ln\", 
>> \"-s\", \"$GUIX_ENVIRONMENT/bin\", \"/bin\"]" - emacs-base' \
>>&& echo -e "FROM emacs-base\nCMD [\"/bin/emacs\"]" | \
>>docker build -
>
> What does the resulting image look like?

It’s very hard to tell because this command doesn’t spit out a file that
fully represents the image.  Instead it modifies some state in
/var/lib/docker.

> Would it be enough to generate an “Image JSON Description” in this
> format: ?

No.  On Fedora (where I ran the above command) Docker uses the
devicemapper backend.  “docker build” appears to have created an XFS
file system in a file.  Different installations use different backends
(e.g. direct-lvm or aufs) — this probably means that we should not try
to build an image for a particular backend directly.

However, there is a “docker save” command to export an image as a tar
archive (which can be imported by a docker instance), and the format of
the resulting archive looks pretty simple:  It contains a couple of JSON
files and two “layer.tar” archives.  The first contains the files of the
base image (i.e. all the /gnu/store stuff), the second contains the
added symlink from “/bin” to “/gnu/store/.../bin” (and “/run/secrets”).

> I’m not familiar enough with Docker but I’m under the impression that we
> should be able to generate an image without even using Docker.  :-)

Absolutely!  Now that I know about “docker save” I’ll give it another
try.

~~



Re: cargo-build-system: cargo-build-flags: --cfg=unix in package recipe

2017-01-03 Thread David Craven
> Aha! It can - if one uses propagated-inputs in the package recipes. I think 
> the importer should propagate inputs if the current package is 
> Rust-source-only. Otherwise packages further down the dependency graph 
> (further to the clients) won't compile later.

One of the ideas behind the [replace] stuff in the Cargo.toml file was
to retain the required dependencies.

> However, some of the Rust crates have a "windows" target which fails.
> For these I'd like to pass "--cfg=unix" and I'd like to put it into the 
> package recipe and not hardcode it into the build system.

Nice, didn't know about this flag. That explains why it refused to
build without the windows dependencies.



Re: [PATCH 4/4] gnu: ocaml-findlib: Update to 1.7.1.

2017-01-03 Thread Ben Woodcroft

Hi David,

Thanks for this.


On 03/01/17 03:38, David Craven wrote:

* gnu/packages/ocaml.scm (ocaml-findlib)[arguments]: Move
   ocaml-findlib-make-install.patch to phase and set ldconf="ignore" in
   findlib.conf.in.
* gnu/local.mk (dist_patch_DATA): Remove old patch.

The deletion of the patch file itself should also be documented.

[...]

-   #:phases (modify-phases %standard-phases
-  (replace
-   'configure
-   (lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
-   (system*
-"./configure"
+   #:phases
+   (modify-phases %standard-phases
+ (add-after 'unpack 'patch-findlib.conf.in
+   (lambda _
+ (let ((port (open-file "findlib.conf.in" "w" #:encoding "utf-8")))
+   (format port "ldconf=\"ignore\"~%")
+   (close-port port))
+ #t))
+ (add-after 'unpack 'patch-findlib-make-install
+   (lambda _
+ (substitute* "src/findlib/Makefile"
+   (("^.*topfind.*OCAML_CORE_STDLIB.*$")
+ "\ttest $(INSTALL_TOPFIND) -eq 0 || cp topfind 
\"$(prefix)$(OCAML_SITELIB)\"\n"))
+ #t))
+ (replace 'configure
+   (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+   (system* "./configure"
  "-bindir" (string-append out "/bin")
  "-config" (string-append out "/etc/ocamfind.conf")
  "-mandir" (string-append out "/share/man")
  "-sitelib" (string-append out "/lib/ocaml/site-lib")
  "-with-toolbox")))


I had some trouble building downstream packages such as 'laby' after 
this patch. Do you see the same?



+(native-search-paths
+ (list (search-path-specification
+(variable "OCAMLPATH")
+(files (list (string-append "lib/ocaml/site-lib"))


This is unnecessary since this is already specified in the ocaml package 
definition, right?


[...]

On a somewhat related note, I've been getting around ocaml-findlib 
issues by adding this phase to downstream packages. WDYT?


 (add-before 'install 'setup-install
   (lambda* (#:key outputs #:allow-other-keys)
 (let* ((out (assoc-ref outputs "out"))
(destdir (string-append out "/lib/ocaml")))
   (mkdir-p destdir)
   (setenv "OCAMLFIND_DESTDIR" destdir)
   (setenv "OCAMLFIND_LDCONF" (string-append destdir 
"/ld.conf"))

   #t))

I've been preparing a few ocaml packages, and it is getting to the point 
that it might be worth adding an ocaml-build-system, much like 
gnu-build-system except perhaps with a few tweaks such as the above 
(preliminary patch not adding anything ocaml/findlib-specific attached). 
OTOH, I'm quite cautious about my knowledge of the OCaml ecosystem, so 
I'm keen to hear others' opinions.


Thanks, ben.
>From 5497df789597bedb3744af4d11d927a99dea229e Mon Sep 17 00:00:00 2001
From: Ben Woodcroft 
Date: Mon, 2 Jan 2017 17:11:13 +1000
Subject: [PATCH 1/5] build: Add OCaml build system.

* guix/build-system/ocaml.scm: New file.
* guix/build/ocaml-build-system: New file.
* Makefile.am (MODULES): Add new files.
* doc/guix.texi (Build Systems): Document ocaml-build-system. (TODO!!!)
* gnu/packages/games.scm (laby): Use ocaml-build-system.
* gnu/packages/ocaml.scm (opam, camlp4, camlp5, hevea, coq, proof-general,
ocaml-menhir, lablgtk, unison, ocaml-findlib): Likewise.
---
 Makefile.am   |   2 +
 gnu/packages/games.scm|   5 +-
 gnu/packages/ocaml.scm|  21 +++---
 guix/build-system/ocaml.scm   | 131 ++
 guix/build/ocaml-build-system.scm |  41 
 5 files changed, 188 insertions(+), 12 deletions(-)
 create mode 100644 guix/build-system/ocaml.scm
 create mode 100644 guix/build/ocaml-build-system.scm

diff --git a/Makefile.am b/Makefile.am
index fb08a004b..6338e0c4e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -74,6 +74,7 @@ MODULES =	\
   guix/build-system/r.scm			\
   guix/build-system/ruby.scm			\
   guix/build-system/trivial.scm			\
+  guix/build-system/ocaml.scm			\
   guix/ftp-client.scm\
   guix/http-client.scm\
   guix/gnupg.scm\
@@ -99,6 +100,7 @@ MODULES =	\
   guix/build/ruby-build-system.scm		\
   guix/build/waf-build-system.scm		\
   guix/build/haskell-build-system.scm		\
+  guix/build/ocaml-build-system.scm		\
   guix/build/store-copy.scm			\
   guix/build/utils.scm\
   guix/build/union.scm\
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index a3b9f04b9..814a2c77d 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -108,7 +108,8 @@
   #:use-module (guix build-system haskell)
   #:use-module (gui

Re: WIP patch: build-system: cargo: Make lots and lots of rust packages work

2017-01-03 Thread David Craven
> For it to work, you also have to back out the (cons "src" outputs) (in 
> ./guix/build-system/cargo.scm) and the (assoc-ref outputs "src") (in 
> guix/build/cargo-build-system.scm) starting from current master.

Can you elaborate on why you think it's a bad idea to separate the
source from the binaries into different outputs?

I see that you are trying to mimic what cargo vendor does. Cool proof
of concept and nice solution to the computing sha256 hashes on the
build side.

The question is if this is the best approach. I was thinking of trying
[0] first and see how that works for the build system use case. The
cargo package example using vendoring is intended to be a temporary
solution, and I'm not sure we have finished exploring the "design
space" yet.

[0] https://github.com/alexcrichton/cargo-local-registry



Re: cargo-build-system: cargo-build-flags: --cfg=unix in package recipe

2017-01-03 Thread ng0
Danny Milosavljevic  writes:

> Hi,
>
> so it seems I got the cargo-build-system to work for large-ish Rust 
> dependency trees now. It still can't pick up transitive dependencies but hey 
> :P
>
> However, some of the Rust crates have a "windows" target which fails.
>
> For these I'd like to pass "--cfg=unix" and I'd like to put it into the 
> package recipe and not hardcode it into the build system.
>
> I saw that there's a "cargo-build-flags" parameter. However, specifying it 
> like
>
>   (arguments
>`(#:cargo-build-flags '("--cfg=unix" "--release")))
>
> gives me "invalid keyword argument"... 
>
> Why?
>
>

It does indeed, and this would fix the bug I filed.
I've cut down the number of crates I packaged from 160 to 81 just
by removing the *32-sys and winapi dependencies after reading a
bit about the system.

-- 
♥Ⓐ  ng0
PGP keys and more: https://n0is.noblogs.org/ http://ng0.chaosnet.org



Re: WIP patch: build-system: cargo: Make lots and lots of rust packages work

2017-01-03 Thread Danny Milosavljevic
Hi David,

On Tue, 3 Jan 2017 12:08:56 +0100
David Craven  wrote:

> Can you elaborate on why you think it's a bad idea to separate the
> source from the binaries into different outputs?

Huh? I think it's a good idea. It just doesn't work yet and I didn't find out 
why :)

> I see that you are trying to mimic what cargo vendor does. Cool proof
> of concept and nice solution to the computing sha256 hashes on the
> build side.

Yeah. I thought they can't exactly replace all the bundled files in all the 
repos (written by anyone) if they ever changed the file format - so it's there 
to stay "forever". There's no downside I can see.

That said, we can also do it via cargo vendor if it's easy. But it's not really 
required - we can always just change it to that if it ever breaks.

> The question is if this is the best approach. I was thinking of trying
> [0] first and see how that works for the build system use case. The
> cargo package example using vendoring is intended to be a temporary
> solution, and I'm not sure we have finished exploring the "design
> space" yet.
> 
> [0] https://github.com/alexcrichton/cargo-local-registry

That's interesting too! We can try both.

My patch is just a WIP patch of something that works. We should explore the 
other alternatives, too.

But about the current approach in master, I talked to Alex Crichton [1], he 
said that the "replace" approach won't work without a registry because it tries 
to replace crates by the exact same version and what you specify for "replace" 
is just an API version. I think by then you can just go all the way to a custom 
registry and dispense of the "replace".

[1] https://github.com/rust-lang/cargo/issues/3476



Re: cargo-build-system: cargo-build-flags: --cfg=unix in package recipe

2017-01-03 Thread Danny Milosavljevic
On Tue, 3 Jan 2017 11:57:48 +0100
David Craven  wrote:

> > For these I'd like to pass "--cfg=unix" and I'd like to put it into the 
> > package recipe and not hardcode it into the build system.  
> 
> Nice, didn't know about this flag. That explains why it refused to
> build without the windows dependencies.

I take it back. It's not that easy, unfortunately. That flag either doesn't 
exist anymore or not yet in stable. In any case while there are forum posts 
about it it doesn't actually work.



Re: WIP patch: build-system: cargo: Make lots and lots of rust packages work

2017-01-03 Thread Danny Milosavljevic
> > Can you elaborate on why you think it's a bad idea to separate the
> > source from the binaries into different outputs?  
> 
> Huh? I think it's a good idea. It just doesn't work yet and I didn't find out 
> why :)

Hmm I think I would have to update all my imported crates' package recipes to 
depend on the "src" output for inputs. I didn't do that and that's probably (?) 
why it doesn't work.



Re: cargo-build-system: cargo-build-flags: --cfg=unix in package recipe

2017-01-03 Thread Danny Milosavljevic
Hi ng0,

On Tue, 03 Jan 2017 11:19:55 +
ng0  wrote:

> It does indeed, and this would fix the bug I filed.
> I've cut down the number of crates I packaged from 160 to 81 just
> by removing the *32-sys and winapi dependencies after reading a
> bit about the system.

Just a heads-up, if there's a Cargo.lock file (e.g. Rust application) and you 
do that it will invalidate it. Happened to me. That's why in the WIP patch I 
don't remove the *32-sys and winapi dependencies if there is a Cargo.lock .



[PATCH] gnu: doxygen: Use sh from the store.

2017-01-03 Thread Thomas Danckaert

Hi Guix,

Doxygen uses a hardcoded "/bin/sh" to run "dot" (and maybe other 
processes as well) to generate documentation graphs, which fails in a 
build environment.  This patch adds the store item of bash-minimal as 
a prefix.


According to `guix refresh --list-dependent', this patch would cause 
689 packages to be rebuilt, so it probably shouldn't be applied on 
master.


best,

Thomas
From 306e4805734bdaf5d0ef2b26a30ff2c558aaf93c Mon Sep 17 00:00:00 2001
From: Thomas Danckaert 
Date: Tue, 3 Jan 2017 12:58:28 +0100
Subject: [PATCH] gnu: doxygen: Use sh from the store.

* gnu/packages/documentation.scm (doxygen)[inputs]: Add bash-minimal.
  [arguments]: Add phase to add store prefix to "/bin/sh".
---
 gnu/packages/documentation.scm | 13 -
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/documentation.scm b/gnu/packages/documentation.scm
index bbc25e8..6f648db 100644
--- a/gnu/packages/documentation.scm
+++ b/gnu/packages/documentation.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2014, 2016 Andreas Enge 
 ;;; Copyright © 2016 Eric Bavier 
 ;;; Copyright © 2016 Roel Janssen 
+;;; Copyright © 2016 Thomas Danckaert 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -26,6 +27,7 @@
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system cmake)
   #:use-module (gnu packages)
+  #:use-module (gnu packages bash)
   #:use-module (gnu packages python)
   #:use-module (gnu packages bison)
   #:use-module (gnu packages docbook)
@@ -99,8 +101,17 @@ markup) can be customized and extended by the user.")
("flex" ,flex)
("libxml2" ,libxml2) ; provides xmllint for the tests
("python" ,python-2))) ; for creating the documentation
+(inputs
+ `(("bash" ,bash-minimal)))
 (arguments
- `(#:test-target "tests"))
+ `(#:test-target "tests"
+   #:phases (modify-phases %standard-phases
+  (add-before 'configure 'patch-sh
+  (lambda* (#:key inputs #:allow-other-keys)
+(substitute* "src/portable.cpp"
+  (("/bin/sh")
+   (string-append
+(assoc-ref inputs "bash") "/bin/sh"
 (home-page "http://www.stack.nl/~dimitri/doxygen/";)
 (synopsis "Generate documentation from annotated sources")
 (description "Doxygen is the de facto standard tool for generating
-- 
2.7.4



Re: [PATCH 3/7] gnu: idris: Update to 0.99.

2017-01-03 Thread Ludovic Courtès
David Craven  skribis:

> * gnu/packages/haskell.scm (idris): Update to 0.99.

LGTM!



Re: [PATCH 2/7] gnu: Order module imports in (gnu packages haskell) alphabetically.

2017-01-03 Thread Ludovic Courtès
David Craven  skribis:

> * gnu/packages/haskell.scm: Order module imports alphabetically.

OK!



Re: [PATCH 4/7] gnu: Add idris-lightyear.

2017-01-03 Thread Ludovic Courtès
David Craven  skribis:

> * gnu/packages/haskell.scm (idris-lightyear, idris-default-arguments):
>   New variables.
> ---
>  gnu/packages/haskell.scm | 71 
> 
>  1 file changed, 71 insertions(+)
>
> diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
> index c55386e2f..2e31c0dbb 100644
> --- a/gnu/packages/haskell.scm
> +++ b/gnu/packages/haskell.scm
> @@ -48,6 +48,7 @@
>#:use-module (guix build-system gnu)
>#:use-module (guix build-system haskell)
>#:use-module (guix download)
> +  #:use-module (guix git-download)
>#:use-module ((guix licenses) #:prefix license:)
>#:use-module (guix packages)
>#:use-module (guix utils)
> @@ -6751,6 +6752,76 @@ can be specified precisely in the type.  The language 
> is closely related to
>  Epigram and Agda.")
>  (license license:bsd-3)))
>  
> +;; Idris modules use the gnu-build-system so that the IDRIS_LIBRARY_PATH is 
> set.
> +(define (idris-default-arguments name)
> +  `(#:modules ((guix build gnu-build-system)
> +   (guix build utils)
> +   (ice-9 ftw)
> +   (ice-9 match))
> +#:phases
> +(modify-phases %standard-phases

[...]

> +  (build-system gnu-build-system)
> +  (native-inputs
> +   `(("idris" ,idris)))
> +  (arguments (idris-default-arguments name))

I think this is asking for a new build system with its own modules and
phases.

IMO you can push this patch as is and provide an ‘idris-build-system’
later on, or do the latter first.  Either way is fine with me as long as
we don’t wait until there are ten users of ‘idris-default-arguments’.

WDYT?

Thanks,
Ludo’.



Re: [PATCH 6/7] gnu: Add idris-bifunctors.

2017-01-03 Thread Ludovic Courtès
David Craven  skribis:

> * gnu/packages/haskell.scm (idris-bifunctors): New variable.

LGTM!



Re: [PATCH 7/7] gnu: Add idris-lens.

2017-01-03 Thread Ludovic Courtès
David Craven  skribis:

> * gnu/packages/haskell.scm (idris-lens): New variable.

Same comment regarding ‘idris-default-arguments’, but otherwise LGTM!



Re: [PATCH 5/7] gnu: Add idris-wl-pprint.

2017-01-03 Thread Ludovic Courtès
David Craven  skribis:

> * gnu/packages/haskell.scm (idris-wl-pprint): New variable.

OK!



Re: [PATCH 1/7] git-download: Add some helpers.

2017-01-03 Thread Ludovic Courtès
David Craven  skribis:

> * guix/git-download.scm (git-version, git-file-name): New variables.
> ---
>  guix/git-download.scm | 10 +-
>  1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/guix/git-download.scm b/guix/git-download.scm
> index 81d1d4fbf..c453aaa6d 100644
> --- a/guix/git-download.scm
> +++ b/guix/git-download.scm
> @@ -30,7 +30,9 @@
>  git-reference-commit
>  git-reference-recursive?
>  
> -git-fetch))
> +git-fetch
> +git-version
> +git-file-name))
>  
>  ;;; Commentary:
>  ;;;
> @@ -110,4 +112,10 @@ HASH-ALGO (a symbol).  Use NAME as the file name, or a 
> generic name if #f."
>#:guile-for-build guile
>#:local-build? #t)))
>  
> +(define (git-version version revision commit)
> +  (string-append version "-" revision "." (string-take commit 7)))
> +
> +(define (git-file-name name version)
> +  (string-append name "-" version "-checkout"))

Please add a docstring.  OK with this change, thank you!

Ludo’.



Re: [PATCH] gnu: doxygen: Use sh from the store.

2017-01-03 Thread Danny Milosavljevic
Thanks for the patch! Looks good to me.

In any case, if we search for "portable_system", we find that there are lots of 
other things that don't use in-store names:

./cite.cpp:  if ((exitCode=portable_system("perl","\""+bib2xhtmlFile+"\" 
"+bibOutputFiles+" \""+
./dia.cpp:  if ((exitCode=portable_system(diaExe,diaArgs,FALSE))!=0) // from 
config
./dia.cpp:if (portable_system("epstopdf",epstopdfArgs)!=0)
./diagram.cpp:if (portable_system("epstopdf",epstopdfArgs)!=0)
./docparser.cpp:  if (portable_system("epstopdf",epstopdfArgs)!=0)
./dot.cpp:if ((exitCode=portable_system(m_dotExe.data(),dotArgs,FALSE))!=0) 
// from config
./dot.cpp:  if 
((exitCode=portable_system(m_dotExe.data(),dotArgs,FALSE))!=0) // from config
./dot.cpp:  if (!m_postCmd.isEmpty() && 
portable_system(m_postCmd.data(),m_postArgs.data())!=0) // seems to be not set 
anywhere
./doxygen.cpp:  if (portable_system(Config_getString("HHC_LOCATION"), 
"index.hhp", Debug::isFlagSet(Debug::ExtCmd))) // from config
./doxygen.cpp:if (portable_system(Config_getString("QHG_LOCATION"), 
args.data(), FALSE)) // from config
./formula.cpp:if (portable_system(latexCmd,"_formulas.tex")!=0) // from 
config
./formula.cpp:  if (portable_system("dvips",dviArgs)!=0)
./formula.cpp:  if 
(portable_system(portable_ghostScriptCommand(),gsArgs)!=0) // 
portable_ghostScriptCommand body hardcodes executable name
./htags.cpp:  bool result=portable_system("htags",commandLine,FALSE)==0;
./msc.cpp:  if ((exitCode=portable_system(mscExe,mscArgs,FALSE))!=0) // from 
config
./msc.cpp:if (portable_system("epstopdf",epstopdfArgs)!=0)
./msc.cpp:  if ((exitCode=portable_system(mscExe,mscArgs,FALSE))!=0) // from 
config
./plantuml.cpp:  if ((exitCode=portable_system(pumlExe,pumlArgs,TRUE))!=0) // 
java, hardcoded
./plantuml.cpp:if ((exitCode=portable_system("epstopdf",epstopdfArgs))!=0)
./portable.cpp:int portable_system(const char *command,const char *args,bool 
commandHasConsole) // should have argument list, not huge string
./portable.h:intportable_system(const char *command,const char 
*args,bool commandHasConsole=TRUE);
./vhdldocgen.cpp:if (portable_system("dot",vlargs)!=0)
./vhdldocgen.cpp:  if (portable_system("dot",vlargs)!=0)

Aaaah found sprintf without max length specifier. 

Dear god is doxygen unsafe. I should refrain from reading the source code of 
some popular packages - it doesn't end well.

If someone is motivated, could also fix the above executable names later.



Re: [PATCH 3/7] gnu: idris: Update to 0.99.

2017-01-03 Thread Ludovic Courtès
BTW, perhaps we should eventually move these packages to idris.scm.
Thoughts?

Ludo’.



Re: [PATCH 2/4] gnu: Add ocaml-zarith.

2017-01-03 Thread Ludovic Courtès
David Craven  skribis:

> * gnu/packages/ocaml.scm (ocaml-zarith): New variable.

LGTM!



Re: [PATCH 1/4] gnu: Use 'license:' prefix in (gnu packages ocaml).

2017-01-03 Thread Ludovic Courtès
David Craven  skribis:

> * gnu/packages/ocaml.scm (ocaml, opam, camlp4, camlp5, hevea, coq,
>   proof-general, ocaml-menhir, lablgtk, unison, ocaml-findlib)[license]:
>   Add prefix.

OK!



Re: [PATCH 3/4] gnu: Reorder imports in (gnu packages ocaml).

2017-01-03 Thread Ludovic Courtès
David Craven  skribis:

> * gnu/packages/ocaml.scm: Reorder imports alphabetically.

OK!



Re: Bad signature on commit 6a34f4ccc8a5d (gnu: python-prompt-toolkit: Update to 1.0.9.)

2017-01-03 Thread Ludovic Courtès
Leo Famulari  skribis:

> On Mon, Jan 02, 2017 at 09:59:20PM +0100, Ludovic Courtès wrote:
>> I’m all for adding it to the repo and recommending it in HACKING.
>> 
>> Leo?
>
> I've attached a patch.

Actually no.  :-)

> I'm not sure where to store the hook.

I’d say in a new etc/guix directory?

Thanks!

Ludo’.



Re: Creating a docker image with Guix

2017-01-03 Thread Ludovic Courtès
Jan Nieuwenhuizen  skribis:

> Ricardo Wurmus writes:
>
>> I just played around with Docker and built up a command to create a
>> Docker image for Emacs.
>
> Nice!
>
>> Can anyone find a more elegant way to do this?
>>
>> guix environment --ad-hoc \
>> coreutils bash emacs-no-x-toolkit -- \
>> sh -c 'tar -c $(guix gc --requisites $GUIX_ENVIRONMENT) | \
>>docker import -c "ONBUILD RUN [\"$GUIX_ENVIRONMENT/bin/ln\", 
>> \"-s\", \"$GUIX_ENVIRONMENT/bin\", \"/bin\"]" - emacs-base' \
>>&& echo -e "FROM emacs-base\nCMD [\"/bin/emacs\"]" | \
>>docker build -
>
> Could this be used to package and deploy our cross built guile.exe?
>
> I find myself kind of waiting for some inspiration to take the next
> step in the MinGW cross builds...

For MinGW, I think it’d be more convenient to just create a standalone
tarball like we do for the Guix binary tarball installation (does Docker
now run on Windows anyway?).

The ‘guix pack’ command I have in mind would generalize what “make
guix-binary.x86_64-linux.tar.xz” does.

Ludo’.



Re: [PATCH 1/5] gnu: gpgme: Update to 1.8.0.

2017-01-03 Thread Ludovic Courtès
Leo Famulari  skribis:

> * gnu/packages/gnupg.scm (gpgme): Update to 1.8.0.
> [arguments]: Don't set 'GPG=gpg2' in #:configure-flags. GnuPG-2.x is
> installed as 'gpg' on Guix.

LGTM, thanks!



Re: [PATCH 2/5] gnu: Add python-gpg.

2017-01-03 Thread Ludovic Courtès
Leo Famulari  skribis:

> * gnu/packages/gnupg.scm (python-gpg, python2-gpg): New variable.

LGTM, thanks!



Re: [PATCH 4/5] gnu: Add python-xdo.

2017-01-03 Thread Ludovic Courtès
Leo Famulari  skribis:

> * gnu/packages/python.scm (python-xdo): New variable.
> (python2-xdo): Use package-with-python2.

LGTM!



Re: [PATCH 3/5] gnu: python2-xdo: Update to 0.3.

2017-01-03 Thread Ludovic Courtès
Leo Famulari  skribis:

> * gnu/packages/python.scm (python2-xdo): Update to 0.3.

LGTM!



Re: [PATCH 5/5] gnu: assword: Update to 0.10.

2017-01-03 Thread Ludovic Courtès
Leo Famulari  skribis:

> * gnu/packages/password-utils.scm (assword): Update to 0.10.
> [arguments]: Use Python 3 instead of Python 2.
> [inputs]: Use Python 3 variants of inputs. Replace python2-pygpgme with
> python-gpg. Remove python2-pygtk. Add python-pygobject.
> [native-inputs]: Replace help2man with txt2man.
> [arguments]: Use $PYTHONPATH in the 'manpage' phase.

Or “Remove PYTHONPATH from 'Makefile' in the 'manpage' phase.”

Otherwise LGTM, thank you!

Ludo’.



Re: [PATCH] gnu: doxygen: Use sh from the store.

2017-01-03 Thread Thomas Danckaert

From: Danny Milosavljevic 
Subject: Re: [PATCH] gnu: doxygen: Use sh from the store.
Date: Tue, 3 Jan 2017 13:28:37 +0100


Thanks for the patch! Looks good to me.

In any case, if we search for "portable_system", we find that there 
are lots of other things that don't use in-store names:


./cite.cpp:  if 
((exitCode=portable_system("perl","\""+bib2xhtmlFile+"\" 
"+bibOutputFiles+" \""+
./dia.cpp:  if 
((exitCode=portable_system(diaExe,diaArgs,FALSE))!=0) // from config

[...]


AFAIU those could work, because "portable_system()" runs “sh -c” with
the specified command.  So if the executables can be found on the
current PATH, I suppose it will work.


Aaaah found sprintf without max length specifier.

Dear god is doxygen unsafe. I should refrain from reading the 
source code of some popular packages - it doesn't end well.


:-) Perhaps this is not so critical, because users likely don't run 
doxygen on arbitrary unverified input data?


Thomas


Re: Empty file in hydra store?

2017-01-03 Thread Jan Synáček
On Tue, Jan 3, 2017 at 9:17 AM, John Darrington
 wrote:
> I got this error (twice) when attempting "guix system init":
>
> Downloading 
> https://mirror.hydra.gnu.org/nar/ciqw5z470c8ihl1kfswj1j3ix6hs092d-module-import
>  (1KiB installed)...
> ^[[K module-import  0B/s 00:00 | 0B 
> transferred
> bzip2: Compressed file ends unexpectedly;
> perhaps it is corrupted?  *Possible* reason follows.
> bzip2: Inappropriate ioctl for device
> Input file = (stdin), output file = (stdout)
> It is possible that the compressed file(s) have become corrupted.
> You can use the -tvv option to test integrity of such files.
> You can use the `bzip2recover' program to attempt to recover
> data from undamaged sections of corrupted files.
> guix substitute: error: corrupt input while restoring 
> '/gnu/store/ciqw5z470c8ihl1kfswj1j3ix6hs092d-module-import' from #{read pipe}#
> killing process 1013
> guix system: error: build failed:
> some substitutes for the outputs of derivation 
> `/gnu/store/9h4nc2fdy2dnklc7rnf61d7993dzsnks-module-import.drv' failed
> (usually happens due to networking issues); try `--fallback' to build 
> derivation from source

I've run into the same issue when trying to install GuixSD.

-- 
Jan Synáček



Re: [PATCH 4/7] gnu: Add idris-lightyear.

2017-01-03 Thread David Craven
> IMO you can push this patch as is and provide an ‘idris-build-system’
> later on, or do the latter first.  Either way is fine with me as long as
> we don’t wait until there are ten users of ‘idris-default-arguments’.
> WDYT?

Regarding that, I think it's harder than it should be to add new build
systems at the moment. I think that adding a new build system requires
a substantial amount of boiler plate.

Would it make sense to have a phase-build-system that could be easily
extended with custom phases and cherry pick from a collection of
generic phases or something like that? Then we could simplify the
gnu-build-system to include only gnu-build-system specific stuff?

This could also be a good time to reinvestigate using gexp's in the
build systems. Would the problem that Danny had with imported modules
compiled not finding libgcrypt be solved by using gexp's?

I'm aware that this would be a substantial effort and maybe it's not
currently that important. But there seems to be interest in also
adding an ocaml-build-system, and the rust-build-system is a work in
progress. Maybe we could ease the transition by having the new build
systems use a phase-build-system as a base, without having to change
existing build-systems and giving some more lead way in experimenting,
since it wouldn't break any existing packages.



Zero-length files cached by nginx

2017-01-03 Thread Ludovic Courtès
John Darrington  skribis:

> and if I try to manually download 
> https://mirror.hydra.gnu.org/nar/ciqw5z470c8ihl1kfswj1j3ix6hs092d-module-import
>
> I get a zero length file. :(

Indeed:

--8<---cut here---start->8---
$ wget -q -O - 
https://mirror.hydra.gnu.org/nar/ciqw5z470c8ihl1kfswj1j3ix6hs092d-module-import 
|wc -c
0
$ wget -q -O - 
https://hydra.gnu.org/nar/ciqw5z470c8ihl1kfswj1j3ix6hs092d-module-import |wc -c
0
--8<---cut here---end--->8---

So the problem is that nginx on hydra.gnu.org cached a zero-length file,
and then nginx on mirror.hydra.gnu.org cached that too.

On hydra.gnu.org, we have:

--8<---cut here---start->8---
/var/cache/nginx/nar# cat 09/87d4a93959df3b0c82baed615b578109
X:kX`��
KEY: http://127.0.0.1:3000/nar/ciqw5z470c8ihl1kfswj1j3ix6hs092d-module-import
HTTP/1.1 200 OK
Content-Type: application/x-nix-archive
Set-Cookie: hydra_session=437ad1277e047114d0a49212805fd1867c0cf914; path=/; 
expires=Tue, 10-Jan-2017 05:43:20 GMT; HttpOnly
Transfer-Encoding: chunked
Date: Tue, 03 Jan 2017 05:43:43 GMT
Connection: close

--8<---cut here---end--->8---

Hydra (the software) produces HTTP chunked-encoded nars, as can be seen
above.

Rereading , it seems
that HTTP clients can detect truncated chunks, but they cannot detect
missing chunks since the total number of chunks is unknown and the
trailer is optional.

Presumably, what happened is that hydra.gnu.org was loaded and Hydra
dropped the connection, and then nginx cached what it got (i.e.,
nothing.)

Seems like the only way to fix it is by using ‘Content-Length’.  At the
very least, we should do that in ‘guix publish’.

For now, I’ve removed the faulty cached item from the nginx cache on
both machines.

Thanks,
Ludo’.



Re: Per-package updaters?

2017-01-03 Thread Ludovic Courtès
Efraim Flashner  skribis:

> On Sat, Dec 31, 2016 at 01:29:15AM +0100, Ludovic Courtès wrote:
>> Hello Guix!
>> 
>> Ricardo Wurmus  skribis:
>> 
>> > we have a couple of generic package updaters (CPAN, CRAN, Bioconductor,
>> > Github, GNU, etc), but they don’t nearly cover all of our packages.  I
>> > wonder if we should add one-off updaters for individual packages that
>> > don’t fall into any of the generic classes of updaters.
>> >
>> > Another question is how to implement them.  Would there be another
>> > optional field in package expressions containing a Guile script to run
>> > to determine updates for the current package?
>> >
>> > What are your opinions on this?
>> 
>> Currently we have ways to provide the generic updates with additional
>> hints.  For instance, we can provide hints to the ‘gnu’ updater:
>> 
>>   (define-public guile-next
>> (package (inherit guile-2.0)
>>   (name "guile-next")
>>   ;; …
>>   (properties '((upstream-name . "guile")
>> (ftp-server . "alpha.gnu.org")
>> (ftp-directory . "/gnu/guile")
>> 
>> I suspect that one-off updaters would most likely use methods very
>> close to the existing updaters.  For instance, we could have a generic
>> FTP updater that would apply to all packages available on FTP; or we
>> could have a generic updater that crawls HTML pages for release numbers
>> and such things.  Then we would have optional properties in packages to
>> specify which method to use, or something along these lines.
>> 
>> WDYT?  Do you have examples in mind?
>> 
>
> Sourceforge has an rss feed for each project they host. For example, for
> libcddb: https://sourceforge.net/projects/libcddb/rss

Looks like something we could use in a generic SourceForge updater.

> Another example is Debian, which has a "watch file" that does something™,
> for example cairo's:
> https://sources.debian.net/src/cairo/1.14.8-1/debian/watch/

Yes, that’s pretty nice.

Ludo’.



Re: Chicken security bugs [was Re: [pe...@more-magic.net: Irregex packages should be updated to 0.9.6]]

2017-01-03 Thread Kei Kebreau
Leo Famulari  writes:

> On Sun, Jan 01, 2017 at 11:04:33PM -0500, Kei Kebreau wrote:
>> Ah, this works excellently. Thanks for the pointer! The two attached
>> patches should do the trick.
>
>> From 41ce29321b21edc698a9ed2ce6dab09f2d190d50 Mon Sep 17 00:00:00 2001
>> From: Kei Kebreau 
>> Date: Sun, 1 Jan 2017 21:49:04 -0500
>> Subject: [PATCH] gnu: chicken: Update to 4.11.1.
>> 
>> * gnu/packages/scheme.scm (chicken): Update to 4.11.1.
>
>>  (source (origin
>>   (method url-fetch)
>> - (uri (string-append "http://code.call-cc.org/releases/";
>> - version "/chicken-" version ".tar.gz"))
>> + (uri (string-append "http://code.call-cc.org/dev-snapshots/";
>> + "/2016/09/12/chicken-" version ".tar.gz"))
>
> I'd leave both URIs there, to make it easier on future readers.
>
> Otherwise, LGTM!

Amended and pushed to master!


signature.asc
Description: PGP signature


Re: [PATCH] make nginx service extensible

2017-01-03 Thread Ludovic Courtès
Hi Julien,

Sorry for the looong delay!  At last I got around to reviewing these
patches from last year.  :-)

Julien Lepiller  skribis:

> From 52f220a2bb5a7186c9dde79b6d9a419bc58feec4 Mon Sep 17 00:00:00 2001
> From: Julien Lepiller 
> Date: Tue, 13 Dec 2016 20:44:31 +0100
> Subject: [PATCH 1/3] gnu: services: Rename nginx vhosts to server.
>
> * gnu/services/web.scm (nginx-vhost-configuration): Rename to...
>   (nginx-server-configuration): ...this.
> ---
>  doc/guix.texi| 20 +-
>  gnu/services/web.scm | 60 
> ++--
>  2 files changed, 40 insertions(+), 40 deletions(-)

Pushed with an adjusted commit log to mention changes in guix.texi as
well.

  
http://git.savannah.gnu.org/cgit/guix.git/commit/?id=3b9b12ef49d0b6d7a8887513acb9e9a1a8325148

> From 237557b0e0cff28dc53f384f2297f658bff06459 Mon Sep 17 00:00:00 2001
> From: Julien Lepiller 
> Date: Tue, 13 Dec 2016 20:48:16 +0100
> Subject: [PATCH 2/3] services: Fix multiple index and server name
>
> * gnu/services/web.scm (config-domain-strings, config-index-string): separate
>   names with a space.

Pushed.

  
http://git.savannah.gnu.org/cgit/guix.git/commit/?id=4e9ae301ce759f9cf9a09f47dc521d0bc8409f6c

> From a0e24caf1f8a7d89c4ecafc57f9cfe2c098dc89c Mon Sep 17 00:00:00 2001
> From: Julien Lepiller 
> Date: Tue, 13 Dec 2016 21:00:53 +0100
> Subject: [PATCH 3/3] services: Make nginx service extensible
>
> * gnu/services/web.scm (nginx-service-type): Make extensible.
>   (nginx-service): Change default options.
> ---
>  doc/guix.texi| 17 +++--
>  gnu/services/web.scm | 34 ++
>  2 files changed, 41 insertions(+), 10 deletions(-)

Pushed with an adjusted commit log to mention all the changes.

  
http://git.savannah.gnu.org/cgit/guix.git/commit/?id=d338237d8c2408e0cd13ecfeb303e327ff7e3d9b

> +@deffn {Scheme Variable} nginx-service-type
> +This is type for the nginx web server.
> +
> +This service can be extended to add more vhosts than the default one.
> +
> +@example
> +(simple-service 'my-extra-vhost nginx-service-type
> +(list (nginx-vhost-configuration (https-port #f)
> + (root 
> "/srv/http/extra-website"
> +@end example

I also changed “vhost” to “server” here.

Thank you!

On a related note: you might have seen the discussion about the ‘root’
parameter of server blocks:

  https://lists.gnu.org/archive/html/help-guix/2017-01/msg5.html

To fix it, we need to have ‘default-nginx-config’ use ‘computed-file’
instead of ‘plain-file’, and to move have ‘default-nginx-server-config’
return a gexp instead of a string.

So something like:

  (define (default-nginx-server-config server)
#~(string-append
"server {"
;; …
"  root " #$(nginx-server-configuration-root server) ";\n"
"};\n"))

  (define (default-nginx-config …)
(computed-file "nginx.conf"
   #~(call-with-output-file #$output
   (lambda (port)
 (display … port)

That way, people could use (file-append …) or similar for ‘root’ and
other parameters that denote a file name.

Could you look into it?  :-)

Ludo’.



Deleting merged wip branches

2017-01-03 Thread David Craven
Hi guix!

I'm looking at some of the branches called wip- and it seems to me
that some have already been merged into master. I think it would be
good to clean them up.

Two examples would be these:
origin/wip-environment-profiles
origin/wip-pam-elogind



[PATCH] gnu: Add wimlib.

2017-01-03 Thread Tobias Geerinckx-Rice
* gnu/packages/backup.scm (wimlib): New variable.
---

Guix,

This adds wimlib, a handy litte tool for liberating files from .wim images.

I've kept the description rather short to avoid any promotion of the format
and platform, for obvious reasons.

Kind regards,

T G-R

 gnu/packages/backup.scm | 35 +++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index 86c6712..44119d2 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2014, 2015 Eric Bavier 
 ;;; Copyright © 2014 Ian Denhardt 
 ;;; Copyright © 2015, 2016 Leo Famulari 
+;;; Copyright © 2017 Tobias Geerinckx-Rice 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -544,3 +545,37 @@ changes are stored.")
 (home-page "https://attic-backup.org/";)
 (license license:bsd-3)
 (properties `((superseded . ,borg)
+
+(define-public wimlib
+  (package
+(name "wimlib")
+(version "1.10.0")
+(source (origin
+  (method url-fetch)
+  (uri (string-append "https://wimlib.net/downloads/";
+  name "-" version ".tar.gz"))
+  (sha256
+   (base32
+"0mbz03smlc054i2m9q2sbqymml9m897kfs84q7g81i26y811p6wq"
+(build-system gnu-build-system)
+(native-inputs
+ `(("pkg-config" ,pkg-config)))
+(inputs
+ `(("fuse" ,fuse)
+   ("libxml2" ,libxml2)
+   ("ntfs-3g" ,ntfs-3g)
+   ("openssl" ,openssl)))
+(arguments
+ `(#:configure-flags (list "--enable-test-support")))
+(home-page "https://wimlib.net/";)
+(synopsis "WIM file manipulation library and utilities")
+(description "wimlib is a C library and set of command-line utilities for
+creating, modifying, extracting, and mounting archives in the Windows Imaging
+Format (@dfn{WIM files}).  It can capture and apply WIMs directly from and to
+NTFS volumes using @code{ntfs-3g}, preserving NTFS-specific attributes.")
+;; wimlib is dual-licenced under either the GPL or LGPL (both version 3 or
+;; later), except those files explicitly marked as being released into the
+;; public domain (CC0) in their headers.
+(license (list license:gpl3+
+   license:lgpl3+
+   license:cc0
-- 
2.9.3




Re: cargo-build-system: cargo-build-flags: --cfg=unix in package recipe

2017-01-03 Thread ng0
Danny Milosavljevic  writes:

> Hi ng0,
>
> On Tue, 03 Jan 2017 11:19:55 +
> ng0  wrote:
>
>> It does indeed, and this would fix the bug I filed.
>> I've cut down the number of crates I packaged from 160 to 81 just
>> by removing the *32-sys and winapi dependencies after reading a
>> bit about the system.
>
> Just a heads-up, if there's a Cargo.lock file (e.g. Rust application) and you 
> do that it will invalidate it. Happened to me. That's why in the WIP patch I 
> don't remove the *32-sys and winapi dependencies if there is a Cargo.lock .
>

Sorry, I'm not a rust developer and after dropping the packaging
process for rust itself sometime in march, I only started on 1st
january with packaging rust and looking into rust again. Can you
explain what you mean?
Unfortunately due to technical reassons I can't give you
view/read access to the branch, so if there's something terribly
wrong/missing you will be able to comment on the weekend or in
the following week. For me it seems to work.
-- 
♥Ⓐ  ng0
PGP keys and more: https://n0is.noblogs.org/ http://ng0.chaosnet.org



Re: cargo-build-system: cargo-build-flags: --cfg=unix in package recipe

2017-01-03 Thread David Craven
> Unfortunately due to technical reassons I can't give you
> view/read access to the branch, so if there's something terribly
> wrong/missing you will be able to comment on the weekend or in
> the following week. For me it seems to work.

Looking forward to seeing your ideas/solution!



Re: FOSDEM 2017 Schedule is there! Change of schedule!:wq

2017-01-03 Thread Pjotr Prins
In other good news: we have a full day instead of a half day!

  https://fosdem.org/2017/schedule/track/gnu_guile/

All talks have more time and we can still add a few talks. The final
schedule has to be ready by this Saturday.

So, if anyone has ideas, please shoot. Also note it is now on Sunday.

Pj.

On Mon, Dec 19, 2016 at 08:37:44AM +0100, Alex Sassmannshausen wrote:
> 
> Pjotr Prins writes:
> 
> > Check it out K.3.201 - looks awesome!
> >
> > https://fosdem.org/2017/schedule/day/saturday/
> 
> Indeed, most excellent!  Looking forward to this greatly :-)
> 
> Alex
> 

-- 



Re: [PATCH] gnu: Use hurd-triplet? to check if GNU/Hurd.

2017-01-03 Thread Ludovic Courtès
Hi!

Manolis Ragkousis  skribis:

> Hello Kei,
>
> On 2 January 2017 at 22:11, Kei Kebreau  wrote:
>>
>> LGTM. I assume this one will be pushed to master as well?
>>
>> P.S. Is there currently a way to successfully build the bootstrap
>> binaries for Hurd from Guix on x86_64 Linux?
>
> If you merge master into core-updates locally, it's as simple as `guix
> build --target=i586-pc-gnu bootstrap-tarballs'

Woohoo!

> You need to merge the two branches, because the one needs some patches
> from the other.

Is it just 9b5f498deff516a9799a132fb04b40fb9ccfd7a6?  That commit could
also go to master.

Thank you Manolis!

Ludo’.



Re: [PATCH 4/7] gnu: Add idris-lightyear.

2017-01-03 Thread Ludovic Courtès
David Craven  skribis:

>> IMO you can push this patch as is and provide an ‘idris-build-system’
>> later on, or do the latter first.  Either way is fine with me as long as
>> we don’t wait until there are ten users of ‘idris-default-arguments’.
>> WDYT?
>
> Regarding that, I think it's harder than it should be to add new build
> systems at the moment. I think that adding a new build system requires
> a substantial amount of boiler plate.
>
> Would it make sense to have a phase-build-system that could be easily
> extended with custom phases and cherry pick from a collection of
> generic phases or something like that? Then we could simplify the
> gnu-build-system to include only gnu-build-system specific stuff?

Yeah, it’s too much boilerplate, though in this case I think it would be
quite reasonable

  (define (set-build-arguments b)
(bag
  (inherit b)
  (arguments '(#:modules … #:phases …

  (define idris-build-system
(build-system
  (lower (compose set-build-arguments
  (build-system-lower gnu-build-system)

and then you could have:

  (define-module (guix build idris-build-system)
#:use-module ((guix build gnu-build-system) #:prefix gnu:))
#:export (%standard-phases))

  (define %standard-phases
(modify-phases gnu:%standard-phases …))

> This could also be a good time to reinvestigate using gexp's in the
> build systems. Would the problem that Danny had with imported modules
> compiled not finding libgcrypt be solved by using gexp's?

The ‘wip-build-systems-gexp’ branch is still around and I plan to look
into it again…

> I'm aware that this would be a substantial effort and maybe it's not
> currently that important. But there seems to be interest in also
> adding an ocaml-build-system, and the rust-build-system is a work in
> progress. Maybe we could ease the transition by having the new build
> systems use a phase-build-system as a base, without having to change
> existing build-systems and giving some more lead way in experimenting,
> since it wouldn't break any existing packages.

I’m not sure what a ‘phase-build-system’ would look like, if not like
‘gnu-build-system’, but it’s an interesting idea to explore.

Dave Thompson recently suggested that maybe phases could be first-class,
i.e., directly exposed on the “host side”, which is indeed a valid
design question.  Another thing worth exploring!

Ludo’.



Re: Deleting merged wip branches

2017-01-03 Thread Ludovic Courtès
David Craven  skribis:

> I'm looking at some of the branches called wip- and it seems to me
> that some have already been merged into master. I think it would be
> good to clean them up.
>
> Two examples would be these:
> origin/wip-environment-profiles
> origin/wip-pam-elogind

Agreed, you can already delete these two!

Ludo’.



Re: [PATCH 4/7] gnu: Add idris-lightyear.

2017-01-03 Thread David Craven
> Regarding that, I think it's harder than it should be to add new build
> systems at the moment. I think that adding a new build system requires
> a substantial amount of boiler plate.

Actually I withdraw this statement. Except copying the guile-for-build
procedure into every build-system, there isn't any boilerplate. I
think the impression that there was boilerplate came from the fact
that I copied an existing build-system before I understood how it
worked.



Re: [PATCH] gnu: Use hurd-triplet? to check if GNU/Hurd.

2017-01-03 Thread Manolis Ragkousis
Hello,

On 01/03/17 16:56, Ludovic Courtès wrote:
> Is it just 9b5f498deff516a9799a132fb04b40fb9ccfd7a6?  That commit could
> also go to master.

Actually we also need b810a85019ab3c4ee1f889d0751b8eb06157dadc which
sets gcc-5 as default. The latest Hurish glibc needs it.

Manolis



Re: [PATCH 1/4] gnu: Use 'license:' prefix in (gnu packages ocaml).

2017-01-03 Thread Danny Milosavljevic
LGTM!



[PATCH] Creating a docker image with Guix

2017-01-03 Thread Ricardo Wurmus

Ludovic Courtès  writes:

> I’m not familiar enough with Docker but I’m under the impression that we
> should be able to generate an image without even using Docker.  :-)

The attached patch adds a Docker export feature, so you can do this:

docker load < \
  $(guix archive --export-docker-image=$(readlink -f ~/.guix-profile))

Then you can use “docker images” to show the available images.  For some
reason Docker won’t show the name and tag “guix archive” generates, so
just take the most recently added image.  Then run it, e.g. like this:

docker run --rm -ti d1472905 /bin/emacs

This starts the container and runs “/bin/emacs” interactively.  During
export “guix archive” also links the item’s “./bin” directory to “/bin”,
so users can run commands without having to know the long store path.

I used it successfully to build an Emacs Docker image like this:

guix environment --ad-hoc coreutils bash emacs-no-x-toolkit
docker load < $(guix archive --export-docker-image=$GUIX_ENVIRONMENT)

~~ Ricardo

>From d600db91078f28d82324671e3d43acaddc9b9608 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus 
Date: Tue, 3 Jan 2017 16:20:15 +0100
Subject: [PATCH] guix: Add Docker image export.

* guix/docker.scm: New file.
* Makefile.am (MODULES): Register it.
* guix/scripts/archive.scm (show-help, %options, guix-archive): Add
support for "--export-docker-image".
* doc/guix.texi (Invoking guix archive): Document it.
---
 Makefile.am  |   1 +
 doc/guix.texi|   6 +++
 guix/docker.scm  | 120 +++
 guix/scripts/archive.scm |  11 +
 4 files changed, 138 insertions(+)
 create mode 100644 guix/docker.scm

diff --git a/Makefile.am b/Makefile.am
index fb08a004b..4317b83a2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -158,6 +158,7 @@ MODULES =	\
 if HAVE_GUILE_JSON
 
 MODULES +=	\
+  guix/docker.scm	   			\
   guix/import/github.scm   			\
   guix/import/json.scm\
   guix/import/crate.scm\
diff --git a/doc/guix.texi b/doc/guix.texi
index 8c65f44da..1dd501261 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -2438,6 +2438,12 @@ Read a list of store file names from the standard input, one per line,
 and write on the standard output the subset of these files missing from
 the store.
 
+@item --export-docker-image=@var{directory}
+@cindex docker, export
+Recursively export the specified store directory as a Docker image in
+tar archive format.  The generated archive can be loaded by Docker using
+@command{docker load}.
+
 @item --generate-key[=@var{parameters}]
 @cindex signing, archives
 Generate a new key pair for the daemon.  This is a prerequisite before
diff --git a/guix/docker.scm b/guix/docker.scm
new file mode 100644
index 0..0f6c3bf90
--- /dev/null
+++ b/guix/docker.scm
@@ -0,0 +1,120 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2017 Ricardo Wurmus 
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see .
+
+(define-module (guix docker)
+  #:use-module (guix hash)
+  #:use-module (guix store)
+  #:use-module ((guix build utils)
+#:select (delete-file-recursively
+  with-directory-excursion))
+  #:use-module (json)
+  #:use-module (rnrs bytevectors)
+  #:export (build-docker-image))
+
+(define (hexencode bv)
+  "Return the hexadecimal representation of the bytevector BV."
+  (format #f "~{~2,'0x~}" (bytevector->u8-list bv)))
+
+(define (docker-id path)
+  "Generate a 256-bit identifier in hexadecimal encoding for the Docker image
+containing the closure at PATH."
+  (hexencode (sha256 (string->utf8 path
+
+(define (layer-diff-id layer)
+  "Generate a layer DiffID for the given LAYER archive."
+  (string-append "sha256:" (hexencode (file-sha256 layer
+
+(define spec-version "1.0")
+
+(define (image-description id time)
+  "Generate a simple image description."
+  `((id . ,id)
+(created . ,time)
+(container_config . #nil)))
+
+(define (manifest id)
+  "Generate a simple image manifest."
+  `(((Config . "config.json")
+ (RepoTags . #nil)
+ (Layers . (,(string-append id "/layer.tar"))
+
+(define (repositories path id)
+  "Generate a repositories file referencing PATH and the image ID."
+  `((,(basename path) . ((latest . ,id)
+
+;; See https://github.com/opencontainers/image-s

Re: FOSDEM 2017 Schedule is there! Change of schedule!:wq

2017-01-03 Thread Amirouche Boubekki

On 2017-01-03 15:46, Pjotr Prins wrote:

In other good news: we have a full day instead of a half day!

  https://fosdem.org/2017/schedule/track/gnu_guile/

All talks have more time and we can still add a few talks. The final
schedule has to be ready by this Saturday.


Great news :)


So, if anyone has ideas, please shoot. Also note it is now on Sunday.


None on my side.



Pj.

On Mon, Dec 19, 2016 at 08:37:44AM +0100, Alex Sassmannshausen wrote:


Pjotr Prins writes:

> Check it out K.3.201 - looks awesome!
>
> https://fosdem.org/2017/schedule/day/saturday/

Indeed, most excellent!  Looking forward to this greatly :-)

Alex



--
Amirouche ~ amz3 ~ http://www.hyperdev.fr



Re: [PATCH 6/6] gnu: Add grub-efi.

2017-01-03 Thread Ludovic Courtès
Howdy!

l...@gnu.org (Ludovic Courtès) skribis:

> Marius Bakke  skribis:
>
 OK. I'll try to find out why tests don't work with the UEFI variant
 first in order to at least write a meaningful comment. Maybe qemu needs
 UEFI support or something like that.
>>>
>>> It might be that we no longer need QEMU 1.3.1 to run the tests (see the
>>> top of gnu/packages/grub.scm)?
>>
>> The problem is missing UEFI firmware for the qemu calls. But we indeed
>> no longer need qemu@1.3.1 for the tests, at least on x86_64. I replaced
>> it with 'qemu-minimal'. Pushed!
>
> Great!
>
> I’m failing at installing GuixSD on a new laptop I have here.
> ‘efibootmgr’ exits with code 2 and this message:
>
>   EFI variables are not supported on this system.
>
> (which ‘grub-install’ happily ignores.)
>
> This is because /sys/firmware/efi is missing, which apparently is
> because I booted off the GuixSD USB image (“legacy”) and not in EFI
> mode.

So it turns out that GRUB was properly installed in the EFI partition,
but the effect of the efivar failure above was that the computer would
not boot it automatically.

I found a “Boot from file” menu entry in HP’s BIOS, under “EFI boot”,
and from there I could select ‘grubx64.efi’ and boot GRUB.

There I typed at the GRUB command prompt:

  insmod efi_gop
  insmod efi_uga
  cat /var/guix/gcroots/grub.cfg

and typed the ‘search.file’, ‘linux’, and ‘initrd’ that appear
‘grub.cfg’ (“source /…/grub.cfg” did not work.)

That actually booted GuixSD.  This time it had /sys/firmware/efi.  Thus
I re-run ‘grub-install’ from there and upon reboot, the thing would
immediately boot GRUB!  \o/

I still need to sort out a few shenanigans but I’m getting there.

To be continued…

Ludo’.



Re: [PATCH 6/6] gnu: Add grub-efi.

2017-01-03 Thread Chris Marusich
l...@gnu.org (Ludovic Courtès) writes:

> Howdy!
>
> There I typed at the GRUB command prompt:
>
>   insmod efi_gop
>   insmod efi_uga
>   cat /var/guix/gcroots/grub.cfg

Slightly off-topic question: how does one find out what the possible
values for X are in a command like "insmod X"?  I've searched before and
I couldn't find a list in the manual, so I presume it's something you
have to "just know" at runtime, somehow.

> and typed the ‘search.file’, ‘linux’, and ‘initrd’ that appear
> ‘grub.cfg’ (“source /…/grub.cfg” did not work.)
>
> That actually booted GuixSD.  This time it had /sys/firmware/efi.  Thus
> I re-run ‘grub-install’ from there and upon reboot, the thing would
> immediately boot GRUB!  \o/
>
> I still need to sort out a few shenanigans but I’m getting there.

Sweet!  I've been tentatively following this thread; glad to see you're
making progress.

-- 
Chris


signature.asc
Description: PGP signature


Re: [PATCH] Creating a docker image with Guix

2017-01-03 Thread Chris Marusich
Ricardo Wurmus  writes:

> Ludovic Courtès  writes:
>
>> I’m not familiar enough with Docker but I’m under the impression that we
>> should be able to generate an image without even using Docker.  :-)
>
> The attached patch adds a Docker export feature, so you can do this:
>
> docker load < \
>   $(guix archive --export-docker-image=$(readlink -f ~/.guix-profile))
>
> [...]
>
> I used it successfully to build an Emacs Docker image like this:
>
> guix environment --ad-hoc coreutils bash emacs-no-x-toolkit
> docker load < $(guix archive --export-docker-image=$GUIX_ENVIRONMENT)

Wow!  That's pretty cool.  If it's this easy to make a Docker image, I'm
sure it'll be a good incentive for Docker users to try out Guix!

What happens if I invoke this command while GC is trying to delete the
specified path?

> +;; See https://github.com/opencontainers/image-spec/blob/master/config.md
> +(define (config layer time)
> +  "Generate a minimal image configuratio for the given LAYER file."

Minor typo.

-- 
Chris


signature.asc
Description: PGP signature


Re: Thoughts on GuixSD and IDS like AIDE and Tripwire

2017-01-03 Thread dian_cecht
On Mon, Jan 02, 2017 at 11:28:55PM +0100, Ludovic Courtès wrote:
> Hi!
> 
> dian_ce...@zoho.com skribis:
> 
> > P.S. On second thought (and after a cup of coffee), could the database file 
> > be
> > generated using the same format programs like md5sum, sha1sum, et al use so 
> > we'd
> > just have to run (for example) md5sum -C database?
> 
> That sounds like a good idea to complement ‘guix publish’ + ‘guix
> challenge’.
> 
> A simple way to dump the database is like this:
> 
> --8<---cut here---start->8---
> $ sudo sqlite3 /var/guix/db/db.sqlite
> SQLite version 3.14.1 2016-08-11 18:53:32
> Enter ".help" for usage hints.
> sqlite> select path,hash from validpaths;
> /gnu/store/98xcn26354r70nyamkgywqzjxvw3qikx-guile-2.0.9.tar.xz|sha256:a475e4bad3d39a94f01c590f239e80dbd84688e480ca74de3e335f6f36a0d975
> /gnu/store/hyh7kwkqlxc0x9s8cs5mjnih5v524486-make-impure-dirs.patch|sha256:d697a02be5fea425ac93eb650b1359e3e8053d84f70677c8c0a80291ed03585e
> /gnu/store/hv15hq91vm3ajv23lkq0kgd56d4kmd08-findutils-absolute-paths.patch|sha256:c4fc83e01a7f448b598905bcf6ca39b5ba0f1f0f131145b379f0de9c2fbe109b
> […]
> --8<---cut here---end--->8---
> 
> (Of course you have to trust the database to contain the right hashes in
> the first place.)
> 
> Ludo’.

That is part of the reason I also suggest an external utility, and ideally one
that is simple enough that people could (re)implement it in their language of
choice (so that what and where the script is is generally
unknown/unknowable/really hard to find, as well as much more difficult to
compromise via simple methods such as patching).

Heck, since your normal user can read the store, one should be able to
reasonably compare the currently stored database to something the user has
generated via

# Please note that I'm not 100% sure this is correct. I don't think you'd want
# to include .link files, but I'm unable to find a quick way in the minute or
# two I wrote this to avoid them. Plus I'd expect some things to be checksumed
# that don't really need it.
$ find /gnu/store/ -type f -print0 | xargs -0 sha256sum

or something similar, given that sha256sum isn't compromised. Once the two are
known to be in sync (ideally with some form of external verification, and by
external I mean booting and mounting the system under a Known Good liveUSB or
similar and checking the database against the system's sha256sum as well as the
liveUSB's Known Good version), then comparing to another person's checksum dump
(ideally someone you know properly checks their system via the aforementioned or
better method) to try and catch potential unwanted modification.

The obvious problem would be removing entries for programs known to not have a
deterministic build (which makes all of this entirely moot for said program),
and hope they aren't compromised and aren't Very Important to the system.




Re: guix build fails: can't change into `/var/tmp/guix-build-...drv-0'

2017-01-03 Thread Hartmut Goebel
Am 02.01.2017 um 17:53 schrieb Leo Famulari:
> Could it be related to this bug?
>
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25242
Yes, this looks like my problem.

Now I just need to find out how to update. `guix pull` as of yesterday
still has version 0.12.0-2.b291.

-- 
Regards
Hartmut Goebel

| Hartmut Goebel  | h.goe...@crazy-compilers.com   |
| www.crazy-compilers.com | compilers which you thought are impossible |




Re: [PATCH] Creating a docker image with Guix

2017-01-03 Thread Ricardo Wurmus

Chris Marusich  writes:

> What happens if I invoke this command while GC is trying to delete the
> specified path?

It will do weird things, I guess.  It’s best to do this inside of “guix
environment” as I demonstrated because while you’re in the environment
the temporary profile is protected from GC.

>> +;; See https://github.com/opencontainers/image-spec/blob/master/config.md
>> +(define (config layer time)
>> +  "Generate a minimal image configuratio for the given LAYER file."
>
> Minor typo.

Oops!  Thanks.

-- 
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
http://elephly.net




Re: [PATCH 1/1] gnu: unrtf: Fix CVE-2016-10091.

2017-01-03 Thread Marius Bakke
Leo Famulari  writes:

> * gnu/packages/patches/unrtf-CVE-2016-10091.patch: New file.
> * gnu/local.mk (dist_patch_DATA): Add it.
> * gnu/packages/unrtf.scm (unrtf)[source]: Use it.

[...]

> diff --git a/gnu/packages/patches/unrtf-CVE-2016-10091.patch 
> b/gnu/packages/patches/unrtf-CVE-2016-10091.patch
> new file mode 100644
> index 0..0a58b40db
> --- /dev/null
> +++ b/gnu/packages/patches/unrtf-CVE-2016-10091.patch
> @@ -0,0 +1,224 @@
> +Fix CVE-2016-10091 (stack-based buffer overflows in cmd_* functions):
> +
> +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-10091
> +https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=849705
> +http://seclists.org/oss-sec/2016/q4/787
> +
> +Patch copied from Debian:
> +
> +https://anonscm.debian.org/cgit/collab-maint/unrtf.git/commit/?h=jessie&id=7500a48fb0fbad3ab963fb17560b2f90a8a485c8
> +
> +The Debian patch adapts this upstream commit so that it can be applied
> +to the 0.21.9 release tarball:
> +
> +http://hg.savannah.gnu.org/hgweb/unrtf/rev/3b16893a6406

Isn't the Debian patch the same as this upstream commit? I can't spot
the difference with a cursory glance.


> +diff --git a/debian/patches/series b/debian/patches/series
> +new file mode 100644
> +index 000..7868249
> +--- /dev/null
>  b/debian/patches/series
> +@@ -0,0 +1 @@
> ++0001-Replace-all-instances-of-sprintf-with-snprintf-and-a.patch

This part we surely don't need ;-)

Unless the Debian patch fixes other issues than upstream revision
3b16893a6406 I would just pick and link to that, skipping the Debian
step. WDYT?

Thanks for taking care of this!


signature.asc
Description: PGP signature


Re: Bad signature on commit 6a34f4ccc8a5d (gnu: python-prompt-toolkit: Update to 1.0.9.)

2017-01-03 Thread Leo Famulari
On Tue, Jan 03, 2017 at 01:34:31PM +0100, Ludovic Courtès wrote:
> Leo Famulari  skribis:
> 
> > On Mon, Jan 02, 2017 at 09:59:20PM +0100, Ludovic Courtès wrote:
> >> I’m all for adding it to the repo and recommending it in HACKING.
> >> 
> >> Leo?
> >
> > I've attached a patch.
> 
> Actually no.  :-)

Oops! I'll try again ;)

> > I'm not sure where to store the hook.
> 
> I’d say in a new etc/guix directory?
From 837f7c717b201998810a46b8dadf8ba2165dde69 Mon Sep 17 00:00:00 2001
From: Leo Famulari 
Date: Tue, 3 Jan 2017 01:19:25 -0500
Subject: [PATCH] doc: Add a Git hook that verifies signatures before pushing.

* HACKING (Commit Access): Describe the pre-push Git hook.
* etc/guix/pre-push: New file.
---
 HACKING   |  5 +
 etc/guix/pre-push | 57 +++
 2 files changed, 62 insertions(+)
 create mode 100755 etc/guix/pre-push

diff --git a/HACKING b/HACKING
index 28948b3e2..364eedf6b 100644
--- a/HACKING
+++ b/HACKING
@@ -4,6 +4,7 @@
 
 Copyright © 2012, 2013, 2014, 2016 Ludovic Courtès 
 Copyright © 2015 Mathieu Lirzin 
+Copyright © 2017 Leo Famulari 
 
   Copying and distribution of this file, with or without modification,
   are permitted in any medium without royalty provided the copyright
@@ -43,6 +44,10 @@ configure Git to automatically sign commits, run:
   git config commit.gpgsign true
   git config user.signingkey CABBA6EA1DC0FF33
 
+You can prevent yourself from accidentally pushing unsigned commits to Savannah
+by using the pre-push Git hook called 'pre-push'. It's located at
+'etc/guix/pre-push'.
+
 For anything else, please post to guix-devel@gnu.org and leave time for a
 review, without committing anything.  If you didn’t receive any reply
 after two weeks, and if you’re confident, it’s OK to commit.
diff --git a/etc/guix/pre-push b/etc/guix/pre-push
new file mode 100755
index 0..c894c5a9e
--- /dev/null
+++ b/etc/guix/pre-push
@@ -0,0 +1,57 @@
+#!/bin/sh
+
+# This hook script prevents the user from pushing to Savannah if any of the new
+# commits' OpenPGP signatures cannot be verified.
+
+# Called by "git push" after it has checked the remote status, but before
+# anything has been pushed.  If this script exits with a non-zero status 
nothing
+# will be pushed.
+#
+# This hook is called with the following parameters:
+#
+# $1 -- Name of the remote to which the push is being done
+# $2 -- URL to which the push is being done
+#
+# If pushing without using a named remote those arguments will be equal.
+#
+# Information about the commits which are being pushed is supplied as lines to
+# the standard input in the form:
+#
+#  
+
+z40=
+
+# Only use the hook when pushing to Savannah.
+case "$2" in
+*git.sv.gnu.org*)
+   break
+   ;;
+*)
+   exit 0
+   ;;
+esac
+
+while read local_ref local_sha remote_ref remote_sha
+do
+   if [ "$local_sha" = $z40 ]
+   then
+   # Handle delete
+   :
+   else
+   if [ "$remote_sha" = $z40 ]
+   then
+   # New branch, examine all commits
+   range="$local_sha"
+   else
+   # Update to existing branch, examine new commits
+   range="$remote_sha..$local_sha"
+   fi
+
+   # Verify the signatures of all commits being pushed.
+   git verify-commit $(git rev-list $range) >/dev/null 2>&1
+
+   exit $?
+   fi
+done
+
+exit 0
-- 
2.11.0



signature.asc
Description: PGP signature


Re: guix build fails: can't change into `/var/tmp/guix-build-...drv-0'

2017-01-03 Thread Leo Famulari
On Tue, Jan 03, 2017 at 05:43:36PM +0100, Hartmut Goebel wrote:
> Am 02.01.2017 um 17:53 schrieb Leo Famulari:
> > Could it be related to this bug?
> >
> > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25242
> Yes, this looks like my problem.
> 
> Now I just need to find out how to update. `guix pull` as of yesterday
> still has version 0.12.0-2.b291.

I think we need to make a new guix-devel snapshot.



Re: [PATCH 5/5] gnu: assword: Update to 0.10.

2017-01-03 Thread Leo Famulari
On Tue, Jan 03, 2017 at 01:41:15PM +0100, Ludovic Courtès wrote:
> Leo Famulari  skribis:
> 
> > * gnu/packages/password-utils.scm (assword): Update to 0.10.
> > [arguments]: Use Python 3 instead of Python 2.
> > [inputs]: Use Python 3 variants of inputs. Replace python2-pygpgme with
> > python-gpg. Remove python2-pygtk. Add python-pygobject.
> > [native-inputs]: Replace help2man with txt2man.
> > [arguments]: Use $PYTHONPATH in the 'manpage' phase.
> 
> Or “Remove PYTHONPATH from 'Makefile' in the 'manpage' phase.”

That's better, thanks!

> Otherwise LGTM, thank you!

Pushed!



Re: [PATCH 4/7] gnu: Add idris-lightyear.

2017-01-03 Thread David Craven
> I’m not sure what a ‘phase-build-system’ would look like, if not like
> ‘gnu-build-system’, but it’s an interesting idea to explore.

I think you are right, it would look exactly like the
gnu-build-system. I think my issue wasn't technical but psychological.
It feels like other build-systems aren't first class citizens, but
that's a minor issue and wouldn't change anything worthwhile.

> Dave Thompson recently suggested that maybe phases could be first-class,
> i.e., directly exposed on the “host side”, which is indeed a valid
> design question.  Another thing worth exploring!

Sounds interesting. Did he provide an example of what that would look like?

> The ‘wip-build-systems-gexp’ branch is still around and I plan to look
> into it again…

I was impressed by how easy it was to rebase it after 1.5 years!

> Yeah, it’s too much boilerplate, though in this case I think it would be
> quite reasonable

Yes that looks quite reasonable.

Thank!
David



[PATCH 00/96] ocaml-build-system and packages

2017-01-03 Thread Julien Lepiller
Hi, it's a bit late for christmas, so let's call this ocamlismas ;).

Here are ~100 patches that:

- Add an ocaml-build-system
- Change the ocaml compiler, camlp4 and findlib to work nicely with it
- A lot of packages (all dependencies of bap, and bap itself).

I took one patch from debian to help the compiler produce reproducible binaries.
Without this patch some modules would embed temporary file names. A few packages
also had reproducibility issues, but that is fixed, except for one of them.

Julien Lepiller (96):
  gnu: ocaml: Add a .file directive to generated .s files
  gnu: ocaml: Add CAML_LD_LIBRARY_PATH search-path
  gnu: camlp4: compile native
  gnu: Add ocaml-build-system.
  gnu: ocaml: Use a prefix for license field.
  gnu: ocaml: Use a helper function to download from ocaml-forge.
  gnu: camlp4: Install camlp4 META file.
  gnu: Add ocaml-ounit.
  gnu: Add camlzip
  gnu: Add ocamlmod.
  gnu: Add ocaml-zarith.
  gnu: Add ocaml-frontc
  gnu: Add ocaml-qtest
  gnu: Add ocaml-stringext
  gnu: Add ocaml-bisect
  gnu: Add ocaml-bitstring
  gnu: Add ocaml-result
  gnu: Add ocaml-topkg
  gnu: Add ocaml-rresult
  gnu: Add ocaml-mtime
  gnu: Add ocaml-cmdliner
  gnu: Add ocaml-fmt
  gnu: Add ocaml-astring
  gnu: Add ocaml-alcotest
  gnu: Add ocaml-ppx-tools
  gnu: Add ocaml-react
  gnu: Add ocaml-ssl
  gnu: Add ocaml-lwt
  gnu: Add ocaml-logs
  gnu: Add ocaml-fpath
  gnu: Add ocaml-bos
  gnu: Add ocaml-xmlm
  gnu: Add ocaml-ulex
  gnu: Add ocaml-uchar
  gnu: Add ocaml-uutf
  gnu: Add ocaml-jsonm
  gnu: Add ocaml-ocurl
  gnu: Add ocaml-base64
  gnu: Add ocamlify
  gnu: Add omake
  gnu: Add ocaml-batteries
  gnu: Add ocaml-pcre
  gnu: Add ocaml-expect
  gnu: Add ocaml-fileutils
  gnu: Add ocaml-oasis
  gnu: Add ocaml-js-build-tools
  gnu: Add ocaml-bin-prot
  gnu: Add ocaml-fieldslib
  gnu: Add ocaml-ppx-core
  gnu: Add ocaml-ppx-optcomp
  gnu: Add ocaml-ppx-driver
  gnu: Add ocaml-cppo
  gnu: Add ocaml-ppx-deriving
  gnu: Add ocaml-ppx-type-conv
  gnu: Add ocaml-ppx-inline-test
  gnu: Add ocaml-ppx-bench
  gnu: Add ocaml-ppx-compare
  gnu: Add ocaml-sexplib
  gnu: Add ocaml-typerep
  gnu: Add ocaml-variantslib
  gnu: Add ocaml-ppx-sexp-conv
  gnu: Add ocaml-ppx-variants-conv
  gnu: Add ocaml-ppx-here
  gnu: Add ocaml-ppx-assert
  gnu: Add ocaml-ppx-enumerate
  gnu: Add ocaml-ppx-let
  gnu: Add ocaml-ppx-typerep-conv
  gnu: Add ocaml-ppx-sexp-value
  gnu: Add ocaml-ppx-pipebang
  gnu: Add ocaml-ppx-bin-prot
  gnu: Add ocaml-ppx-fail
  gnu: Add ocaml-ppx-custom-printf
  gnu: Add ocaml-ppx-sexp-message
  gnu: Add ocaml-ppx-fields-conv
  gnu: Add ocaml-re
  gnu: Add ocaml-ppx-expect
  gnu: Add ocaml-ppx-jane
  gnu: Add ocaml-core-kernel
  gnu: Add ocaml-async-kernel
  gnu: Add ocaml-async-rpc-kernel
  gnu: Add ocaml-core
  gnu: Add ocaml-async-unix
  gnu: Add ocaml-async-extra
  gnu: Add ocaml-async
  gnu: Add ocaml-ocplib-endian
  gnu: Add ocaml-cstruct
  gnu: Add ocaml-hex
  gnu: Add ocaml-ezjsonm
  gnu: Add ocaml-uri
  gnu: Add ocaml-easy-format
  gnu: Add ocaml-optcomp
  gnu: Add ocaml-piqilib
  gnu: Add ocaml-uuidm
  gnu: Add ocamlgraph
  gnu: Add ocaml-piqi
  gnu: Add bap

 Makefile.am|2 +
 gnu/local.mk   |7 +
 gnu/packages/ocaml.scm | 2305 +++-
 .../patches/ocaml-Add-a-.file-directive.patch  |   96 +
 ...ml-bisect-fix-camlp4-in-another-directory.patch |  125 ++
 .../patches/ocaml-bitstring-fix-configure.patch|   53 +
 .../patches/ocaml-janestreet-fix-libdir.patch  |   36 +
 .../patches/ocaml-omake-fix-non-determinism.patch  |   41 +
 .../patches/ocaml-piqilib-fix-makefile.patch   |   47 +
 .../ocamlgraph-honor-source-date-epoch.patch   |   34 +
 guix/build-system/ocaml.scm|  181 ++
 guix/build/ocaml-build-system.scm  |  119 +
 12 files changed, 3021 insertions(+), 25 deletions(-)
 create mode 100644 gnu/packages/patches/ocaml-Add-a-.file-directive.patch
 create mode 100644 
gnu/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch
 create mode 100644 gnu/packages/patches/ocaml-bitstring-fix-configure.patch
 create mode 100644 gnu/packages/patches/ocaml-janestreet-fix-libdir.patch
 create mode 100644 gnu/packages/patches/ocaml-omake-fix-non-determinism.patch
 create mode 100644 gnu/packages/patches/ocaml-piqilib-fix-makefile.patch
 create mode 100644 
gnu/packages/patches/ocamlgraph-honor-source-date-epoch.patch
 create mode 100644 guix/build-system/ocaml.scm
 create mode 100644 guix/build/ocaml-build-system.scm

-- 
2.11.0




[PATCH 07/96] gnu: camlp4: Install camlp4 META file.

2017-01-03 Thread Julien Lepiller
* gnu/packages/ocaml.scm (ocaml-findlib): Delete camlp4 META file.
* gnu/packages/ocaml.scm (camlp4): Install in OCAMLPATH and install its META
file.
---
 gnu/packages/ocaml.scm | 21 ++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 6bb0e4826..7d9d363b5 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -258,9 +258,19 @@ Git-friendly development workflow.")
  ;; This is a home-made 'configure' script.
  (let ((out (assoc-ref outputs "out")))
(zero? (system* "./configure"
-   (string-append "--libdir=" out "/lib")
+   (string-append "--libdir=" out
+  "/lib/ocaml/site-lib")
(string-append "--bindir=" out "/bin")
-   (string-append "--pkgdir=" out)
+   (string-append "--pkgdir=" out
+  
"/lib/ocaml/site-lib"))
+  (add-after 'install 'install-meta
+(lambda* (#:key outputs #:allow-other-keys)
+  (let ((out (assoc-ref outputs "out")))
+(substitute* "camlp4/META.in"
+  (("directory = .*")
+(string-append "directory = \"" out
+   "/lib/ocaml/site-lib/camlp4\"\n")))
+(zero? (system* "make" "install-META"
 (home-page "https://github.com/ocaml/camlp4";)
 (synopsis "Write parsers in OCaml")
 (description
@@ -725,7 +735,12 @@ to the other.")
 "-config" (string-append out "/etc/ocamfind.conf")
 "-mandir" (string-append out "/share/man")
 "-sitelib" (string-append out "/lib/ocaml/site-lib")
-"-with-toolbox")))
+"-with-toolbox"
+  (add-after 'install 'remove-camlp4
+(lambda* (#:key outputs #:allow-other-keys)
+  (let ((out (assoc-ref outputs "out")))
+(delete-file-recursively
+  (string-append out 
"/lib/ocaml/site-lib/camlp4"
 (home-page "http://projects.camlcity.org/projects/findlib.html";)
 (synopsis "Management tool for OCaml libraries")
 (description
-- 
2.11.0




[PATCH 06/96] gnu: ocaml: Use a helper function to download from ocaml-forge.

2017-01-03 Thread Julien Lepiller
* gnu/packages/ocaml.scm (ocaml-forge-origin): New procedure.
* gnu/packages/ocaml.scm (lablgtk): Use it.
---
 gnu/packages/ocaml.scm | 19 ---
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 1554be217..6bb0e4826 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -50,6 +50,16 @@
   #:use-module (gnu packages version-control)
   #:use-module (gnu packages curl))
 
+;; A shortcut for files from ocaml forge. Downloaded files are computed from
+;; their number, not their name.
+(define (ocaml-forge-origin name version file-number hash)
+  (origin
+(method url-fetch)
+(uri (string-append "https://forge.ocamlcore.org/frs/download.php/";
+(number->string file-number) "/" name "-" version
+".tar.gz"))
+(sha256 (base32 hash
+
 (define-public ocaml
   (package
 (name "ocaml")
@@ -509,13 +519,8 @@ Knuth’s LR(1) parser construction technique.")
 (name "lablgtk")
 (version "2.18.5")
 (source
-  (origin
-(method url-fetch)
-  (uri (string-append "https://forge.ocamlcore.org/frs/download.php/";
-  "1627/lablgtk-2.18.5.tar.gz"))
-  (sha256
-(base32
-  "0cyj6sfdvzx8hw7553lhgwc0krlgvlza0ph3dk9gsxy047dm3wib"
+  (ocaml-forge-origin name version 1627
+"0cyj6sfdvzx8hw7553lhgwc0krlgvlza0ph3dk9gsxy047dm3wib"))
 (build-system gnu-build-system)
 (native-inputs
  `(("camlp4" ,camlp4)
-- 
2.11.0




[PATCH 01/96] gnu: ocaml: Add a .file directive to generated .s files

2017-01-03 Thread Julien Lepiller
* gnu/packages/patches/ocaml-Add-a-.file-directive.patch:
New file
* gnu/local.mk (dist_patch_DATA): Add patch.
* gnu/packages/ocaml.scm (ocaml) [origin]: Add patch.
---
 gnu/local.mk   |  1 +
 gnu/packages/ocaml.scm |  7 +-
 .../patches/ocaml-Add-a-.file-directive.patch  | 96 ++
 3 files changed, 102 insertions(+), 2 deletions(-)
 create mode 100644 gnu/packages/patches/ocaml-Add-a-.file-directive.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 0c42f9f44..9cbeaf071 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -751,6 +751,7 @@ dist_patch_DATA =   
\
   %D%/packages/patches/nvi-dbpagesize-binpower.patch   \
   %D%/packages/patches/nvi-db4.patch   \
   %D%/packages/patches/ocaml-CVE-2015-8869.patch   \
+  %D%/packages/patches/ocaml-Add-a-.file-directive.patch   \
   %D%/packages/patches/ocaml-findlib-make-install.patch\
   %D%/packages/patches/ola-readdir-r.patch \
   %D%/packages/patches/openexr-missing-samples.patch   \
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index c5784db90..4bb138a14 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -6,7 +6,7 @@
 ;;; Copyright © 2016 Eric Bavier 
 ;;; Copyright © 2016 Jan Nieuwenhuizen 
 ;;; Copyright © 2016 Efraim Flashner 
-;;; Copyright © 2016 Julien Lepiller 
+;;; Copyright © 2016, 2017 Julien Lepiller 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -63,7 +63,10 @@
   (sha256
(base32
 "1qwwvy8nzd87hk8rd9sm667nppakiapnx4ypdwcrlnav2dz6kil3"))
-  (patches (search-patches "ocaml-CVE-2015-8869.patch"
+  (patches
+   (search-patches
+  "ocaml-CVE-2015-8869.patch"
+  "ocaml-Add-a-.file-directive.patch"
 (build-system gnu-build-system)
 (native-search-paths
  (list (search-path-specification
diff --git a/gnu/packages/patches/ocaml-Add-a-.file-directive.patch 
b/gnu/packages/patches/ocaml-Add-a-.file-directive.patch
new file mode 100644
index 0..07842e9c3
--- /dev/null
+++ b/gnu/packages/patches/ocaml-Add-a-.file-directive.patch
@@ -0,0 +1,96 @@
+From: Stephane Glondu 
+Date: Sun, 16 Aug 2015 20:59:14 +0200
+Subject: Add a .file directive to generated .s files
+
+When no .file directive is given, the toolchain records the filename
+of the .o file, which is sometimes random, making generated objects
+non-deterministic.
+
+We use Location.input_name for adding .file directives to assembly
+files. Note: when the file is preprocessed, this reference holds the
+name of the temporary file. Hence, files compiled with -pp are still
+not deterministic.
+
+Bug-Debian: https://bugs.debian.org/795784
+Bug-Debian: https://bugs.debian.org/796336
+---
+ asmcomp/amd64/emit.mlp | 1 +
+ asmcomp/arm/emit.mlp   | 1 +
+ asmcomp/arm64/emit.mlp | 1 +
+ asmcomp/i386/emit.mlp  | 1 +
+ asmcomp/power/emit.mlp | 1 +
+ asmcomp/sparc/emit.mlp | 1 +
+ 6 files changed, 6 insertions(+)
+
+diff --git a/asmcomp/amd64/emit.mlp b/asmcomp/amd64/emit.mlp
+index d56d0f5..4d7aa30 100644
+--- a/asmcomp/amd64/emit.mlp
 b/asmcomp/amd64/emit.mlp
+@@ -794,6 +794,7 @@ let data l =
+ let begin_assembly() =
+   reset_debug_info();   (* PR#5603 *)
+   float_constants := [];
++  `   .file \"{emit_string (String.escaped !Location.input_name)}\"\n`;
+   if !Clflags.dlcode then begin
+ (* from amd64.S; could emit these constants on demand *)
+ if macosx then
+diff --git a/asmcomp/arm/emit.mlp b/asmcomp/arm/emit.mlp
+index 4948fb2..6f30fba 100644
+--- a/asmcomp/arm/emit.mlp
 b/asmcomp/arm/emit.mlp
+@@ -892,6 +892,7 @@ let data l =
+
+ let begin_assembly() =
+   reset_debug_info();
++  `   .file \"{emit_string (String.escaped !Location.input_name)}\"\n`;
+   `   .syntax unified\n`;
+   begin match !arch with
+   | ARMv4   -> `  .arch   armv4t\n`
+diff --git a/asmcomp/arm64/emit.mlp b/asmcomp/arm64/emit.mlp
+index 750c2b2..5afbb8a 100644
+--- a/asmcomp/arm64/emit.mlp
 b/asmcomp/arm64/emit.mlp
+@@ -942,6 +942,7 @@ let data l =
+
+ let begin_assembly() =
+   reset_debug_info();
++  `   .file \"{emit_string (String.escaped !Location.input_name)}\"\n`;
+   let lbl_begin = Compilenv.make_symbol (Some "data_begin") in
+   `   .data\n`;
+   `   .globl  {emit_symbol lbl_begin}\n`;
+diff --git a/asmcomp/i386/emit.mlp b/asmcomp/i386/emit.mlp
+index 98df5f9..531150f 100644
+--- a/asmcomp/i386/emit.mlp
 b/asmcomp/i386/emit.mlp
+@@ -986,6 +986,7 @@ let data l =
+ let begin_assembly() =
+   reset_debug_info();   (* PR#5603 *)
+   float_constants := [];
++  `   .file \"{emit_string (String.escaped !Location.input_name)}\"\n`;
+   let lbl_begin = Compilenv.make_symbol (Some "data_begin") in
+   `   .data\n`;
+   `   .globl  {emit_symbol lbl_begin}\n`;
+diff --git a/asmcomp/power

[PATCH 11/96] gnu: Add ocaml-zarith.

2017-01-03 Thread Julien Lepiller
* gnu/packages/ocaml.scm (ocaml-zarith): New variable.
---
 gnu/packages/ocaml.scm | 24 
 1 file changed, 24 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 1900cfc70..a1c8df1da 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -47,6 +47,7 @@
   #:use-module (gnu packages perl)
   #:use-module (gnu packages python)
   #:use-module (gnu packages m4)
+  #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages version-control)
   #:use-module (gnu packages xml)
@@ -816,3 +817,26 @@ files in these formats.")
 (synopsis "Generate modules from OCaml source files")
 (description "Generate modules from OCaml source files.")
 (license license:lgpl2.1))); with an exception
+
+(define-public ocaml-zarith
+  (package
+(name "ocaml-zarith")
+(version "1.4.1")
+(home-page "https://forge.ocamlcore.org/projects/zarith/";)
+(source (ocaml-forge-origin "zarith" version 1574
+   "0l36hzmfbvdai2kcgynh13vfdim5x2grnaw61fxqalyjm90c3di3"))
+(build-system ocaml-build-system)
+(native-inputs `(("perl" ,perl)))
+(inputs `(("gmp" ,gmp)))
+(arguments `(#:tests? #f ; no test target
+ #:phases
+ (modify-phases %standard-phases
+   (replace 'configure
+ (lambda* (#:key #:allow-other-keys)
+   (zero? (system* "./configure")))
+(synopsis "Implements arbitrary-precision integers")
+(description "Implements arithmetic and logical operations over
+arbitrary-precision integers.  It uses GMP to efficiently implement arithmetic
+over big integers. Small integers are represented as Caml unboxed integers,
+for speed and space economy.")
+(license license:lgpl2.1))); with an exception
-- 
2.11.0




[PATCH 02/96] gnu: ocaml: Add CAML_LD_LIBRARY_PATH search-path

2017-01-03 Thread Julien Lepiller
* gnu/packages/ocaml.scm (ocaml) [native-search-paths]: Add
CAML_LD_LIBRARY_PATH
---
 gnu/packages/ocaml.scm | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 4bb138a14..f74cd5245 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -64,14 +64,17 @@
(base32
 "1qwwvy8nzd87hk8rd9sm667nppakiapnx4ypdwcrlnav2dz6kil3"))
   (patches
-   (search-patches
+(search-patches
   "ocaml-CVE-2015-8869.patch"
   "ocaml-Add-a-.file-directive.patch"
 (build-system gnu-build-system)
 (native-search-paths
  (list (search-path-specification
 (variable "OCAMLPATH")
-(files (list (string-append "lib/ocaml"))
+(files (list "lib/ocaml")))
+   (search-path-specification
+(variable "CAML_LD_LIBRARY_PATH")
+(files (list "lib/ocaml/site-lib/stubslibs")
 (native-inputs
  `(("perl" ,perl)
("pkg-config" ,pkg-config)))
-- 
2.11.0




[PATCH 03/96] gnu: camlp4: compile native

2017-01-03 Thread Julien Lepiller
* gnu/packages/ocaml.scm (camlp4): Change default target to "all", and
compile both native and byte version.
---
 gnu/packages/ocaml.scm | 4 
 1 file changed, 4 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index f74cd5245..90483c6e1 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -237,6 +237,10 @@ Git-friendly development workflow.")
 (inputs `(("ocaml" ,ocaml)))
 (arguments
  '(#:tests? #f;no documented test target
+   ;; a race-condition will lead byte and native targets to  mkdir _build
+   ;; which  fails on the second attempt.
+   #:parallel-build? #f
+   #:make-flags (list "all")
#:phases (modify-phases %standard-phases
   (replace
'configure
-- 
2.11.0




[PATCH 08/96] gnu: Add ocaml-ounit.

2017-01-03 Thread Julien Lepiller
* gnu/packages/ocaml.scm (ocaml-ounit): New variable.
---
 gnu/packages/ocaml.scm | 19 +++
 1 file changed, 19 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 7d9d363b5..e32bd9de1 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -30,6 +30,7 @@
   #:use-module (guix svn-download)
   #:use-module (guix utils)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system ocaml)
   #:use-module (gnu packages)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages gnome)
@@ -48,6 +49,7 @@
   #:use-module (gnu packages m4)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages version-control)
+  #:use-module (gnu packages xml)
   #:use-module (gnu packages curl))
 
 ;; A shortcut for files from ocaml forge. Downloaded files are computed from
@@ -755,3 +757,20 @@ allows the user to enter queries on the command-line.  In 
order to simplify
 compilation and linkage, there are new frontends of the various OCaml
 compilers that can directly deal with packages.")
 (license license:x11)))
+
+;; note that some tests may hang for no obvious reason.
+(define-public ocaml-ounit
+  (package
+(name "ocaml-ounit")
+(version "2.0.0")
+(home-page "http://ounit.forge.ocamlcore.org";)
+(source (ocaml-forge-origin "ounit" version 1258
+  "118xsadrx84pif9vaq13hv4yh22w9kmr0ypvhrs0viir1jr0ajjd"))
+(build-system ocaml-build-system)
+(native-inputs `(("libxml2" ,libxml2))) ; for xmllint
+; tests are done during build
+(arguments `(#:phases (modify-phases %standard-phases (delete 'check
+(synopsis "Unit testing framework for OCaml")
+(description "Unit testing framework for OCaml.  It is similar to JUnit and
+other XUnit testing frameworks.")
+(license license:lgpl2.1)))
-- 
2.11.0




[PATCH 05/96] gnu: ocaml: Use a prefix for license field.

2017-01-03 Thread Julien Lepiller
---
 gnu/packages/ocaml.scm | 24 
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 644638f8a..1554be217 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -24,7 +24,7 @@
 ;;; along with GNU Guix.  If not, see .
 
 (define-module (gnu packages ocaml)
-  #:use-module ((guix licenses) #:hide (zlib))
+  #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix svn-download)
@@ -152,7 +152,7 @@ functional, imperative and object-oriented styles of 
programming.")
 ;; The compiler is distributed under qpl1.0 with a change to choice of
 ;; law: the license is governed by the laws of France.  The library is
 ;; distributed under lgpl2.0.
-(license (list qpl lgpl2.0
+(license (list license:qpl license:lgpl2.0
 
 (define-public opam
   (package
@@ -217,7 +217,7 @@ simultaneous compiler installations, flexible package 
constraints, and a
 Git-friendly development workflow.")
 
 ;; The 'LICENSE' file waives some requirements compared to LGPLv3.
-(license lgpl3)))
+(license license:lgpl3)))
 
 (define-public camlp4
   (package
@@ -263,7 +263,7 @@ syntax of OCaml.")
 
 ;; This is LGPLv2 with an exception that allows packages statically-linked
 ;; against the library to be released under any terms.
-(license lgpl2.0)))
+(license license:lgpl2.0)))
 
 (define-public camlp5
   (package
@@ -304,7 +304,7 @@ syntax of OCaml.")
 tools for syntax (Stream Parsers and Grammars) and the ability to modify the
 concrete syntax of the language (Quotations, Syntax Extensions).")
 ;; Most files are distributed under bsd-3, but ocaml_stuff/* is under qpl.
-(license (list bsd-3 qpl
+(license (list license:bsd-3 license:qpl
 
 (define-public hevea
   (package
@@ -335,7 +335,7 @@ concrete syntax of the language (Quotations, Syntax 
Extensions).")
 (description
  "HeVeA is a LaTeX to HTML translator that generates modern HTML 5.  It is
 written in Objective Caml.")
-(license qpl)))
+(license license:qpl)))
 
 (define-public coq
   (package
@@ -388,7 +388,7 @@ development of computer programs consistent with their 
formal specification.
 It is developed using Objective Caml and Camlp5.")
 ;; The code is distributed under lgpl2.1.
 ;; Some of the documentation is distributed under opl1.0+.
-(license (list lgpl2.1 opl1.0+
+(license (list license:lgpl2.1 license:opl1.0+
 
 (define-public proof-general
   (package
@@ -466,7 +466,7 @@ It is developed using Objective Caml and Camlp5.")
  "Proof General is a major mode to turn Emacs into an interactive proof
 assistant to write formal mathematical proofs using a variety of theorem
 provers.")
-(license gpl2+)))
+(license license:gpl2+)))
 
 (define-public ocaml-menhir
   (package
@@ -502,7 +502,7 @@ Knuth’s LR(1) parser construction technique.")
 ;; The file src/standard.mly and all files listed in src/mnehirLib.mlpack
 ;; that have an *.ml or *.mli extension are GPL licensed. All other files
 ;; are QPL licensed.
-(license (list gpl2+ qpl
+(license (list license:gpl2+ license:qpl
 
 (define-public lablgtk
   (package
@@ -565,7 +565,7 @@ gdk-pixbuf, the GLArea widget (in combination with LablGL), 
gnomecanvas,
 gnomeui, gtksourceview, gtkspell,
 libglade (and it an generate OCaml code from .glade files),
 libpanel, librsvg and quartz.")
-(license lgpl2.1)))
+(license license:lgpl2.1)))
 
 (define-public unison
   (package
@@ -686,7 +686,7 @@ a collection of files and directories to be stored on 
different hosts
 (or different disks on the same host), modified separately, and then
 brought up to date by propagating the changes in each replica
 to the other.")
-(license gpl3+)))
+(license license:gpl3+)))
 
 (define-public ocaml-findlib
   (package
@@ -734,4 +734,4 @@ dependency information about multiple packages.  There is 
also a tool that
 allows the user to enter queries on the command-line.  In order to simplify
 compilation and linkage, there are new frontends of the various OCaml
 compilers that can directly deal with packages.")
-(license x11)))
+(license license:x11)))
-- 
2.11.0




[PATCH 13/96] gnu: Add ocaml-qtest

2017-01-03 Thread Julien Lepiller
* gnu/packages/ocaml.scm (ocaml-qtest): New variable.
---
 gnu/packages/ocaml.scm | 29 +
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 4289e5336..7c3945884 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -881,3 +881,32 @@ The result is a syntactic tree easy to process with usual 
OCAML tree management.
 It provides support for ANSI C syntax, old-C K&R style syntax and the standard
 GNU CC attributes.  It provides also a C pretty printer as an example of use.")
 (license license:lgpl2.1)))
+
+(define-public ocaml-qtest
+  (package
+(name "ocaml-qtest")
+(version "2.3")
+(home-page "https://github.com/vincent-hugot/iTeML";)
+(source (origin
+  (method url-fetch)
+  (uri (string-append "https://github.com/vincent-hugot/iTeML/";
+  "archive/v" version ".tar.gz"))
+  (sha256
+(base32
+  "1n7x5l6h4j44f75wzgzjsjkq349i4gj707w1hr7fx84igxxfr6vl"
+(build-system ocaml-build-system)
+(native-inputs `(("findlib" ,ocaml-findlib)))
+(propagated-inputs `(("ounit" ,ocaml-ounit)))
+(arguments
+  `(#:tests? #f; no test target
+#:make-flags
+(list (string-append "BIN=" (assoc-ref %outputs "out") "/bin"))
+#:phases
+(modify-phases %standard-phases
+  (delete 'configure
+(synopsis "Inline (Unit) Tests for OCaml")
+(description "Qtest extracts inline unit tests written using a special
+syntax in comments.  Those tests are then run using the oUnit framework and the
+qcheck library.  The possibilities range from trivial tests -- extremely simple
+to use -- to sophisticated random generation of test cases.")
+(license license:lgpl3+)))
-- 
2.11.0




[PATCH 10/96] gnu: Add ocamlmod.

2017-01-03 Thread Julien Lepiller
* gnu/packages/ocaml.scm (ocamlmod): New variable.
---
 gnu/packages/ocaml.scm | 15 +++
 1 file changed, 15 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 1de96c760..1900cfc70 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -801,3 +801,18 @@ other XUnit testing frameworks.")
 JAR format.  It provides functions for reading from and writing to compressed
 files in these formats.")
 (license license:lgpl2.1)))
+
+(define-public ocamlmod
+  (package
+(name "ocamlmod")
+(version "0.0.8")
+(home-page "https://forge.ocamlcore.org/projects/ocamlmod/";)
+(source (ocaml-forge-origin name version 1544
+   "1w0w8lfyymvk300dv13gvhrddpcyknvyp4g2yvq2vaw7khkhjs9g"))
+(build-system ocaml-build-system)
+(native-inputs `(("ounit" ,ocaml-ounit)))
+; tests are done during build
+(arguments `(#:phases (modify-phases %standard-phases (delete 'check
+(synopsis "Generate modules from OCaml source files")
+(description "Generate modules from OCaml source files.")
+(license license:lgpl2.1))); with an exception
-- 
2.11.0




[PATCH 04/96] gnu: Add ocaml-build-system.

2017-01-03 Thread Julien Lepiller
* guix/build/ocaml-build-system.scm: New file.
* guix/build-system/ocaml.scm: New file.
* Makefile.am (MODULES): Add them.
* gnu/packages/ocaml.scm (ocaml) [native-search-paths]: Adjuste OCAMLPATH.
---
 Makefile.am   |   2 +
 gnu/packages/ocaml.scm|   2 +-
 guix/build-system/ocaml.scm   | 181 ++
 guix/build/ocaml-build-system.scm | 119 +
 4 files changed, 303 insertions(+), 1 deletion(-)
 create mode 100644 guix/build-system/ocaml.scm
 create mode 100644 guix/build/ocaml-build-system.scm

diff --git a/Makefile.am b/Makefile.am
index fb08a004b..1a66fff50 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -70,6 +70,7 @@ MODULES = \
   guix/build-system/haskell.scm\
   guix/build-system/perl.scm   \
   guix/build-system/python.scm \
+  guix/build-system/ocaml.scm  \
   guix/build-system/waf.scm\
   guix/build-system/r.scm  \
   guix/build-system/ruby.scm   \
@@ -95,6 +96,7 @@ MODULES = \
   guix/build/gnu-dist.scm  \
   guix/build/perl-build-system.scm \
   guix/build/python-build-system.scm   \
+  guix/build/ocaml-build-system.scm\
   guix/build/r-build-system.scm\
   guix/build/ruby-build-system.scm \
   guix/build/waf-build-system.scm  \
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 90483c6e1..644638f8a 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -71,7 +71,7 @@
 (native-search-paths
  (list (search-path-specification
 (variable "OCAMLPATH")
-(files (list "lib/ocaml")))
+(files (list "lib/ocaml" "lib/ocaml/site-lib")))
(search-path-specification
 (variable "CAML_LD_LIBRARY_PATH")
 (files (list "lib/ocaml/site-lib/stubslibs")
diff --git a/guix/build-system/ocaml.scm b/guix/build-system/ocaml.scm
new file mode 100644
index 0..f4f57b5ad
--- /dev/null
+++ b/guix/build-system/ocaml.scm
@@ -0,0 +1,181 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016, 2017 Julien Lepiller 
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see .
+
+(define-module (guix build-system ocaml)
+  #:use-module (guix store)
+  #:use-module (guix utils)
+  #:use-module (guix derivations)
+  #:use-module (guix search-paths)
+  #:use-module (guix build-system)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix packages)
+  #:use-module (ice-9 match)
+  #:export (%ocaml-build-system-modules
+ocaml-build
+ocaml-build-system))
+
+;; Commentary:
+;;
+;; Standard build procedure for packages using ocaml. This is implemented as an
+;; extension of `gnu-build-system'.
+;;
+;; OCaml packages don't use a single standard for their build system. Some use
+;; autotools, other use custom configure scripts with Makefiles, others use
+;; oasis to generate the configure script and Makefile and lastly, some use
+;; custom ocaml scripts.
+;;
+;; Each phase in the build system will try to figure out what the build system
+;; is for that package. Most packages come with a custom configure script and
+;; a Makefile that in turn call custom build tools. Packages built with oasis
+;; will have a `setup.ml' file in the top directory, that can be used for all
+;; phases. In that case the Makefile is here only to call that script. In case
+;; the setup.ml do not work as expected, the @var{use-make} argument can be
+;; used to ignore the setup.ml file and run make instead.
+;;
+;; Some packages use their own custom scripts, `pkg/pkg.ml' or
+;; `pkg/build.ml'. They can be used here too.
+;;
+;; Code:
+
+(define %ocaml-build-system-modules
+  ;; Build-side modules imported by default.
+  `((guix build ocaml-build-system)
+,@%gnu-build-system-modules))
+
+(define (default-ocaml)
+  "Return the default OCaml package."
+
+  ;; Do not use `@' to avoid introducing circular dependencies.
+  (let ((module (resolve-interface '(gnu packages ocaml
+(module-ref module 'ocaml)))
+
+(define (default-findlib)
+  "Return the default OCaml-findlib package

[PATCH 09/96] gnu: Add camlzip

2017-01-03 Thread Julien Lepiller
* gnu/packages/ocaml.scm (camlzip): New variable.
---
 gnu/packages/ocaml.scm | 27 +++
 1 file changed, 27 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index e32bd9de1..1de96c760 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -774,3 +774,30 @@ compilers that can directly deal with packages.")
 (description "Unit testing framework for OCaml.  It is similar to JUnit and
 other XUnit testing frameworks.")
 (license license:lgpl2.1)))
+
+(define-public camlzip
+  (package
+(name "camlzip")
+(version "1.0.6")
+(home-page "http://forge.ocamlcore.org/projects/camlzip";)
+(source (ocaml-forge-origin name version 1616
+  "0m6gyjw46w3qnhxfsyqyag42znl5lwargks7w7rfchr9jzwpff68"))
+(build-system ocaml-build-system)
+(inputs `(("zlib" ,zlib)))
+(arguments `(#:phases
+ (modify-phases %standard-phases
+   (delete 'configure)
+   (add-before 'install 'fix-install-name
+ (lambda* (#:key #:allow-other-keys)
+   (substitute* "Makefile"
+ (("install zip") "install camlzip")
+ #:install-target "install-findlib"
+ #:make-flags
+ (list "all" "allopt"
+   (string-append "INSTALLDIR=" (assoc-ref %outputs "out")
+   "/lib/ocaml"
+(synopsis "Provides easy access to compressed files")
+(description "Provides easy access to compressed files in ZIP, GZIP and
+JAR format.  It provides functions for reading from and writing to compressed
+files in these formats.")
+(license license:lgpl2.1)))
-- 
2.11.0




[PATCH 14/96] gnu: Add ocaml-stringext

2017-01-03 Thread Julien Lepiller
* gnu/packages/ocaml.scm (ocaml-stringext): New variable.
---
 gnu/packages/ocaml.scm | 21 +
 1 file changed, 21 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 7c3945884..bf89b847a 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -910,3 +910,24 @@ syntax in comments.  Those tests are then run using the 
oUnit framework and the
 qcheck library.  The possibilities range from trivial tests -- extremely simple
 to use -- to sophisticated random generation of test cases.")
 (license license:lgpl3+)))
+
+(define-public ocaml-stringext
+  (package
+(name "ocaml-stringext")
+(version "1.4.3")
+(home-page "https://github.com/rgrinberg/stringext/";)
+(source (origin
+  (method url-fetch)
+  (uri (string-append home-page "archive/v" version ".tar.gz"))
+  (sha256
+(base32
+  "19g6lfn03iki9f8h91hi0yiqn0b3wkxyq08b3y23wgv6jw6mssfh"
+(build-system ocaml-build-system)
+(native-inputs `(("qtest" ,ocaml-qtest)))
+(synopsis "Extra string functions for OCaml")
+(description "Provides a single module named Stringext that provides a grab
+bag of often used but missing string functions from the stdlib.  E.g, split,
+full_split, cut, rcut, etc..")
+;; the only mention of a license in this project is in its `opam' file
+;; where it says `mit'.
+(license license:expat)))
-- 
2.11.0




[PATCH 15/96] gnu: Add ocaml-bisect

2017-01-03 Thread Julien Lepiller
* gnu/packages/ocaml.scm (ocaml-bisect): New variable.
* gnu/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch:
New file
* gnu/local.mk (dist_patch_DATA): Add patch.
---
 gnu/local.mk   |   1 +
 gnu/packages/ocaml.scm |  34 ++
 ...ml-bisect-fix-camlp4-in-another-directory.patch | 125 +
 3 files changed, 160 insertions(+)
 create mode 100644 
gnu/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 9cbeaf071..cc46b4749 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -750,6 +750,7 @@ dist_patch_DATA =   
\
   %D%/packages/patches/nvi-assume-preserve-path.patch  \
   %D%/packages/patches/nvi-dbpagesize-binpower.patch   \
   %D%/packages/patches/nvi-db4.patch   \
+  %D%/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch  
\
   %D%/packages/patches/ocaml-CVE-2015-8869.patch   \
   %D%/packages/patches/ocaml-Add-a-.file-directive.patch   \
   %D%/packages/patches/ocaml-findlib-make-install.patch\
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index bf89b847a..f3f76eb1d 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -931,3 +931,37 @@ full_split, cut, rcut, etc..")
 ;; the only mention of a license in this project is in its `opam' file
 ;; where it says `mit'.
 (license license:expat)))
+
+
+(define-public ocaml-bisect
+  (package
+(name "ocaml-bisect")
+(version "1.3")
+(home-page "http://bisect.x9c.fr";)
+(source
+  (origin
+(inherit (ocaml-forge-origin "bisect" version 1051
+   "0kcg2rh0qlkfpbv3nhcb75n62b04gbrz0zasq15ynln91zd5qrg0"))
+(patches (search-patches 
"ocaml-bisect-fix-camlp4-in-another-directory.patch"
+(build-system ocaml-build-system)
+(native-inputs `(("camlp4" ,camlp4)
+ ("libxml2" ,libxml2)
+ ("which" ,which)))
+(propagated-inputs `(("camlp4" ,camlp4)))
+(arguments `(#:test-target "tests"
+ #:make-flags
+ (list "all" (string-append "CAMLP4_LIBDIR="
+(assoc-ref %build-inputs "camlp4")
+"/lib/ocaml/site-lib/camlp4"))
+ #:phases (modify-phases %standard-phases
+(replace 'configure
+  (lambda* (#:key outputs #:allow-other-keys)
+(zero? (system* "./configure" "-prefix"
+(assoc-ref outputs 
"out"
+(synopsis "Code coverage tool for the OCaml language")
+(description "Bisect is a code coverage tool for the OCaml language.  It is
+a camlp4-based tool that allows to instrument your application before running
+tests.  After application execution, it is possible to generate a report in 
HTML
+format that is the replica of the application source code annotated with code
+coverage information.")
+(license license:gpl3+)))
diff --git 
a/gnu/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch 
b/gnu/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch
new file mode 100644
index 0..2056b4235
--- /dev/null
+++ b/gnu/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch
@@ -0,0 +1,125 @@
+From 26cac62fe0154cf65c06faaee10805531e9dade8 Mon Sep 17 00:00:00 2001
+From: Julien Lepiller 
+Date: Wed, 14 Dec 2016 14:14:59 +0100
+Subject: [PATCH] fix camlp4 in another directory
+
+---
+ Makefile| 11 ++-
+ configure   | 13 -
+ myocamlbuild.ml |  2 +-
+ 3 files changed, 19 insertions(+), 7 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 4a8ce17..d94a6d5 100644
+--- a/Makefile
 b/Makefile
+@@ -25,7 +25,7 @@ PATH_BUILD=$(PATH_BASE)/_build
+ PATH_OCAMLDOC=$(PATH_BASE)/ocamldoc
+ PATH_SRC=$(PATH_BASE)/src
+ PATH_TESTS=$(PATH_BASE)/tests
+-PATH_INSTALL=$(PATH_OCAML_PREFIX)/lib/ocaml/bisect
++PATH_INSTALL=$(PREFIX)/lib/ocaml/bisect
+
+
+ # DEFINITIONS
+@@ -33,7 +33,8 @@ PATH_INSTALL=$(PATH_OCAML_PREFIX)/lib/ocaml/bisect
+ PROJECT_NAME=bisect
+ OCAMLBUILD=$(PATH_OCAML_PREFIX)/bin/ocamlbuild
+ OCAMLBUILD_ENV=WARNINGS=$(WARNINGS) PATH_OCAML_PREFIX=$(PATH_OCAML_PREFIX)
+-OCAMLBUILD_FLAGS=-classic-display -no-links
++CAMLP4_INCLUDE=$(shell test -z $(CAMLP4_LIBDIR) || echo "-cflags 
-I,$(CAMLP4_LIBDIR)")
++OCAMLBUILD_FLAGS=-classic-display -no-links $(CAMLP4_INCLUDE)
+ MODULES_ODOCL=$(PROJECT_NAME).odocl
+ MODULES_MLPACK=$(PROJECT_NAME).mlpack
+ MODULES_MLPACK_PP=$(PROJECT_NAME)_pp.mlpack
+@@ -80,11 +81,11 @@ veryclean: clean
+   rm -f $(PATH_OCAMLDOC)/*.html $(PATH_OCAMLDOC)/*.css
+
+ install: FORCE
+-  cp $(PATH_BUILD)/src/report/report.byte 
$(PATH_OCAML_PREFIX)/bin/bisect-report; \
++  cp $(P

[PATCH 20/96] gnu: Add ocaml-mtime

2017-01-03 Thread Julien Lepiller
* gnu/packages/ocaml.scm (ocaml-mtime): New variable.
---
 gnu/packages/ocaml.scm | 25 +
 1 file changed, 25 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index fea3ebda0..e971e72d0 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1099,3 +1099,28 @@ declarative manner, without resorting to exceptions.  It 
defines combinators
 to operate on the result type available from OCaml 4.03 in the standard
 library.")
 (license license:isc)))
+
+(define-public ocaml-mtime
+  (package
+(name "ocaml-mtime")
+(version "0.8.3")
+(home-page "http://erratique.ch/software/mtime";)
+(source (origin
+  (method url-fetch)
+  (uri (string-append home-page "/releases/mtime-" version ".tbz"))
+  (sha256
+(base32
+  "1hfx4ny2dkw6jf3jppz0640dafl5xgn8r2si9kpwzhmibal8qrah"
+(build-system ocaml-build-system)
+(arguments `(#:tests? #f
+ #:build-flags (list "native=true" "native-dynlink=true"
+ "jsoo=false")
+ #:phases
+ (modify-phases %standard-phases
+   (delete 'configure
+(native-inputs `(("opam" ,opam)))
+(propagated-inputs `(("topkg" ,ocaml-topkg)))
+(synopsis "Monotonic wall-clock time for OCaml")
+(description "access monotonic wall-clock time.  It allows to measure time
+spans without being subject to operating system calendar time adjustments.")
+(license license:isc)))
-- 
2.11.0




[PATCH 12/96] gnu: Add ocaml-frontc

2017-01-03 Thread Julien Lepiller
* gnu/packages/ocaml.scm (ocaml-frontc): New variable.
---
 gnu/packages/ocaml.scm | 41 +
 1 file changed, 41 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index a1c8df1da..4289e5336 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -840,3 +840,44 @@ arbitrary-precision integers.  It uses GMP to efficiently 
implement arithmetic
 over big integers. Small integers are represented as Caml unboxed integers,
 for speed and space economy.")
 (license license:lgpl2.1))); with an exception
+
+(define-public ocaml-frontc
+  (package
+(name "ocaml-frontc")
+(version "3.4")
+(home-page "https://www.irit.fr/FrontC";)
+(source (origin
+  (method url-fetch)
+  (uri (string-append "https://www.irit.fr/recherches/ARCHI/MARCH/";
+  "frontc/Frontc-" version ".tgz"))
+  (sha256
+(base32
+  "16dz153s92dgbw1rrfwbhscy73did87kfmjwyh3qpvs748h1sc4g"
+(build-system ocaml-build-system)
+(arguments `(#:phases
+ (modify-phases %standard-phases
+   (delete 'configure)
+   (add-after 'install 'install-meta
+ (lambda* (#:key outputs #:allow-other-keys)
+   (let ((out (assoc-ref outputs "out")))
+ (with-output-to-file
+   (string-append out "/lib/ocaml/frontc/META")
+ (lambda _
+   (display
+ (string-append
+   "description = \"Parser for the C language\"
+version = \"" ,version "\"
+requires = \"unix\"
+archive(byte) = \"frontc.cma\"
+archive(native) = \"frontc.cmxa\""
+ (symlink (string-append out "/lib/ocaml/frontc")
+  (string-append out "/lib/ocaml/FrontC"))
+ #:make-flags (list (string-append "PREFIX="
+   (assoc-ref %outputs "out"))
+"OCAML_SITE=$(LIB_DIR)/ocaml/")))
+(synopsis "C parser and lexer library")
+(description "FrontC is an OCAML library providing a C parser and lexer.
+The result is a syntactic tree easy to process with usual OCAML tree 
management.
+It provides support for ANSI C syntax, old-C K&R style syntax and the standard
+GNU CC attributes.  It provides also a C pretty printer as an example of use.")
+(license license:lgpl2.1)))
-- 
2.11.0




[PATCH 17/96] gnu: Add ocaml-result

2017-01-03 Thread Julien Lepiller
* gnu/packages/ocaml.scm (ocaml-result): New variable.
---
 gnu/packages/ocaml.scm | 20 
 1 file changed, 20 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 9814e10d2..335a81c88 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1027,3 +1027,23 @@ and generate binary formats, files and protocols.  
Bitstring handling is added
 as primitives to the language, making it exceptionally simple to use and very
 powerful.")
 (license license:isc)))
+
+(define-public ocaml-result
+  (package
+(name "ocaml-result")
+(version "1.2")
+(home-page "https://github.com/janestreet/result/";)
+(source
+  (origin
+(method url-fetch)
+(uri (string-append home-page "/archive/" version ".tar.gz"))
+(sha256 (base32
+  "1pgpfsgvhxnh0i37fkvp9j8nadns9hz9iqgabj4dr519j2gr1xvw"
+(build-system ocaml-build-system)
+(arguments `(#:phases (modify-phases %standard-phases (delete 'configure))
+ #:tests? #f))
+(synopsis "Compatibility Result module")
+(description "Uses the new result type defined in OCaml >= 4.03 while
+staying compatible with older version of OCaml should use the Result module
+defined in this library.")
+(license license:bsd-3)))
-- 
2.11.0




[PATCH 18/96] gnu: Add ocaml-topkg

2017-01-03 Thread Julien Lepiller
* gnu/packages/ocaml.scm (ocaml-topkg): New variable.
---
 gnu/packages/ocaml.scm | 26 ++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 335a81c88..25354fbcc 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1047,3 +1047,29 @@ powerful.")
 staying compatible with older version of OCaml should use the Result module
 defined in this library.")
 (license license:bsd-3)))
+
+(define-public ocaml-topkg
+  (package
+(name "ocaml-topkg")
+(version "0.8.1")
+(home-page "http://erratique.ch/software/topkg";)
+(source
+  (origin
+(method url-fetch)
+(uri (string-append home-page "/releases/topkg-" version ".tbz"))
+(sha256 (base32
+  "18rrh6fmf708z7dd30amljmcgaypj3kk49jrmrj68r4wnw8004j8"
+(build-system ocaml-build-system)
+(arguments `(#:tests? #f
+ #:build-flags (list "build")
+ #:phases
+ (modify-phases %standard-phases
+   (delete 'configure
+(native-inputs `(("opam" ,opam)))
+(propagated-inputs `(("result" ,ocaml-result)))
+(synopsis "Transitory OCaml software packager")
+(description "Topkg is a packager for distributing OCaml software. It
+provides an API to describe the files a package installs in a given build
+configuration and to specify information about the package's distribution,
+creation and publication procedures.")
+(license license:isc)))
-- 
2.11.0




[PATCH 19/96] gnu: Add ocaml-rresult

2017-01-03 Thread Julien Lepiller
* gnu/packages/ocaml.scm (ocaml-rresult): New variable.
---
 gnu/packages/ocaml.scm | 26 ++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 25354fbcc..fea3ebda0 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1073,3 +1073,29 @@ provides an API to describe the files a package installs 
in a given build
 configuration and to specify information about the package's distribution,
 creation and publication procedures.")
 (license license:isc)))
+
+(define-public ocaml-rresult
+  (package
+(name "ocaml-rresult")
+(version "0.5.0")
+(home-page "http://erratique.ch/software/rresult";)
+(source (origin
+  (method url-fetch)
+  (uri (string-append home-page "/releases/rresult-" version 
".tbz"))
+  (sha256
+(base32
+  "1xxycxhdhaq8p9vhwi93s2mlxjwgm44fcxybx5vghzgbankz9yhm"
+(build-system ocaml-build-system)
+(arguments `(#:tests? #f
+ #:build-flags (list "build")
+ #:phases
+ (modify-phases %standard-phases
+   (delete 'configure
+(native-inputs `(("opam" ,opam)))
+(propagated-inputs `(("topkg" ,ocaml-topkg)))
+(synopsis "Result value combinators for OCaml")
+(description "Handle computation results and errors in an explicit and
+declarative manner, without resorting to exceptions.  It defines combinators
+to operate on the result type available from OCaml 4.03 in the standard
+library.")
+(license license:isc)))
-- 
2.11.0




[PATCH 28/96] gnu: Add ocaml-lwt

2017-01-03 Thread Julien Lepiller
* gnu/packages/ocaml.scm (ocaml-lwt): New variable.
---
 gnu/packages/ocaml.scm | 37 +
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 7328004a0..5418ee235 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -47,6 +47,8 @@
   #:use-module (gnu packages lynx)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages glib)
+  #:use-module (gnu packages libevent)
   #:use-module (gnu packages m4)
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages ncurses)
@@ -1313,3 +1315,38 @@ lets the client choose the concrete timeline.")
 (synopsis "OCaml bindings for OpenSSL")
 (description "OCaml bindings for OpenSSL.")
 (license license:lgpl2.1)))
+
+(define-public ocaml-lwt
+  (package
+(name "ocaml-lwt")
+(version "2.6.0")
+(home-page "https://github.com/ocsigen/lwt";)
+(source
+  (origin
+(method url-fetch)
+(uri (string-append home-page "/archive/" version ".tar.gz"))
+(sha256 (base32
+  "1gbw0g8a5a4b16diqrmlhc8ilnikrm4w3jjm1zq310maqg8z0zxz"
+(build-system ocaml-build-system)
+(arguments `(#:configure-flags
+ (list "--enable-ssl" "--enable-glib" "--enable-react"
+   "--enable-ppx")
+ #:phases
+ (modify-phases %standard-phases
+   (add-before 'configure 'disable-some-checks
+ (lambda* (#:key #:allow-other-keys)
+   (substitute* "tests/unix/main.ml"
+ (("Test_mcast.suite;") "")))
+(native-inputs `(("pkg-config" ,pkg-config)
+ ("ppx-tools" ,ocaml-ppx-tools)))
+(inputs `(("libev" ,libev)
+  ("glib" ,glib)))
+(propagated-inputs `(("result" ,ocaml-result)
+ ("ocaml-ssl" ,ocaml-ssl)
+ ("ocaml-react" ,ocaml-react)))
+(synopsis "Cooperative threads and I/O in monadic style")
+(description "Lwt provides typed, composable cooperative threads.  These
+make it easy to run normally-blocking I/O operations concurrently in a single
+process.  Also, in many cases, Lwt threads can interact without the need for
+locks or other synchronization primitives.")
+(license license:lgpl2.1)))
-- 
2.11.0




[PATCH 22/96] gnu: Add ocaml-fmt

2017-01-03 Thread Julien Lepiller
* gnu/packages/ocaml.scm (ocaml-fmt): New variable.
---
 gnu/packages/ocaml.scm | 27 +++
 1 file changed, 27 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 8f7e3ec55..31b717874 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1151,3 +1151,30 @@ module automatically handles syntax errors, help 
messages and UNIX man page
 generation. It supports programs with single or multiple commands and respects
 most of the POSIX and GNU conventions.")
 (license license:bsd-3)))
+
+(define-public ocaml-fmt
+  (package
+(name "ocaml-fmt")
+(version "0.8.0")
+(home-page "http://erratique.ch/software/fmt";)
+(source
+  (origin
+(method url-fetch)
+(uri (string-append home-page "/releases/fmt-" version ".tbz"))
+(sha256 (base32
+  "16y7ibndnairb53j8a6qgipyqwjxncn4pl9jiw5bxjfjm59108px"
+(build-system ocaml-build-system)
+(native-inputs `(("opam" ,opam)
+ ("topkg" ,ocaml-topkg)))
+(propagated-inputs `(("result" ,ocaml-result)
+ ("cmdliner" ,ocaml-cmdliner)))
+(arguments `(#:tests? #f
+ #:build-flags (list "build" "--with-base-unix" "true"
+ "--with-cmdliner" "true")
+ #:phases
+ (modify-phases %standard-phases
+   (delete 'configure
+(synopsis "OCaml Format pretty-printer combinators")
+(description "Fmt exposes combinators to devise Format pretty-printing
+functions.")
+(license license:isc)))
-- 
2.11.0




[PATCH 16/96] gnu: Add ocaml-bitstring

2017-01-03 Thread Julien Lepiller
* gnu/packages/ocaml.scm (ocaml-bitstring): New variable.
* gnu/packages/patches/ocaml-bitstring-fix-configure.patch: New file.
* gnu/local.mk (dist_patch_DATA): New patch.
---
 gnu/local.mk   |  1 +
 gnu/packages/ocaml.scm | 62 ++
 .../patches/ocaml-bitstring-fix-configure.patch| 53 ++
 3 files changed, 116 insertions(+)
 create mode 100644 gnu/packages/patches/ocaml-bitstring-fix-configure.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index cc46b4749..3e8517117 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -751,6 +751,7 @@ dist_patch_DATA =   
\
   %D%/packages/patches/nvi-dbpagesize-binpower.patch   \
   %D%/packages/patches/nvi-db4.patch   \
   %D%/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch  
\
+  %D%/packages/patches/ocaml-bitstring-fix-configure.patch \
   %D%/packages/patches/ocaml-CVE-2015-8869.patch   \
   %D%/packages/patches/ocaml-Add-a-.file-directive.patch   \
   %D%/packages/patches/ocaml-findlib-make-install.patch\
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index f3f76eb1d..9814e10d2 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -32,6 +32,7 @@
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system ocaml)
   #:use-module (gnu packages)
+  #:use-module (gnu packages autotools)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages gtk)
@@ -49,6 +50,7 @@
   #:use-module (gnu packages m4)
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages time)
   #:use-module (gnu packages version-control)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages curl))
@@ -965,3 +967,63 @@ tests.  After application execution, it is possible to 
generate a report in HTML
 format that is the replica of the application source code annotated with code
 coverage information.")
 (license license:gpl3+)))
+
+(define-public ocaml-bitstring
+  (package
+(name "ocaml-bitstring")
+(version "2.1.0")
+(home-page "https://github.com/xguerin/bitstring/";)
+(source (origin
+  (method url-fetch)
+  (uri (string-append home-page "archive/v" version ".tar.gz"))
+  (sha256
+(base32
+  "0miw4banfpmx4kxrckpqr57b1fcmsqdmspyjx6gqjd4kghm4l7xj"))
+  (patches (search-patches 
"ocaml-bitstring-fix-configure.patch"
+(build-system ocaml-build-system)
+(native-inputs `(("camlp4" ,camlp4)
+ ("time" ,time)
+ ("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("bisect" ,ocaml-bisect)))
+(propagated-inputs `(("camlp4" ,camlp4)))
+(arguments `(#:configure-flags
+ (list "CAMLP4OF=camlp4of" "--enable-coverage")
+ #:make-flags
+ (list (string-append "BISECTLIB="
+  (assoc-ref %build-inputs "bisect")
+  "/lib/ocaml/site-lib")
+   (string-append "OCAMLCFLAGS=-g -I "
+  (assoc-ref %build-inputs "camlp4")
+  "/lib/ocaml/site-lib/camlp4 -I "
+  "$(BISECTLIB)/bisect")
+   (string-append "OCAMLOPTFLAGS=-g -I "
+  (assoc-ref %build-inputs "camlp4")
+  "/lib/ocaml/site-lib/camlp4 -I "
+  "$(BISECTLIB)/bisect"))
+ #:phases
+ (modify-phases %standard-phases
+   (add-before 'configure 'fix-configure
+ (lambda* (#:key inputs #:allow-other-keys)
+   (substitute* "Makefile.in"
+ (("@abs_top_builddir@") (string-append 
"@abs_top_builddir@:" (getenv "LIBRARY_PATH"
+   (substitute* "configure"
+ (("-/bin/sh") (string-append "-" (assoc-ref inputs 
"bash")
+  "/bin/sh")
+   (add-after 'install 'link-lib
+ (lambda* (#:key outputs #:allow-other-keys)
+   (let* ((out (assoc-ref outputs "out"))
+  (stubs (string-append out
+   "/lib/ocaml/site-lib/stubslibs"))
+  (lib (string-append out
+ "/lib/ocaml/site-lib/bitstring")))
+ (mkdir-p stubs)
+ (symlink (string-append lib "/dllbitstring.so")
+  (string-append stubs 
"/dllbitstring.so"))

[PATCH 23/96] gnu: Add ocaml-astring

2017-01-03 Thread Julien Lepiller
* gnu/packages/ocaml.scm (ocaml-astring): New variable.
---
 gnu/packages/ocaml.scm | 29 +
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 31b717874..bf308f1a7 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1178,3 +1178,32 @@ most of the POSIX and GNU conventions.")
 (description "Fmt exposes combinators to devise Format pretty-printing
 functions.")
 (license license:isc)))
+
+(define-public ocaml-astring
+  (package
+(name "ocaml-astring")
+(version "0.8.3")
+(home-page "http://erratique.ch/software/astring";)
+(source
+  (origin
+(method url-fetch)
+(uri (string-append home-page "/releases/astring-" version ".tbz"))
+(sha256 (base32
+  "0ixjwc3plrljvj24za3l9gy0w30lsbggp8yh02lwrzw61ls4cri0"
+(build-system ocaml-build-system)
+(native-inputs `(("opam" ,opam)
+ ("topkg" ,ocaml-topkg)))
+(arguments `(#:tests? #f
+ #:build-flags (list "build")
+ #:phases
+ (modify-phases %standard-phases
+   (delete 'configure
+(synopsis "Alternative String module for OCaml")
+(description "Astring exposes an alternative String module for OCaml.  This
+module balances minimality and expressiveness for basic, index-free, string
+processing and provides types and functions for substrings, string sets and
+string maps.  The String module exposed by Astring has exception safe 
functions,
+removes deprecated and rarely used functions, alters some signatures and names,
+adds a few missing functions and fully exploits OCaml's newfound string
+immutability.")
+(license license:isc)))
-- 
2.11.0




[PATCH 33/96] gnu: Add ocaml-ulex

2017-01-03 Thread Julien Lepiller
* gnu/packages/ocaml.scm (ocaml-ulex): New variable.
---
 gnu/packages/ocaml.scm | 26 ++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 21859ea90..33dc8d114 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1463,3 +1463,29 @@ run command line programs.")
 format.  It can process XML documents without a complete in-memory
 representation of the data.")
 (license license:isc)))
+
+(define-public ocaml-ulex
+  (package
+(name "ocaml-ulex")
+(version "1.1")
+(home-page "http://www.cduce.org/download.html#side";)
+(source (origin
+  (method url-fetch)
+  (uri (string-append "http://www.cduce.org/download/ulex-";
+  version ".tar.gz"))
+  (sha256
+(base32
+  "0fjlkwps14adfgxdrbb4yg65fhyimplvjjs1xqj5np197cig67x0"
+(build-system ocaml-build-system)
+(arguments `(#:phases (modify-phases %standard-phases (delete 'configure))
+ #:tests? #f
+ #:make-flags
+ (list "all.opt"
+   (string-append "OCAMLBUILD=ocamlbuild -byte-plugin "
+  "-cflags -I,"
+  (assoc-ref %build-inputs "camlp4")
+  "/lib/ocaml/site-lib/camlp4"
+(native-inputs `(("camlp4" ,camlp4)))
+(synopsis "Lexer generator for Unicode and OCaml")
+(description "Lexer generator for Unicode and OCaml.")
+(license license:expat)))
-- 
2.11.0




[PATCH 30/96] gnu: Add ocaml-fpath

2017-01-03 Thread Julien Lepiller
* gnu/packages/ocaml.scm (ocaml-fpath): New variable.
---
 gnu/packages/ocaml.scm | 26 ++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 3856af1e9..13d9b488d 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1380,3 +1380,29 @@ locks or other synchronization primitives.")
 performed on sources whose reporting level can be set independently.  Log
 message report is decoupled from logging and is handled by a reporter.")
 (license license:isc)))
+
+(define-public ocaml-fpath
+  (package
+(name "ocaml-fpath")
+(version "0.7.1")
+(home-page "http://erratique.ch/software/fpath";)
+(source (origin
+  (method url-fetch)
+  (uri (string-append home-page "/releases/fpath-" version ".tbz"))
+  (sha256
+(base32
+  "05134ij27xjl6gaqsc65yl19vfj6cjxq3mbm9bf4mija8grdpn6g"
+(build-system ocaml-build-system)
+(arguments `(#:tests? #f
+ #:build-flags (list "build")
+ #:phases
+ (modify-phases %standard-phases
+   (delete 'configure
+(native-inputs `(("opam" ,opam)))
+(propagated-inputs `(("topkg" ,ocaml-topkg)
+ ("astring" ,ocaml-astring)))
+(synopsis "File system paths for OCaml")
+(description "Fpath is an OCaml module for handling file system paths with
+POSIX or Windows conventions.  Fpath processes paths without accessing the
+file system and is independent from any system library.")
+(license license:isc)))
-- 
2.11.0




[PATCH 26/96] gnu: Add ocaml-react

2017-01-03 Thread Julien Lepiller
* gnu/packages/ocaml.scm (ocaml-react): New variable.
---
 gnu/packages/ocaml.scm | 25 +
 1 file changed, 25 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 915926e6f..e710efc2f 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1256,3 +1256,28 @@ simple (yet expressive) query language to select the 
tests to run.")
 (synopsis "Tools for authors of ppx rewriters and other syntactic tools")
 (description "Tools for authors of ppx rewriters and other syntactic 
tools.")
 (license license:expat)))
+
+(define-public ocaml-react
+  (package
+(name "ocaml-react")
+(version "1.2.0")
+(home-page "http://erratique.ch/software/react";)
+(source
+  (origin
+(method url-fetch)
+(uri (string-append home-page "/releases/react-" version ".tbz"))
+(sha256 (base32
+  "0knhgbngphv5sp1yskfd97crf169qhpc0igr6w7vqw0q36lswyl8"
+(build-system ocaml-build-system)
+(native-inputs `(("opam" ,opam)))
+(arguments `(#:tests? #f
+ #:build-flags (list "native=true" "native-dynlink=true")
+ #:phases
+ (modify-phases %standard-phases
+   (delete 'configure
+(synopsis "Declarative events and signals for OCaml")
+(description "React is an OCaml module for functional reactive programming
+(FRP).  It provides support to program with time varying values: declarative
+events and signals.  React doesn't define any primitive event or signal, it
+lets the client choose the concrete timeline.")
+(license license:bsd-3)))
-- 
2.11.0




[PATCH 25/96] gnu: Add ocaml-ppx-tools

2017-01-03 Thread Julien Lepiller
* gnu/packages/ocaml.scm (ocaml-ppx-tools): New variables.
---
 gnu/packages/ocaml.scm | 18 ++
 1 file changed, 18 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 93092cfb1..915926e6f 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1238,3 +1238,21 @@ Alcotest provides a quiet and colorful output where only 
faulty runs are fully
 displayed at the end of the run (with the full logs ready to inspect), with a
 simple (yet expressive) query language to select the tests to run.")
 (license license:isc)))
+
+(define-public ocaml-ppx-tools
+  (package
+(name "ocaml-ppx-tools")
+(version "5.0+4.02.0")
+(home-page "https://github.com/alainfrisch/ppx_tools/";)
+(source
+  (origin
+(method url-fetch)
+(uri (string-append home-page "/archive/" version ".tar.gz"))
+(sha256 (base32
+  "0rjg4rngi8k9873z4zq95zn9hj8qyw1vcrf11y15aqasfpqq16rc"
+(build-system ocaml-build-system)
+(arguments `(#:phases (modify-phases %standard-phases (delete 'configure))
+ #:tests? #f))
+(synopsis "Tools for authors of ppx rewriters and other syntactic tools")
+(description "Tools for authors of ppx rewriters and other syntactic 
tools.")
+(license license:expat)))
-- 
2.11.0




[PATCH 21/96] gnu: Add ocaml-cmdliner

2017-01-03 Thread Julien Lepiller
* gnu/packages/ocaml.scm (ocaml-cmdliner): New variable.
---
 gnu/packages/ocaml.scm | 27 +++
 1 file changed, 27 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index e971e72d0..8f7e3ec55 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1124,3 +1124,30 @@ library.")
 (description "access monotonic wall-clock time.  It allows to measure time
 spans without being subject to operating system calendar time adjustments.")
 (license license:isc)))
+
+(define-public ocaml-cmdliner
+  (package
+(name "ocaml-cmdliner")
+(version "0.9.8")
+(home-page "http://erratique.ch/software/cmdliner";)
+(source
+  (origin
+(method url-fetch)
+(uri (string-append home-page "/releases/cmdliner-" version ".tbz"))
+(sha256 (base32
+  "0hdxlkgiwjml9dpaa80282a8350if7mc1m6yz2mrd7gci3fszykx"
+(build-system ocaml-build-system)
+(native-inputs `(("opam" ,opam)))
+(arguments `(#:tests? #f
+ #:build-flags (list "native=true" "native-dynlink=true")
+ #:phases
+ (modify-phases %standard-phases
+   (delete 'configure
+(synopsis "Declarative definition of command line interfaces for OCaml")
+(description "Cmdliner is a module for the declarative definition of 
command
+line interfaces.  It provides a simple and compositional mechanism to convert
+command line arguments to OCaml values and pass them to your functions.  The
+module automatically handles syntax errors, help messages and UNIX man page
+generation. It supports programs with single or multiple commands and respects
+most of the POSIX and GNU conventions.")
+(license license:bsd-3)))
-- 
2.11.0




[PATCH 32/96] gnu: Add ocaml-xmlm

2017-01-03 Thread Julien Lepiller
* gnu/packages/ocaml.scm (ocaml-xmlm): New variable.
---
 gnu/packages/ocaml.scm | 26 ++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 1301bcb6d..21859ea90 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1437,3 +1437,29 @@ the operating system in OCaml.  It has functions to 
access the process
 environment, parse command line arguments, interact with the file system and
 run command line programs.")
 (license license:isc)))
+
+(define-public ocaml-xmlm
+  (package
+(name "ocaml-xmlm")
+(version "1.2.0")
+(home-page "http://erratique.ch/software/xmlm";)
+(source (origin
+  (method url-fetch)
+  (uri (string-append home-page "/releases/xmlm-" version ".tbz"))
+  (sha256
+(base32
+  "1jywcrwn5z3gkgvicr004cxmdaqfmq8wh72f81jqz56iyn5024nh"
+(build-system ocaml-build-system)
+(arguments `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+   (delete 'configure)
+   (replace 'build
+ (lambda* (#:key #:allow-other-keys)
+   (zero? (system* "pkg/build" "true")))
+(native-inputs `(("opam" ,opam)))
+(synopsis "Streaming XML codec for OCaml")
+(description "Xmlm is a streaming codec to decode and encode the XML data
+format.  It can process XML documents without a complete in-memory
+representation of the data.")
+(license license:isc)))
-- 
2.11.0




[PATCH 35/96] gnu: Add ocaml-uutf

2017-01-03 Thread Julien Lepiller
* gna/packages/ocaml.scm (ocaml-uutf): New variable.
---
 gnu/packages/ocaml.scm | 31 +++
 1 file changed, 31 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 48583e8c0..a4b129f42 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1513,3 +1513,34 @@ representation of the data.")
 (description "The uchar package provides a compatibility library for the
 `Uchar` module introduced in OCaml 4.03.")
 (license license:lgpl2.1)))
+
+(define-public ocaml-uutf
+  (package
+(name "ocaml-uutf")
+(version "1.0.0")
+(home-page "http://erratique.ch/software/uutf";)
+(source (origin
+  (method url-fetch)
+  (uri (string-append home-page "/releases/uutf-" version ".tbz"))
+  (sha256
+(base32
+  "08i0cw02cxw4mi2rs01v9xi307qshs6fnd1dlqyb52kcxzblpp37"
+(build-system ocaml-build-system)
+(arguments `(#:tests? #f
+ #:build-flags (list "build")
+ #:phases
+ (modify-phases %standard-phases
+   (delete 'configure
+(native-inputs `(("opam" ,opam)
+ ("topkg" ,ocaml-topkg)))
+(propagated-inputs `(("uchar" ,ocaml-uchar)
+ ("cmdliner" ,ocaml-cmdliner)))
+(synopsis "Non-blocking streaming Unicode codec for OCaml")
+(description "Uutf is a non-blocking streaming codec to decode and encode
+the UTF-8, UTF-16, UTF-16LE and UTF-16BE encoding schemes.  It can efficiently
+work character by character without blocking on IO.  Decoders perform character
+position tracking and support newline normalization.
+
+Functions are also provided to fold over the characters of UTF encoded OCaml
+string values and to directly encode characters in OCaml Buffer.t values.")
+(license license:isc)))
-- 
2.11.0




[PATCH 37/96] gnu: Add ocaml-ocurl

2017-01-03 Thread Julien Lepiller
* gnu/pcakages/ocaml.scm (ocaml-ocurl): New variable.
---
 gnu/packages/ocaml.scm | 26 ++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 0c8b188ca..a695d4a5e 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1571,3 +1571,29 @@ string values and to directly encode characters in OCaml 
Buffer.t values.")
 the JSON data format.  It can process JSON text without blocking on IO and
 without a complete in-memory representation of the data.")
 (license license:isc)))
+
+(define-public ocaml-ocurl
+  (package
+(name "ocaml-ocurl")
+(version "0.7.9")
+(home-page "http://ocurl.forge.ocamlcore.org/";)
+(source (origin
+  (method url-fetch)
+  (uri (string-append "http://ygrek.org.ua/p/release/ocurl/ocurl-";
+  version ".tar.gz"))
+  (sha256
+(base32
+  "0pm6nm33wi0p9h765k6zb94ljpknryam4qd1hmb2rsk2y0y1181n"
+(build-system ocaml-build-system)
+(arguments `(#:phases
+ (modify-phases %standard-phases
+   (add-before 'configure 'fix-/bin/sh
+ (lambda* (#:key inputs #:allow-other-keys)
+   (substitute* "configure"
+ (("-/bin/sh") (string-append "-" (which 
"bash")
+(native-inputs `(("pkg-config" ,pkg-config)))
+(inputs `(("curl" ,curl)))
+(synopsis "OCaml bindings for libcurl")
+(description "Client-side URL transfer library, supporting HTTP and a
+multitude of other network protocols (FTP/SMTP/RTSP/etc).")
+(license license:isc)))
-- 
2.11.0




[PATCH 34/96] gnu: Add ocaml-uchar

2017-01-03 Thread Julien Lepiller
* gnu/packages/ocaml.scm (ocaml-uchar): New variable.
---
 gnu/packages/ocaml.scm | 24 
 1 file changed, 24 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 33dc8d114..48583e8c0 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1489,3 +1489,27 @@ representation of the data.")
 (synopsis "Lexer generator for Unicode and OCaml")
 (description "Lexer generator for Unicode and OCaml.")
 (license license:expat)))
+
+(define-public ocaml-uchar
+  (package
+(name "ocaml-uchar")
+(version "0.0.1")
+(home-page "https://github.com/ocaml/uchar";)
+(source
+  (origin
+(method url-fetch)
+(uri (string-append home-page "/releases/download/v" version
+"/uchar-" version ".tbz"))
+(sha256 (base32
+  "0ficw1x7ymbd6m8hqw3w1aycwm1hbwd6bad3c5pspwnzh3qlikhi"
+(build-system ocaml-build-system)
+(arguments `(#:tests? #f
+ #:build-flags (list "native=true" "native-dynlink=true")
+ #:phases
+ (modify-phases %standard-phases
+   (delete 'configure
+(native-inputs `(("opam" ,opam)))
+(synopsis "Compatibility library for OCaml's Uchar module")
+(description "The uchar package provides a compatibility library for the
+`Uchar` module introduced in OCaml 4.03.")
+(license license:lgpl2.1)))
-- 
2.11.0




[PATCH 27/96] gnu: Add ocaml-ssl

2017-01-03 Thread Julien Lepiller
* gnu/packages/ocaml.scm (ocaml-ssl): New variable.
---
 gnu/packages/ocaml.scm | 32 
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index e710efc2f..7328004a0 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -51,6 +51,7 @@
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages time)
+  #:use-module (gnu packages tls)
   #:use-module (gnu packages version-control)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages curl))
@@ -1281,3 +1282,34 @@ simple (yet expressive) query language to select the 
tests to run.")
 events and signals.  React doesn't define any primitive event or signal, it
 lets the client choose the concrete timeline.")
 (license license:bsd-3)))
+
+(define-public ocaml-ssl
+  (package
+(name "ocaml-ssl")
+(version "0.5.3")
+(home-page "https://github.com/savonet/ocaml-ssl/";)
+(source
+  (origin
+(method url-fetch)
+(uri (string-append home-page "/archive/" version ".tar.gz"))
+(sha256 (base32
+  "1ds5gzyzpcgwn7h40dmjkll7g990cr82ay05b2a7nrclvv6fdpg8"
+(build-system ocaml-build-system)
+(arguments `(#:tests? #f
+ #:make-flags (list "OCAMLFIND_LDCONF=ignore")
+ #:phases
+ (modify-phases %standard-phases
+   (add-before 'configure 'bootstrap
+ (lambda* (#:key #:allow-other-keys)
+   (system* "./bootstrap")
+   (substitute* "src/OCamlMakefile"
+ (("/bin/sh") (which "bash")))
+   (substitute* "configure"
+ (("/bin/sh") (which "bash"
+(native-inputs `(("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("which" ,which)))
+(propagated-inputs `(("openssl" ,openssl)))
+(synopsis "OCaml bindings for OpenSSL")
+(description "OCaml bindings for OpenSSL.")
+(license license:lgpl2.1)))
-- 
2.11.0




[PATCH 36/96] gnu: Add ocaml-jsonm

2017-01-03 Thread Julien Lepiller
* gnu/packages/ocaml.scm (ocaml-jsonm): New variable.
---
 gnu/packages/ocaml.scm | 27 +++
 1 file changed, 27 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index a4b129f42..0c8b188ca 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1544,3 +1544,30 @@ position tracking and support newline normalization.
 Functions are also provided to fold over the characters of UTF encoded OCaml
 string values and to directly encode characters in OCaml Buffer.t values.")
 (license license:isc)))
+
+(define-public ocaml-jsonm
+  (package
+(name "ocaml-jsonm")
+(version "1.0.0")
+(home-page "http://erratique.ch/software/jsonm";)
+(source (origin
+  (method url-fetch)
+  (uri (string-append home-page "/releases/jsonm-" version ".tbz"))
+  (sha256
+(base32
+  "1v3ln6d965lplj28snjdqdqablpp1kx8bw2cfx0m6i157mqyln62"
+(build-system ocaml-build-system)
+(arguments `(#:tests? #f
+ #:build-flags (list "build")
+ #:phases
+ (modify-phases %standard-phases
+   (delete 'configure
+(native-inputs `(("opam" ,opam)
+ ("topkg" ,ocaml-topkg)))
+(propagated-inputs `(("uutf" ,ocaml-uutf)
+ ("cmdliner" ,ocaml-cmdliner)))
+(synopsis "Non-blocking streaming JSON codec for OCaml")
+(description "Jsonm is a non-blocking streaming codec to decode and encode
+the JSON data format.  It can process JSON text without blocking on IO and
+without a complete in-memory representation of the data.")
+(license license:isc)))
-- 
2.11.0




[PATCH 42/96] gnu: Add ocaml-pcre

2017-01-03 Thread Julien Lepiller
* gnu/packages/ocaml.scm (ocaml-pcre): New variable.
---
 gnu/packages/ocaml.scm | 23 +++
 1 file changed, 23 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 2975004b0..09017211c 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -52,6 +52,7 @@
   #:use-module (gnu packages m4)
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages pcre)
   #:use-module (gnu packages time)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages version-control)
@@ -1706,3 +1707,25 @@ tasks in C, C++, OCaml, and LaTeX projects, or a mixture 
thereof.")
 every compliant installation of OCaml and organize these libraries into a
 hierarchy of modules.")
 (license license:lgpl2.1+)))
+
+(define-public ocaml-pcre
+  (package
+(name "ocaml-pcre")
+(version "7.2.3")
+(home-page "https://mmottl.github.io/pcre-ocaml/";)
+(source (origin
+  (method url-fetch)
+  (uri (string-append 
"https://github.com/mmottl/pcre-ocaml/archive";
+  "/v" version ".tar.gz"))
+  (sha256
+(base32
+  "0rj6dw79px4sj2kq0iss2nzq3rnsn9wivvc0f44wa1mppr6njfb3"
+(build-system ocaml-build-system)
+(native-inputs `(("batteries" ,ocaml-batteries)
+ ("pcre:bin" ,pcre "bin")))
+(propagated-inputs `(("pcre" ,pcre)))
+(synopsis "Bindings to the Perl Compatibility Regular Expressions library")
+(description "Pcre-ocaml offers library functions for string pattern
+matching and substitution, similar to the functionality offered by the Perl
+language.")
+(license license:lgpl2.1))); with an exception
-- 
2.11.0




[PATCH 29/96] gnu: Add ocaml-logs

2017-01-03 Thread Julien Lepiller
* gnu/packages/ocaml.scm (ocaml-logs): New variable.
---
 gnu/packages/ocaml.scm | 30 ++
 1 file changed, 30 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 5418ee235..3856af1e9 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1350,3 +1350,33 @@ make it easy to run normally-blocking I/O operations 
concurrently in a single
 process.  Also, in many cases, Lwt threads can interact without the need for
 locks or other synchronization primitives.")
 (license license:lgpl2.1)))
+
+(define-public ocaml-logs
+  (package
+(name "ocaml-logs")
+(version "0.6.2")
+(home-page "http://erratique.ch/software/logs";)
+(source (origin
+  (method url-fetch)
+  (uri (string-append home-page "/releases/logs-" version ".tbz"))
+  (sha256
+(base32
+  "1khbn7jqpid83zn8rvyh1x1sirls7zc878zj4fz985m5xlsfy853"
+(build-system ocaml-build-system)
+(arguments `(#:tests? #f
+ #:build-flags (list "build" "--with-js_of_ocaml" "false")
+ #:phases
+ (modify-phases %standard-phases
+   (delete 'configure
+(native-inputs `(("opam" ,opam)))
+(propagated-inputs `(("fmt" ,ocaml-fmt)
+ ("lwt" ,ocaml-lwt)
+ ("mtime" ,ocaml-mtime)
+ ("result" ,ocaml-result)
+ ("cmdliner" ,ocaml-cmdliner)
+ ("topkg" ,ocaml-topkg)))
+(synopsis "Logging infrastructure for OCaml")
+(description "Logs provides a logging infrastructure for OCaml.  Logging is
+performed on sources whose reporting level can be set independently.  Log
+message report is decoupled from logging and is handled by a reporter.")
+(license license:isc)))
-- 
2.11.0




[PATCH 49/96] gnu: Add ocaml-ppx-core

2017-01-03 Thread Julien Lepiller
* gnu/packages/ocaml.scm (ocaml-ppx-core): New variable.
---
 gnu/packages/ocaml.scm | 22 ++
 1 file changed, 22 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 1dad83fe7..3a9a8de13 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1865,3 +1865,25 @@ storage of large amounts of data.")
 record fields, to get and set record fields, iterate and fold over all fields
 of a record and create new record values.")
 (license license:asl2.0)))
+
+(define-public ocaml-ppx-core
+  (package
+(name "ocaml-ppx-core")
+(version "113.33.03")
+(home-page "https://github.com/janestreet/ppx_core/";)
+(source (janestreet-origin "ppx_core" version
+   "0f69l4czhgssnhb5ds2j9dbqjyz8dp1y3i3x0i4h6pxnms20zbxa"))
+(build-system ocaml-build-system)
+(native-inputs `(("js-build-tools" ,ocaml-js-build-tools)
+ ("opam" ,opam)))
+(inputs `(("ppx-tools" ,ocaml-ppx-tools)))
+(arguments janestreet-arguments)
+(synopsis "Standard library for ppx rewriters")
+(description "Ppx_core is a standard library for OCaml AST transformers.
+It contains:
+
+- various auto-generated AST traversal using an open recursion scheme
+- helpers for building AST fragments
+- helpers for matching AST fragments
+- a framework for dealing with attributes and extension points.")
+(license license:asl2.0)))
-- 
2.11.0




  1   2   3   >