Re: [PATCH 1/5] gnu: Add emacs-ht.

2017-01-27 Thread Alex Kost
Mathieu Othacehe (2017-01-26 13:31 +0100) wrote:

> * gnu/packages/emacs.scm (emacs-ht): New variable.
> ---
>  gnu/packages/emacs.scm | 25 +
>  1 file changed, 25 insertions(+)
>
> diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
> index d3e64c04f..699d41712 100644
> --- a/gnu/packages/emacs.scm
> +++ b/gnu/packages/emacs.scm
> @@ -3645,3 +3645,28 @@ Streams are implemented as delayed evaluation of cons 
> cells.")
>(description "This package provides expression based interactive search
>  procedures for emacs-lisp-mode.")
>(license license:gpl3+
> +
> +(define-public emacs-ht
> +  (package
> +  (name "emacs-ht")
> +  (version "20161015.1945")
> +  (source
> +(origin
> +  (method url-fetch)
> +  (uri (string-append
> + "http://melpa.org/packages/ht-";
> + version
> + ".el"))

We can't use files from melpa.org because once a new commit appears in
the upstream repo, melpa will rebuilt the package and remove the
previous version, so this package will lost its source and will not be
buildable anymore.  So please use the latest available tarballs instead.
In this case it is:

  https://github.com/Wilfred/ht.el/archive/2.1.tar.gz

> +  (sha256
> +(base32
> +  "1ar6rw0vl18pws72nm167jfxn9vzl8ngnh1xw3npfk19x3y6n5g6"
> +  (build-system emacs-build-system)
> +  (propagated-inputs `(("emacs-dash" ,emacs-dash)))
> +  (home-page "https://github.com/Wilfred/ht.el";)
> +  (synopsis
> +"Hash table library for Emacs")
> +  (description
> +"This package simplifies the use of hash tables in elisp. It also
> +provides functions to convert hash tables from and to alists and plists.")
> +  (license license:gpl3+)))
> +

-- 
Alex



Re: [PATCH 1/5] gnu: Add emacs-ht.

2017-01-27 Thread Leo Famulari
On Fri, Jan 27, 2017 at 12:20:46PM +0300, Alex Kost wrote:
> Mathieu Othacehe (2017-01-26 13:31 +0100) wrote:
> > +  (uri (string-append
> > + "http://melpa.org/packages/ht-";
> > + version
> > + ".el"))
> 
> We can't use files from melpa.org because once a new commit appears in
> the upstream repo, melpa will rebuilt the package and remove the
> previous version, so this package will lost its source and will not be
> buildable anymore.  So please use the latest available tarballs instead.

I think the linter should warn about this. It seems like you have to
send this email often.



Multiple python-3 packages

2017-01-27 Thread Leo Famulari
Currently we have Python 3.4 and 3.5. Python 3.6 was released recently.

When we added 3.5, I thought it was a good idea to keep 3.4 around in
case some packages need it. It turns out that nothing is using it in our
tree.

Do we want to keep 3.4 and 3.5 around? There is a maintenance cost
incurred at each new release, because their shared patches tend to
diverge each time.

If we should keep them, how should the package inheritance go? Now, it's
like this:

2.7 < 3.5 < 3.4

If we kept them all, should 3.5 and 3.4 both inherit 3.6?



Re: [PATCH 1/5] gnu: Add emacs-ht.

2017-01-27 Thread Mathieu OTHACEHE

> On Fri, Jan 27, 2017 at 12:20:46PM +0300, Alex Kost wrote:
>> Mathieu Othacehe (2017-01-26 13:31 +0100) wrote:
>> > +  (uri (string-append
>> > + "http://melpa.org/packages/ht-";
>> > + version
>> > + ".el"))
>> 
>> We can't use files from melpa.org because once a new commit appears in
>> the upstream repo, melpa will rebuilt the package and remove the
>> previous version, so this package will lost its source and will not be
>> buildable anymore.  So please use the latest available tarballs instead.

Ok, I'll send and update.

>
> I think the linter should warn about this. It seems like you have to
> send this email often.

Yes, or modify guix import for melpa ? It seems that I
trusted wrongly the output of the importer ...

Mathieu



[PATCH 0/1] Fix docs on Installing GuixSD in a VM

2017-01-27 Thread Leo Famulari
>From what I can tell, there is a mistake in these instructions. I can't
find any QEMU documentation that mentions using '-net default', and I've
seen a few reports on #guix of it failing.

Here is the most recent:

https://gnunet.org/bot/log/guix/2017-01-27#T1276044

Leo Famulari (1):
  doc: Fix networking instructions in "Installing GuixSD in a VM".

 doc/guix.texi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.11.0




[PATCH 1/1] doc: Fix networking instructions in "Installing GuixSD in a VM".

2017-01-27 Thread Leo Famulari
This is a followup to commit c8b543741f422ecf41e7635c6a1c40b3bd55947a.

* doc/guix.texi (Installing GuixSD in a VM): Fix typo.
---
 doc/guix.texi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 7093bf746..cb203fca2 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -7137,7 +7137,7 @@ Boot the USB installation image in an VM:
 
 @example
 qemu-system-x86_64 -m 1024 -smp 1 \
-  -net default -net nic,model=virtio -boot menu=on \
+  -net user -net nic,model=virtio -boot menu=on \
   -drive file=guixsd.img \
   -drive file=guixsd-usb-install-@value{VERSION}.@var{system}
 @end example
-- 
2.11.0




[PATCH 0/2] Clarify VM installation instructions

2017-01-27 Thread Leo Famulari
There is a subtle confuser in the instructions about installing GuixSD
in a VM. I missed it the first time it was pointed out to me, because I
already knew how to install GuixSD. But if you begin with Guix by
installing GuixSD in a VM, this might waste a few minutes of your time.

The instructions start with "First, retrieve the GuixSD installation
image as described previously (see USB Stick Installation)." [0]

You go to USB Stick Installation, where it explains how to download the
image file and check the signature. [1] It continues to explain how to put
it on a USB stick, but you aren't doing that, so you go back to the VM
installation instructions and try booting the xz-compressed tarball.

The reader has not read the part about decompressing the tarball,
because that is under "To copy the image to a USB stick, follow these
steps[...]"

I've helped one person who made this mistake, and I can see how you'd
make it if you were a beginner.

[0]
https://www.gnu.org/software/guix/manual/html_node/Installing-GuixSD-in-a-VM.html

[1]
https://www.gnu.org/software/guix/manual/html_node/USB-Stick-Installation.html


Leo Famulari (1):
  doc: Clarify "Installing GuixSD in a VM".

 doc/guix.texi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.11.0




[PATCH 1/1] doc: Clarify "Installing GuixSD in a VM".

2017-01-27 Thread Leo Famulari
* doc/guix.texi (Installing GuixSD in a VM): Mention decompressing the
installation image.
---
 doc/guix.texi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index cb203fca2..bff1d03c6 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -7119,8 +7119,8 @@ disk image, follow these steps:
 
 @enumerate
 @item
-First, retrieve the GuixSD installation image as described previously
-(@pxref{USB Stick Installation}).
+First, retrieve and decompress the GuixSD installation image as
+described previously (@pxref{USB Stick Installation}).
 
 @item
 Create a disk image that will hold the installed system.  To make a
-- 
2.11.0




[PATCH] gnu: rustc: Add LIBRARY_PATH search path.

2017-01-27 Thread Ben Woodcroft
Hi,

This helps compiling when rustc is in one's profile and gcc is not.
Thanks, ben.




[PATCH] gnu: rustc: Add LIBRARY_PATH search path.

2017-01-27 Thread Ben Woodcroft
* gnu/packages/rust.scm (rustc)[native-search-paths]: New field.
---
 gnu/packages/rust.scm | 5 +
 1 file changed, 5 insertions(+)

diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index ae0453004..e1d973ac7 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2016 David Craven 
 ;;; Copyright © 2016 Eric Le Bihan 
 ;;; Copyright © 2016 ng0 
+;;; Copyright © 2016 Ben Woodcroft 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -272,6 +273,10 @@ rustc-bootstrap and cargo-bootstrap packages.")
(wrap-program (string-append out "/bin/rustc")
  `("PATH" ":" prefix (,(string-append ld-wrapper "/bin")))
  `("LIBRARY_PATH" ":" suffix (,(string-append libc 
"/lib"))
+(native-search-paths
+ (list (search-path-specification
+(variable "LIBRARY_PATH")
+(files '("lib" "lib64")
 (synopsis "Compiler for the Rust progamming language")
 (description "Rust is a systems programming language that provides memory
 safety and thread safety guarantees.")
-- 
2.11.0




[PATCH v2 0/5] Add emacs-mu4e-alert.

2017-01-27 Thread Mathieu Othacehe
The point of this serie is to add mu4e-alert and it's dependencies.
I used the importer for every package and rewrote incorrect descriptions.

Changelog:
*v2: Replace melpa repositories by github repositories.

Mathieu Othacehe (5):
  gnu: Add emacs-ht.
  gnu: Add emacs-log4e.
  gnu: Add emacs-gntp.
  gnu: Add emacs-alert.
  gnu: Add emacs-mu4e-alert.

 gnu/packages/emacs.scm | 130 +
 1 file changed, 130 insertions(+)

-- 
2.11.0




[PATCH v2 2/5] gnu: Add emacs-log4e.

2017-01-27 Thread Mathieu Othacehe
* gnu/packages/emacs.scm (emacs-log4e): New variable.
---
 gnu/packages/emacs.scm | 29 +
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 6c6d4db2f..35294a9bc 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -3670,3 +3670,32 @@ procedures for emacs-lisp-mode.")
 provides functions to convert hash tables from and to alists and plists.")
   (license license:gpl3+)))
 
+(define-public emacs-log4e
+  (package
+(name "emacs-log4e")
+(version "0.3.0")
+(source
+ (origin
+   (method url-fetch)
+   (uri (string-append
+ "https://github.com/aki2o/log4e/archive/";
+ "v" version ".tar.gz"))
+   (sha256
+(base32
+ "0nbdpbw353snda3v19l9hsm6gimppwnpxj18amm350bm81lyim2g"
+(build-system emacs-build-system)
+(arguments
+ `(#:phases
+   (modify-phases %standard-phases
+ (add-after
+ 'unpack 'remove-tests
+   ;; Guile complains of null characters in some strings of
+   ;; test files. Remove the test folder fixes it.
+   (lambda _
+ (delete-file-recursively "test"))
+(home-page "https://github.com/aki2o/log4e";)
+(synopsis "Logging framework for elisp.")
+(description
+ "This package provides a logging framework for elisp. It allows to deal 
with
+multiple log levels.")
+(license license:gpl3+)))
-- 
2.11.0




[PATCH v2 1/5] gnu: Add emacs-ht.

2017-01-27 Thread Mathieu Othacehe
* gnu/packages/emacs.scm (emacs-ht): New variable.
---
 gnu/packages/emacs.scm | 25 +
 1 file changed, 25 insertions(+)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index d3e64c04f..6c6d4db2f 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -3645,3 +3645,28 @@ Streams are implemented as delayed evaluation of cons 
cells.")
   (description "This package provides expression based interactive search
 procedures for emacs-lisp-mode.")
   (license license:gpl3+
+
+(define-public emacs-ht
+  (package
+  (name "emacs-ht")
+  (version "2.1")
+  (source
+(origin
+  (method url-fetch)
+  (uri (string-append
+ "https://github.com/Wilfred/ht.el/archive/";
+ version
+ ".tar.gz"))
+  (sha256
+(base32
+  "1lpba36kzxcc966fvsbrfpy8ah9gnvay0yk26gbyjil0rggrbqzj"
+  (build-system emacs-build-system)
+  (propagated-inputs `(("emacs-dash" ,emacs-dash)))
+  (home-page "https://github.com/Wilfred/ht.el";)
+  (synopsis
+"Hash table library for Emacs")
+  (description
+"This package simplifies the use of hash tables in elisp. It also
+provides functions to convert hash tables from and to alists and plists.")
+  (license license:gpl3+)))
+
-- 
2.11.0




[PATCH v2 3/5] gnu: Add emacs-gntp.

2017-01-27 Thread Mathieu Othacehe
* gnu/packages/emacs.scm (emacs-gntp): New variable.
---
 gnu/packages/emacs.scm | 24 
 1 file changed, 24 insertions(+)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 35294a9bc..aaa67615f 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -3699,3 +3699,27 @@ provides functions to convert hash tables from and to 
alists and plists.")
  "This package provides a logging framework for elisp. It allows to deal 
with
 multiple log levels.")
 (license license:gpl3+)))
+
+(define-public emacs-gntp
+  (package
+(name "emacs-gntp")
+(version "0.1")
+(source
+ (origin
+   (method url-fetch)
+   (uri (string-append
+ "https://github.com/tekai/gntp.el/archive/";
+ "v" version ".tar.gz"))
+   (sha256
+(base32
+ "16c1dfkia9yhl206bdhjr3b8kfvqcqr38jl5lq8qsyrrzsnmghny"
+(build-system emacs-build-system)
+(home-page "https://github.com/tekai/gntp.el";)
+(synopsis
+ "Growl Notification Protocol for Emacs")
+(description
+ "This package implements the Growl Notification Protocol GNTP
+described at http://www.growlforwindows.com/gfw/help/gntp.aspx
+It is incomplete as it only lets you send but not receive
+notifications.")
+(license license:gpl3+)))
-- 
2.11.0




[PATCH v2 4/5] gnu: Add emacs-alert.

2017-01-27 Thread Mathieu Othacehe
* gnu/packages/emacs.scm (emacs-alert): New variable.
---
 gnu/packages/emacs.scm | 26 ++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index aaa67615f..81cefa541 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -3723,3 +3723,29 @@ described at 
http://www.growlforwindows.com/gfw/help/gntp.aspx
 It is incomplete as it only lets you send but not receive
 notifications.")
 (license license:gpl3+)))
+
+(define-public emacs-alert
+  (package
+(name "emacs-alert")
+(version "1.2")
+(source
+ (origin
+   (method url-fetch)
+   (uri (string-append
+ "https://github.com/jwiegley/alert/archive/";
+ "v" version ".tar.gz"))
+   (sha256
+(base32
+ "1693kck3k2iz5zhpmxwqyafxm68hr6gzs60lkxd3j1wlp2c9fwyr"
+(build-system emacs-build-system)
+(propagated-inputs
+ `(("emacs-gntp" ,emacs-gntp)
+   ("emacs-log4e" ,emacs-log4e)))
+(home-page "https://github.com/jwiegley/alert";)
+(synopsis
+ "Growl-style notification system for Emacs")
+(description
+ "Alert is a Growl-workalike for Emacs which uses a common notification
+interface and multiple, selectable \"styles\", whose use is fully
+customizable by the user.")
+(license license:gpl3+)))
-- 
2.11.0




[PATCH v2 5/5] gnu: Add emacs-mu4e-alert.

2017-01-27 Thread Mathieu Othacehe
* gnu/packages/emacs.scm (emacs-mu4e-alert): New variable.
---
 gnu/packages/emacs.scm | 26 ++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 81cefa541..3f93b867e 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -3749,3 +3749,29 @@ notifications.")
 interface and multiple, selectable \"styles\", whose use is fully
 customizable by the user.")
 (license license:gpl3+)))
+
+(define-public emacs-mu4e-alert
+  (package
+(name "emacs-mu4e-alert")
+(version "0.4")
+(source
+ (origin
+   (method url-fetch)
+   (uri (string-append
+ "https://github.com/iqbalansari/mu4e-alert/archive/";
+ "v" version ".tar.gz"))
+   (sha256
+(base32
+ "1m63vyb2v5r9swmqv56q80jca8172nk5vaxl7bcm5zbfs8zsvr4b"
+(build-system emacs-build-system)
+(propagated-inputs
+ `(("emacs-alert" ,emacs-alert)
+   ("emacs-s" ,emacs-s)
+   ("emacs-ht" ,emacs-ht)))
+(home-page
+ "https://github.com/iqbalansari/mu4e-alert";)
+(synopsis "Desktop notification for mu4e")
+(description
+ "This package provides desktop notifications for mu4e, additionally it can
+display the number of unread emails in the modeline.")
+(license license:gpl3+)))
-- 
2.11.0




[PATCH 1/2] gnu: Add openvswitch.

2017-01-27 Thread 宋文武
* gnu/packages/networking.scm (openvswitch): New variable.
---
 gnu/packages/networking.scm | 54 +
 1 file changed, 54 insertions(+)

diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 87ee0a1d8..c6fb2cfda 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -1060,3 +1060,57 @@ suddenly a lot of network traffic, you can fire up 
NetHogs and immediately see
 which PID is causing this.  This makes it easy to identify programs that have
 gone wild and are suddenly taking up your bandwidth.")
 (license license:gpl2+)))
+
+(define-public openvswitch
+  (package
+(name "openvswitch")
+(version "2.6.1")
+(source (origin
+  (method url-fetch)
+  (uri (string-append
+"http://openvswitch.org/releases/openvswitch-";
+version ".tar.gz"))
+  (sha256
+   (base32
+"036gq741j9kqsjlp693nff838c9wjd1c56nswl9vyyd1lsmj0yrh"
+(build-system gnu-build-system)
+(arguments
+ '(;; FIXME: many tests fail with:
+   ;;[…]
+   ;;test -e $OVS_RUNDIR/ovs-vswitchd.pid
+   ;;ovs-appctl -t ovs-vswitchd exit
+   ;;hard failure
+   #:tests? #f
+   #:configure-flags
+   '("--enable-shared"
+ "--localstatedir=/var"
+ "--with-dbdir=/var/lib/openvswitch")
+   #:phases
+   (modify-phases %standard-phases
+ (replace 'install
+   (lambda _
+ (zero? (system* "make"
+ "RUNDIR=/tmp"
+ "PKIDIR=/tmp"
+ "LOGDIR=/tmp"
+ "DBDIR=/tmp"
+ "install")))
+(native-inputs
+ `(("perl" ,perl)
+   ("pkg-config" ,pkg-config)
+   ("python" ,python-2)
+   ;; for testing
+   ("util-linux" ,util-linux)))
+(propagated-inputs
+ `(("python-six" ,python2-six)))
+(inputs
+ `(("libcap-ng" ,libcap-ng)
+   ("openssl" ,openssl)))
+(synopsis "Virtual network switch")
+(home-page "http://www.openvswitch.org/";)
+(description
+ "Open vSwitch is a multilayer virtual switch.  It is designed to enable
+massive network automation through programmatic extension, while still
+supporting standard management interfaces and protocols (e.g. NetFlow, sFlow,
+IPFIX, RSPAN, CLI, LACP, 802.1ag).")
+(license license:asl2.0)))
-- 
2.11.0




[PATCH 2/2] services: Add openvswitch-service-type.

2017-01-27 Thread 宋文武
* gnu/services/networking.scm (): New record type.
(openvswitch-activation, openvswitch-shepherd-service): New procedures.
(openvswitch-service-type): New variable.
* doc/guix.texi (Networking Services): Document it.
---
 doc/guix.texi   | 15 +++
 gnu/services/networking.scm | 61 -
 2 files changed, 75 insertions(+), 1 deletion(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 7093bf746..8f9973542 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -9093,6 +9093,21 @@ Boolean values @var{ipv4?} and @var{ipv6?} determine 
whether to use IPv4/IPv6
 sockets.
 @end deffn
 
+@deffn {Scheme Variable} openvswitch-service-type
+This is the type of the @uref{http://www.openvswitch.org, Open vSwitch}
+service, whose value should be an @code{openvswitch-configuration}
+object.
+@end deffn
+
+@deftp {Data Type} openvswitch-configuration
+Data type representing the configuration of openvswitch.
+
+@table @asis
+@item @code{package} (default: @var{openvswitch})
+Package object of the Open vSwitch.
+
+@end table
+@end deftp
 
 @node X Window
 @subsubsection X Window
diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index f7412ff29..8cc92a31d 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -31,6 +31,7 @@
   #:use-module (gnu packages linux)
   #:use-module (gnu packages tor)
   #:use-module (gnu packages messaging)
+  #:use-module (gnu packages networking)
   #:use-module (gnu packages ntp)
   #:use-module (gnu packages wicd)
   #:use-module (gnu packages gnome)
@@ -72,7 +73,10 @@
 network-manager-service-type
 
 connman-service
-wpa-supplicant-service-type))
+wpa-supplicant-service-type
+
+openvswitch-service-type
+openvswitch-configuration))
 
 ;;; Commentary:
 ;;;
@@ -811,4 +815,59 @@ configure networking."
(service-extension dbus-root-service-type list)
(service-extension profile-service-type list)
 
+
+;;;
+;;; Open vSwitch
+;;;
+
+(define-record-type* 
+  openvswitch-configuration make-openvswitch-configuration
+  openvswitch-configuration?
+  (package openvswitch-configuration-package
+   (default openvswitch)))
+
+(define openvswitch-activation
+  (match-lambda
+(($  package)
+ (let ((ovsdb-tool (file-append package "/bin/ovsdb-tool")))
+   #~(begin
+   (use-modules (guix build utils))
+   (mkdir-p "/var/run/openvswitch")
+   (mkdir-p "/var/lib/openvswitch")
+   (let ((conf.db "/var/lib/openvswitch/conf.db"))
+ (unless (file-exists? conf.db)
+   (system* #$ovsdb-tool "create" conf.db
+
+(define openvswitch-shepherd-service
+  (match-lambda
+(($  package)
+ (let ((ovsdb-server (file-append package "/sbin/ovsdb-server"))
+   (ovs-vswitchd (file-append package "/sbin/ovs-vswitchd")))
+   (list
+(shepherd-service
+ (provision '(ovsdb))
+ (documentation "Run the Open vSwitch database server.")
+ (start #~(make-forkexec-constructor
+   (list #$ovsdb-server
+ "--remote=punix:/var/run/openvswitch/db.sock")))
+ (stop #~(make-kill-destructor)))
+(shepherd-service
+ (provision '(vswitchd))
+ (requirement '(ovsdb))
+ (documentation "Run the Open vSwitch daemon.")
+ (start #~(make-forkexec-constructor
+   (list #$ovs-vswitchd)))
+ (stop #~(make-kill-destructor
+
+(define openvswitch-service-type
+  (service-type
+   (name 'openvswitch)
+   (extensions
+(list (service-extension activation-service-type
+ openvswitch-activation)
+  (service-extension profile-service-type
+ (compose list openvswitch-configuration-package))
+  (service-extension shepherd-root-service-type
+ openvswitch-shepherd-service)
+
 ;;; networking.scm ends here
-- 
2.11.0




Re: [PATCH 1/2] gnu: Add openvswitch.

2017-01-27 Thread John Darrington
On Fri, Jan 27, 2017 at 09:56:15PM +0800, ? wrote:
 * gnu/packages/networking.scm (openvswitch): New variable.
 ---
  gnu/packages/networking.scm | 54 
+
  1 file changed, 54 insertions(+)
 
 diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
 index 87ee0a1d8..c6fb2cfda 100644
 --- a/gnu/packages/networking.scm
 +++ b/gnu/packages/networking.scm
 @@ -1060,3 +1060,57 @@ suddenly a lot of network traffic, you can fire up 
NetHogs and immediately see
  which PID is causing this.  This makes it easy to identify programs that 
have
  gone wild and are suddenly taking up your bandwidth.")
  (license license:gpl2+)))
 +
 +(define-public openvswitch
 +  (package
 +(name "openvswitch")
 +(version "2.6.1")
 +(source (origin
 +  (method url-fetch)
 +  (uri (string-append
 +"http://openvswitch.org/releases/openvswitch-";
 +version ".tar.gz"))
 +  (sha256
 +   (base32
 +"036gq741j9kqsjlp693nff838c9wjd1c56nswl9vyyd1lsmj0yrh"
 +(build-system gnu-build-system)
 +(arguments
 + '(;; FIXME: many tests fail with:
 +   ;;[???]
 +   ;;test -e $OVS_RUNDIR/ovs-vswitchd.pid
 +   ;;ovs-appctl -t ovs-vswitchd exit
 +   ;;hard failure
 +   #:tests? #f

Have you tried asking upstream about this?  They are usually very helpfull.


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: [PATCH] Update entries for ng0 in .mailmap.

2017-01-27 Thread Tobias Geerinckx-Rice
ng0,

On 24/01/17 12:51, contact@cryptolab.net wrote:
> * .mailmap: Update entries for ng0.

Pushed as a74b49765b366fb9a9a202e1811f25c746c6.

Kind regards,

T G-R



signature.asc
Description: OpenPGP digital signature


[PATCH] gnu: python-matplotlib: Don't propagate python-numpy-bootstrap.

2017-01-27 Thread Thomas Danckaert
Hi,

when a profile contains both python-numpy and python-matplotlib
(either installed directly or by propagation, e.g. when from
python-ipython), a lot of warnings about conflicts between
python-numpy and python-nympy-bootstrap appear, because matplotlib
propagates its python-numpy-bootstrap dependency.

This patch works around it by creating an intermediate
python-matplotlib-bootstrap package as well, which is then used as a
native input to generate the documentation of python-numpy.
python-numpy is then used as a propagated input of python-matplotlib,
so python-numpy-bootstrap doesn't appear in user's profiles anymore.

What do you think?

Thomas
>From 56a9c4d0f86308fe7bdec1345998c0142c444a4b Mon Sep 17 00:00:00 2001
From: Thomas Danckaert 
Date: Fri, 27 Jan 2017 12:12:42 +0100
Subject: [PATCH] gnu: python-matplotlib: Don't propagate
 python-numpy-bootstrap.

* gnu/packages/python.scm (python-matplotlib-bootstrap,python2-matplotlib-bootstrap):
  New variables.
  (python-matplotlib, python2-matplotlib) [propagated-inputs]: Use
  python-numpy instead of python-numpy-bootstrap.
  (python-numpy, python2-numpy) [propagated-inputs,native-inputs]: Replace
  matplotlib by native inputs matplotlib-bootstrap.
---
 gnu/packages/python.scm | 21 -
 1 file changed, 16 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 1a56008a6..73a940548 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -3404,11 +3404,11 @@ association studies (GWAS) on extremely large data sets.")
  `(("which" ,which)
,@(package-inputs python-numpy-bootstrap)))
 (propagated-inputs
- `(("python-matplotlib" ,python-matplotlib)
-   ("python-pyparsing" ,python-pyparsing)
+ `(("python-pyparsing" ,python-pyparsing)
,@(package-propagated-inputs python-numpy-bootstrap)))
 (native-inputs
  `(("pkg-config" ,pkg-config)
+   ("python-matplotlib" ,python-matplotlib-bootstrap) ; to build documentation
("python-sphinx" ,python-sphinx)
("python-numpydoc" ,python-numpydoc)
("texlive" ,texlive)
@@ -3458,7 +3458,11 @@ association studies (GWAS) on extremely large data sets.")
   ,phases)))
 
 (define-public python2-numpy
-  (package-with-python2 python-numpy))
+  (let ((numpy (package-with-python2 python-numpy)))
+(package (inherit numpy)
+ (native-inputs
+  `(("python-matplotlib" ,python2-matplotlib-bootstrap)
+,@(alist-delete "python-matplotlib" (package-native-inputs numpy)))
 
 (define-public python-pygit2
   (package
@@ -3623,7 +3627,7 @@ transcendental functions).")
("gobject-introspection" ,gobject-introspection)
("python-tkinter" ,python "tk")
("python-dateutil" ,python-dateutil-2)
-   ("python-numpy" ,python-numpy-bootstrap)
+   ("python-numpy" ,python-numpy)
("python-pillow" ,python-pillow)
("python-pytz" ,python-pytz)
("python-six" ,python-six)
@@ -3740,8 +3744,15 @@ toolkits.")
`(("python2-pycairo" ,python2-pycairo)
  ("python2-pygobject-2" ,python2-pygobject-2)
  ("python2-tkinter" ,python-2 "tk")
+ ("python2-numpy" ,python2-numpy)
  ,@(fold alist-delete (package-propagated-inputs matplotlib)
- '("python-pycairo" "python-pygobject" "python-tkinter")))
+ '("python-pycairo" "python-pygobject" "python-tkinter" "python-numpy")))
+
+(define python-matplotlib-bootstrap
+  ((package-input-rewriting `((,python-numpy . ,python-numpy-bootstrap))) python-matplotlib))
+
+(define python2-matplotlib-bootstrap
+  ((package-input-rewriting `((,python2-numpy . ,python2-numpy-bootstrap))) python2-matplotlib))
 
 (define-public python2-pysnptools
   (package
-- 
2.11.0



Re: Multiple python-3 packages

2017-01-27 Thread Benz Schenk
On Fri, 27 Jan 2017 05:12:25 -0500
Leo Famulari  wrote:

> Currently we have Python 3.4 and 3.5. Python 3.6 was released recently.
> 
> When we added 3.5, I thought it was a good idea to keep 3.4 around in
> case some packages need it. It turns out that nothing is using it in our
> tree.
> 
> Do we want to keep 3.4 and 3.5 around? There is a maintenance cost
> incurred at each new release, because their shared patches tend to
> diverge each time.

As far as my grep-fu tells me, there's no packages that rely on a
specific Python 3 release in their definition as of now, so I'd be in
favour of dropping the old versions. 

If packages start to fail because of compatibility issues, I'd say
that's
a) an upstream issue, which admittedly has to be worked around until
they hopefuly fix it, but still 
b) until the definitions of the affected packages are patched it would
happen anyway

worst case scenario, the old versions have to be are added again and
people just rollback and keep using whatever they have installed atm
until the needed version is available again and the package definitions
are fixed

> 
> If we should keep them, how should the package inheritance go? Now, it's
> like this:
> 
> 2.7 < 3.5 < 3.4
> 
> If we kept them all, should 3.5 and 3.4 both inherit 3.6?

That would make sense



Bug in Texlive &co ??

2017-01-27 Thread John Darrington
Yesterday I did "guix package --upgrade" and now, a simple latex file:

\documentclass{article}
\usepackage[T1]{fontenc}
\begin {document}
This is a test.
\end {document}

fails with 

/gnu/store/161gb51263qn8kydvdcd3jq6bcax3abf-texlive-texmf-minimal-2016/share/texmf-dist/web2c/mktexnam:
 Could not map source abbreviation  for ecrm1000.
/gnu/store/161gb51263qn8kydvdcd3jq6bcax3abf-texlive-texmf-minimal-2016/share/texmf-dist/web2c/mktexnam:
 Need to update ?
mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; 
input ecrm1000
This is METAFONT, Version 2.7182818 (TeX Live 2016) (preloaded base=mf)


kpathsea: Running mktexmf ecrm1000
! I can't find file `ecrm1000'.
<*> ...ljfour; mag:=1; nonstopmode; input ecrm1000
  
Please type another input file name
! Emergency stop.
<*> ...ljfour; mag:=1; nonstopmode; input ecrm1000
  
Transcript written on mfput.log.
grep: ecrm1000.log: No such file or directory
mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input 
ecrm1000' failed to make ecrm1000.tfm.
kpathsea: Appending font creation commands to missfont.log.

! Font T1/cmr/m/n/10=ecrm1000 at 10.0pt not loadable: Metric (TFM) file not fou
nd.
 
   relax 
l.105 \fontencoding\encodingdefault\selectfont



Rolling back my upgrade and it works fine.


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


[PATCH 1/2] gnu: Add mbedtls-apache.

2017-01-27 Thread contact . ng0
From: ng0 

* gnu/packages/tls.scm (mbedtls-apache): New variable.
---
 gnu/packages/tls.scm | 31 ++-
 1 file changed, 30 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm
index c3f2d9ba1..11a4fe496 100644
--- a/gnu/packages/tls.scm
+++ b/gnu/packages/tls.scm
@@ -7,7 +7,7 @@
 ;;; Copyright © 2015, 2016 Leo Famulari 
 ;;; Copyright © 2015, 2016, 2017 Leo Famulari 
 ;;; Copyright © 2016 Efraim Flashner 
-;;; Copyright © 2016 ng0 
+;;; Copyright © 2016, 2017 ng0 
 ;;; Copyright © 2016 Hartmut Goebel 
 ;;;
 ;;; This file is part of GNU Guix.
@@ -33,6 +33,7 @@
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system perl)
   #:use-module (guix build-system python)
+  #:use-module (guix build-system cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages)
   #:use-module (gnu packages guile)
@@ -791,3 +792,31 @@ then ported to the GNU / Linux environment.")
 ;; acme-client is distributed under the ISC license, but the files 'jsmn.h'
 ;; and 'jsmn.c' are distributed under the Expat license.
 (license (list license:isc license:expat
+
+;; The "-apache" variant is the upstreamed prefered variant. A "-gpl"
+;; variant exists in addition to the "-apache" one.
+(define-public mbedtls-apache
+  (package
+(name "mbedtls-apache")
+(version "2.4.0")
+(source
+ (origin
+   (method url-fetch)
+   ;; XXX: The download links on the website are script redirection links
+   ;; which effectively lead to the format listed in the uri here.
+   (uri (string-append "https://tls.mbed.org/download/mbedtls-";
+   version "-apache.tgz"))
+   (sha256
+(base32
+ "03bzbfidigljva6xj49k38q3kwlbj75lrky4a0ainylzsfg5bhy1"
+(build-system cmake-build-system)
+(native-inputs
+ `(("perl" ,perl)))
+(synopsis "Small TLS library")
+(description
+ "@code{mbed TLS}, formerly known as PolarSSL, makes it trivially easy
+for developers to include cryptographic and SSL/TLS capabilities in their
+(embedded) products, facilitating this functionality with a minimal
+coding footprint.")
+(home-page "https://tls.mbed.org";)
+(license license:asl2.0)))
-- 
2.11.0




Add: mbedtls (v3), and hiawatha

2017-01-27 Thread contact . ng0
Hi,

this adds mbedtls with hiawatha as an application using it.
As hiawatha is a webserver, we'll need a short service to make it usable
but this was the reason I packaged mbedtls.

Changes:

 "mbedtls" was renamed to "mbedtls-apache":
 This is prefered upstream variant, and also the version hiawatha ships with.
 As noted in the patch, "mbedtls-gpl" exists.

 Added an explanation to (source) of mbedtls-apache for future updaters.




[PATCH 2/2] gnu: Add hiawatha.

2017-01-27 Thread contact . ng0
From: ng0 

* gnu/packages/web.scm (hiawatha): New variable.
---
 gnu/packages/web.scm | 57 +++-
 1 file changed, 56 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 67b9797bb..48f1f867d 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -13,7 +13,7 @@
 ;;; Copyright © 2016 Rene Saavedra 
 ;;; Copyright © 2016 Ben Woodcroft 
 ;;; Copyright © 2016 Clément Lassieur 
-;;; Copyright © 2016 ng0 
+;;; Copyright © 2016, 2017 ng0 
 ;;; Copyright © 2016 Arun Isaac 
 ;;; Copyright © 2016 Tobias Geerinckx-Rice 
 ;;; Copyright © 2016 Bake Timmons 
@@ -3995,3 +3995,58 @@ programs' code.  Its architecture is optimized for 
security, portability, and
 scalability (including load-balancing), making it suitable for large
 deployments.")
   (license l:gpl2+)))
+
+(define-public hiawatha
+  (package
+(name "hiawatha")
+(version "10.4")
+(source
+ (origin
+   (method url-fetch)
+   (uri (string-append "https://www.hiawatha-webserver.org/files/";
+   "hiawatha-" version ".tar.gz"))
+   (modules '((guix build utils)))
+   (snippet
+;; We use our packaged mbedtls, so delete the included copy.
+'(delete-file-recursively "mbedtls"))
+   (sha256
+(base32
+ "0m2llzm72s29c32abnj03532m85fawvi8ybjpx6s3mgvx2yvq3p4"
+(build-system cmake-build-system)
+(arguments
+ `(#:tests? #f ; No tests included
+   #:configure-flags (list (string-append "-DUSE_SYSTEM_MBEDTLS=on")
+   (string-append "-DENABLE_TOMAHAWK=on")
+   (string-append "-DWEBROOT_DIR="
+  (assoc-ref %outputs "out")
+  "/share/hiawatha/html"))
+   #:phases
+   (modify-phases %standard-phases
+ (add-after 'install 'remove-empty-dirs
+   (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out")))
+   ;; The directories in "var" are empty, remove them.
+   (delete-file-recursively (string-append out "/var"))
+   #t)))
+ (add-after 'install 'wrap
+   (lambda* (#:key inputs outputs #:allow-other-keys)
+ ;; Make sure 'hiawatha' finds 'mbedtls'.
+ (let* ((out (assoc-ref outputs "out"))
+(sbin (string-append out "/sbin"))
+(mbed (assoc-ref inputs "mbedtls-apache")))
+   (wrap-program (string-append sbin "/hiawatha")
+ `("PATH" ":" prefix (,mbed)
+(inputs
+ ;; TODO: package "hiawatha-monitor", an optional dependency of "hiawatha".
+ `(("mbedtls-apache" ,mbedtls-apache) ;Hiawatha includes this version.
+   ("zlib" ,zlib)
+   ("libxslt" ,libxslt)
+   ("libxml2" ,libxml2)))
+(home-page "https://www.hiawatha-webserver.org";)
+(synopsis "Webserver with focus on security")
+(description
+ "Hiawatha has been written with security in mind.  This resulted in a
+highly secure webserver in both code and features.  Hiawatha can stop SQL
+injections, XSS and CSRF attacks and exploit attempts.  Via a specially
+crafted monitoring tool, you can keep track of all your webservers.")
+(license l:gpl2)))
-- 
2.11.0




Re: [PATCH] Update entries for ng0 in .mailmap.

2017-01-27 Thread ng0
Tobias Geerinckx-Rice  writes:

> ng0,
>
> On 24/01/17 12:51, contact@cryptolab.net wrote:
>> * .mailmap: Update entries for ng0.
>
> Pushed as a74b49765b366fb9a9a202e1811f25c746c6.
>
> Kind regards,
>
> T G-R
>
Thanks!
-- 
♥Ⓐ  ng0 -- https://www.inventati.org/patternsinthechaos/



Re: Multiple python-3 packages

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

> Currently we have Python 3.4 and 3.5. Python 3.6 was released recently.
>
> When we added 3.5, I thought it was a good idea to keep 3.4 around in
> case some packages need it. It turns out that nothing is using it in our
> tree.
>
> Do we want to keep 3.4 and 3.5 around? There is a maintenance cost
> incurred at each new release, because their shared patches tend to
> diverge each time.
>
> If we should keep them, how should the package inheritance go? Now, it's
> like this:
>
> 2.7 < 3.5 < 3.4
>
> If we kept them all, should 3.5 and 3.4 both inherit 3.6?

Hi Leo!

I think python 3.x releases should inherit from the latest indeed. That
way changes to lower 3.x releases are guaranteed not to affect the
newest one.

No preference for keeping older releases around either. Unless any
python folks wants to maintain them, I think they can be dropped.

Perhaps we can use python-3.6 as the basis for a new "python-updates"
branch?


signature.asc
Description: PGP signature


[PATCH] gnu: Add debbugs.

2017-01-27 Thread contact . ng0
From: ng0 

* gnu/packages/debbugs.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
---
 gnu/local.mk |   1 +
 gnu/packages/debbugs.scm | 121 +++
 2 files changed, 122 insertions(+)
 create mode 100644 gnu/packages/debbugs.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 59fc1a82c..da1e159ac 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -97,6 +97,7 @@ GNU_SYSTEM_MODULES =  \
   %D%/packages/dav.scm \
   %D%/packages/dc.scm  \
   %D%/packages/debug.scm   \
+  %D%/packages/debbugs.scm  \
   %D%/packages/dejagnu.scm \
   %D%/packages/dico.scm\
   %D%/packages/dictionaries.scm\
diff --git a/gnu/packages/debbugs.scm b/gnu/packages/debbugs.scm
new file mode 100644
index 0..6ddf170fb
--- /dev/null
+++ b/gnu/packages/debbugs.scm
@@ -0,0 +1,121 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2017 ng0 
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see .
+
+(define-module (gnu packages debbugs)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages links)
+  #:use-module (gnu packages lynx)
+  #:use-module (gnu packages mail)
+  #:use-module (gnu packages perl)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix utils)
+  #:use-module (guix build-system gnu))
+
+(define-public debbugs
+  (package
+(name "debbugs")
+(version "2.4.1.1")
+(source
+ (origin
+   (method url-fetch)
+   (uri (string-append "mirror://debian/pool/main/d/debbugs/"
+   name "_" version ".tar.gz"))
+   (file-name (string-append name "-" version ".tar.gz"))
+   (sha256
+(base32
+ "1j6zg7g2d97ihc8ydb9pl56xyh2x202vk7l3cld01xaa5ssxlxgs"
+(build-system gnu-build-system)
+(inputs
+ `(("perl" ,perl)
+   ("links" ,links)
+   ("lynx" ,lynx)))
+(arguments
+ `(#:make-flags (list (string-append "DESTDIR="
+ (assoc-ref %outputs "out")))
+   #:tests? #f ; No checks
+   #:phases
+   (modify-phases %standard-phases
+ (replace 'configure ; No configure
+   (lambda _
+ (substitute* "Makefile"
+   (("/usr") ""
+ (add-before 'build 'create-doc-dir
+   (lambda _
+ (mkdir-p (string-append (assoc-ref %outputs "out")
+ "/share/doc/debbugs"
+ (add-after 'unpack 'fix-absolute-paths
+   (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+(share (string-append out "/share/debbugs/examples/"))
+(links (string-append (assoc-ref inputs "links")
+  "/bin/links"))
+(lynx (string-append (assoc-ref inputs "lynx")
+ "/bin/lynx")))
+   (substitute* (list "cgi/pkgreport.cgi" "cgi/bugreport.cgi"
+  "cgi/common.pl" "scripts/processall.in"
+  "scripts/rebuild.in" "scripts/service.in"
+  "scripts/db2html.in" "scripts/config.in"
+  "scripts/html-control.in" 
"scripts/summary.in"
+  "scripts/process.in" "scripts/expire.in"
+  "scripts/receive.in" "scripts/mailsummary.in"
+  "html/Reporting.html.in" "debbugs-service")
+ (("/usr") out))
+   (substitute* "debian/debbugsconfig"
+ (("/etc") (string-append out "/etc"))
+ (("/usr/share/debbugs/examples/") share)
+ (("/usr/bin/links") links)
+ (("/usr/bin/lynx") lynx))
+   (substitute* "scripts/config.in"
+ (("/var") (string-append out "/var"))
+ (("/debian") (string-append out "/debian")))
+   (substitute* (list "scripts/summary.in" "scripts/rebuild.in"
+   

[RFC] debbugs, v2

2017-01-27 Thread contact . ng0
Request for comments: Debbugs package.

It's still a bit rough, but better than last year.
I wonder about the folder "Debbugs" in the distributed tarball. This holds 
perlmodules, but they aren't installed with by Makefile.

Should we just give it a go like this, or should I ask upstream what's up with 
this?




Re: [PATCH 1/2] gnu: Add openvswitch.

2017-01-27 Thread Marius Bakke
宋文武  writes:

> * gnu/packages/networking.scm (openvswitch): New variable.

Cool, thanks a lot for this! I will be using this for sure.

> diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
> index 87ee0a1d8..c6fb2cfda 100644
> --- a/gnu/packages/networking.scm
> +++ b/gnu/packages/networking.scm
> @@ -1060,3 +1060,57 @@ suddenly a lot of network traffic, you can fire up 
> NetHogs and immediately see
>  which PID is causing this.  This makes it easy to identify programs that have
>  gone wild and are suddenly taking up your bandwidth.")
>  (license license:gpl2+)))
> +
> +(define-public openvswitch
> +  (package
> +(name "openvswitch")
> +(version "2.6.1")
> +(source (origin
> +  (method url-fetch)
> +  (uri (string-append
> +"http://openvswitch.org/releases/openvswitch-";
> +version ".tar.gz"))
> +  (sha256
> +   (base32
> +"036gq741j9kqsjlp693nff838c9wjd1c56nswl9vyyd1lsmj0yrh"
> +(build-system gnu-build-system)
> +(arguments
> + '(;; FIXME: many tests fail with:
> +   ;;[…]
> +   ;;test -e $OVS_RUNDIR/ovs-vswitchd.pid
> +   ;;ovs-appctl -t ovs-vswitchd exit
> +   ;;hard failure
> +   #:tests? #f

Ah, this brings me back to
https://github.com/NixOS/nixpkgs/commit/4561a649f41554f9c47c0405079a909a1b51db2f

I managed to get everything but bash completion tests working back then,
but did not have the same luck now after about ten minutes of trying. I
will give it a go at a later opportunity unless someone beats me to it ;)

> +   #:configure-flags
> +   '("--enable-shared"
> + "--localstatedir=/var"
> + "--with-dbdir=/var/lib/openvswitch")
> +   #:phases
> +   (modify-phases %standard-phases
> + (replace 'install
> +   (lambda _
> + (zero? (system* "make"
> + "RUNDIR=/tmp"
> + "PKIDIR=/tmp"
> + "LOGDIR=/tmp"
> + "DBDIR=/tmp"
> + "install")))
> +(native-inputs
> + `(("perl" ,perl)
> +   ("pkg-config" ,pkg-config)
> +   ("python" ,python-2)
> +   ;; for testing
> +   ("util-linux" ,util-linux)))
> +(propagated-inputs
> + `(("python-six" ,python2-six)))
> +(inputs
> + `(("libcap-ng" ,libcap-ng)
> +   ("openssl" ,openssl)))
> +(synopsis "Virtual network switch")
> +(home-page "http://www.openvswitch.org/";)
> +(description
> + "Open vSwitch is a multilayer virtual switch.  It is designed to enable
> +massive network automation through programmatic extension, while still
> +supporting standard management interfaces and protocols (e.g. NetFlow, sFlow,
> +IPFIX, RSPAN, CLI, LACP, 802.1ag).")
> +(license license:asl2.0)))

The source ships a handy "debian/copyright" file outlining the various
licenses in use. They should be mentioned here. Could not find any
third-party bundled software at a glance. Otherwise LGTM!

Haven't tested the service, but the definition LGTM too.


signature.asc
Description: PGP signature


Re: [PATCH 1/1] doc: Clarify "Installing GuixSD in a VM".

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

> * doc/guix.texi (Installing GuixSD in a VM): Mention decompressing the
> installation image.
> ---
>  doc/guix.texi | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/doc/guix.texi b/doc/guix.texi
> index cb203fca2..bff1d03c6 100644
> --- a/doc/guix.texi
> +++ b/doc/guix.texi
> @@ -7119,8 +7119,8 @@ disk image, follow these steps:
>  
>  @enumerate
>  @item
> -First, retrieve the GuixSD installation image as described previously
> -(@pxref{USB Stick Installation}).
> +First, retrieve and decompress the GuixSD installation image as
> +described previously (@pxref{USB Stick Installation}).

LGTM, thanks!


signature.asc
Description: PGP signature


Re: [PATCH 1/2] gnu: Add tremc.

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

> * gnu/packages/bittorrent.scm (tremc): New variable.
> ---
>  gnu/packages/bittorrent.scm | 45 
> +
>  1 file changed, 45 insertions(+)
>
> diff --git a/gnu/packages/bittorrent.scm b/gnu/packages/bittorrent.scm
> index 716d8b766..a7294f38a 100644
> --- a/gnu/packages/bittorrent.scm
> +++ b/gnu/packages/bittorrent.scm
> @@ -2,6 +2,7 @@
>  ;;; Copyright © 2014 Taylan Ulrich Bayirli/Kammer 
>  ;;; Copyright © 2014, 2015, 2016 Ludovic Courtès 
>  ;;; Copyright © 2016 Leo Famulari 
> +;;; Copyright © 2016, 2017 Leo Famulari 
>  ;;; Copyright © 2016, 2017 Efraim Flashner 
>  ;;; Copyright © 2016 Tomáš Čech 
>  ;;; Copyright © 2016 Tobias Geerinckx-Rice 
> @@ -25,6 +26,7 @@
>  (define-module (gnu packages bittorrent)
>#:use-module (guix packages)
>#:use-module (guix download)
> +  #:use-module (guix git-download)
>#:use-module (guix build-system gnu)
>#:use-module (guix build-system python)
>#:use-module (guix build-system glib-or-gtk)
> @@ -172,6 +174,49 @@ XML-RPC over SCGI.")
>  (home-page "https://github.com/rakshasa/rtorrent";)
>  (license l:gpl2+)))
>  
> +(define-public tremc
> +  (let ((commit "401f2303c9b5a6e2e7b0808617d794576d4aa29e")
> +(revision "0"))
> +(package
> +  (name "tremc")
> +  (version (string-append "0.0.0-" revision "." (string-take commit 7)))

The script has a VERSION variable specifying 0.9.0, so I think we should
use that. It would of course be better if they provided tagged releases..

> +  (source
> +(origin
> +  (method git-fetch)
> +  (uri (git-reference
> + (url "https://github.com/louipc/tremc.git";)
> + (commit commit)))
> +  (sha256
> +   (base32
> +"1h2720zn35iggmf9av65g119b0bhskwm1ng0zbkjryaf38nfzpin"
> +  (build-system python-build-system)
> +  (arguments
> +   `(#:tests? #f ; no test suite
> + #:phases
> + (modify-phases %standard-phases
> +   ;; The software is just a Python script that must be
> +   ;; copied into place.
> +   (delete 'build)
> +   (replace 'install
> + (lambda* (#:key outputs #:allow-other-keys)
> +   (let* ((out (assoc-ref outputs "out"))
> +  (bin (string-append out "/bin"))
> +  (man (string-append out "/share/man/man1"))
> +  ;; FIXME install zsh completions
> +  (completions (string-append out 
> "/etc/bash_completion.d")))
> + (install-file "tremc" bin)
> + (install-file "tremc.1" man)
> + (install-file
> +   (string-append
> + "completion/bash/"
> + "transmission-remote-cli-bash-completion.sh")
> +   completions)))
> +  (synopsis "Console client for the Transmission BitTorrent daemon")
> +  (description "Tremc is a console client, with a curses interface, for 
> the
> +Transmission BitTorrent daemon.")

So all the imports in the script are part of the python standard
library, including "curses"? Neat. LGTM!

> +  (home-page "https://github.com/louipc/tremc";)
> +  (license l:gpl3+
> +
>  (define-public transmission-remote-cli
>(package
>  (name "transmission-remote-cli")
> -- 
> 2.11.0


signature.asc
Description: PGP signature


Re: [PATCH 2/2] gnu: transmission-remote-cli: Superseded by tremc.

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

> * gnu/packages/bittorrent.scm (transmission-remote-cli)[properties]: New 
> field.
> ---
>  gnu/packages/bittorrent.scm | 6 --
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/gnu/packages/bittorrent.scm b/gnu/packages/bittorrent.scm
> index a7294f38a..facc2be53 100644
> --- a/gnu/packages/bittorrent.scm
> +++ b/gnu/packages/bittorrent.scm
> @@ -254,9 +254,11 @@ Transmission BitTorrent daemon.")
>completions)))
>  (synopsis "Console client for the Transmission BitTorrent daemon")
>  (description "Transmission-remote-cli is a console client, with a curses
> -interface, for the Transmission BitTorrent daemon.")
> +interface, for the Transmission BitTorrent daemon.  This package is no longer
> +maintained upstream.")
>  (home-page "https://github.com/fagga/transmission-remote-cli";)
> -(license l:gpl3+)))
> +(license l:gpl3+)
> +(properties `((superseded . ,tremc)

LGTM, thanks!


signature.asc
Description: PGP signature


Re: [PATCH 0/1] Fix docs on Installing GuixSD in a VM

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

> From what I can tell, there is a mistake in these instructions. I can't
> find any QEMU documentation that mentions using '-net default', and I've
> seen a few reports on #guix of it failing.

I remember stumbling on this too. This change LGTM.

>
> Leo Famulari (1):
>   doc: Fix networking instructions in "Installing GuixSD in a VM".
>
>  doc/guix.texi | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> -- 
> 2.11.0


signature.asc
Description: PGP signature


Re: [PATCH] Update gd and php

2017-01-27 Thread Leo Famulari
On Thu, Jan 26, 2017 at 11:15:43AM +0100, Ludovic Courtès wrote:
> Leo Famulari  skribis:
> > =
> > FAILED TEST SUMMARY
> > -
> > Test disk_free_space and its alias diskfreespace() functions : basic 
> > functionality [ext/standard/tests/file/disk_free_space_basic.phpt]
> > Test lstat() and stat() functions: usage variations - creating file/subdir 
> > [ext/standard/tests/file/lstat_stat_variation8.phpt]
> > Test lstat() and stat() functions: usage variations - deleting file/subdir 
> > [ext/standard/tests/file/lstat_stat_variation9.phpt]
> > =
> 
> This doesn’t seem to have any connection to the gd change.
> 
> Are you using a file system other than ext[234]?
> 
> Does php in current master passes its tests on the same machine?

Good hunch. It builds fine for me on ext4 but not on btrfs.

I'll prepare a bug report for PHP.



Re: [PATCH 1/5] gnu: Add emacs-ht.

2017-01-27 Thread Alex Kost
Mathieu OTHACEHE (2017-01-27 11:16 +0100) wrote:

>> On Fri, Jan 27, 2017 at 12:20:46PM +0300, Alex Kost wrote:
>>> Mathieu Othacehe (2017-01-26 13:31 +0100) wrote:
>>> > +  (uri (string-append
>>> > + "http://melpa.org/packages/ht-";
>>> > + version
>>> > + ".el"))
>>> 
>>> We can't use files from melpa.org because once a new commit appears in
>>> the upstream repo, melpa will rebuilt the package and remove the
>>> previous version, so this package will lost its source and will not be
>>> buildable anymore.  So please use the latest available tarballs instead.
>
> Ok, I'll send and update.
>
>>
>> I think the linter should warn about this. It seems like you have to
>> send this email often.
>
> Yes, or modify guix import for melpa ? It seems that I
> trusted wrongly the output of the importer ...

Yeah, I think adjusting guix import for that would be really great (but
I'm not a volunteer for this task :-))

-- 
Alex



Re: [PATCH] gnu: python-matplotlib: Don't propagate python-numpy-bootstrap.

2017-01-27 Thread Marius Bakke
Hi Thomas,

Thomas Danckaert  writes:

> Hi,
>
> when a profile contains both python-numpy and python-matplotlib
> (either installed directly or by propagation, e.g. when from
> python-ipython), a lot of warnings about conflicts between
> python-numpy and python-nympy-bootstrap appear, because matplotlib
> propagates its python-numpy-bootstrap dependency.

Ouch.

> This patch works around it by creating an intermediate
> python-matplotlib-bootstrap package as well, which is then used as a
> native input to generate the documentation of python-numpy.
> python-numpy is then used as a propagated input of python-matplotlib,
> so python-numpy-bootstrap doesn't appear in user's profiles anymore.
>
> What do you think?

This sounds sensible. Does numpy not require any matplotlib functions at
runtime? If so, this patch LGTM. The new matplotlib-bootstrap variables
should have an explaining comment though :)


signature.asc
Description: PGP signature


[PATCH 1/3] download: url-fetch/tarball: Make ‘name’ truly optional.

2017-01-27 Thread Tobias Geerinckx-Rice
* guix/download.scm (url-fetch/tarbomb): Fall back to ‘file-name’ if
‘name’ is #f, like the regular ‘url-fetch’ does.
* gnu/packages/bioinformatics.scm (muscle)[source]: Remove ‘file-name’.
* gnu/packages/engineering.scm (fastcap)[source]: Likewise.
* gnu/packages/scheme.scm (scmutils)[source]: Likewise.
---

Guix,

This copies some code from ‘url-fetch’ to ‘url-fetch/tarbomb’, allowing
the latter to be used without a mandatory ‘file-name’.

Unless, of course, that was by design.

I've made the same change to ‘url-fetch/zipbomb’ in the next patch. If
there's a more tightly factored way to do this nicely, please let me know.

Kind regards,

T G-R

 gnu/packages/bioinformatics.scm |  1 -
 gnu/packages/engineering.scm|  1 -
 gnu/packages/scheme.scm |  1 -
 guix/download.scm   | 12 ++--
 4 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 3bf3521..2d6cef2 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -3501,7 +3501,6 @@ that a read originated from a particular isoform.")
 (version "3.8.1551")
 (source (origin
   (method url-fetch/tarbomb)
-  (file-name (string-append name "-" version))
   (uri (string-append
 "http://www.drive5.com/muscle/muscle_src_";
 version ".tar.gz"))
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index b147764..734efcd 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -259,7 +259,6 @@ featuring various improvements and bug fixes.")))
 (version "2.0-18Sep92")
 (source (origin
   (method url-fetch/tarbomb)
-  (file-name (string-append name "-" version ".tar.gz"))
   (uri (string-append "http://www.rle.mit.edu/cpg/codes/";
   name "-" version ".tgz"))
   (sha256
diff --git a/gnu/packages/scheme.scm b/gnu/packages/scheme.scm
index 2756805..1210ab5 100644
--- a/gnu/packages/scheme.scm
+++ b/gnu/packages/scheme.scm
@@ -604,7 +604,6 @@ threads.")
  (snippet
   ;; Remove binary code
   '(delete-file-recursively "scmutils/mit-scheme"))
- (file-name (string-append name "-" version ".tar.gz"))
  (uri (string-append "http://groups.csail.mit.edu/mac/users/gjs/6946";
  "/scmutils-tarballs/" name "-" version
  "-x86-64-gnu-linux.tar.gz"))
diff --git a/guix/download.scm b/guix/download.scm
index e2e5cee..e218c2e 100644
--- a/guix/download.scm
+++ b/guix/download.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2015 Federico Beffa 
 ;;; Copyright © 2016 Alex Griffin 
 ;;; Copyright © 2016 David Craven 
+;;; Copyright © 2017 Tobias Geerinckx-Rice 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -485,17 +486,24 @@ in the store."
 (guile (default-guile)))
   "Similar to 'url-fetch' but unpack the file from URL in a directory of its
 own.  This helper makes it easier to deal with \"tar bombs\"."
+  (define file-name
+(match url
+  ((head _ ...)
+   (basename head))
+  (_
+   (basename url
   (define gzip
 (module-ref (resolve-interface '(gnu packages compression)) 'gzip))
   (define tar
 (module-ref (resolve-interface '(gnu packages base)) 'tar))
 
   (mlet %store-monad ((drv (url-fetch url hash-algo hash
-  (string-append "tarbomb-" name)
+  (string-append "tarbomb-"
+ (or name file-name))
   #:system system
   #:guile guile)))
 ;; Take the tar bomb, and simply unpack it as a directory.
-(gexp->derivation name
+(gexp->derivation (or name file-name)
   #~(begin
   (mkdir #$output)
   (setenv "PATH" (string-append #$gzip "/bin"))
-- 
2.9.3




[PATCH 2/3] download: Add ‘url-fetch/zipbomb’.

2017-01-27 Thread Tobias Geerinckx-Rice
>From this suggestion by Ludovic Courtès:


* guix/download.scm (url-fetch/zipbomb): New procedure.
---
 guix/download.scm | 30 ++
 1 file changed, 30 insertions(+)

diff --git a/guix/download.scm b/guix/download.scm
index e218c2e..80efb9d 100644
--- a/guix/download.scm
+++ b/guix/download.scm
@@ -36,6 +36,7 @@
   #:export (%mirrors
 url-fetch
 url-fetch/tarbomb
+url-fetch/zipbomb
 download-to-store))
 
 ;;; Commentary:
@@ -512,6 +513,35 @@ own.  This helper makes it easier to deal with \"tar 
bombs\"."
   "xf" #$drv)))
   #:local-build? #t)))
 
+(define* (url-fetch/zipbomb url hash-algo hash
+#:optional name
+#:key (system (%current-system))
+(guile (default-guile)))
+  "Similar to 'url-fetch' but unpack the zip file at URL in a directory of its
+own.  This helper makes it easier to deal with \"zip bombs\"."
+  (define file-name
+(match url
+  ((head _ ...)
+   (basename head))
+  (_
+   (basename url
+  (define unzip
+(module-ref (resolve-interface '(gnu packages zip)) 'unzip))
+
+  (mlet %store-monad ((drv (url-fetch url hash-algo hash
+  (string-append "zipbomb-"
+ (or name file-name))
+  #:system system
+  #:guile guile)))
+;; Take the zip bomb, and simply unpack it as a directory.
+(gexp->derivation (or name file-name)
+  #~(begin
+  (mkdir #$output)
+  (chdir #$output)
+  (zero? (system* (string-append #$unzip "/bin/unzip")
+  #$drv)))
+  #:local-build? #t)))
+
 (define* (download-to-store store url #:optional (name (basename url))
 #:key (log (current-error-port)) recursive?
 (verify-certificate? #t))
-- 
2.9.3




[PATCH 3/3] gnu: Add zpaq.

2017-01-27 Thread Tobias Geerinckx-Rice
* gnu/packages/compression.scm (zpaq): New variable.
---
 gnu/packages/compression.scm | 60 +++-
 1 file changed, 59 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index 2e4de81..ca5509c 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -10,7 +10,7 @@
 ;;; Copyright © 2015, 2016 Efraim Flashner 
 ;;; Copyright © 2016 Ben Woodcroft 
 ;;; Copyright © 2016 Danny Milosavljevic 
-;;; Copyright © 2016 Tobias Geerinckx-Rice 
+;;; Copyright © 2016, 2017 Tobias Geerinckx-Rice 
 ;;; Copyright © 2016 David Craven 
 ;;; Copyright © 2016 Kei Kebreau 
 ;;; Copyright © 2016 Marius Bakke 
@@ -46,6 +46,8 @@
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages valgrind)
+  #:use-module (gnu packages zip)
+  #:use-module (ice-9 match)
   #:use-module ((srfi srfi-1) #:select (last)))
 
 (define-public zlib
@@ -1001,3 +1003,59 @@ handles the 7z format which features very high 
compression ratios.")
 (description "gzstream is a small library for providing zlib
 functionality in a C++ iostream.")
 (license license:lgpl2.1+)))
+
+(define-public zpaq
+  (package
+(name "zpaq")
+(version "7.15")
+(source
+ (origin
+   (method url-fetch/zipbomb)
+   (uri (string-append "http://mattmahoney.net/dc/zpaq";
+   (string-delete #\. version) ".zip"))
+   (sha256
+(base32
+ "066l94yyladlfzri877nh2dhkvspagjn3m5bmv725fmhkr9c4pp8"))
+   (modules '((guix build utils)))
+   (snippet
+;; Delete irrelevant pre-compiled binaries.
+'(for-each delete-file (find-files "." "\\.exe$")
+(build-system gnu-build-system)
+(arguments
+ `(#:phases
+   (modify-phases %standard-phases
+ (delete 'configure))   ; no ‘configure’ script
+   #:make-flags
+   (list
+(string-append "CPPFLAGS=-Dunix"
+   ,(match (or (%current-target-system)
+   (%current-system))
+   ("x86_64-linux" "")
+   ("i686-linux""")
+   (_   " -DNOJIT")))
+(string-append "CXXFLAGS=-O3 -mtune=generic -DNDEBUG"
+   ,(match (or (%current-target-system)
+   (%current-system))
+   ("x86_64-linux"  " -march=nocona")
+   ("i686-linux"" -march=i686")
+   (_   "")))
+(string-append "PREFIX="
+   (assoc-ref %outputs "out")
+(native-inputs
+ `(("perl" ,perl))) ; for pod2man
+(home-page "http://mattmahoney.net/dc/zpaq.html";)
+(synopsis "Incremental journaling archiver")
+(description "ZPAQ is a command-line archiver that backs up faster and
+compresses better than most other popular archivers in realistic situations
+with many duplicate and already compressed files.  It backs up only those files
+modified since the last update.  All previous versions remain untouched and can
+be independently recovered.  Identical files are only stored once (known as
+@dfn{de-duplication}).  Archives can also be encrypted.
+ZPAQ is intended to back up user data, not entire operating systems. It ignores
+owner and group IDs, ACLs, extended attributes, or special file types like
+devices, sockets, or named pipes.  It does not follow or restore symbolic links
+or junctions, and always follows hard links.")
+(license (list license:public-domain
+   ;; libzpaq.cpp contains a mix of public-domain and
+   ;; expat-licenced (or ‘MIT’) code.
+   license:expat
-- 
2.9.3




Re: [PATCH] gnu: rustc: Add LIBRARY_PATH search path.

2017-01-27 Thread Marius Bakke
Hi Ben,

Ben Woodcroft  writes:

> * gnu/packages/rust.scm (rustc)[native-search-paths]: New field.

[...]

> +(native-search-paths
> + (list (search-path-specification
> +(variable "LIBRARY_PATH")
> +(files '("lib" "lib64")

This seems odd. This search path is for glibc, no?

Is the problem this addresses not already fixed by
5d18d776d269ab9a6c44e049936389df3454ba30?


signature.asc
Description: PGP signature


idle3 (python3) bug?

2017-01-27 Thread ng0
When I try to start "idle3" with (guix build python3) in my
profile, I get the following message. Of course when running a
search I see there's output: "tk" and I would install that, but
should we point out (in the description) that for usage of "idle"
you will have to install the "tk" output?

What do you think?



ng0@wasp ~/s/h/python> idle3
** IDLE can't import Tkinter.
Your Python may not be configured for Tk. **

-- 
♥Ⓐ  ng0 -- https://www.inventati.org/patternsinthechaos/



[PATCH 02/10] gnu: Add ocamlify.

2017-01-27 Thread Julien Lepiller
* gnu/packages/ocaml.scm (ocamlify): 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 012833766..a2297d1ab 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1728,3 +1728,27 @@ multitude of other network protocols 
(FTP/SMTP/RTSP/etc).")
 that represent binary data in an ASCII string format by translating it into a
 radix-64 representation.  It is specified in RFC 4648.")
 (license license:isc)))
+
+(define-public ocamlify
+  (package
+(name "ocamlify")
+(version "0.0.2")
+(source (origin
+  (method url-fetch)
+  (uri (ocaml-forge-uri name version 1209))
+  (sha256
+   (base32
+"1f0fghvlbfryf5h3j4as7vcqrgfjb4c8abl5y0y5h069vs4kp5ii"
+(build-system ocaml-build-system)
+; tests are done during build
+(arguments
+ `(#:phases
+   (modify-phases %standard-phases
+ (delete 'check
+(home-page "https://forge.ocamlcore.org/projects/ocamlify";)
+(synopsis "Include files in OCaml code")
+(description "OCamlify allows to create OCaml source code by including
+whole files into OCaml string or string list.  The code generated can be
+compiled as a standard OCaml file.  It allows embedding external resources as
+OCaml code.")
+(license license:lgpl2.1))); with an exception
-- 
2.11.0




[PATCH 00/10] ocaml patches v2

2017-01-27 Thread Julien Lepiller
I finally had some time to work on these patches, so here are the new versions 
of
them. I was unable to fix the failing tests in oasis, so I just disabled the
failing ones.

Julien Lepiller (10):
  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/local.mk   |   2 +
 gnu/packages/ocaml.scm | 317 +
 .../patches/ocaml-janestreet-fix-libdir.patch  |  39 +++
 .../patches/omake-fix-non-determinism.patch|  41 +++
 4 files changed, 399 insertions(+)
 create mode 100644 gnu/packages/patches/ocaml-janestreet-fix-libdir.patch
 create mode 100644 gnu/packages/patches/omake-fix-non-determinism.patch

-- 
2.11.0




[PATCH 06/10] gnu: Add ocaml-expect.

2017-01-27 Thread Julien Lepiller
* gnu/packages/ocaml.scm (ocaml-expect): 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 66e0a2a0d..3138d2675 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1861,3 +1861,24 @@ hierarchy of modules.")
 matching and substitution, similar to the functionality offered by the Perl
 language.")
 (license license:lgpl2.1))); with an exception
+
+(define-public ocaml-expect
+  (package
+(name "ocaml-expect")
+(version "0.0.5")
+(source (origin
+  (method url-fetch)
+  (uri (ocaml-forge-uri name version 1372))
+  (sha256
+   (base32
+"07xq8w2x2vffc32z7vk6y14jwbfb1cw0m2lm1jzi60hnr1dvg8by"
+(build-system ocaml-build-system)
+(native-inputs
+ `(("ocaml-pcre" ,ocaml-pcre)
+   ("ounit" ,ocaml-ounit)))
+(propagated-inputs `(("batteries" ,ocaml-batteries)))
+(home-page "https://forge.ocamlcore.org/projects/ocaml-expect/";)
+(synopsis "Simple implementation of expect")
+(description "Help building unitary testing of interactive program.  You
+can match the question using a regular expression or a timeout.")
+(license license:lgpl2.0))) ; with an exception
-- 
2.11.0




[PATCH 04/10] gnu: Add ocaml-batteries.

2017-01-27 Thread Julien Lepiller
* gnu/packages/ocaml.scm (ocaml-batteries): 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 0235ca023..9043c1464 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1796,3 +1796,32 @@ many additional enhancements, including:
license:expat ; OMake scripts
license:gpl2 ; OMake itself, with ocaml linking 
exception
 ; see LICENSE.OMake
+
+(define-public ocaml-batteries
+  (package
+(name "ocaml-batteries")
+(version "2.5.3")
+(source (origin
+  (method url-fetch)
+  (uri (ocaml-forge-uri "batteries" version 1650))
+  (sha256
+   (base32
+"1a97w3x2l1jr5x9kj5gqm1x6b0q9fjqdcsvls7arnl3bvzgsia0n"
+(build-system ocaml-build-system)
+(native-inputs
+ `(("qtest" ,ocaml-qtest)
+   ("bisect" ,ocaml-bisect)
+   ("ounit" ,ocaml-ounit)))
+(arguments
+ `(#:phases
+   (modify-phases %standard-phases
+ (delete 'check) ; tests are run by the build phase
+ (replace 'build
+   (lambda* (#:key outputs #:allow-other-keys)
+ (zero? (system* "ocaml" "setup.ml" "-build")))
+(home-page "http://batteries.forge.ocamlcore.org/";)
+(synopsis "Development platform for the OCaml programming language")
+(description "Define a standard set of libraries which may be expected on
+every compliant installation of OCaml and organize these libraries into a
+hierarchy of modules.")
+(license license:lgpl2.1+)))
-- 
2.11.0




[PATCH 03/10] gnu: Add omake.

2017-01-27 Thread Julien Lepiller
* gnu/packages/ocaml.scm (omake): New variable.
* gnu/packages/patches/ocaml-omake-fix-non-determinism.patch: New file.
* gnu/local.mk (dist_patch_DATA): New patch.
---
 gnu/local.mk   |  1 +
 gnu/packages/ocaml.scm | 44 ++
 .../patches/omake-fix-non-determinism.patch| 41 
 3 files changed, 86 insertions(+)
 create mode 100644 gnu/packages/patches/omake-fix-non-determinism.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 59fc1a82c..2e3548342 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -775,6 +775,7 @@ dist_patch_DATA =   
\
   %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/omake-fix-non-determinism.patch \
   %D%/packages/patches/ola-readdir-r.patch \
   %D%/packages/patches/openexr-missing-samples.patch   \
   %D%/packages/patches/openjpeg-CVE-2016-5157.patch\
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index a2297d1ab..0235ca023 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1752,3 +1752,47 @@ whole files into OCaml string or string list.  The code 
generated can be
 compiled as a standard OCaml file.  It allows embedding external resources as
 OCaml code.")
 (license license:lgpl2.1))); with an exception
+
+(define-public omake
+  (package
+(name "omake")
+(version "0.10.1")
+(source (origin
+  (method url-fetch)
+  (uri (string-append "http://download.camlcity.org/download/";
+  "omake-" version ".tar.gz"))
+  (sha256
+   (base32
+"093ansbppms90hiqvzar2a46fj8gm9iwnf8gn38s6piyp70lrbsj"))
+  (patches (search-patches "omake-fix-non-determinism.patch"
+(build-system ocaml-build-system)
+(arguments
+ `(#:make-flags
+   (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
+   #:tests? #f ; no test target
+   #:phases
+   (modify-phases %standard-phases
+ (add-before 'configure 'fix-makefile
+ (lambda* (#:key outputs #:allow-other-keys)
+   (substitute* "mk/osconfig_unix.mk"
+(("CC = cc") "CC = gcc")))
+(native-inputs `(("hevea" ,hevea)))
+(home-page "http://projects.camlcity.org/projects/omake.html";)
+(synopsis "Build system designed for scalability and portability")
+(description "Similar to make utilities you may have used, but it features
+many additional enhancements, including:
+
+@enumerate
+@item Support for projects spanning several directories or directory 
hierarchies.
+@item Fast, reliable, automated, scriptable dependency analysis using MD5 
digests,
+  with full support for incremental builds.
+@item Dependency analysis takes the command lines into account — whenever the
+  command line used to build a target changes, the target is considered
+  out-of-date.
+@item Fully scriptable, includes a library that providing support for standard
+  tasks in C, C++, OCaml, and LaTeX projects, or a mixture thereof.
+@end enumerate")
+(license (list license:lgpl2.1 ; libmojave
+   license:expat ; OMake scripts
+   license:gpl2 ; OMake itself, with ocaml linking 
exception
+; see LICENSE.OMake
diff --git a/gnu/packages/patches/omake-fix-non-determinism.patch 
b/gnu/packages/patches/omake-fix-non-determinism.patch
new file mode 100644
index 0..813ce3cd7
--- /dev/null
+++ b/gnu/packages/patches/omake-fix-non-determinism.patch
@@ -0,0 +1,41 @@
+From 2e7e254160506dc00f1beabf170512a8e932934b Mon Sep 17 00:00:00 2001
+From: Julien Lepiller 
+Date: Sat, 31 Dec 2016 15:43:38 +0100
+Subject: [PATCH] fix build date in binary
+
+---
+ src/magic/omake_gen_magic.ml | 12 ++--
+ 1 file changed, 2 insertions(+), 10 deletions(-)
+
+diff --git a/src/magic/omake_gen_magic.ml b/src/magic/omake_gen_magic.ml
+index b2419ba..fad52f5 100644
+--- a/src/magic/omake_gen_magic.ml
 b/src/magic/omake_gen_magic.ml
+@@ -150,7 +150,7 @@ let ir_magic = "%s"
+ let obj_magic = "%s"
+ let lib_dir = "%s"
+ let version = "%s"
+-let version_message = "OMake %s:\\n\\tbuild [%s %s %d %02d:%02d:%02d 
%d]\\n\\ton %s"
++let version_message = "OMake %s"
+ |}
+default_save_interval
+digest_len
+@@ -160,15 +160,7 @@ let version_message = "OMake %s:\\n\\tbuild [%s %s %d 
%02d:%02d:%02d %d]\\n\\ton
+(digest_files ".omo.magic" ".omo" omo_files)
+(String.escaped libdir)
+(String.escaped (shorten_version version))
+-   (String.escaped version)
+-   [|"Sun"; "Mon"; "Tue"; "Wed"; "Thu"; "Fri"; "Sat"|].(tm.tm_wday)
+-   [|"Jan"; "Feb";

[PATCH 01/10] gnu: Add ocaml-base64.

2017-01-27 Thread Julien Lepiller
* gnu/packages/ocaml.scm (ocaml-base64): 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 28c6ab34f..012833766 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1696,3 +1696,35 @@ without a complete in-memory representation of the 
data.")
 (description "Client-side URL transfer library, supporting HTTP and a
 multitude of other network protocols (FTP/SMTP/RTSP/etc).")
 (license license:isc)))
+
+(define-public ocaml-base64
+  (package
+(name "ocaml-base64")
+(version "2.1.2")
+(source (origin
+  (method url-fetch)
+  (uri (string-append "https://github.com/mirage/ocaml-base64/";
+  "releases/download/v" version "/base64-"
+   version ".tbz"))
+  (file-name (string-append name "-" version ".tar.gz"))
+  (sha256
+   (base32
+ "1p45sawchmrkr22gkmydjc4ary23pisp58zsnb7iq7d82nxs1lfq"
+(build-system ocaml-build-system)
+(arguments
+ `(#:build-flags (list "build" "--tests" "true")
+   #:phases
+   (modify-phases %standard-phases
+ (delete 'configure
+(native-inputs
+ `(("topkg" ,ocaml-topkg)
+   ("opam" ,opam)
+   ("rresult" ,ocaml-rresult)
+   ("bos" ,ocaml-bos)
+   ("alcotest" ,ocaml-alcotest)))
+(home-page "https://github.com/mirage/ocaml-base64";)
+(synopsis "Base64 encoding for OCaml")
+(description "Base64 is a group of similar binary-to-text encoding schemes
+that represent binary data in an ASCII string format by translating it into a
+radix-64 representation.  It is specified in RFC 4648.")
+(license license:isc)))
-- 
2.11.0




[PATCH 07/10] gnu: Add ocaml-fileutils.

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

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 3138d2675..3817e77ae 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1882,3 +1882,21 @@ language.")
 (description "Help building unitary testing of interactive program.  You
 can match the question using a regular expression or a timeout.")
 (license license:lgpl2.0))) ; with an exception
+
+(define-public ocaml-fileutils
+  (package
+(name "ocaml-fileutils")
+(version "0.5.1")
+(source (origin
+  (method url-fetch)
+  (uri (ocaml-forge-uri name version 1651))
+  (sha256
+   (base32
+"0g6zx2rcvacklxyli19ixcf6ich9ipxsps4k3jz98f5zlaab0a7g"
+(build-system ocaml-build-system)
+(native-inputs `(("ounit" ,ocaml-ounit)))
+(home-page "http://ocaml-fileutils.forge.ocamlcore.org";)
+(synopsis "Pure OCaml functions to manipulate real file and filename")
+(description "Library to provide pure OCaml functions to manipulate real
+file (POSIX like) and filename.")
+(license license:lgpl2.1)))
-- 
2.11.0




[PATCH 08/10] gnu: Add ocaml-oasis.

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

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 3817e77ae..ba0f5cd4c 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1900,3 +1900,45 @@ can match the question using a regular expression or a 
timeout.")
 (description "Library to provide pure OCaml functions to manipulate real
 file (POSIX like) and filename.")
 (license license:lgpl2.1)))
+
+(define-public ocaml-oasis
+  (package
+(name "ocaml-oasis")
+(version "0.4.8")
+(source (origin
+  (method url-fetch)
+  (uri (ocaml-forge-uri name version 1669))
+  (sha256
+   (base32
+"1ln7vc7ip6s5xbi20mhnn087xi4a2m5vqawx0703qqnfkzhmslqy"))
+(modules '((guix build utils)))
+(snippet
+ '(substitute* "test/test-main/Test.ml"
+;; most of these tests fail because ld cannot find crti.o, but 
according
+;; to the log file, the environment variables 
{LD_,}LIBRARY_PATH
+;; are set correctly whene LD_LIBRARY_PATH is defined 
beforhand.
+(("TestBaseCompat.tests;") "")
+(("TestExamples.tests;") "")
+(("TestFull.tests;") "")
+(("TestPluginDevFiles.tests;") "")
+(("TestPluginInternal.tests;") "")
+(("TestPluginOCamlbuild.tests;") "")
+(("TestPluginOMake.tests;") "")
+(build-system ocaml-build-system)
+(native-inputs
+ `(("ocamlify" ,ocamlify)
+   ("ocamlmod" ,ocamlmod)
+   ("ounit" ,ocaml-ounit)
+   ("omake" ,omake)
+   ("ocaml-expect" ,ocaml-expect)
+   ("ocaml-pcre" ,ocaml-pcre)
+   ("ocaml-fileutils" ,ocaml-fileutils)
+   ("camlp4" ,camlp4)
+   ("texlive" ,texlive)
+   ("pkg-config" ,pkg-config)))
+(home-page "https://oasis.forge.ocamlcore.org";)
+(synopsis "Integrates a configure, build, install system in OCaml 
projects")
+(description "OASIS is a tool to integrate a configure, build and install
+system in your OCaml projects.  It helps to create standard entry points in 
your
+build system and allows external tools to analyse your project easily.")
+(license license:lgpl2.1))) ; with ocaml static compilation exception
-- 
2.11.0




[PATCH 05/10] gnu: Add ocaml-pcre.

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

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 9043c1464..66e0a2a0d 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -40,6 +40,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 perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
@@ -1825,3 +1826,38 @@ many additional enhancements, including:
 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")
+(source (origin
+  (method url-fetch)
+  (uri (string-append 
"https://github.com/mmottl/pcre-ocaml/archive";
+  "/v" version ".tar.gz"))
+  (file-name (string-append name "-" version ".tar.gz"))
+  (sha256
+   (base32
+"0rj6dw79px4sj2kq0iss2nzq3rnsn9wivvc0f44wa1mppr6njfb3"
+(build-system ocaml-build-system)
+(arguments
+ `(#:phases
+   (modify-phases %standard-phases
+ (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/pcre")))
+   (mkdir-p stubs)
+   (symlink (string-append lib "/dllpcre_stubs.so")
+(string-append stubs "/dllpcre_stubs.so"
+(native-inputs
+ `(("batteries" ,ocaml-batteries)
+   ("pcre:bin" ,pcre "bin")))
+(propagated-inputs `(("pcre" ,pcre)))
+(home-page "https://mmottl.github.io/pcre-ocaml";)
+(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 10/10] gnu: Add ocaml-bin-prot.

2017-01-27 Thread Julien Lepiller
* gnu/packages/ocaml.scm (ocaml-bin-prot): 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 9b323975f..bb751101b 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1992,3 +1992,24 @@ Packages, but can be used for other purposes.  It 
contains:
 @item an js_build_tools ocamlbuild plugin with various goodies
 @end enumerate")
 (license license:asl2.0)))
+
+(define-public ocaml-bin-prot
+  (package
+(name "ocaml-bin-prot")
+(version "113.33.03")
+(source (janestreet-origin "bin_prot" version
+   "1ws8c017z8nbj3vw92ndvjk9011f71rmp3llncbv8r5fc76wqv3l"))
+(native-inputs
+ `(("js-build-tools" ,ocaml-js-build-tools)
+   ("opam" ,opam)))
+(build-system ocaml-build-system)
+(arguments janestreet-arguments)
+(home-page "https://github.com/janestreet/bin_prot/";)
+(synopsis "A binary protocol generator")
+(description "This library contains functionality for reading and writing
+OCaml-values in a type-safe binary protocol.  It is extremely efficient,
+typically supporting type-safe marshalling and unmarshalling of even highly
+structured values at speeds sufficient to saturate a gigabit connection.  The
+protocol is also heavily optimized for size, making it ideal for long-term
+storage of large amounts of data.")
+(license license:asl2.0)))
-- 
2.11.0




[PATCH 09/10] gnu: Add ocaml-js-build-tools.

2017-01-27 Thread Julien Lepiller
* gnu/packages/ocaml.scm (ocaml-js-build-tools): New variable.
* gnu/packages/patches/ocaml-janestreet-fix-libdir.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk   |  1 +
 gnu/packages/ocaml.scm | 50 ++
 .../patches/ocaml-janestreet-fix-libdir.patch  | 39 +
 3 files changed, 90 insertions(+)
 create mode 100644 gnu/packages/patches/ocaml-janestreet-fix-libdir.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 2e3548342..8555e403f 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -775,6 +775,7 @@ dist_patch_DATA =   
\
   %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/ocaml-janestreet-fix-libdir.patch \
   %D%/packages/patches/omake-fix-non-determinism.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 ba0f5cd4c..9b323975f 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -66,6 +66,35 @@
  (number->string file-number) "/" name "-" version
  ".tar.gz"))
 
+;; Janestreet packages are found in a similar way and all need the same patch
+(define (janestreet-origin name version hash)
+  (origin (method url-fetch)
+  (uri (string-append "https://ocaml.janestreet.com/ocaml-core/";
+  (version-major+minor version) "/files/"
+  name "-" version ".tar.gz"))
+  (sha256 (base32 hash))
+  (patches (search-patches "ocaml-janestreet-fix-libdir.patch"))
+  (modules '((guix build utils)))
+  (snippet `(substitute* "install.ml"
+ (((string-append "lib/" ,name))
+  (string-append "lib/ocaml/site-lib/" 
,name))
+
+;; They also require almost the same set of arguments
+(define janestreet-arguments
+ `(#:use-make? #t
+   #:make-flags
+   (list (string-append "CONFIGUREFLAGS=--prefix "
+(assoc-ref %outputs "out")
+" --enable-tests")
+ (string-append "LIBDIR="
+(assoc-ref %outputs "out")
+"/lib/ocaml/site-lib")
+ ;; for ocaml-bin-prot, otherwise ignored
+ (string-append "OCAML_TOPLEVEL_PATH="
+(assoc-ref %build-inputs "findlib")
+"/lib/ocaml/site-lib"))
+   #:phases (modify-phases %standard-phases (delete 'configure
+
 (define-public ocaml
   (package
 (name "ocaml")
@@ -1942,3 +1971,24 @@ file (POSIX like) and filename.")
 system in your OCaml projects.  It helps to create standard entry points in 
your
 build system and allows external tools to analyse your project easily.")
 (license license:lgpl2.1))) ; with ocaml static compilation exception
+
+(define-public ocaml-js-build-tools
+  (package
+(name "ocaml-js-build-tools")
+(version "113.33.06")
+(source (janestreet-origin "js-build-tools" version
+  "0r8z4fz8iy5y6hkdlkpwf6rk4qigcr3dzyv35585xgg2ahf12zy6"))
+(native-inputs
+ `(("oasis" ,ocaml-oasis)
+   ("opam" ,opam)))
+(build-system ocaml-build-system)
+(arguments janestreet-arguments)
+(home-page "https://github.com/janestreet/js-build-tools";)
+(synopsis "Collection of tools to help building Jane Street Packages")
+(description "This packages contains tools to help building Jane Street
+Packages, but can be used for other purposes.  It contains:
+@enumerate
+@item an oasis2opam-install tool to produce a .install file from the oasis 
build log
+@item an js_build_tools ocamlbuild plugin with various goodies
+@end enumerate")
+(license license:asl2.0)))
diff --git a/gnu/packages/patches/ocaml-janestreet-fix-libdir.patch 
b/gnu/packages/patches/ocaml-janestreet-fix-libdir.patch
new file mode 100644
index 0..4ba2a7510
--- /dev/null
+++ b/gnu/packages/patches/ocaml-janestreet-fix-libdir.patch
@@ -0,0 +1,39 @@
+This patch adds a --libdir option to opam-installer so it installs the plugin
+in the specified directory rather than in the default one (ocaml's directory in
+the store, which is forbidden).
+diff -aur package.pristine/Makefile package.new/Makefile
+--- package.pristine/Makefile  2016-02-06 01:55:14.650150309 +0100
 package.new/Makefile   2016-02-06 01:57:56.012174364 +0100
+@@ -29,26 +29,26 @@
+   ocaml -I js-utils js-utils/gen_install.ml
+
+ install: $(NAME).install
+-  opam-installer -i --prefix $(PREFIX) $(NAME).install
++  opam-installer -i --prefix $(PREFIX) --libdir $(LIBDIR) $(NAME).install
+
+ uninstall: $(NAME).install
+-  opam-installer -u --pr

gzip embedded timestamps

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

BTW, yesterday I added a ‘remove-gzip-timestamps’ phase in
‘core-updates’ so we don’t have to bother at all in the future:

  
http://git.savannah.gnu.org/cgit/guix.git/commit/?h=core-updates&id=1d636d63193b66f67fbd0f10315cd61818f132c1
  
http://git.savannah.gnu.org/cgit/guix.git/commit/?h=core-updates&id=95e7be97282f136190d7007f34d355a9691a16fa

Ludo’.



Re: [PATCH] Update gd and php

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

> On Thu, Jan 26, 2017 at 11:15:43AM +0100, Ludovic Courtès wrote:
>> Leo Famulari  skribis:
>> > =
>> > FAILED TEST SUMMARY
>> > -
>> > Test disk_free_space and its alias diskfreespace() functions : basic 
>> > functionality [ext/standard/tests/file/disk_free_space_basic.phpt]
>> > Test lstat() and stat() functions: usage variations - creating file/subdir 
>> > [ext/standard/tests/file/lstat_stat_variation8.phpt]
>> > Test lstat() and stat() functions: usage variations - deleting file/subdir 
>> > [ext/standard/tests/file/lstat_stat_variation9.phpt]
>> > =
>> 
>> This doesn’t seem to have any connection to the gd change.
>> 
>> Are you using a file system other than ext[234]?
>> 
>> Does php in current master passes its tests on the same machine?
>
> Good hunch. It builds fine for me on ext4 but not on btrfs.
>
> I'll prepare a bug report for PHP.

Thanks.  It’s interesting that file system details show up at this
level.  I’d be curious to see what feature/behavior is causing the
failure.

Ludo’.



Re: CUPS and HP printers

2017-01-27 Thread Ludovic Courtès
ng0  skribis:

> Ludovic Courtès  writes:
>
>> Hi Andy,
>>
>> Andy Patterson  skribis:
>>
>>> On Thu, 29 Dec 2016 14:05:51 +
>>> ng0  wrote:
>>>
>>>
 I really have no idea how hplip is supposed to be used in Guix after
 reading the note about the base service. So we are not supposed to
 run and install it as users in profiles? Will it be in the cups
 service where I would have no idea how to add it in there? 
>>>
>>> I've been printing with an hp for a little while now, and in my system
>>> configuration I have this:
>>>
>>> (service cups-service-type
>>>  (cups-configuration
>>>   (web-interface? #t)
>>>   (extensions
>>>(list cups-filters hplip
>>
>> Interesting.  Maybe we should document it somewhere or simply provide
>> this example in the manual, because it’s not necessarily obvious.

Done!

Ludo’.



Re: [PATCH 1/5] gnu: Add emacs-ht.

2017-01-27 Thread Ludovic Courtès
Alex Kost  skribis:

> Mathieu OTHACEHE (2017-01-27 11:16 +0100) wrote:
>
>>> On Fri, Jan 27, 2017 at 12:20:46PM +0300, Alex Kost wrote:
 Mathieu Othacehe (2017-01-26 13:31 +0100) wrote:
 > +  (uri (string-append
 > + "http://melpa.org/packages/ht-";
 > + version
 > + ".el"))
 
 We can't use files from melpa.org because once a new commit appears in
 the upstream repo, melpa will rebuilt the package and remove the
 previous version, so this package will lost its source and will not be
 buildable anymore.  So please use the latest available tarballs instead.
>>
>> Ok, I'll send and update.
>>
>>>
>>> I think the linter should warn about this. It seems like you have to
>>> send this email often.
>>
>> Yes, or modify guix import for melpa ? It seems that I
>> trusted wrongly the output of the importer ...
>
> Yeah, I think adjusting guix import for that would be really great (but
> I'm not a volunteer for this task :-))

What needs to be done?  We cannot guess the upstream URL just from the
MELPA one, can we?

Ludo’.



Re: [PATCH 0/1] Fix docs on Installing GuixSD in a VM

2017-01-27 Thread Ludovic Courtès
Marius Bakke  skribis:

> Leo Famulari  writes:
>
>> From what I can tell, there is a mistake in these instructions. I can't
>> find any QEMU documentation that mentions using '-net default', and I've
>> seen a few reports on #guix of it failing.
>
> I remember stumbling on this too. This change LGTM.

+1, thanks.



Re: [PATCH] gnu: rustc: Add LIBRARY_PATH search path.

2017-01-27 Thread Ludovic Courtès
Marius Bakke  skribis:

> Hi Ben,
>
> Ben Woodcroft  writes:
>
>> * gnu/packages/rust.scm (rustc)[native-search-paths]: New field.
>
> [...]
>
>> +(native-search-paths
>> + (list (search-path-specification
>> +(variable "LIBRARY_PATH")
>> +(files '("lib" "lib64")
>
> This seems odd. This search path is for glibc, no?

It’s honored by GCC (not to be confused with LD_LIBRARY_PATH.)

Does rustc invoke gcc, or does it just happen to use a same-named
variable?

Ludo’.



Re: [PATCH] gnu: rustc: Add LIBRARY_PATH search path.

2017-01-27 Thread Ben Woodcroft

Hi Marius,


On 28/01/17 06:21, Marius Bakke wrote:

Hi Ben,

Ben Woodcroft  writes:


* gnu/packages/rust.scm (rustc)[native-search-pat hs]: New field.

[...]


+(native-search-paths
+ (list (search-path-specification
+(variable "LIBRARY_PATH")
+(files '("lib" "lib64")

This seems odd. This search path is for glibc, no?

Is the problem this addresses not already fixed by
5d18d776d269ab9a6c44e049936389df3454ba30?


I didn't have any problem compiling and linking pure rust programs - 
that commit fixed that issue, but when trying to link rust programs to 
non-rust libraries such as zlib the linker did not look in the lib of 
the profile (unless gcc was also in the profile, I guess). I was 
specifically looking to include rust-htslib in a crate I am building, to 
be concrete.


Thanks, ben.



Re: gnu: ghc-8: Update to 8.0.2

2017-01-27 Thread Ludovic Courtès
Hi Federico,

Federico Beffa  skribis:

> I've updated our ghc-8 Haskell compiler to the latest version (8.0.2)
> and in doing so I've investigated why both 8.0.1 and 8.0.2 do not work
> without setting LD_LIBRARY_PATH to the required system libraries.
> I've found that NIX had the same problem.  The root cause for them was
> that their gcc-wrapper was not able to properly handle arguments
> passed through response files.  I suspect that we have the same
> problem.

We do.  (This and more was discussed at
.)

But really, “response files” are relics.  OTOH, it may not be hard to
change ‘ld-wrapper’ to read them (and there’s a good opportunity now
that we’re working on ‘core-updates’, if you want to give it a try.
:-)).

> For the moment I've borrowed a patch for GHC that they did use before
> fixing the gcc-wrapper. Going forward it would probably be wise to fix
> our gcc/ld wrapper as well.

Sounds good.

> From 35c4fa12cf2eb7316583b41c0c4e8b60f7a59bdc Mon Sep 17 00:00:00 2001
> From: Federico Beffa 
> Date: Wed, 25 Jan 2017 18:21:43 +0100
> Subject: [PATCH] gnu: ghc-8: Update to 8.0.2.
>
> * gnu/packages/haskell.scm (ghc-8): Update to 8.0.2.

Please mention the changes to ‘arguments’ (deleted phase, etc.)

> * gnu/packages/patches/ghc-dont-pass-linker-flags-via-response-files.patch:
>   New file.
> * gnu/local.mk (dist_patch_DATA): Add it.


> +++ b/gnu/packages/patches/ghc-dont-pass-linker-flags-via-response-files.patch
> @@ -0,0 +1,24 @@
> +See 
> https://github.com/NixOS/nixpkgs/commit/a421e7bd4a28c69bded8b17888325e31554f61a1

Maybe add “Don’t add linker flags via ‘response files’ since ld-wrapper
doesn’t handle them.”

Also: https://gcc.gnu.org/ml/gcc/2016-10/msg00151.html

OK with these changes.

Thank you!

Ludo’.



Re: [PATCH] gnu: rustc: Add LIBRARY_PATH search path.

2017-01-27 Thread Ben Woodcroft



On 28/01/17 09:22, Ludovic Courtès wrote:

Marius Bakke  skribis:


Hi Ben,

Ben Woodcroft  writes:


* gnu/packages/rust.scm (rustc)[native-search-paths]: New field.

[...]


+(native-search-paths
+ (list (search-path-specification
+(variable "LIBRARY_PATH")
+(files '("lib" "lib64")

This seems odd. This search path is for glibc, no?

It’s honored by GCC (not to be confused with LD_LIBRARY_PATH.)

Does rustc invoke gcc, or does it just happen to use a same-named
variable?

It uses gcc. The specific error I was getting was this:

error: linking with 
`/gnu/store/y1g6991kxvdk4vxhsq07r5saww30v8dq-gcc-4.9.4/bin/gcc` failed: 
exit code: 1

  |
  = note: 
"/gnu/store/y1g6991kxvdk4vxhsq07r5saww30v8dq-gcc-4.9.4/bin/gcc" 
"-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" 
"/gnu/store/8mdrn8i530qh00l4xsmjlj1q7mzsj5a0-rustc-1.14.0/lib/rustlib/x86_64-unknown-linux-gnu/lib" 
"/home/ben/git/genome_assigner/target/debug/genome_assigner.0.o" "-o" 
"/home/ben/git/genome_assigner/target/debug/genome_assigner" 
"-Wl,--gc-sections" "-pie" "-nodefaultlibs" "-L" 
"/home/ben/git/genome_assigner/target/debug/deps" "-L" 
"/home/ben/.cargo/registry/src/github.com-1ecc6299db9ec823/rust-htslib-0.10.0/htslib" 
"-L" 
"/gnu/store/8mdrn8i530qh00l4xsmjlj1q7mzsj5a0-rustc-1.14.0/lib/rustlib/x86_64-unknown-linux-gnu/lib" 
"-Wl,-Bstatic" "-Wl,-Bdynamic" 
"/home/ben/git/genome_assigner/target/debug/deps/librust_htslib-ccb3e9d7adc535c1.rlib" 
"/home/ben/git/genome_assigner/target/debug/deps/libitertools-42383a1bef75ce72.rlib" 
"/home/ben/git/genome_assigner/target/debug/deps/libcustom_derive-bf1b4c7d3ee792c6.rlib" 
"/home/ben/git/genome_assigner/target/debug/deps/libieee754-afaaaec92cb01ddb.rlib" 
"/home/ben/git/genome_assigner/target/debug/deps/liblazy_static-3a04918be71c80ee.rlib" 
"/home/ben/git/genome_assigner/target/debug/deps/libquick_error-729eced693f2612d.rlib" 
"/home/ben/git/genome_assigner/target/debug/deps/liblibc-29ef97a68464c2b7.rlib" 
"/home/ben/git/genome_assigner/target/debug/deps/liburl-30c51e30991892cc.rlib" 
"/home/ben/git/genome_assigner/target/debug/deps/libnewtype_derive-154c397f9f0bae71.rlib" 
"/home/ben/git/genome_assigner/target/debug/deps/libidna-82ebdb343d6c1855.rlib" 
"/home/ben/git/genome_assigner/target/debug/deps/libunicode_normalization-77ce7c413abacd3f.rlib" 
"/home/ben/git/genome_assigner/target/debug/deps/libunicode_bidi-eaf420bc9a69d19f.rlib" 
"/home/ben/git/genome_assigner/target/debug/deps/libmatches-3614821dd5ceb75c.rlib" 
"/gnu/store/8mdrn8i530qh00l4xsmjlj1q7mzsj5a0-rustc-1.14.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-f5a209a9.rlib" 
"/gnu/store/8mdrn8i530qh00l4xsmjlj1q7mzsj5a0-rustc-1.14.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-f5a209a9.rlib" 
"/gnu/store/8mdrn8i530qh00l4xsmjlj1q7mzsj5a0-rustc-1.14.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-f5a209a9.rlib" 
"/gnu/store/8mdrn8i530qh00l4xsmjlj1q7mzsj5a0-rustc-1.14.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/librand-f5a209a9.rlib" 
"/gnu/store/8mdrn8i530qh00l4xsmjlj1q7mzsj5a0-rustc-1.14.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcollections-f5a209a9.rlib" 
"/gnu/store/8mdrn8i530qh00l4xsmjlj1q7mzsj5a0-rustc-1.14.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_unicode-f5a209a9.rlib" 
"/gnu/store/8mdrn8i530qh00l4xsmjlj1q7mzsj5a0-rustc-1.14.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-f5a209a9.rlib" 
"/gnu/store/8mdrn8i530qh00l4xsmjlj1q7mzsj5a0-rustc-1.14.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc_jemalloc-f5a209a9.rlib" 
"/gnu/store/8mdrn8i530qh00l4xsmjlj1q7mzsj5a0-rustc-1.14.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-f5a209a9.rlib" 
"/gnu/store/8mdrn8i530qh00l4xsmjlj1q7mzsj5a0-rustc-1.14.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-f5a209a9.rlib" 
"/gnu/store/8mdrn8i530qh00l4xsmjlj1q7mzsj5a0-rustc-1.14.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-f5a209a9.rlib" 
"-l" "z" "-l" "util" "-l" "dl" "-l" "pthread" "-l" "gcc_s" "-l" 
"pthread" "-l" "c" "-l" "m" "-l" "rt" "-l" "util"

  = note: ld: cannot find -lz
collect2: error: ld returned 1 exit status


Thanks, ben.



Re: [PATCH] tests: Adjust pypi test to recent importer change.

2017-01-27 Thread Ludovic Courtès
Carlo Zancanaro  skribis:

> From e709e9a1cb321ff2581cc10232bae9e37048cea0 Mon Sep 17 00:00:00 2001
> From: Carlo Zancanaro 
> Date: Fri, 27 Jan 2017 14:40:49 +1100
> Subject: [PATCH] tests: Adjust pypi test to recent importer change.
>
> This is a followup to 2f977d92d3ae517788d3dee98f63680ca149aa1a.
>
> * tests/pypi.scm ("pypi->guix-package"): Don't expect 'python-setuptools' in
> 'propagated-inputs'.
> ("pypi->guix-package, wheels"): Likewise.

Applied, thanks!

Ludo’.



Re: [PATCH] gnu: u-boot: Use scandir.

2017-01-27 Thread Ludovic Courtès
Hi Danny,

Danny Milosavljevic  skribis:

> * gnu/packages/u-boot.scm (make-u-boot-package): Modify.


>   (replace 'configure
> (lambda* (#:key outputs make-flags #:allow-other-keys)
> + (use-modules ((ice-9 ftw)))
>   (let ((config-name (string-append ,board "_defconfig")))
> (if (file-exists? (string-append "configs/" config-name))
> (zero? (apply system* "make" `(,@make-flags 
> ,config-name)))
> (begin
>   (display "Invalid board name. Valid board names are:")
> - (let ((dir (opendir "configs"))
> -   (suffix-length (string-length "_defconfig")))
> -   (do ((file-name (readdir dir) (readdir dir)))
> -   ((eof-object? file-name))
> - (when (string-suffix? "_defconfig" file-name)
> -   (format #t "- ~A\n"
> -   (string-drop-right file-name 
> suffix-length
> -   (closedir dir))
> + (let ((suffix-length (string-length "_defconfig")))
> +   (scandir "configs"
> + (lambda (file-name)
> +   (when (string-suffix? "_defconfig" file-name)
> + (format #t "- ~A\n"
> + (string-drop-right file-name
> +suffix-length))

Using ‘scandir’ is a good idea.

Minor point: please write

  (arguments
   '(#:modules ((ice-9 ftw) …)
 …))

instead of the inner ‘use-modules’ form (which is not guaranteed to work
with future Guile versions.)

Also the second argument to ‘scandir’ should be aligned with the first.
:-)

OK with these changes, thank you!

Ludo’.



Re: [PATCH] gnu: Add ldc-1.1.0-beta6

2017-01-27 Thread Ludovic Courtès
Frederick Muriithi  skribis:

> On Fri, Jan 20, 2017 at 4:33 PM, Ludovic Courtès  wrote:
>> Frederick Muriithi  skribis:
>>
>>> On 19 Jan 2017 3:47 p.m., "Ludovic Courtès"  wrote:
>>>
>>>  ... However, on my x86_64 machine, the build fails with:
>>>  --8<---cut here---start->8---
>>>  99% tests passed, 1 tests failed out of 751
>>>
>>>  Total Test time (real) = 2134.61 sec
>>>
>>>  The following tests FAILED:
>>>  235 - std.datetime (Failed)
>>>  Errors while running CTest
>>>  make: *** [Makefile:76: test] Error 8
>>>  --8<---cut here---end--->8---
>>>
>>>  Any idea what’s amiss?
>>>
>>> If you have the time , look in builild/Testing/Temporary/Last test.log file 
>>> in the debug folder created by guix with the --keep-failed flag: If you 
>>> can't,
>>> I'll look at it when I get back to my computer.
>>
>> Please do!
>>
>> TIA,
>> Ludo’.
>
> I ran `dos2unix 0001-gnu-Add-ldc-1.1.0-beta6.patch` then applied the
> patch on a newly cloned guix repository and ran the following command:
>
> ./pre-inst-env guix environment guix --pure -- ./pre-inst-env guix
> build --keep-failed ldc@1.1.0-beta6
>
> on my system.
> The ldc build ran successfully with no errors.
>
> My system is a x86_64, running Debian 8 (Jessie). The output of `uname -a` is:
>
> Linux localhost 3.16.0-4-amd64 #1 SMP Debian 3.16.39-1
> (2016-12-30) x86_64 GNU/Linux
>
> When you get the time, please send me the files in
> /tmp/guix-build-ldc-1.1.0-beta6.drv-0/build/Testing from your system.
> Those should help me troubleshoot the issue.

I tried another time and this time all the tests passed.

I have pushed the patch and we’ll investigate when the problem comes up
again:

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

Thanks, and sorry for the delay!

Ludo’.



Re: 01/01: gnu: Add ldc@1.1.0-beta6.

2017-01-27 Thread Mark H Weaver
l...@gnu.org (Ludovic Courtès) writes:

> civodul pushed a commit to branch master
> in repository guix.
>
> commit 2429dde57d8461cc8e51dbe6c9d47d795fe6fc9a
> Author: Muriithi Frederick Muriuki 
> Date:   Fri Jan 6 17:51:18 2017 +0300
>
> gnu: Add ldc@1.1.0-beta6.
> 
> * gnu/packages/ldc.scm (ldc-1.1.0-beta6, ldc-beta): New variables.
> * gnu/packages/patches/ldc-1.1.0-disable-dmd-tests.patch: New file.
> * gnu/packages/patches/ldc-1.1.0-disable-phobos-tests.patch: New file.
> * gnu/local.mk (dist_patch_DATA): Add them.
> 
> Signed-off-by: Ludovic Courtès 

This commit neglected to add the *.patch files, so 'make' now fails.

   Mark



Re: Debugging and source code

2017-01-27 Thread Pjotr Prins
On Thu, Jan 26, 2017 at 10:54:56AM +0100, Ludovic Courtès wrote:
>   0. Status quo: people need to get the source by themselves with “guix
>  build -S”.
> 
>   1. The “debug” output, when it exists, always includes the source.
> 
>   2. When a “source” output exists, the source code is copied there.
>  The “debug” output contains nothing more than debugging info, as is
>  currently the case.
> 
> We’ve already discussed #1.
> 
> With #2, we’d have to manually opt-in in package recipes.  So we could
> have:
> 
>   (package
> (output '("out" "debug"))  ;like now
> …)
> 
> or:
> 
>   (package
> (output '("out" "source" "debug"))
> …)
> 
> Maybe that’s too inconvenient though.
> 
> Thoughts?

I think we are missing something here. What I want to achieve is that
someone can do 'guix package -i gdb foo:debug-with-sources' so he/she can 
simply start the debugger with

   gdb ~/.guix-profile/bin/foo

and have full debugging information to test drive.

The problem I am facing now is that I have to explain non-programmers
to fetch the source code, unpack it from a *named* store path, go to
the new directory and then run gdb. Not only that, this package
fetches multiple source trees from multiple origins (a common thing in
programming languages). So I'll have to explain how to fetch each
individual tree and make sure they play well together.

And that is exactly what the build system does!!

So, the next idea is to use -K and tell someone to move into the
temporary directory. But then again I miss the dependencies with their
trees.

The :debug target is awesome, it wouuld be even more awesome to point
to source trees from the profile - so they are easy to find and in
sync with the built target. It would mean you can ask anyone to
debug software like we are doing here:
https://github.com/lomereiter/sambamba/issues/219#issuecomment-275615245

Note that this feature is to debug complex software on architectures I
have no access for - like some HPC environments. In the next step I'll
make it relocatable too. I can probably work it using multiple -K's,
but it would be a one-off for every software package. 

That is my request. 

I have a feeling that if I have a use case there will be more takers,
what to think of icecat ;)

-- 



Re: [PATCH] gnu: Add ldc-1.1.0-beta6

2017-01-27 Thread Pjotr Prins
ldc 1.1.0 was released yesterday :). I am testing.

Pj.




Re: [PATCH v2 1/2] gnu: Add dub.

2017-01-27 Thread Pjotr Prins
Great work!

On Mon, Jan 23, 2017 at 11:46:25PM +0100, Ludovic Courtès wrote:
> Danny Milosavljevic  skribis:
> 
> > * gnu/packages/ldc.scm (dub): New variable.
> 
> [...]
> 
> > +   (modify-phases %standard-phases
> > + (delete 'configure)
> > + (replace 'build
> > +   (lambda _
> > + (zero? (system* "./build.sh"
> > + (replace 'install
> > +   (lambda* (#:key outputs #:allow-other-keys)
> > + (let* ((out (assoc-ref outputs "out"))
> > +(outbin (string-append out "/bin")))
> > +   (mkdir-p outbin)
> > +   (install-file "bin/dub" outbin)))
> 
> Please add #t at the end of this lambda, to denote success.
> 
> Otherwise LGTM, thanks!
> 
> Ludo’.
> 

--