Re: [PATCH 1/2] build: Generalize 'package-with-explicit-python'.

2017-02-08 Thread Federico Beffa
On Wed, Feb 8, 2017 at 8:09 PM, Ricardo Wurmus  wrote:
>
> Federico Beffa  writes:
>
>> Generalize the Python procedure to recursively replace compiler/interpreter.
>> From a8220b430d196e5bb079e23ac63b1acd16fdaaee Mon Sep 17 00:00:00 2001
>> From: Federico Beffa 
>> Date: Wed, 8 Feb 2017 18:55:32 +0100
>> Subject: [PATCH 1/2] build: Generalize 'package-with-explicit-python'.
>>
>> * guix/build-system/python.scm (package-with-explicit-python): Remove it and
>>   replace it with the generalized procedure 'package-with-explicit-compiler'
>>   in the new file. (package-with-python2): Adapt it.
>> * guix/build-system/utils.scm: New file with the generalized procedure.
>> * Makefile.am (MODULES): Add new file.
>
> The goal here is to override packages in build system arguments, right?
> This is great and we really need something like this to make building
> package variants simpler.  (I ran into a problem that would be solved by
> this when I tried to build Perl modules for different variants of Perl.)

Hi Ricardo,

The goal is to exploit the compiler keyword argument of many
build-systems (such as #:python, #:haskell, ...) to pass the desired
compiler instead of the default one.

> Looking over the patch it feels inelegant to have a whitelist of
> permitted arguments, as in “compiler-keyword”.  We already have a
> procedure called “package-input-rewriting” that replaces any (explicit
> input-) package in the dependency graph with a different package.  What
> I like about that is that it is generic.  Is there a way we could extend
> it to include packages pulled in by the build system, e.g. by making it
> work at the level of bags?

The procedure was not written by me: 99% of it comes from the
python-build-system.  The only thing that I did is to replace the
hard-coded '#:python' keyword with a variable one such that it can be
used with some other build systems. This seemed to me as one step in
the right direction, but if you have a better idea then please go
ahead and write it.  I will not feel offended ;-)

Regards,
Fede



Re: Category package

2017-02-08 Thread Eric Bavier
On Wed, 08 Feb 2017 07:07:57 -0600
ren...@openmailbox.org wrote:

> Hello,
> 
> I am packing Filezilla, a ftp/sftp client. Filezilla requires the 
> libfilezilla[1] library.
> 
> My question is, in which category can I add it?

It seems to me that gnu/packages/ftp.scm would be a fine home for both.

`~Eric




Re: [PATCH 1/5] gnu: Add libmp4v2.

2017-02-08 Thread Kei Kebreau
contact@cryptolab.net writes:

> From: ng0 
>
> * gnu/packages/video.scm (libmp4v2): New variable.
> ---
>  gnu/packages/video.scm | 56 
> +-
>  1 file changed, 55 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
> index 8ba229e58..601364fdf 100644
> --- a/gnu/packages/video.scm
> +++ b/gnu/packages/video.scm
> @@ -11,7 +11,7 @@
>  ;;; Copyright © 2016 Kei Kebreau 
>  ;;; Copyright © 2016 Dmitry Nikolaev 
>  ;;; Copyright © 2016 Andy Patterson 
> -;;; Copyright © 2016 ng0 
> +;;; Copyright © 2016, 2017 ng0 
>  ;;; Copyright © 2016 Eric Bavier 
>  ;;; Copyright © 2016 Jan Nieuwenhuizen 
>  ;;;
> @@ -57,6 +57,7 @@
>#:use-module (gnu packages compression)
>#:use-module (gnu packages curl)
>#:use-module (gnu packages databases)
> +  #:use-module (gnu packages dejagnu)
>#:use-module (gnu packages elf)
>#:use-module (gnu packages flex)
>#:use-module (gnu packages fontutils)
> @@ -75,6 +76,7 @@
>#:use-module (gnu packages linux)
>#:use-module (gnu packages lua)
>#:use-module (gnu packages m4)
> +  #:use-module (gnu packages man)
>#:use-module (gnu packages mp3)
>#:use-module (gnu packages ncurses)
>#:use-module (gnu packages ocr)
> @@ -1862,3 +1864,55 @@ of modern, widely supported codecs.")
>  (description
>   "Openh264 is a library which can decode H264 video streams.")
>  (license license:bsd-2)))
> +
> +(define-public libmp4v2
> +  (package
> +(name "libmp4v2")
> +(version "2.0.0")
> +(source
> + (origin
> +   (method url-fetch)
> +   ;; XXX: The new location of upstream is uncertain and will become 
> relevant the
> +   ;; moment when the googlecode archive shuts down. It is past the date 
> it
> +   ;; should've been turned off. I tried to communicate with upstream, 
> but this
> +   ;; wasn't very responsive and not very helpful. The short summary is, 
> it is
> +   ;; chaos when it comes to the amount of forks and only time will tell 
> where
> +   ;; the new upstream location is.
> +   (uri (string-append "https://storage.googleapis.com/google-;
> +   "code-archive-downloads/v2/"
> +   "code.google.com/mp4v2/mp4v2-" version 
> ".tar.bz2"))
> +   (file-name (string-append name "-" version ".tar.bz2"))
> +   (sha256
> +(base32
> + "0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683"
> +(build-system gnu-build-system)
> +(outputs '("out"
> +   "static")) ; 3.7MiB .a file
> +(arguments
> + `(#:phases

Adding a phase here that gets rid of dates and such makes the build
reproducible:

(add-after 'unpack 'pre-configure
   (lambda _
 (substitute* "configure"
   (("PROJECT_build=\"`date`\"") "PROJECT_build=\"\"")
   (("ac_abs_top_builddir=$ac_pwd") "ac_abs_top_builddir=\"\""

> +   (modify-phases %standard-phases
> + (add-after 'install 'move-static-libraries
> +   (lambda* (#:key outputs #:allow-other-keys)
> + ;; Move static libraries to the "static" output.
> + (let* ((out(assoc-ref outputs "out"))
> +(lib(string-append out "/lib"))
> +(static (assoc-ref outputs "static"))
> +(slib   (string-append static "/lib")))
> +   (mkdir-p slib)
> +   (for-each (lambda (file)
> +   (install-file file slib)
> +   (delete-file file))
> + (find-files lib "\\.a$"))
> +   #t))
> +(native-inputs
> + `(("help2man" ,help2man)
> +   ("dejagnu" ,dejagnu)))
> +(home-page "https://code.google.com/archive/p/mp4v2/;)
> +(synopsis "libmp4v2 provides an API to create and modify mp4 files")
The synopsis should start with an uppercase letter and not start with
the package name. Perhaps you could erase everything before "API".

> +(description
> + "The MP4v2 library provides an API to create and modify mp4 files as 
> defined by
> +ISO-IEC:14496-1:2001 MPEG-4 Systems.  This file format is derived from 
> Apple's QuickTime
> +file format that has been used as a multimedia file format in a variety of 
> platforms and
> +applications.  It is a very powerful and extensible format that can 
> accommodate
> +practically any type of media.")
> +(license license:mpl1.1)))

The rest LGTM. Could you send an updated patch?


signature.asc
Description: PGP signature


Re: [PATCH 2/5] gnu: Add tidy-html.

2017-02-08 Thread Kei Kebreau
contact@cryptolab.net writes:

> From: ng0 
>
> * gnu/packages/web.scm (tidy-html): New variable.
> ---
>  gnu/packages/web.scm | 51 ++-
>  1 file changed, 50 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
> index 67b9797bb..8a29eead1 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,52 @@ 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 tidy-html
> +  (package
> +(name "tidy-html")
> +(version "5.2.0")
> +(source
> + (origin
> +   (method url-fetch)
> +   (uri (string-append "https://github.com/htacg/tidy-html5/archive/;
> +   version ".tar.gz"))
> +   (file-name (string-append name "-" version ".tar.gz"))
> +   (sha256
> +(base32
> + "0kbwzh15dlapp3s3vff2qgz0yfcf8hwsnx5q4igwa6pimhak8lw0"
> +(build-system cmake-build-system)
> +(outputs '("out"
> +   "static")) ; 1.0MiB of .a files
> +(arguments
> + `(#:tests? #f ; No tests available
> +   #:configure-flags (list "-DCMAKE_BUILD_TYPE=Release")
> +   #:phases
> +   (modify-phases %standard-phases
> + (add-after 'install 'move-static-libraries
> +   (lambda* (#:key outputs #:allow-other-keys)
> + ;; Move static libraries to the "static" output.
> + (let* ((out(assoc-ref outputs "out"))
> +(lib(string-append out "/lib"))
> +(static (assoc-ref outputs "static"))
> +(slib   (string-append static "/lib")))
> +   (mkdir-p slib)
> +   (for-each (lambda (file)
> +   (install-file file slib)
> +   (delete-file file))
> + (find-files lib "\\.a$"))
> +   #t))
> +(native-inputs
> + `(("libxslt" ,libxslt)))
> +(home-page "http://www.html-tidy.org/;)
> +(synopsis "HTML Tidy with HTML5 support")
> +(description
> + "Tidy is a console application for Mac OS X, Linux, Windows,
> +UNIX, and more. It corrects and cleans up HTML and XML documents by
> +fixing markup errors and upgrading legacy code to modern standards.
> +
> +libtidy is a C static and dynamic library that developers can integrate
> +into their applications in order to bring all of Tidy’s power to your
> +favorite tools. libtidy is used today in desktop applications,
> +web servers, and more.")

Sentences in the description should be followed by two spaces.

> +(license l:bsd-3)))

The rest LGTM.


signature.asc
Description: PGP signature


Re: [PATCH 2/5] gnu: Add tidy-html.

2017-02-08 Thread Kei Kebreau
contact@cryptolab.net writes:

> From: ng0 
>
> * gnu/packages/web.scm (tidy-html): New variable.
> ---
>  gnu/packages/web.scm | 51 ++-
>  1 file changed, 50 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
> index 67b9797bb..8a29eead1 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,52 @@ 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 tidy-html
> +  (package
> +(name "tidy-html")
> +(version "5.2.0")
> +(source
> + (origin
> +   (method url-fetch)
> +   (uri (string-append "https://github.com/htacg/tidy-html5/archive/;
> +   version ".tar.gz"))
> +   (file-name (string-append name "-" version ".tar.gz"))
> +   (sha256
> +(base32
> + "0kbwzh15dlapp3s3vff2qgz0yfcf8hwsnx5q4igwa6pimhak8lw0"
> +(build-system cmake-build-system)
> +(outputs '("out"
> +   "static")) ; 1.0MiB of .a files
> +(arguments
> + `(#:tests? #f ; No tests available
> +   #:configure-flags (list "-DCMAKE_BUILD_TYPE=Release")
> +   #:phases
> +   (modify-phases %standard-phases
> + (add-after 'install 'move-static-libraries
> +   (lambda* (#:key outputs #:allow-other-keys)
> + ;; Move static libraries to the "static" output.
> + (let* ((out(assoc-ref outputs "out"))
> +(lib(string-append out "/lib"))
> +(static (assoc-ref outputs "static"))
> +(slib   (string-append static "/lib")))
> +   (mkdir-p slib)
> +   (for-each (lambda (file)
> +   (install-file file slib)
> +   (delete-file file))
> + (find-files lib "\\.a$"))
> +   #t))
> +(native-inputs
> + `(("libxslt" ,libxslt)))
> +(home-page "http://www.html-tidy.org/;)
> +(synopsis "HTML Tidy with HTML5 support")
> +(description
> + "Tidy is a console application for Mac OS X, Linux, Windows,
> +UNIX, and more. It corrects and cleans up HTML and XML documents by
> +fixing markup errors and upgrading legacy code to modern standards.
> +
> +libtidy is a C static and dynamic library that developers can integrate
> +into their applications in order to bring all of Tidy’s power to your
> +favorite tools. libtidy is used today in desktop applications,
> +web servers, and more.")

Sentences in the description should be followed by two spaces.

> +(license l:bsd-3)))

The rest LGTM.


signature.asc
Description: PGP signature


Re: [PATCH -v3] Fix gtk-im-modules for gtk+3

2017-02-08 Thread 宋文武
"Huang, Ying"  writes:

> Hi, Wenwu,
>
> iyzs...@member.fsf.org (宋文武) writes:
>
>> "Huang, Ying"  writes:
>>
>>> [...]
 -#$(if gtk+   (build gtk+   "3.0.0")  #t)
 -#$(if gtk+-2 (build gtk+-2 "2.10.0") #t
 +#$(if gtk+
 +  (build
 +   gtk+ "3.0.0"
 +   #~(string-append
 +  #$gtk+:bin "/bin/gtk-query-immodules-3.0"))
>>>
>>> If "gtk+" is store path instead of package, this doesn't work.  In a
>>> previous version, "gtk+" will be store path, it is package now.  If it
>>> will always be package in the future.  We can pass the store path of
>>> target output too.
>>
>> Oh, you're right!
>>
>> We can use the gtk+ package object here:
>>
>> [attachment]
>>
>> 0001-profiles-gtk-im-modules-Fix-for-gtk3.patch
>>
>> From a0b9a36b4e902fd6f456fa596c6220c708c35f71 Mon Sep 17 00:00:00 2001
>> From: "huang_ying_cari...@163.com" 
>> Date: Sun, 5 Feb 2017 13:41:47 +0800
>> Subject: [PATCH] profiles: gtk-im-modules: Fix for gtk3.
>>
>> Gtk+3 now have multiple outputs, so the gtk-query-immodules-3.0 should be 
>> find
>> in output "bin" instead of "out".
>>
>> * guix/profiles.scm (gtk-im-modules): Pass the path of 
>> gtk-query-immodules-x.x
>> as 'query' argument to the 'build' procedure.
>> ---
>>  guix/profiles.scm | 26 +++---
>>  1 file changed, 19 insertions(+), 7 deletions(-)
>>
>> diff --git a/guix/profiles.scm b/guix/profiles.scm
>> index 495a9e2e7..de82eae34 100644
>> --- a/guix/profiles.scm
>> +++ b/guix/profiles.scm
>> @@ -739,7 +739,7 @@ for both major versions of GTK+."
>>(mlet %store-monad ((gtk+   (manifest-lookup-package manifest "gtk+" "3"))
>>(gtk+-2 (manifest-lookup-package manifest "gtk+" 
>> "2")))
>>  
>> -(define (build gtk gtk-version)
>> +(define (build gtk gtk-version query)
>>(let ((major (string-take gtk-version 1)))
>>  (with-imported-modules '((guix build utils)
>>   (guix build union)
>> @@ -756,8 +756,6 @@ for both major versions of GTK+."
>>  
>>(let* ((prefix  (string-append "/lib/gtk-" #$major ".0/"
>>   #$gtk-version))
>> - (query   (string-append #$gtk 
>> "/bin/gtk-query-immodules-"
>> - #$major ".0"))
>>   (destdir (string-append #$output prefix))
>>   (moddirs (cons (string-append #$gtk prefix 
>> "/immodules")
>>  (filter file-exists?
>> @@ -768,7 +766,7 @@ for both major versions of GTK+."
>>  
>>  ;; Generate a new immodules cache file.
>>  (mkdir-p (string-append #$output prefix))
>> -(let ((pipe(apply open-pipe* OPEN_READ query modules))
>> +(let ((pipe(apply open-pipe* OPEN_READ #$query modules))
>>(outfile (string-append #$output prefix
>>"/immodules-gtk" #$major 
>> ".cache")))
>>(dynamic-wind
>> @@ -783,9 +781,23 @@ for both major versions of GTK+."
>>(close-pipe pipe)
>>  
>>  ;; Don't run the hook when there's nothing to do.
>> -(let ((gexp #~(begin
>> -#$(if gtk+   (build gtk+   "3.0.0")  #t)
>> -#$(if gtk+-2 (build gtk+-2 "2.10.0") #t
>> +(let* ((pkg-gtk+ (module-ref; lazy reference
>> +  (resolve-interface '(gnu packages gtk)) 'gtk+))
>> +   (gexp #~(begin
>> + #$(if gtk+
>> +   (build
>> +gtk+ "3.0.0"
>> +;; Use 'gtk-query-immodules-3.0' from the 'bin'
>> +;; output of latest gtk+ package.
>> +#~(string-append
>> +   #$pkg-gtk+:bin 
>> "/bin/gtk-query-immodules-3.0"))
>> +   #t)
>> + #$(if gtk+-2
>> +   (build
>> +gtk+-2 "2.10.0"
>> +#~(string-append
>> +   #$gtk+-2 "/bin/gtk-query-immodules-2.0"))
>> +   #t
>>(if (or gtk+ gtk+-2)
>>(gexp->derivation "gtk-im-modules" gexp
>>  #:local-build? #t
>
> This should work.  But I don't think it is perfect.  It may refer to the
> gtk-query-immodules-3.0 not with the exact same version.

Yes..  but it's acceptable, if we don't require and use gtk+:bin in
profile, then I think the latest gtk+ is the only choice?

Pushed, thank you!



Re: [PATCH 1/5] gnu: Add libmp4v2.

2017-02-08 Thread Kei Kebreau
contact@cryptolab.net writes:

> From: ng0 
>
> * gnu/packages/video.scm (libmp4v2): New variable.
> ---
>  gnu/packages/video.scm | 56 
> +-
>  1 file changed, 55 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
> index 8ba229e58..601364fdf 100644
> --- a/gnu/packages/video.scm
> +++ b/gnu/packages/video.scm
> @@ -11,7 +11,7 @@
>  ;;; Copyright © 2016 Kei Kebreau 
>  ;;; Copyright © 2016 Dmitry Nikolaev 
>  ;;; Copyright © 2016 Andy Patterson 
> -;;; Copyright © 2016 ng0 
> +;;; Copyright © 2016, 2017 ng0 
>  ;;; Copyright © 2016 Eric Bavier 
>  ;;; Copyright © 2016 Jan Nieuwenhuizen 
>  ;;;
> @@ -57,6 +57,7 @@
>#:use-module (gnu packages compression)
>#:use-module (gnu packages curl)
>#:use-module (gnu packages databases)
> +  #:use-module (gnu packages dejagnu)
>#:use-module (gnu packages elf)
>#:use-module (gnu packages flex)
>#:use-module (gnu packages fontutils)
> @@ -75,6 +76,7 @@
>#:use-module (gnu packages linux)
>#:use-module (gnu packages lua)
>#:use-module (gnu packages m4)
> +  #:use-module (gnu packages man)
>#:use-module (gnu packages mp3)
>#:use-module (gnu packages ncurses)
>#:use-module (gnu packages ocr)
> @@ -1862,3 +1864,55 @@ of modern, widely supported codecs.")
>  (description
>   "Openh264 is a library which can decode H264 video streams.")
>  (license license:bsd-2)))
> +
> +(define-public libmp4v2
> +  (package
> +(name "libmp4v2")
> +(version "2.0.0")
> +(source
> + (origin
> +   (method url-fetch)
> +   ;; XXX: The new location of upstream is uncertain and will become 
> relevant the
> +   ;; moment when the googlecode archive shuts down. It is past the date 
> it
> +   ;; should've been turned off. I tried to communicate with upstream, 
> but this
> +   ;; wasn't very responsive and not very helpful. The short summary is, 
> it is
> +   ;; chaos when it comes to the amount of forks and only time will tell 
> where
> +   ;; the new upstream location is.
> +   (uri (string-append "https://storage.googleapis.com/google-;
> +   "code-archive-downloads/v2/"
> +   "code.google.com/mp4v2/mp4v2-" version 
> ".tar.bz2"))
> +   (file-name (string-append name "-" version ".tar.bz2"))
> +   (sha256
> +(base32
> + "0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683"
> +(build-system gnu-build-system)
> +(outputs '("out"
> +   "static")) ; 3.7MiB .a file
> +(arguments
> + `(#:phases

Adding a phase here that gets rid of dates and such makes the build
reproducible:

(add-after 'unpack 'pre-configure
   (lambda _
 (substitute* "configure"
   (("PROJECT_build=\"`date`\"") "PROJECT_build=\"\"")
   (("ac_abs_top_builddir=$ac_pwd") "ac_abs_top_builddir=\"\""

> +   (modify-phases %standard-phases
> + (add-after 'install 'move-static-libraries
> +   (lambda* (#:key outputs #:allow-other-keys)
> + ;; Move static libraries to the "static" output.
> + (let* ((out(assoc-ref outputs "out"))
> +(lib(string-append out "/lib"))
> +(static (assoc-ref outputs "static"))
> +(slib   (string-append static "/lib")))
> +   (mkdir-p slib)
> +   (for-each (lambda (file)
> +   (install-file file slib)
> +   (delete-file file))
> + (find-files lib "\\.a$"))
> +   #t))
> +(native-inputs
> + `(("help2man" ,help2man)
> +   ("dejagnu" ,dejagnu)))
> +(home-page "https://code.google.com/archive/p/mp4v2/;)
> +(synopsis "libmp4v2 provides an API to create and modify mp4 files")
The synopsis should start with an uppercase letter and not start with
the package name. Perhaps you could erase everything before "API".

> +(description
> + "The MP4v2 library provides an API to create and modify mp4 files as 
> defined by
> +ISO-IEC:14496-1:2001 MPEG-4 Systems.  This file format is derived from 
> Apple's QuickTime
> +file format that has been used as a multimedia file format in a variety of 
> platforms and
> +applications.  It is a very powerful and extensible format that can 
> accommodate
> +practically any type of media.")
> +(license license:mpl1.1)))

The rest LGTM. Could you send an updated patch?


signature.asc
Description: PGP signature


Re: [PATCH 1/5] gnu: Add libmp4v2.

2017-02-08 Thread Kei Kebreau
contact@cryptolab.net writes:

> From: ng0 
>
> * gnu/packages/video.scm (libmp4v2): New variable.
> ---
>  gnu/packages/video.scm | 56 
> +-
>  1 file changed, 55 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
> index 8ba229e58..601364fdf 100644
> --- a/gnu/packages/video.scm
> +++ b/gnu/packages/video.scm
> @@ -11,7 +11,7 @@
>  ;;; Copyright © 2016 Kei Kebreau 
>  ;;; Copyright © 2016 Dmitry Nikolaev 
>  ;;; Copyright © 2016 Andy Patterson 
> -;;; Copyright © 2016 ng0 
> +;;; Copyright © 2016, 2017 ng0 
>  ;;; Copyright © 2016 Eric Bavier 
>  ;;; Copyright © 2016 Jan Nieuwenhuizen 
>  ;;;
> @@ -57,6 +57,7 @@
>#:use-module (gnu packages compression)
>#:use-module (gnu packages curl)
>#:use-module (gnu packages databases)
> +  #:use-module (gnu packages dejagnu)
>#:use-module (gnu packages elf)
>#:use-module (gnu packages flex)
>#:use-module (gnu packages fontutils)
> @@ -75,6 +76,7 @@
>#:use-module (gnu packages linux)
>#:use-module (gnu packages lua)
>#:use-module (gnu packages m4)
> +  #:use-module (gnu packages man)
>#:use-module (gnu packages mp3)
>#:use-module (gnu packages ncurses)
>#:use-module (gnu packages ocr)
> @@ -1862,3 +1864,55 @@ of modern, widely supported codecs.")
>  (description
>   "Openh264 is a library which can decode H264 video streams.")
>  (license license:bsd-2)))
> +
> +(define-public libmp4v2
> +  (package
> +(name "libmp4v2")
> +(version "2.0.0")
> +(source
> + (origin
> +   (method url-fetch)
> +   ;; XXX: The new location of upstream is uncertain and will become 
> relevant the
> +   ;; moment when the googlecode archive shuts down. It is past the date 
> it
> +   ;; should've been turned off. I tried to communicate with upstream, 
> but this
> +   ;; wasn't very responsive and not very helpful. The short summary is, 
> it is
> +   ;; chaos when it comes to the amount of forks and only time will tell 
> where
> +   ;; the new upstream location is.
> +   (uri (string-append "https://storage.googleapis.com/google-;
> +   "code-archive-downloads/v2/"
> +   "code.google.com/mp4v2/mp4v2-" version 
> ".tar.bz2"))
> +   (file-name (string-append name "-" version ".tar.bz2"))
> +   (sha256
> +(base32
> + "0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683"
> +(build-system gnu-build-system)
> +(outputs '("out"
> +   "static")) ; 3.7MiB .a file
> +(arguments
> + `(#:phases

Adding a phase here that gets rid of dates and such makes the build
reproducible:

(add-after 'unpack 'pre-configure
   (lambda _
 (substitute* "configure"
   (("PROJECT_build=\"`date`\"") "PROJECT_build=\"\"")
   (("ac_abs_top_builddir=$ac_pwd") "ac_abs_top_builddir=\"\""

> +   (modify-phases %standard-phases
> + (add-after 'install 'move-static-libraries
> +   (lambda* (#:key outputs #:allow-other-keys)
> + ;; Move static libraries to the "static" output.
> + (let* ((out(assoc-ref outputs "out"))
> +(lib(string-append out "/lib"))
> +(static (assoc-ref outputs "static"))
> +(slib   (string-append static "/lib")))
> +   (mkdir-p slib)
> +   (for-each (lambda (file)
> +   (install-file file slib)
> +   (delete-file file))
> + (find-files lib "\\.a$"))
> +   #t))
> +(native-inputs
> + `(("help2man" ,help2man)
> +   ("dejagnu" ,dejagnu)))
> +(home-page "https://code.google.com/archive/p/mp4v2/;)
> +(synopsis "libmp4v2 provides an API to create and modify mp4 files")
The synopsis should start with an uppercase letter and not start with
the package name. Perhaps you could erase everything before "API".

> +(description
> + "The MP4v2 library provides an API to create and modify mp4 files as 
> defined by
> +ISO-IEC:14496-1:2001 MPEG-4 Systems.  This file format is derived from 
> Apple's QuickTime
> +file format that has been used as a multimedia file format in a variety of 
> platforms and
> +applications.  It is a very powerful and extensible format that can 
> accommodate
> +practically any type of media.")
> +(license license:mpl1.1)))

The rest LGTM. Could you send an updated patch?


signature.asc
Description: PGP signature


Re: libextractor dependencies: libmp4v2, tidy-html, libsmf.

2017-02-08 Thread Kei Kebreau
contact@cryptolab.net writes:

> [PATCH 1/5] gnu: Add libmp4v2.
>
> Take a look at the included XXX note I wrote.
>
> [PATCH 2/5] gnu: Add tidy-html.
> [PATCH 3/5] gnu: Add libsmf.
> [PATCH 4/5] gnu: libextractor: Add dependencies.
>
> Add the 3 missing dependencies.
>
> [PATCH 5/5] gnu: libextractor: Move .a files to output "static".
>
> Size justifies moving the .a files. If not, feel free to skip this patch.

Except for the notes I sent you, these packages are ready for committing.


signature.asc
Description: PGP signature


Re: [PATCH 6/6] gnu: Add python-ruamel.ordereddict

2017-02-08 Thread Marius Bakke
Muriithi Frederick Muriuki  writes:

> * gnu/packages/python.scm (python-ruamel.ordereddict): New variable.
> ---
>  gnu/packages/python.scm | 28 
>  1 file changed, 28 insertions(+)
>
> diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
> index ef3d9bd..e1e4e74 100644
> --- a/gnu/packages/python.scm
> +++ b/gnu/packages/python.scm
> @@ -12645,3 +12645,31 @@ faster ones are not available.")
>   fundamental support consists of the types Any, Union, Tuple, Callable, 
> TypeVar, and
>   Generic.  For full specification please see PEP 484")
>  (license license:psfl)))
> +
> +(define-public python-ruamel.ordereddict
> +  (package
> +(name "python-ruamel.ordereddict")
> +(version "0.4.9")
> +(source
> + (origin
> +   (method url-fetch)
> +   (uri (pypi-uri "ruamel.ordereddict" version))
> +   (sha256
> +(base32
> + "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"
> +(build-system python-build-system)
> +(arguments
> + `(#:python ,python-2))

If this is python2 only, the package should be named
"python2-ruamel.ordereddict".

Could you also use the "package-with-python2" procedure to add a python2
variant for all packages that work with either version? Look around in
python.scm for examples.

Can you send an updated series? Thanks in advance!

> +(home-page
> + "https://bitbucket.org/ruamel/ordereddict;)
> +(synopsis
> + "Version of dict that keeps keys in insertion resp. sorted order")
> +(description
> + "This is an implementation of an ordered dictionary with Key Insertion 
> Order (KIO:
> + updates of values do not affect the position of the key), Key Value 
> Insertion Order
> + (KVIO, an existing key's position is removed and put at the back).  The 
> standard library
> + module OrderedDict, implemented later, implements a subset of ordereddict 
> functionality.
> +Sorted dictionaries are also provided.  Currently only with Key Sorted Order 
> (KSO, no
> + sorting function can be specified, but a transform can be specified to 
> apply on the key
> + before comparison (e.g. string.lower))")
> +(license license:expat)))
> -- 
> 2.1.4


signature.asc
Description: PGP signature


Re: [PATCH 4/6] gnu: Add python-pycosat

2017-02-08 Thread Marius Bakke
Muriithi Frederick Muriuki  writes:

> * gnu/packages/python.scm (python-pycosat): New variable.
> ---
>  gnu/packages/python.scm | 20 
>  1 file changed, 20 insertions(+)
>
> diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
> index 44704b2..170107a 100644
> --- a/gnu/packages/python.scm
> +++ b/gnu/packages/python.scm
> @@ -12605,3 +12605,23 @@ faster ones are not available.")
>   it with different test data, and make it appear as multiple test cases")
>  (license (license:non-copyleft
>"https://github.com/txels/ddt/blob/master/LICENSE.md;
> +
> +(define-public python-pycosat
> +  (package
> +(name "python-pycosat")
> +(version "0.6.1")
> +(source
> + (origin
> +   (method url-fetch)
> +   (uri (pypi-uri "pycosat" version))
> +   (sha256
> +(base32
> + "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"
> +(build-system python-build-system)
> +(home-page
> + "https://github.com/ContinuumIO/pycosat;)
> +(synopsis "Bindings to picosat (a SAT solver)")
> +(description
> + "This package provides efficient Python bindings to picosat on the C 
> level, i.e.
> + when importing pycosat, the picosat solver becomes part of the Python 
> process itself")

Does this package not need "picosat" as input? Or is it bundled?

Please also use @code{picosat} here, and preferably an explanation of
the SAT acronym :)

> +(license license:expat)))
> -- 
> 2.1.4


signature.asc
Description: PGP signature


Re: [PATCH 5/6] gnu: Add python-typing

2017-02-08 Thread Marius Bakke
Muriithi Frederick Muriuki  writes:

> * gnu/packages/python.scm (python-typing): New variable.
> ---
>  gnu/packages/python.scm | 20 
>  1 file changed, 20 insertions(+)
>
> diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
> index 170107a..ef3d9bd 100644
> --- a/gnu/packages/python.scm
> +++ b/gnu/packages/python.scm
> @@ -12625,3 +12625,23 @@ faster ones are not available.")
>   "This package provides efficient Python bindings to picosat on the C 
> level, i.e.
>   when importing pycosat, the picosat solver becomes part of the Python 
> process itself")
>  (license license:expat)))
> +
> +(define-public python-typing
> +  (package
> +(name "python-typing")
> +(version "3.5.3.0")
> +(source
> + (origin
> +   (method url-fetch)
> +   (uri (pypi-uri "typing" version))
> +   (sha256
> +(base32
> + "08gz3grrh3vph5ib1w5x1ssnpzvj077x030lx63fxs4kwg3slbfa"
> +(build-system python-build-system)
> +(home-page
> + "https://docs.python.org/3.5/library/typing.html;)

If this is provided by the standard library as this link implies, why do
we need this package? Is it a python2 backport? In that case it should
be named "python2-typing" and you'll need to specify #:python as argument.

> +(synopsis "Type Hints for Python")
> +(description "This module supports type hints as specified by PEP 484.  
> The most
> + fundamental support consists of the types Any, Union, Tuple, Callable, 
> TypeVar, and
> + Generic.  For full specification please see PEP 484")
> +(license license:psfl)))
> -- 
> 2.1.4


signature.asc
Description: PGP signature


Re: [PATCH 3/6] gnu: Add python-ddt

2017-02-08 Thread Marius Bakke
Muriithi Frederick Muriuki  writes:

> * gnu/packages/python.scm (python-ddt): New variable.
> ---
>  gnu/packages/python.scm | 25 +
>  1 file changed, 25 insertions(+)
>
> diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
> index b39d8b1..44704b2 100644
> --- a/gnu/packages/python.scm
> +++ b/gnu/packages/python.scm
> @@ -12580,3 +12580,28 @@ faster ones are not available.")
>   "This package that provides some compatibility helpers for Flake8 
> plugins that
>   intend to support Flake8 2.x and 3.x simultaneously")
>  (license license:expat)))
> +
> +(define-public python-ddt
> +  (package
> +(name "python-ddt")
> +(version "1.1.1")
> +(source
> + (origin
> +   (method url-fetch)
> +   (uri (pypi-uri "ddt" version))
> +   (sha256
> +(base32
> + "1c00ikkxr7lha97c81k938bzhgd4pbwamkjn0h4nkhr3xk00zp6n"
> +(build-system python-build-system)
> +(native-inputs
> + `(("python-mock" ,python-mock)
> +   ("python-nose" ,python-nose)))
> +(inputs
> + `(("python-six" ,python-six)
> +   ("python-pyyaml" ,python-pyyaml)))
> +(home-page "https://github.com/txels/ddt;)
> +(synopsis "Data-Driven/Decorated Tests")

Where does "decorated" come from? :)

> +(description "DDT (Data-Driven Tests) allows you to multiply one test 
> case by running
> + it with different test data, and make it appear as multiple test cases")
> +(license (license:non-copyleft
> +  "https://github.com/txels/ddt/blob/master/LICENSE.md;

This looks like the "expat" license.

> -- 
> 2.1.4

Btw, this git version is *very* old. Consider `guix package -i git` ;-)


signature.asc
Description: PGP signature


Re: [PATCH 2/6] gnu: Add python-flake8-polyfill

2017-02-08 Thread Marius Bakke
Muriithi Frederick Muriuki  writes:

> * gnu/packages/python.scm (python-flake8-polyfill): New variable.
> ---
>  gnu/packages/python.scm | 21 +
>  1 file changed, 21 insertions(+)
>
> diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
> index b57e9a7..b39d8b1 100644
> --- a/gnu/packages/python.scm
> +++ b/gnu/packages/python.scm
> @@ -12559,3 +12559,24 @@ faster ones are not available.")
>   "Python module dedicated to rendering RST (reStructuredText) documents 
> to
>   ansi-escaped strings suitable for display in a terminal")
>  (license license:expat)))
> +
> +(define-public python-flake8-polyfill
> +  (package
> +(name "python-flake8-polyfill")
> +(version "1.0.1")
> +(source
> + (origin
> +   (method url-fetch)
> +   (uri (pypi-uri "flake8-polyfill" version))
> +   (sha256
> +(base32
> + "02gn2wxvh9vnf7m7dld7ca4l60mg5c370hv3swwppkngwaqmcw67"
> +(build-system python-build-system)
> +(inputs
> + `(("python-flake8" ,python-flake8)))

This should be either a native-input (e.g. if necessary for tests), or
propagated-input (if it's imported at runtime).

> +(home-page "https://gitlab.com/pycqa/flake8;)

I believe this should be https://gitlab.com/pycqa/flake8-polyfill

Otherwise LGTM!

> +(synopsis "Polyfill package for Flake8 plugins")
> +(description
> + "This package that provides some compatibility helpers for Flake8 
> plugins that
> + intend to support Flake8 2.x and 3.x simultaneously")
> +(license license:expat)))
> -- 
> 2.1.4


signature.asc
Description: PGP signature


Re: [PATCH 1/6] gnu: Add python-rst2ansi

2017-02-08 Thread Marius Bakke
Hi Muriithi,

Thank you for these patches! I will respond to them individually.

They look good for the most part, but need some tiny tweaks that breaks
the patch context. In particular, descriptions should end with a period,
but if I add that to one patch, the next does not apply!

Normally I would simply amend these commits while applying them, so
please excuse the nit-picking.

Could you also add a copyright notice for yourself at the top of
python.scm with the first commit?

Muriithi Frederick Muriuki  writes:

> * gnu/packages/python.scm (python-rst2ansi): New variable.
> ---
>  gnu/packages/python.scm | 23 +++
>  1 file changed, 23 insertions(+)
>
> diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
> index d53eea1..b57e9a7 100644
> --- a/gnu/packages/python.scm
> +++ b/gnu/packages/python.scm
> @@ -12536,3 +12536,26 @@ console.")
>  This implementation is slow (hence the project name) but still useful when
>  faster ones are not available.")
>  (license license:asl2.0)))
> +
> +(define-public python-rst2ansi
> +  (package
> +(name "python-rst2ansi")
> +(version "0.1.5")
> +(source
> + (origin
> +   (method url-fetch)
> +   (uri (pypi-uri "rst2ansi" version))
> +   (sha256
> +(base32
> + "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"
> +(build-system python-build-system)
> +(native-inputs
> + `(("python-docutils" ,python-docutils)))

This should be a propagated-input, since rst2ansi needs docutils at
runtime.

> +(home-page
> + "https://github.com/Snaipe/python-rst-to-ansi;)

The newline here is not necessary.

> +(synopsis
> + "Python rst converter to ansi-decorated console output")

"Convert RST to ANSI-decorated console output".

> +(description
> + "Python module dedicated to rendering RST (reStructuredText) documents 
> to
> + ansi-escaped strings suitable for display in a terminal")

All descriptions should end with a "." as mentioned above.
`guix lint python-rst2ansi` should warn about this.


signature.asc
Description: PGP signature


Re: [PATCH 1/5] gnu: Add libmp4v2.

2017-02-08 Thread Kei Kebreau
contact@cryptolab.net writes:

> From: ng0 
>
> * gnu/packages/video.scm (libmp4v2): New variable.
> ---
>  gnu/packages/video.scm | 56 
> +-
>  1 file changed, 55 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
> index 8ba229e58..601364fdf 100644
> --- a/gnu/packages/video.scm
> +++ b/gnu/packages/video.scm
> @@ -11,7 +11,7 @@
>  ;;; Copyright © 2016 Kei Kebreau 
>  ;;; Copyright © 2016 Dmitry Nikolaev 
>  ;;; Copyright © 2016 Andy Patterson 
> -;;; Copyright © 2016 ng0 
> +;;; Copyright © 2016, 2017 ng0 
>  ;;; Copyright © 2016 Eric Bavier 
>  ;;; Copyright © 2016 Jan Nieuwenhuizen 
>  ;;;
> @@ -57,6 +57,7 @@
>#:use-module (gnu packages compression)
>#:use-module (gnu packages curl)
>#:use-module (gnu packages databases)
> +  #:use-module (gnu packages dejagnu)
>#:use-module (gnu packages elf)
>#:use-module (gnu packages flex)
>#:use-module (gnu packages fontutils)
> @@ -75,6 +76,7 @@
>#:use-module (gnu packages linux)
>#:use-module (gnu packages lua)
>#:use-module (gnu packages m4)
> +  #:use-module (gnu packages man)
>#:use-module (gnu packages mp3)
>#:use-module (gnu packages ncurses)
>#:use-module (gnu packages ocr)
> @@ -1862,3 +1864,55 @@ of modern, widely supported codecs.")
>  (description
>   "Openh264 is a library which can decode H264 video streams.")
>  (license license:bsd-2)))
> +
> +(define-public libmp4v2
> +  (package
> +(name "libmp4v2")
> +(version "2.0.0")
> +(source
> + (origin
> +   (method url-fetch)
> +   ;; XXX: The new location of upstream is uncertain and will become 
> relevant the
> +   ;; moment when the googlecode archive shuts down. It is past the date 
> it
> +   ;; should've been turned off. I tried to communicate with upstream, 
> but this
> +   ;; wasn't very responsive and not very helpful. The short summary is, 
> it is
> +   ;; chaos when it comes to the amount of forks and only time will tell 
> where
> +   ;; the new upstream location is.
> +   (uri (string-append "https://storage.googleapis.com/google-;
> +   "code-archive-downloads/v2/"
> +   "code.google.com/mp4v2/mp4v2-" version 
> ".tar.bz2"))
> +   (file-name (string-append name "-" version ".tar.bz2"))
> +   (sha256
> +(base32
> + "0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683"
> +(build-system gnu-build-system)
> +(outputs '("out"
> +   "static")) ; 3.7MiB .a file
> +(arguments
> + `(#:phases

Adding a phase here that gets rid of dates and such makes the build
reproducible:

(add-after 'unpack 'pre-configure
   (lambda _
 (substitute* "configure"
   (("PROJECT_build=\"`date`\"") "PROJECT_build=\"\"")
   (("ac_abs_top_builddir=$ac_pwd") "ac_abs_top_builddir=\"\""

> +   (modify-phases %standard-phases
> + (add-after 'install 'move-static-libraries
> +   (lambda* (#:key outputs #:allow-other-keys)
> + ;; Move static libraries to the "static" output.
> + (let* ((out(assoc-ref outputs "out"))
> +(lib(string-append out "/lib"))
> +(static (assoc-ref outputs "static"))
> +(slib   (string-append static "/lib")))
> +   (mkdir-p slib)
> +   (for-each (lambda (file)
> +   (install-file file slib)
> +   (delete-file file))
> + (find-files lib "\\.a$"))
> +   #t))
> +(native-inputs
> + `(("help2man" ,help2man)
> +   ("dejagnu" ,dejagnu)))
> +(home-page "https://code.google.com/archive/p/mp4v2/;)
> +(synopsis "libmp4v2 provides an API to create and modify mp4 files")
The synopsis should start with an uppercase letter and not start with
the package name. Perhaps you could erase everything before "API".

> +(description
> + "The MP4v2 library provides an API to create and modify mp4 files as 
> defined by
> +ISO-IEC:14496-1:2001 MPEG-4 Systems.  This file format is derived from 
> Apple's QuickTime
> +file format that has been used as a multimedia file format in a variety of 
> platforms and
> +applications.  It is a very powerful and extensible format that can 
> accommodate
> +practically any type of media.")
> +(license license:mpl1.1)))

The rest LGTM. Could you send an updated patch?


signature.asc
Description: PGP signature


Re: libextractor dependencies: libmp4v2, tidy-html, libsmf.

2017-02-08 Thread Kei Kebreau
contact@cryptolab.net writes:

> [PATCH 1/5] gnu: Add libmp4v2.
>
> Take a look at the included XXX note I wrote.
>
> [PATCH 2/5] gnu: Add tidy-html.
> [PATCH 3/5] gnu: Add libsmf.
> [PATCH 4/5] gnu: libextractor: Add dependencies.
>
> Add the 3 missing dependencies.
>
> [PATCH 5/5] gnu: libextractor: Move .a files to output "static".
>
> Size justifies moving the .a files. If not, feel free to skip this patch.

Except for the notes I sent you, these packages are ready for committing.


signature.asc
Description: PGP signature


Re: [PATCH 2/5] gnu: Add tidy-html.

2017-02-08 Thread Kei Kebreau
contact@cryptolab.net writes:

> From: ng0 
>
> * gnu/packages/web.scm (tidy-html): New variable.
> ---
>  gnu/packages/web.scm | 51 ++-
>  1 file changed, 50 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
> index 67b9797bb..8a29eead1 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,52 @@ 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 tidy-html
> +  (package
> +(name "tidy-html")
> +(version "5.2.0")
> +(source
> + (origin
> +   (method url-fetch)
> +   (uri (string-append "https://github.com/htacg/tidy-html5/archive/;
> +   version ".tar.gz"))
> +   (file-name (string-append name "-" version ".tar.gz"))
> +   (sha256
> +(base32
> + "0kbwzh15dlapp3s3vff2qgz0yfcf8hwsnx5q4igwa6pimhak8lw0"
> +(build-system cmake-build-system)
> +(outputs '("out"
> +   "static")) ; 1.0MiB of .a files
> +(arguments
> + `(#:tests? #f ; No tests available
> +   #:configure-flags (list "-DCMAKE_BUILD_TYPE=Release")
> +   #:phases
> +   (modify-phases %standard-phases
> + (add-after 'install 'move-static-libraries
> +   (lambda* (#:key outputs #:allow-other-keys)
> + ;; Move static libraries to the "static" output.
> + (let* ((out(assoc-ref outputs "out"))
> +(lib(string-append out "/lib"))
> +(static (assoc-ref outputs "static"))
> +(slib   (string-append static "/lib")))
> +   (mkdir-p slib)
> +   (for-each (lambda (file)
> +   (install-file file slib)
> +   (delete-file file))
> + (find-files lib "\\.a$"))
> +   #t))
> +(native-inputs
> + `(("libxslt" ,libxslt)))
> +(home-page "http://www.html-tidy.org/;)
> +(synopsis "HTML Tidy with HTML5 support")
> +(description
> + "Tidy is a console application for Mac OS X, Linux, Windows,
> +UNIX, and more. It corrects and cleans up HTML and XML documents by
> +fixing markup errors and upgrading legacy code to modern standards.
> +
> +libtidy is a C static and dynamic library that developers can integrate
> +into their applications in order to bring all of Tidy’s power to your
> +favorite tools. libtidy is used today in desktop applications,
> +web servers, and more.")

Sentences in the description should be followed by two spaces.

> +(license l:bsd-3)))

The rest LGTM.


signature.asc
Description: PGP signature


Category package

2017-02-08 Thread rennes

Hello,

I am packing Filezilla, a ftp/sftp client. Filezilla requires the 
libfilezilla[1] library.


My question is, in which category can I add it?


[1] https://lib.filezilla-project.org

Regards



[PATCH] build: Add build-aux/ar-lib to .gitignore.

2017-02-08 Thread Clément Lassieur
* .gitignore: Add entry for the above file which is created by './bootstrap'.
---
 .gitignore | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitignore b/.gitignore
index c64326e60..0897c95f3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,6 +11,7 @@
 /INSTALL
 /aclocal.m4
 /autom4te.cache
+/build-aux/ar-lib
 /build-aux/compile
 /build-aux/config.guess
 /build-aux/config.rpath
-- 
2.11.0




Re: Debbugs handling of packages

2017-02-08 Thread Andreas Enge
On Wed, Feb 08, 2017 at 03:29:31PM +0100, Ricardo Wurmus wrote:
> Just a question: does this mean that patch *sets* should be flattened
> before sending them so that they are part of the *same* debbugs issue
> (instead of being scattered across as many issues as there are patches)?

This would be desirable, I think.

> E.g. for submitting the last 10 commits:
> git format-patch -10 --stdout > series.patch
> git send-email --to=guix-packa...@gnu.org series.patch

Alternatively, one can send only the first patch. This will open a new issue,
and the submitter obtains the bug number with the corresponding e-mail
address in reply. Then one can send the remaining patches message by message
to this address.

Andreas




Re: [PATCH 1/2] build: Generalize 'package-with-explicit-python'.

2017-02-08 Thread Ricardo Wurmus

Federico Beffa  writes:

> Generalize the Python procedure to recursively replace compiler/interpreter.
> From a8220b430d196e5bb079e23ac63b1acd16fdaaee Mon Sep 17 00:00:00 2001
> From: Federico Beffa 
> Date: Wed, 8 Feb 2017 18:55:32 +0100
> Subject: [PATCH 1/2] build: Generalize 'package-with-explicit-python'.
>
> * guix/build-system/python.scm (package-with-explicit-python): Remove it and
>   replace it with the generalized procedure 'package-with-explicit-compiler'
>   in the new file. (package-with-python2): Adapt it.
> * guix/build-system/utils.scm: New file with the generalized procedure.
> * Makefile.am (MODULES): Add new file.

The goal here is to override packages in build system arguments, right?
This is great and we really need something like this to make building
package variants simpler.  (I ran into a problem that would be solved by
this when I tried to build Perl modules for different variants of Perl.)

Looking over the patch it feels inelegant to have a whitelist of
permitted arguments, as in “compiler-keyword”.  We already have a
procedure called “package-input-rewriting” that replaces any (explicit
input-) package in the dependency graph with a different package.  What
I like about that is that it is generic.  Is there a way we could extend
it to include packages pulled in by the build system, e.g. by making it
work at the level of bags?

--
Ricardo

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




[PATCH 2/2] build: Add new '--with-compiler' option.

2017-02-08 Thread Federico Beffa
... and try to make it easy to test new compilers.

There actually was a request on help-guix
https://lists.gnu.org/archive/html/help-guix/2017-02/msg3.html

Regards,
Fede
From 84b68a1a3faf6609a0e1922bafe7987d908e5694 Mon Sep 17 00:00:00 2001
From: Federico Beffa 
Date: Wed, 8 Feb 2017 18:57:13 +0100
Subject: [PATCH 2/2] build: Add new '--with-compiler' option.

* guix/scripts/build.scm (package-name-prefix, transform-package-compiler):
  New procedures.  (%transformations, %transformation-options,
  show-transformation-options-help): Add new option '--with-compiler'.
---
 guix/scripts/build.scm | 59 +++---
 1 file changed, 56 insertions(+), 3 deletions(-)

diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm
index 68402fda1..1bc69b179 100644
--- a/guix/scripts/build.scm
+++ b/guix/scripts/build.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès 
 ;;; Copyright © 2013 Mark H Weaver 
+;;; Copyright © 2017 Federico Beffa 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -29,6 +30,8 @@
   #:use-module ((guix utils) #:hide (package-name->name+version))
   #:use-module ((guix build utils) #:select (package-name->name+version))
 
+  #:use-module (guix build-system)
+  #:use-module (guix build-system utils)
   #:use-module (guix monads)
   #:use-module (guix gexp)
   #:autoload   (guix http-client) (http-fetch http-get-error?)
@@ -231,6 +234,50 @@ current 'gnutls' package, after which version 3.5.4 is grafted onto them."
   (rewrite obj)
   obj
 
+;; XXX: Can we use a more robust method?
+(define* (package-name-prefix package #:optional (default ""))
+  "Return the package name prefix used by convention by PACKAGE."
+  (let ((name (package-name package))
+(bs (package-build-system package)))
+(case (build-system-name bs)
+  ((haskell) "ghc-")
+  ((python)
+   (if (string-prefix? "python2-" name)
+   "python2-"
+   "python-"))
+  ((emacs perl r ruby)
+   (let ((prefix (string-append (symbol->string bs) "-")))
+ (if (string-prefix? prefix name)
+ prefix
+ default)))
+  (else default
+
+(define (transform-package-compiler compiler-spec)
+"Return a procedure that, when passed a package, replaces the default
+compiler used to build it by COMPILER-SPEC.  The package inputs are changed
+recursively accordingly.  Currently only packages built using one of the
+following build-systems are supported: haskell, python. emacs, perl, r or
+ruby."
+  (define (new-prefix old-prefix compiler)
+(let ((name (package-name compiler))
+  (version (package-version compiler)))
+  (string-append old-prefix "with" name version "-")))
+
+  (let* ((compiler (match compiler-spec
+ ((spec) (specification->package spec))
+ (_ (leave (_ "Wrong compiler specification: ~A~%"))
+(lambda (store obj)
+  (match obj
+((? package? p)
+ (let* ((bs-name (build-system-name (package-build-system p)))
+(prefix (package-name-prefix p)))
+   ((package-with-explicit-compiler compiler bs-name
+prefix
+(new-prefix prefix compiler))
+p)))
+(_
+ obj)
+
 (define %transformations
   ;; Transformations that can be applied to things to build.  The car is the
   ;; key used in the option alist, and the cdr is the transformation
@@ -238,7 +285,8 @@ current 'gnutls' package, after which version 3.5.4 is grafted onto them."
   ;; things to build.
   `((with-source . ,transform-package-source)
 (with-input  . ,transform-package-inputs)
-(with-graft  . ,transform-package-inputs/graft)))
+(with-graft  . ,transform-package-inputs/graft)
+(with-compiler . ,transform-package-compiler)))
 
 (define %transformation-options
   ;; The command-line interface to the above transformations.
@@ -252,7 +300,9 @@ current 'gnutls' package, after which version 3.5.4 is grafted onto them."
   (option '("with-input") #t #f
   (parser 'with-input))
   (option '("with-graft") #t #f
-  (parser 'with-graft)
+  (parser 'with-graft))
+  (option '("with-compiler") #t #f
+  (parser 'with-compiler)
 
 (define (show-transformation-options-help)
   (display (_ "
@@ -263,7 +313,10 @@ current 'gnutls' package, after which version 3.5.4 is grafted onto them."
  replace dependency PACKAGE by REPLACEMENT"))
   (display (_ "
   --with-graft=PACKAGE=REPLACEMENT
- graft REPLACEMENT on packages that refer to PACKAGE")))
+ graft REPLACEMENT on packages that refer to 

[PATCH 1/2] build: Generalize 'package-with-explicit-python'.

2017-02-08 Thread Federico Beffa
Generalize the Python procedure to recursively replace compiler/interpreter.
From a8220b430d196e5bb079e23ac63b1acd16fdaaee Mon Sep 17 00:00:00 2001
From: Federico Beffa 
Date: Wed, 8 Feb 2017 18:55:32 +0100
Subject: [PATCH 1/2] build: Generalize 'package-with-explicit-python'.

* guix/build-system/python.scm (package-with-explicit-python): Remove it and
  replace it with the generalized procedure 'package-with-explicit-compiler'
  in the new file. (package-with-python2): Adapt it.
* guix/build-system/utils.scm: New file with the generalized procedure.
* Makefile.am (MODULES): Add new file.
---
 Makefile.am  |   1 +
 guix/build-system/python.scm |  71 +++--
 guix/build-system/utils.scm  | 105 +++
 3 files changed, 112 insertions(+), 65 deletions(-)
 create mode 100644 guix/build-system/utils.scm

diff --git a/Makefile.am b/Makefile.am
index 360c356f1..2d2544a7b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -76,6 +76,7 @@ MODULES =	\
   guix/build-system/r.scm			\
   guix/build-system/ruby.scm			\
   guix/build-system/trivial.scm			\
+  guix/build-system/utils.scm			\
   guix/ftp-client.scm\
   guix/http-client.scm\
   guix/gnupg.scm\
diff --git a/guix/build-system/python.scm b/guix/build-system/python.scm
index 17173f121..8b3eb4008 100644
--- a/guix/build-system/python.scm
+++ b/guix/build-system/python.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès 
 ;;; Copyright © 2013 Andreas Enge 
 ;;; Copyright © 2013 Nikita Karetnikov 
+;;; Copyright © 2017 Federico Beffa 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -27,6 +28,7 @@
   #:use-module (guix search-paths)
   #:use-module (guix build-system)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system utils)
   #:use-module (ice-9 match)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-26)
@@ -70,75 +72,14 @@ extension, such as '.tar.gz'."
   (let ((python (resolve-interface '(gnu packages python
 (module-ref python 'python-2)))
 
-(define* (package-with-explicit-python python old-prefix new-prefix
-   #:key variant-property)
-  "Return a procedure of one argument, P.  The procedure creates a package with
-the same fields as P, which is assumed to use PYTHON-BUILD-SYSTEM, such that
-it is compiled with PYTHON instead.  The inputs are changed recursively
-accordingly.  If the name of P starts with OLD-PREFIX, this is replaced by
-NEW-PREFIX; otherwise, NEW-PREFIX is prepended to the name.
-
-When VARIANT-PROPERTY is present, it is used as a key to search for
-pre-defined variants of this transformation recorded in the 'properties' field
-of packages.  The property value must be the promise of a package.  This is a
-convenient way for package writers to force the transformation to use
-pre-defined variants."
-  (define transform
-;; Memoize the transformations.  Failing to do that, we would build a huge
-;; object graph with lots of duplicates, which in turns prevents us from
-;; benefiting from memoization in 'package-derivation'.
-(mlambdaq (p)
-  (let* ((rewrite-if-package
-  (lambda (content)
-;; CONTENT may be a file name, in which case it is returned,
-;; or a package, which is rewritten with the new PYTHON and
-;; NEW-PREFIX.
-(if (package? content)
-(transform content)
-content)))
- (rewrite
-  (match-lambda
-((name content . rest)
- (append (list name (rewrite-if-package content)) rest)
-
-(cond
- ;; If VARIANT-PROPERTY is present, use that.
- ((and variant-property
-   (assoc-ref (package-properties p) variant-property))
-  => force)
-
- ;; Otherwise build the new package object graph.
- ((eq? (package-build-system p) python-build-system)
-  (package
-(inherit p)
-(location (package-location p))
-(name (let ((name (package-name p)))
-(string-append new-prefix
-   (if (string-prefix? old-prefix name)
-   (substring name
-  (string-length old-prefix))
-   name
-(arguments
- (let ((python (if (promise? python)
-   (force python)
-   python)))
-   (ensure-keyword-arguments (package-arguments p)
- `(#:python ,python
-(inputs (map rewrite (package-inputs p)))
-(propagated-inputs (map rewrite (package-propagated-inputs p)))
- 

Re: Packaging leiningen (feedback desired)

2017-02-08 Thread Catonano
2017-02-08 16:53 GMT+01:00 Ricardo Wurmus :

I’d like to avoid propagating inputs.  Could we add a wrapper instead?
> The wrapper would set the appropriate environment variables and retain a
> reference to the JVM.
>

Good. So I can see how a wrapper is arranged


Re: [Sharing store/state between Nix and Guix]: How stable is it?

2017-02-08 Thread Ricardo Wurmus

rohit yadav  writes:

> On Mon, Feb 6, 2017 at 11:50 PM, Pjotr Prins 
> wrote:
>
>> On Mon, Feb 06, 2017 at 04:14:04PM -0600, rohit yadav wrote:
>> >Hi,
>> >Is there anyone who has experimented with above mentioned idea? In
>> theory
>> >it may be possible, I am just wondering how stable is it? Assuming, I
>> >installed a package with guix, it should change the database, create
>> a new
>> >profile. As long as ~/.nix-profile or ~/.guix-profile points to
>> current
>> >profile I should see the changes in list of packages in the current
>> >generation. So, at higher level it should almost be indistinguishable
>> >whether nix or guix is used to manage the profiles.
>>
>> Yes, it is perfectly safe and some people do that. Note that I would
>> not *share* the DB and store - just have them separate and they
>> coexist fine.
>>
> Actually my question was whether DB and Store can be shared. Guix and Nix
> only changes the databases depending on what is installed and updating the
> current generation.

I don’t think there’s a practical advantage in sharing the store.  The
items will be different for the most part anyway so Guix cannot just use
Nix store items.  You might benefit from deduplication, but it might
make more sense to do deduplication at the filesystem level.

--
Ricardo

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




Re: Packaging leiningen (feedback desired)

2017-02-08 Thread Ricardo Wurmus

Catonano  writes:

> The Clojure compilation target is the Jvm. Any Clojure based software needs
> a Jvm in order to run
>
> And the Clojure REPL is a Clojure based program. Without a Jvm it won' t
> run.
>
> I don' t remember now if the compiler is written in Java or in Clojure.
> Anyway, the compiler too needs a Jvm in order to run.
>
> That is to say that as far as I understand both Clojure and Guix, a Java
> runtime should be a propagated input of any Clojure package.

I’d like to avoid propagating inputs.  Could we add a wrapper instead?
The wrapper would set the appropriate environment variables and retain a
reference to the JVM.

-- 
Ricardo

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




Re: [PATCH 2/2] import: Add stackage importer and updater.

2017-02-08 Thread Ludovic Courtès
Hello Federico,

Federico Beffa  skribis:

> From 50891dc929a21327405c6a3b58638126456deeed Mon Sep 17 00:00:00 2001
> From: Federico Beffa 
> Date: Mon, 6 Feb 2017 18:19:26 +0100
> Subject: [PATCH 2/2] import: Add stackage importer and updater.
>
> * guix/import/stackage.scm: New file.
> * guix/scripts/import/stackage.scm: New file.
> * Makefile.am (MODULES): Add new files.
> * guix/scripts/import.scm (importers): Add "stackage".
> * guix/scripts/refresh.scm (%updaters): Add %stackage-updater.
> * doc/guix.texi (Invoking 'guix import'): Document the importer.
>   (Invoking 'guix refresh'): Add stackage to option --type valid values.

Neat!

[...]

> +@item stackage
> +@cindex stackage
> +The @code{stackage} importer is a wrapper around the @code{hackage} one.
> +It takes a package name, looks up the package version included in an LTS

For the first occurrence of “LTS”:
s/LTS/long-term support (LTS)/

> +;;;
> +;;; Hackage importer low-level help functions
> +;;;
> +
> +(define guix-package->hackage-name
> +  (@@ (guix import hackage) guix-package->hackage-name))
> +
> +(define hackage-fetch
> +  (@@ (guix import hackage) hackage-fetch))
> +
> +(define hackage-source-url
> +  (@@ (guix import hackage) hackage-source-url))
> +
> +(define hackage-cabal-url
> +  (@@ (guix import hackage) hackage-cabal-url))

I’d suggest exporting these procedures from (guix import hackage) rather
than using ‘@@’, which should really be a last resort.

> +(define %stackage-updater
> +  (upstream-updater
> +   (name 'stackage)
> +   (description "Updater for Stackage LTS packages")
> +   (pred (@@ (guix import hackage) hackage-package?))

Likewise here, or use (upstream-updater-predicate hackage-updater).

> +(if name-version
> +(hackage->guix-package name-version
> +   #:include-test-dependencies?
> +   include-test-dependencies?)
> +(begin
> +  (format (current-error-port)
> +  "guix import stackage: package not found: ~a~%" 
> package-name)
> +  #f

The ‘if’ is unnecessary here: (guix scripts import) produces an error
message when an importer returns something other than a ‘package’ sexp.

> --- a/guix/scripts/refresh.scm
> +++ b/guix/scripts/refresh.scm
> @@ -40,6 +40,7 @@
>#:use-module (guix import elpa)
>#:use-module (guix import cran)
>#:use-module (guix import hackage)
> +  #:use-module (guix import stackage)
>#:use-module (guix gnupg)
>#:use-module (gnu packages)
>#:use-module ((gnu packages commencement) #:select (%final-inputs))
> @@ -205,6 +206,7 @@ unavailable optional dependencies such as Guile-JSON."
>   %elpa-updater
>   %cran-updater
>   %bioconductor-updater
> + %stackage-updater

Because the dependency on Guile-JSON is still optional, you should
remove the #:use-module above and this line and write:

  ((guix import stackage) => %stackage-updater)

I haven’t tested it, but this LGTM.

Thank you!

Ludo’.



Re: [PATCH 1/2] import: json: Explicitly ask for JSON data.

2017-02-08 Thread Ludovic Courtès
Federico Beffa  skribis:

> Some sites, if not explicitly asked for JSON data, answer with HTML.
> One of them is Stackage.
>
> Regards,
> Fede
>
> From 2576e7390c9f8660fbb52e2a72eb782564b8865e Mon Sep 17 00:00:00 2001
> From: Federico Beffa 
> Date: Sun, 5 Feb 2017 14:42:10 +0100
> Subject: [PATCH 1/2] import: json: Explicitly ask for JSON data.
>
> * guix/import/json.scm (json-fetch): Add #:headers to http-fetch call.

Good catch, LGTM!

Ludo’.



Re: Add /usr/bin/env by default in guixsd?

2017-02-08 Thread Ludovic Courtès
Hello,

huang_ying_cari...@163.com skribis:

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

[...]

>> First we need a simple ‘special-files’ service or something (for /bin/sh
>> and /usr/bin/env).
>>
>> Then the whole battle will be about what the default should be.  I used
>> to be affiliated with the “no way!” party on this topic, but I
>> considering changing my mind.  :-)  Especially that it does not matter
>> that much, after all.
>
> That sounds great for me!  Thanks!

Commit 387e175492f960d7d86f34f3b2e43938fa72dbf3 adds
‘special-files-service-type’.

The default is unchanged (only /bin/sh is created) but the documentation
provides a one-liner for /usr/bin/env (see below).

Thanks,
Ludo’.

 -- Scheme Variable: special-files-service-type
 This is the service that sets up “special files” such as ‘/bin/sh’;
 an instance of it is part of ‘%base-services’.

 The value associated with ‘special-files-service-type’ services
 must be a list of tuples where the first element is the “special
 file” and the second element is its target.  By default it is:

  `(("/bin/sh" ,(file-append BASH "/bin/sh")))

 If you want to add, say, ‘/usr/bin/env’ to your system, you can
 change it to:

  `(("/bin/sh" ,(file-append BASH "/bin/sh"))
("/usr/bin/env" ,(file-append COREUTILS "/bin/env")))

 Since this is part of ‘%base-services’, you can use
 ‘modify-services’ to customize the set of special files (*note
 ‘modify-services’: Service Reference.).  But the simple way to add
 a special file is via the ‘extra-special-file’ procedure (see
 below.)

 -- Scheme Procedure: extra-special-file FILE TARGET
 Use TARGET as the “special file” FILE.

 For example, adding the following lines to the ‘services’ field of
 your operating system declaration leads to a ‘/usr/bin/env’
 symlink:

  (extra-special-file "/usr/bin/env"
  (file-append coreutils "/bin/env"))



Re: [PATCH 2/2] gnu: Add vinagre.

2017-02-08 Thread Ludovic Courtès
Thomas Danckaert  skribis:

> * gnu/packages/gnome.scm (vinagre): New variable.

Applied with minor changes:

> +(build-system gnu-build-system)

I changed it to ‘glib-or-gtk-build-system’ so that Vinagre finds its own
schema.

> +(license license:gpl3)))

Changed to gpl3+ (‘COPYING’ is GPLv3 and source file headers say
“version 2 or later”.)

Thanks!

Ludo’.



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

2017-02-08 Thread Ludovic Courtès
Thomas Danckaert  skribis:

> From bcca85478a273789043f46e9574a58d26591bf56 Mon Sep 17 00:00:00 2001
> From: Thomas Danckaert 
> Date: Mon, 6 Feb 2017 17:19:06 +0100
> Subject: [PATCH] gnu: Add freerdp.
>
> * gnu/packages/rdesktop.scm (freerdp): New variable.

Applied, thanks!

Ludo’.



Re: [PATCH 2/2] gnu: Add lshw

2017-02-08 Thread Ludovic Courtès
Hello!

Gábor Boskovits  skribis:

> I would like to get some suggestion about which category this package
> belongs to.

Since it depends on interfaces specific to the kernel Linux, I’d suggest
putting it in linux.scm.

Please make sure to add a copyright line for yourself in there.
Apart from that it should be good!

Could you send an updated patch?

Thanks in advance,
Ludo’.



Re: [PATCH 2/2] tests: Add 'prosody-service-type' test.

2017-02-08 Thread Ludovic Courtès
Hello!

Clément Lassieur  skribis:

> * gnu/tests/messaging.scm: New file.
> * gnu/services/messaging.scm: New exported procedure.
>   ()[provision]: Add 'xmpp-daemon'.

Awesome!

Please also add the new file to gnu/local.mk.

> +(define %base-os
> +  (operating-system
> +(host-name "komputilo")
> +(timezone "Europe/Berlin")
> +(locale "en_US.UTF-8")
> +
> +(bootloader (grub-configuration (device "/dev/sdX")))
> +(file-systems %base-file-systems)
> +(firmware '())
> +(users %base-user-accounts)
> +(services (cons (dhcp-client-service)
> +%base-services
> +
> +(define (os-with-service service)
> +  "Return a test operating system that runs SERVICE."
> +  (operating-system
> +(inherit %base-os)
> +(services (cons service
> +(operating-system-user-services %base-os)
> +
> +(define (run-xmpp-test name xmpp-service pid-file create-account)
> +  "Run a test of an OS running XMPP-SERVICE, which writes its PID to 
> PID-FILE."
> +  (mlet* %store-monad ((os -> (marionette-operating-system
> +   (os-with-service xmpp-service)
> +   #:imported-modules '((gnu services herd

I think you can remove ‘os-with-service’ and simply add the Prosody
service explicitly in ‘%base-os’ (which could be rename ‘%prosody-os’
maybe).

> +(define script.ft
> +  (scheme-file
> +   "script.ft"
> +   #~(begin
> +   (define (handle-received-message time from nickname message)
> + (if (equal? message #$message)
> + (ft-quit 0)
> + (ft-quit 1)))
> +   (add-hook! ft-message-receive-hook handle-received-message)
> +
> +   (ft-set-jid! #$jid)
> +   (ft-set-password! #$password)
> +   (ft-set-server! #$server)
> +   (ft-set-port! #$port)
> +   (ft-set-sslconn! #f)
> +   (ft-connect-blocking)
> +   (ft-send-message #$jid #$message)
> +   (ft-main-loop

Very neat that this can be done in Scheme too.  :-)

If it’s possible, I agree that adding a timeout (say 1 minute) would be
nice.

> +;; Check XMPP service's PID.
> +(test-assert "service process id"
> +  (let ((pid (number->string (wait-for-file #$pid-file
> +(marionette-eval `(zero? (system* "ps" "-p" ,pid))
> + marionette)))

I think (file-exists? (string-append "/proc/" pid)) would be enough.

> +(define %create-prosody-account
> +  (program-file
> +   "create-account"
> +   #~(let* ((jid (cadr (command-line)))
> +(password (caddr (command-line)))

Better use ‘match’ here.  :-)

   (match (command-line)
 ((command jid password)
  …))

Could you send an updated patch?

Thank you!

Ludo’.



Re: libextractor dependencies: libmp4v2, tidy-html, libsmf.

2017-02-08 Thread Kei Kebreau
contact@cryptolab.net writes:

> [PATCH 1/5] gnu: Add libmp4v2.
>
> Take a look at the included XXX note I wrote.
>
> [PATCH 2/5] gnu: Add tidy-html.
> [PATCH 3/5] gnu: Add libsmf.
> [PATCH 4/5] gnu: libextractor: Add dependencies.
>
> Add the 3 missing dependencies.
>
> [PATCH 5/5] gnu: libextractor: Move .a files to output "static".
>
> Size justifies moving the .a files. If not, feel free to skip this patch.

Except for the notes I sent you, these packages are ready for committing.


signature.asc
Description: PGP signature


Re: [PATCH 1/2] service: shepherd: Replace spaces with hyphens in file names.

2017-02-08 Thread Ludovic Courtès
Clément Lassieur  skribis:

> * gnu/services/shepherd.scm (shepherd-service-file-name): Update
>   'match-lambda' accordingly.
>
> This fixes a bug whereby names of files defining services would be invalid if
> 'provisions' contained more than one element.

Good catch!  Applied, thanks.

Ludo’.



Re: [PATCH v2] gnu: Add python-pyodbc-c.

2017-02-08 Thread Kei Kebreau
Danny Milosavljevic  writes:

> * gnu/packages/databases.scm (python-pyodbc-c, python2-pyodbc-c):
>   New variables.
> ---
>  gnu/packages/databases.scm | 28 
>  1 file changed, 28 insertions(+)
>
> diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
> index e8be17980..232c46985 100644
> --- a/gnu/packages/databases.scm
> +++ b/gnu/packages/databases.scm
> @@ -1312,3 +1312,31 @@ development.")
>  ;; test/crypto.test are licensed under a 3-clause BSD license. All other
>  ;; source files are in the public domain.
>  (license (list license:public-domain license:bsd-3
> +
> +(define-public python-pyodbc-c
> +  (package
> +(name "python-pyodbc-c")
> +(version "3.1.2")
> +(source
> + (origin
> +   (method url-fetch)
> +   (uri (string-append "https://gitlab.com/daym/pyodbc-c/repository/;
> +   "archive.tar.gz?ref=v" version))
> +   (sha256
> +(base32
> + "0nl11n3mgrcfnhimjqgv48rxqnb21l5m6s7p8ps2fa4nn4z6rzy0"))
> +   (file-name (string-append name "-" version ".tar.gz"
> +(build-system python-build-system)
> +(inputs
> + `(("unixodbc" ,unixodbc)))
> +(arguments
> + `(;; No unit tests exist.
> +   #:tests? #f))
> +(home-page "https://github.com/mkleehammer/pyodbc;)
> +(synopsis "Python ODBC Library")
> +(description "@code{python-pyodbc-c} provides a Python DB-API driver
> +for ODBC.")
> +(license (license:x11-style "file://LICENSE.TXT"
> +
> +(define-public python2-pyodbc-c
> +  (package-with-python2 python-pyodbc-c))

LGTM. Pushed as 98d403bb4594c857729d64eaaafaf4a0ca51d7b3.


signature.asc
Description: PGP signature


Re: Debbugs handling of packages

2017-02-08 Thread Ricardo Wurmus

Ludovic Courtès  writes:

>> This was discussed before at
>> 
>> and we could request a separate Debbugs instance for
>> “guix-packa...@gnu.org” *right now* if we wanted to.
>>
>> What do other people think about this?
>
> I think we should just go ahead and setup that Debbugs instance like I
> said I’d do back in September.  It can only be an improvement over what
> we have now anyway.
>
> Objections?

No objections, please go ahead!

Just a question: does this mean that patch *sets* should be flattened
before sending them so that they are part of the *same* debbugs issue
(instead of being scattered across as many issues as there are patches)?

E.g. for submitting the last 10 commits:

git format-patch -10 --stdout > series.patch
git send-email --to=guix-packa...@gnu.org series.patch

I guess we can play with this once we have the debbugs instance.

--
Ricardo

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




Debbugs handling of packages

2017-02-08 Thread Ludovic Courtès
Hello Guix!

Ricardo Wurmus  skribis:

> I see two possible outcomes of establishing an additional “incubator”
> repository: it might fragment our review community as some people will
> try to upstream incubator patches and others handle mailing list
> patches; another outcome is that the incubator never gets accepted by
> reviewers and mentors because it is more work, leading to growing
> parallel infrastructure and second-class code.  Neither of these
> outcomes is desirable in my opinion.

Yeah, I share the same concerns.  The example of external repos that you
gave seems to confirm this.

But like Pjotr said, if people want to have their own package set
somewhere else, that’s also fine.  We’ll just work hard to make sure
there’s no real incentive to do that.  :-)

> Our workflow involving the mailing list is far from perfect.  We had
> further discussions over post-FOSDEM dinner and drinks and there seemed
> to be consensus among the people present (including long time
> contributors, reviewers, and successful mentors) that it would be a
> great improvement to keep track of package contributions in a separate
> Debbugs instance (e.g. one “bug” per package submission).  It gives us a
> way to track the state of things more easily, it accomodates people who
> prefer to use a web browser, it permits us to continue to use email, and
> it doesn’t force yet another account onto submitters.
>
> Admittedly, the web interface that Debbugs comes with is kinda bland and
> hard to use, so a second step would be to develop a better UI frontend
> to Debbugs that would be closer to what people expect from an issue
> tracker.
>
> This was discussed before at
> 
> and we could request a separate Debbugs instance for
> “guix-packa...@gnu.org” *right now* if we wanted to.
>
> What do other people think about this?

I think we should just go ahead and setup that Debbugs instance like I
said I’d do back in September.  It can only be an improvement over what
we have now anyway.

Objections?

Thanks,
Ludo’.



Re: [PATCH 2/2] import: Add stackage importer and updater.

2017-02-08 Thread Federico Beffa
On Tue, Feb 7, 2017 at 8:36 AM, Federico Beffa  wrote:
> An importer/updater for Stackage built on top of the Hackage one.

I've cleaned it up a bit.
From 168ce15a10ed0b76bb339e31ae5b8998564d7d43 Mon Sep 17 00:00:00 2001
From: Federico Beffa 
Date: Mon, 6 Feb 2017 18:19:26 +0100
Subject: [PATCH 2/2] import: Add stackage importer and updater.

* guix/import/stackage.scm: New file.
* guix/scripts/import/stackage.scm: New file.
* Makefile.am (MODULES): Add new files.
* guix/scripts/import.scm (importers): Add "stackage".
* guix/scripts/refresh.scm (%updaters): Add %stackage-updater.
* doc/guix.texi (Invoking 'guix import'): Document the importer.
  (Invoking 'guix refresh'): Add stackage to option --type valid values.
---
 Makefile.am  |   2 +
 doc/guix.texi|  33 -
 guix/import/stackage.scm | 153 +++
 guix/scripts/import.scm  |   3 +-
 guix/scripts/import/stackage.scm | 115 +
 guix/scripts/refresh.scm |   2 +
 6 files changed, 306 insertions(+), 2 deletions(-)
 create mode 100644 guix/import/stackage.scm
 create mode 100644 guix/scripts/import/stackage.scm

diff --git a/Makefile.am b/Makefile.am
index 360c356f1..18501bddf 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -126,6 +126,7 @@ MODULES =	\
   guix/import/cabal.scm\
   guix/import/cran.scm\
   guix/import/hackage.scm			\
+  guix/import/stackage.scm			\
   guix/import/elpa.scm   			\
   guix/scripts.scm\
   guix/scripts/download.scm			\
@@ -147,6 +148,7 @@ MODULES =	\
   guix/scripts/import/gnu.scm			\
   guix/scripts/import/nix.scm			\
   guix/scripts/import/hackage.scm		\
+  guix/scripts/import/stackage.scm		\
   guix/scripts/import/elpa.scm  		\
   guix/scripts/environment.scm			\
   guix/scripts/publish.scm			\
diff --git a/doc/guix.texi b/doc/guix.texi
index 6acde6621..8caf1d68d 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -31,7 +31,8 @@ Copyright @copyright{} 2016 Jan Nieuwenhuizen@*
 Copyright @copyright{} 2016 Julien Lepiller@*
 Copyright @copyright{} 2016 Alex ter Weele@*
 Copyright @copyright{} 2017 Clément Lassieur@*
-Copyright @copyright{} 2017 Mathieu Othacehe
+Copyright @copyright{} 2017 Mathieu Othacehe@*
+Copyright @copyright{} 2017 Federico Beffa
 
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -5340,6 +5341,34 @@ package name by an at-sign and a version number as in the following example:
 guix import hackage mtl@@2.1.3.1
 @end example
 
+@item stackage
+@cindex stackage
+The @code{stackage} importer is a wrapper around the @code{hackage} one.
+It takes a package name, looks up the package version included in an LTS
+@uref{https://www.stackage.org/, Stackage} release and uses the
+@code{hackage} importer to retrieve its metadata.  Note that it is up to
+you to select an LTS release compatible with the GHC compiler used by
+Guix.
+
+Specific command-line options are:
+
+@table @code
+@item --no-test-dependencies
+@itemx -t
+Do not include dependencies required only by the test suites.
+@item --lts-version=@var{version}
+@itemx -r @var{version}
+@var{version} is the desired LTS release version.  If omitted the latest
+release is used.
+@end table
+
+The command below imports metadata for the @code{HTTP} Haskell package
+included in the LTS Stackage release version 7.18:
+
+@example
+guix import stackage --lts-version=7.18 HTTP
+@end example
+
 @item elpa
 @cindex elpa
 Import metadata from an Emacs Lisp Package Archive (ELPA) package
@@ -5504,6 +5533,8 @@ the updater for @uref{https://rubygems.org, RubyGems} packages.
 the updater for @uref{https://github.com, GitHub} packages.
 @item hackage
 the updater for @uref{https://hackage.haskell.org, Hackage} packages.
+@item stackage
+the updater for @uref{https://www.stackage.org, Stackage} packages.
 @item crate
 the updater for @uref{https://crates.io, Crates} packages.
 @end table
diff --git a/guix/import/stackage.scm b/guix/import/stackage.scm
new file mode 100644
index 0..57b07f24e
--- /dev/null
+++ b/guix/import/stackage.scm
@@ -0,0 +1,153 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2017 Federico Beffa 
+;;;
+;;; 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
+;;; 

Re: [PATCH 6/9] gnu: Add python-pytest-httpbin-0.0.7.

2017-02-08 Thread ng0
On 17-02-05 15:22:20, Maxim Cournoyer wrote:
> contact@cryptolab.net writes:
> 
> > From: ng0 
> >
> > * gnu/packages/python.scm (python-pytest-httpbin-0.0.7): New variable.
> > ---
> >  gnu/packages/python.scm | 23 +++
> >  1 file changed, 23 insertions(+)
> >
> > diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
> > index 9c3a031e1..7bdd371b5 100644
> > --- a/gnu/packages/python.scm
> > +++ b/gnu/packages/python.scm
> > @@ -1975,6 +1975,29 @@ thread running httpbin and provides your test with 
> > the URL in the fixture.")
> >  (define-public python2-pytest-httpbin
> >(package-with-python2 python-pytest-httpbin))
> >  
> > +;; Some packages like "searx" need this old version.
> > +(define-public python-pytest-httpbin-0.0.7
> > +  (package
> > +(inherit python-pytest-httpbin)
> > +(version "0.0.7")
> > +(source
> > + (origin
> > +   (method url-fetch)
> > +   (uri (pypi-uri "pytest-httpbin" version))
> > +   (sha256
> > +(base32
> > + "08ghq923dn33rllip3vap2p9fb680g0i96jdn5lcpfy8amq8mbq3"))
> > +
> > +(define-public python2-pytest-httpbin-0.0.7
> > +  (package
> > +(inherit (package-with-python2
> > +  (strip-python2-variant python-pytest-httpbin-0.0.7)))
> > +(inputs
> > + `(("python2-flask" ,python2-flask)
> > +   ("python2-decorator" ,python2-decorator)
> > +   ("python2-httpbin" ,python2-httpbin)
> > +   ("python2-six" ,python2-six)
> > +
> 
> Again, shouldn't those be propagated-inputs? Unless I missed something
> this was the recommendation going forward for Python runtime dependencies.
> 
> >  (define-public python-scripttest
> >(package
> >  (name "python-scripttest")

Definitely. These patches predate the proposed changes and I didn't
check all of them.

I don't have the time to apply changes this work week. I'll see to apply
changes on sunday or monday.

Any reviews etc in the next days are considered with the next patch
submission.

Thanks!
-- 
ng0 -- https://www.inventati.org/patternsinthechaos/



Re: playing nice with other OSs

2017-02-08 Thread Chris Marusich
Federico Beffa  writes:

> Hi,
>
> I'm looking into the possibility of installing GuixSD in parallel with
> another operating system on a single machine (dual boot).  Looking
> into the code (gnu system grub) I see that the GRUB "linux" and
> "initrd" commands are hardwired into the code.  This appears to make
> the definition of a  for another operating system
> (GNU/Hurd, NetBSD, Windows, ...) impossible.  Am I right, or am I
> overlooking something?
>

I think it's possible, but only for other GNU/Linux distributions, and
only when not chain loading.  This could of course be improved, but I
think those are the current limitations.  See "(guix) GRUB
Configuration", if you haven't already, for details on how to define a
custom entry.

>
> If the above is correct and we want to make GuixSD play nicely with
> others, then I suppose that we will have to modify the 
> record.  I see two possibilities:
>
> * We could try to generalize the fields along the lines of linux ->
> kernel, initrd -> kernel-boot-helpers, ...
>
> * Define operating system specific records such as ,
> , , ..., where the content of
> the fields for the systems not handled by GuixSD would come from the
> user operating-system file configuration.
>
> I personally prefer the second approach. What do you think?
>

At first blush, I guess the second approach seems more intuitive to me.
I don't dual boot, so I don't have a vested interest in seeing this
feature implemented, but if it can be done reasonably, why not do it?

I suspect most people will not need to dual boot, so whatever solution
you choose, it might be wise to try and keep the code for the common use
case as simple as possible.  It would be unfortunate to wind up overly
complicating the code for the common use case in order to accommodate an
uncommon use case.

-- 
Chris


signature.asc
Description: PGP signature


Re: CDN Mirrors for GNU Guix

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

> Hello Tom,
>
> Tom Li  skribis:
>
>> Currently, GNU Guix is still in the early stage of development, and there is 
>> a great
>> lack of mirrors worldwide. For example. in my region, using GNU Guix is 
>> incredibly
>> slow, the speed is around 4 KiB/s and rendering it almost unusable.
>
> Woow, that sounds really extreme!  Do you always have such a bandwidth,
> or did you just happen to be unlucky somehow at that time?
>
> Regardless, I agree that we should have more mirrors and a wider
> distribution.
>
>> Therefore, I created two CDN mirrors of https://mirror.hydra.gnu.org/, by 
>> using
>> CloudFlare and Amazon CloudFront's service. I know some have the concerns 
>> about
>> such type of centralized corporation-controlled service. Personally, I have 
>> done my
>> best to minimized the security risks (HTTPS only, untouched signatures) and 
>> set ip
>> up faithfully. Please use it according to your own judgement.
>>
>> they are available at:
>>
>> * https://guix-cloudflare.tomli.me/
>> * https://guix-amazon.tomli.me/
>>
>> Since they are identical mirrors of Hydra, you just need to use 
>> `--substitute-urls=`
>> in order to use it.

I'm curious to know what the cache hit rate of your CloudFront
distribution is.  I have one, too, at
https://hydra-mirror.marusich.info, and the hit rate is surprisingly low
(less than 5%, last I checked).  It's probably because I'm the only one
using it, though :-)

> Nice!  (Though I should say that I hate CloudFare for essentially
> preventing Tor users from accessing what they host.)
>
> I think it may be time to arrange so that mirror.hydra.gnu.org (or some
> other host name?) can somehow redirect users to external mirrors.  I’m
> not sure how to achieve this, so if anyone has experience in this area,
> help is welcome!

One option is to use DNS round robin.  The main problems with
traditional DNS round robin is that you don't always get a "nearby"
(according to some metric such as latency or geographic location)
address, and if one of the addresses is "unhealthy" (according to some
metric such as external network connectivity), some clients might still
get (and cache) the unhealthy address.  Some DNS services (e.g., Amazon
Route 53) provide "smarter" features that will return nearby records or
healthy records, but I do not know how easy it is to use those features
when you are trying to route requests to another domain or address
outside of your own control.  Beyond DNS, I suppose you could implement
some kind of application layer logic, perhaps involving HTTP redirects,
but it would not be as simple as DNS round robin.

-- 
Chris


signature.asc
Description: PGP signature


Re: [Install guix packages to non-default]: Unable to build derivation hello

2017-02-08 Thread Ludovic Courtès
rohit yadav  skribis:

> Thanks for fixing the linux-libre (I am yet to try). However, my other
> question is why linux-libre is required to build hello?

Since you’re using a non-standard store directory, you cannot get
binaries from hydra.gnu.org, so you’re rebuilding the world.

The C library depends on the Linux-libre header files, which is why this
is happening.

Ludo’.



Re: Running services in containers

2017-02-08 Thread Ludovic Courtès
Ricardo Wurmus  skribis:

> Ludovic Courtès  writes:
>
>> Those who didn’t have the luck to be at FOSDEM missed this not-so-visual
>> demo I made of a Shepherd service running in a container.  :-)
>>
>> I’ve polished the thing on my way back and pushed the result, using
>> BitlBee as an example:
>>
>>   
>> http://git.savannah.gnu.org/cgit/guix.git/commit/?id=63302a4e55241a41eab4c21d7af9fbd0d5817459
>>   
>> http://git.savannah.gnu.org/cgit/guix.git/commit/?id=a062b6ca99ad61c9df473fe49a93d69f9698c59d
>>
>
> This is very cool!  I’m amazed at how you got this ready in time for
> your talk.  I’m sure you didn’t just keep this under wraps for weeks :)

I had a long train trip and also the version I demoed on Sunday was much
less polished than this—but nobody could see that.  :-)

Ludo’.



Re: 01/01: gnu: grub-efi: Really build the EFI variant.

2017-02-08 Thread Ludovic Courtès
Marius Bakke  skribis:

> Ludovic Courtès  writes:
>
>> civodul pushed a commit to branch master
>> in repository guix.
>>
>> commit ef753a1a8f9e7c971957abfda9b672a7728cd073
>> Author: Ludovic Courtès 
>> Date:   Tue Feb 7 11:14:09 2017 +0100
>>
>> gnu: grub-efi: Really build the EFI variant.
>> 
>> Fixes a regression introduced in
>> d846834fc2b2f76aa2e258685bc211edd31866c5 where '--with-platform=efi'
>> would no longer be passed.
>> 
>> * gnu/packages/grub.scm (grub-efi)[arguments]: Provide a default value
>> for #:configure-flags.
>
> [...]
>
>> @@ -139,8 +139,8 @@ menu to select one of the installed operating systems.")
>> ;; Search for 'OVMF' in "tests/util/grub-shell.in".
>> #:tests? #f
>> ,@(substitute-keyword-arguments (package-arguments grub)
>> -   ((#:configure-flags flags) `(cons* "--with-platform=efi"
>> -  ,flags))
>> +   ((#:configure-flags flags ''())
>> +`(cons "--with-platform=efi" ,flags))
>> ((#:phases phases)
>>  `(modify-phases ,phases
>> (add-after 'patch-stuff 'use-absolute-efibootmgr-path
>
> Thank you for this! I did test grub-efi with the new grub release, but
> then afterwards checked whether the #:configure-flags were still needed.
>
> I will be more careful about this in the future.

No problem, it’s easy to get tripped up with things that inherit and
customize flags.

Ludo’.



Re: [PATCH 00/10] ocaml patches

2017-02-08 Thread Ludovic Courtès
Hi,

Ben Woodcroft  skribis:

> On 08/02/17 06:16, Julien Lepiller wrote:
>> On Tue, 31 Jan 2017 21:58:05 +0100
>> Julien Lepiller  wrote:
>>
>>> Here is the next series of patches. I think I took into account all
>>> of your previous remarks, so it should be faster.
>>>
>>> Julien Lepiller (10):
>>>gnu: Add ocaml-fieldslib.
>>>gnu: Add ocaml-ppx-core.
>>>gnu: Add ocaml-ppx-optcomp.
>>>gnu: Add ocaml-ppx-driver.
>>>gnu: Add ocaml-cppo.
>>>gnu: Add ocaml-ppx-deriving.
>>>gnu: Add ocaml-ppx-type-conv.
>>>gnu: Add ocaml-ppx-inline-test.
>>>gnu: Add ocaml-ppx-bench.
>>>gnu: Add ocaml-ppx-compare.
>>>
>>>   gnu/packages/ocaml.scm | 255
>>> + 1 file changed, 255
>>> insertions(+)
>>>
>> Up?
>>
>> Can I push them?
> I've been meaning to review these patches but haven't found the time..
>
> If they pass 'guix lint' then I would think it is OK to push
> them. Thanks for your efforts on the OCaml front.

I concur, sorry for the delay Julien!

That’s really a minor issue but in the future, please make sure
descriptions contain full sentences and use @code and similar where it
makes sense.

Also, feel free to push simple packages if they pass ‘guix lint’ and you
don’t get feedback within a few days (see ‘HACKING’).

Thanks for working the OCaml front!  :-)

Ludo’.



Re: GuixSD lvm support

2017-02-08 Thread Chris Marusich
Hi,

Gábor Boskovits  writes:

> I have seen an earlier attempt to add lvm support to guixsd.
> I would like to know the status of lvm support, and willing to assist with it.

I think your best bet is to review past email threads on this topic.
Search the archives for "lvm" and similar keywords to find them:

https://lists.gnu.org/archive/cgi-bin/namazu.cgi?query=lvm=Search!=guix-devel=20=normal=score

https://lists.gnu.org/archive/cgi-bin/namazu.cgi?query=lvm=Search!=help-guix=20=normal=score

-- 
Chris


signature.asc
Description: PGP signature


Re: [PATCH 04/10] gnu: Add ocaml-ppx-driver.

2017-02-08 Thread Ludovic Courtès
Hello!

Minor issues:

Julien Lepiller  skribis:

> +(synopsis "Feature-full driver for OCaml AST transformers")
> +(description "A driver is an executable created from a set of OCaml AST
> +transformers linked together with a command line frontend.  The aim is to

The first thing should be a real sentence.

> +provide a tool that can be used to:
> +@enumerate
> +@item easily view the pre-processed version of a file, no need to construct a
> +  complex command line: ppx file.ml will do

Could be: @command{ppx file.ml}.

Ludo’.