[PATCH 2/5] profiles: gtk-icon-themes: Use 'gtk-update-icon-cache' from 'gtk+:bin'.

2016-08-06 Thread
* guix/profiles.scm (gtk-icon-themes): Use 'gtk-update-icon-cacnhe' from
the "bin" output of gtk+ package.
---
 guix/profiles.scm | 21 +++--
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/guix/profiles.scm b/guix/profiles.scm
index db807a8..9c2dbba 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -642,7 +642,18 @@ MANIFEST.  Single-file bundles are required by programs 
such as Git and Lynx."
 (define (gtk-icon-themes manifest)
   "Return a derivation that unions all icon themes from manifest entries and
 creates the GTK+ 'icon-theme.cache' file for each theme."
-  (mlet %store-monad ((gtk+ (manifest-lookup-package manifest "gtk+")))
+  (define gtk+  ; lazy reference
+(module-ref (resolve-interface '(gnu packages gtk)) 'gtk+))
+
+  (mlet %store-monad ((%gtk+ (manifest-lookup-package manifest "gtk+"))
+  ;; XXX: Can't use gtk-update-icon-cache corresponding
+  ;; to the gtk+ referenced by 'manifest'.  Because
+  ;; '%gtk+' can be either a package or store path, and
+  ;; there's no way to get the "bin" output for the later.
+  (gtk-update-icon-cache
+   -> #~(string-append #+gtk+:bin
+   "/bin/gtk-update-icon-cache")))
+
 (define build
   (with-imported-modules '((guix build utils)
(guix build union)
@@ -659,9 +670,7 @@ creates the GTK+ 'icon-theme.cache' file for each theme."
 (let* ((destdir  (string-append #$output "/share/icons"))
(icondirs (filter file-exists?
  (map (cut string-append <> "/share/icons")
-  '#$(manifest-inputs manifest
-   (update-icon-cache (string-append
-   #+gtk+ "/bin/gtk-update-icon-cache")))
+  '#$(manifest-inputs manifest)
 
   ;; Union all the icons.
   (mkdir-p (string-append #$output "/share"))
@@ -676,11 +685,11 @@ creates the GTK+ 'icon-theme.cache' file for each theme."
;; "abiword_48.png".  Ignore these.
(when (file-is-directory? dir)
  (ensure-writable-directory dir)
- (system* update-icon-cache "-t" dir "--quiet"
+ (system* #+gtk-update-icon-cache "-t" dir "--quiet"
(scandir destdir (negate (cut member <> '("." "..")
 
 ;; Don't run the hook when there's nothing to do.
-(if gtk+
+(if %gtk+
 (gexp->derivation "gtk-icon-themes" build
   #:local-build? #t
   #:substitutable? #f)
-- 
2.8.4




[PATCH 1/5] gnu: gtk+: Add "bin" output.

2016-08-06 Thread
* gnu/packages/gtk.scm (gtk+)[outputs]: New field.
---
 gnu/packages/gtk.scm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 21365b9..5c42053 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -624,6 +624,7 @@ application suites.")
  (base32
   "157nh9gg0p2avw765hrnkvr8lsh2w811397yxgjv6q5j4fzz6d1q"))
 (patches (search-patches "gtk3-respect-GUIX_GTK3_PATH.patch"
+   (outputs '("out" "bin" "doc"))
(propagated-inputs
 `(("at-spi2-atk" ,at-spi2-atk)
   ("atk" ,atk)
-- 
2.8.4




Re: [PATCH] Update lisp.scm CCL and SBCL to latest versions

2016-08-02 Thread
ng0  writes:

> Hi Efraim and Christopher,
>
> I found this contribution on my search for forgotten
> packages/contributions.
> Christopher, thanks for working on this. Was this simply forgotten or
> left due to whatever reasons, or do you want someone else to move this
> over the finnishing line?
sbcl has been updated to 1.3.7.

I applied the ccl update patch, thanks Christopher for patches and ng0
for the reminding!



Re: [PATCH] gnu: Add ircii.

2016-08-02 Thread
Leo Famulari  writes:

> On Mon, Aug 01, 2016 at 07:34:49PM +, ng0 wrote:
>> * gnu/packages/irc.scm (ircii): New variable.
>
> Cool!
>
>> + (snippet
>> +  '(begin
>> + (substitute* "bsdinstall"
>> +   (("/bin/strip") "strip")
>> +   (("/bin/cp") "cp")
>> +   (("/bin/chmod") "chmod")
>> +   (("/etc/chown") "chown")
>> +   (("/bin/chgrp") "chgrp")
>> +   (("/bin/mkdir") "mkdir")
>> +   (("/bin/rm") "rm")
>> +   (("/bin/mv") "mv"))
>
> Does anyone else think we should put this origin snippet in a build phase
> instead? Or, should we leave it in the origin, where it will be applied
> to the source code provided by `guix build --source ircii`?
I think it should be in snippet.  The 'substitute*' doesn't introduce
any guix specified modifitions, it removes the hardcoded paths.

>
>> + (delete 'check
>
> Using '#:tests? #f' is preferred instead of deleting the check phase.
>
>> +(inputs
>> + `(("libiconv" ,libiconv)
>> +   ("ncurses" ,ncurses)
>> +   ("openssl" ,openssl)))
>
> I noticed that the built package does refer to libiconv:
>
> ---
> $ guix gc --references $(./pre-inst-env guix build ircii)
> /gnu/store/0kml8g9fix69v00afv59ngf4lgfr1565-openssl-1.0.2h
> /gnu/store/9maps38bsia0wcxm82h0v0p2dxyn8j35-ircii-20151120
> /gnu/store/9nifwk709wajpyfwa0jzaa3p6mf10vxs-gcc-4.9.3-lib
> /gnu/store/m9vxvhdj691bq1f85lpflvnhcvrdilih-glibc-2.23
> /gnu/store/xl19qrfzga52vrvp4ncccwjlnrjqwj95-ncurses-6.0
> /gnu/store/ykzwykkvr2c80rw4l1qh3mvfdkl7jibi-bash-4.3.42
> ---
>
> But, libiconv is used:
>
> ---
> $ strings /gnu/store/9maps38bsia0wcxm82h0v0p2dxyn8j35-ircii-20151120/bin/irc 
> | grep iconv
> iconv_close
> iconv
> iconv_open
> iconv_open@@GLIBC_2.2.5
> iconv@@GLIBC_2.2.5
> iconv_close@@GLIBC_2.2.5
> ---
>
> Perhaps libiconv should be propagated?
The iconv functions are provided by glibc, libiconv is for systems that
do not use glibc.  libiconv should be removed from inputs.



Re: Glibc-locales failure in core-updates

2016-07-30 Thread
Andreas Enge  writes:

> Hello,
>
> glibc-locales fails on all architectures in core-updates. The error message
> looks as if it would not be too difficult to fix for someone who knows
> the package...
Fixed, thanks for noticing!



Re: [PATCH] gnu: gnunet-gtk: Configure with gnunet path.

2016-07-30 Thread
ng0  writes:

> Graphically, this was not run. From my packaging experience with gnunet
> and with the succesfull build which just ran, it should just work.

Applied, thanks!



Re: [PATCH] gnu: Add tint2.

2016-07-30 Thread
Mathieu Lirzin  writes:

> * gnu/packages/xdisorg.scm (tint2): New variable.
> ---
>  gnu/packages/xdisorg.scm | 49 
> ++--
>  1 file changed, 47 insertions(+), 2 deletions(-)
Look good, please push!



Re: Ricardo Wurmus appointed co-maintainer

2016-07-26 Thread
l...@gnu.org (Ludovic Courtès) writes:

> Hello Guix!
>
> I’m happy to announce that Ricardo Wurmus has just been appointed by the
> GNU overseers to join me as co-maintainer of GNU Guix.
>
> Ricardo is a long-time free software activist and has been making
> significant contributions to Guix for the most part of its young history
> in terms of code, reviews, and talks.  He has deployed Guix on the
> bioinformatics clusters of his workplace and trained his co-workers.  He
> undoubtedly has all the technical and social skills I would expect for
> the job.  Please welcome him warmly!  :-)

Great news, and welcome Ricardo :-)



Re: [PATCH] gnu: sbcl: Update to 1.3.7.

2016-07-25 Thread
Andy Patterson  writes:

> This patch allows sbcl to build using the newer texlive.

Pushed, thanks!



Re: [PATCH 2/2] gnu: racket: Add more inputs.

2016-07-22 Thread
l...@gnu.org (Ludovic Courtès) writes:

> 宋文武  skribis:
>
>> * gnu/packages/schem.scm (racket)[inputs]: Add glu, gmp, libpng, libx11,
>  ^^
> Typo. 
>
>> mesa, mpfr, openssl and unixodbc.  Replace libjpeg-8 with libjpeg and
>> gtk+-2 with gtk+.
>
> LGTM!
Thanks for the review, pushed!



[PATCH 1/2] gnu: racket: Patch dynamically loaded libraries with absolute paths.

2016-07-19 Thread
* gnu/packages/scheme.scm (racket)[arguments]: Patch 'ffi-lib' calls to
absolute paths in 'pre-configure' phase.  Remove 'wrap-programs' phase.
---
 gnu/packages/scheme.scm | 105 ++--
 1 file changed, 65 insertions(+), 40 deletions(-)

diff --git a/gnu/packages/scheme.scm b/gnu/packages/scheme.scm
index e7cf950..715feca 100644
--- a/gnu/packages/scheme.scm
+++ b/gnu/packages/scheme.scm
@@ -408,46 +408,71 @@ implementation techniques and as an expository tool.")
 (build-system gnu-build-system)
 (arguments
  '(#:phases
-   (let* ((gui-libs
-   (lambda (inputs)
- (define (lib input)
-   (string-append (assoc-ref inputs input) "/lib"))
-
- (list (lib "glib")
-   (lib "cairo")
-   (lib "pango")
-   (lib "libjpeg")
-   (lib "gtk")
-   (lib "gdk-pixbuf")
-   (lib "fontconfig")
-   (lib "sqlite") ;to build the doc
- (alist-cons-before
-  'configure 'pre-configure
-  (lambda* (#:key inputs #:allow-other-keys)
-(chdir "src")
-
-;; The GUI libs are dynamically opened through the FFI, so they
-;; must be in the loader's search path.
-(setenv "LD_LIBRARY_PATH" (string-join (gui-libs inputs) ":")))
-  (alist-cons-after
-   'unpack 'patch-/bin/sh
-   (lambda _
- (substitute* "collects/racket/system.rkt"
-   (("/bin/sh") (which "sh"
-   (alist-cons-after
-'install 'wrap-programs
-(lambda* (#:key inputs outputs #:allow-other-keys)
-  (let ((out (assoc-ref outputs "out")))
-(define (wrap prog)
-  (wrap-program prog
-`("LD_LIBRARY_PATH" ":" prefix
-  ,(gui-libs inputs
-
-(with-directory-excursion (string-append out "/bin")
-  (for-each wrap
-(list "gracket" "drracket" "slideshow" "mred"))
-  #t)))
-%standard-phases
+   (alist-cons-before
+'configure 'pre-configure
+(lambda* (#:key inputs #:allow-other-keys)
+  ;; Patch dynamically loaded libraries with their absolute paths.
+  (let* ((library-path   (search-path-as-string->list
+  (getenv "LIBRARY_PATH")))
+ (find-so(lambda (soname)
+   (search-path
+library-path
+(format #f "~a.so" soname
+ (patch-ffi-libs (lambda (file libs)
+   (for-each
+(lambda (lib)
+  (substitute* file
+(((format #f "\"~a\"" lib))
+ (format #f "\"~a\"" (find-so lib)
+libs
+(substitute* "collects/db/private/sqlite3/ffi.rkt"
+  (("ffi-lib sqlite-so")
+   (format #f "ffi-lib \"~a\"" (find-so "libsqlite3"
+(substitute* "collects/openssl/libssl.rkt"
+  (("ffi-lib libssl-so")
+   (format #f "ffi-lib \"~a\"" (find-so "libssl"
+(substitute* "collects/openssl/libcrypto.rkt"
+  (("ffi-lib libcrypto-so")
+   (format #f "ffi-lib \"~a\"" (find-so "libcrypto"
+(for-each
+ (lambda (x) (apply patch-ffi-libs x))
+ '(("share/pkgs/draw-lib/racket/draw/unsafe/cairo-lib.rkt"
+("libfontconfig" "libcairo"))
+   ("share/pkgs/draw-lib/racket/draw/unsafe/glib.rkt"
+("libglib-2.0" "libgmodule-2.0" "libgobject-2.0"))
+   ("share/pkgs/draw-lib/racket/draw/unsafe/jpeg.rkt"
+("libjpeg"))
+   ("share/pkgs/draw-lib/racket/draw/unsafe/pango.rkt"
+("libpango-1.0" "libpangocairo-1.0"))
+   ("share/pkgs/draw-lib/racket/draw/unsafe/png.rkt"
+("libpng"))
+   ("share/pkgs/db-lib/db/private/odbc/ffi.rkt"
+("libodbc"))
+   ("share/pkgs/math-lib/math/private/bigfloat/gmp.rkt"
+("libgmp"))
+   ("share/pkgs/math-lib/math/private/bigfloat/mpfr.rkt"
+("libmpfr"))
+   ("share/pkgs/gui-lib/mred/private/wx/gtk/x11.rkt"
+("libX11"))
+   ("share/pkgs/gui-lib/mred/private/wx/gtk/gsettings.rkt"
+("libgio-2.0"))
+   ("share/pkgs/gui-lib/mred/private/wx/gtk/gtk3.rkt"
+("libgdk-3" "libgtk-3"))
+   ("share/pkgs/gui-lib/mred/private/wx/gtk/unique.r

[PATCH 2/2] gnu: racket: Add more inputs.

2016-07-19 Thread
* gnu/packages/schem.scm (racket)[inputs]: Add glu, gmp, libpng, libx11,
mesa, mpfr, openssl and unixodbc.  Replace libjpeg-8 with libjpeg and
gtk+-2 with gtk+.
---
 gnu/packages/scheme.scm | 32 ++--
 1 file changed, 22 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/scheme.scm b/gnu/packages/scheme.scm
index 715feca..461cce7 100644
--- a/gnu/packages/scheme.scm
+++ b/gnu/packages/scheme.scm
@@ -23,7 +23,7 @@
 
 (define-module (gnu packages scheme)
   #:use-module (gnu packages)
-  #:use-module (guix licenses)
+  #:use-module ((guix licenses) #:hide (openssl))
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix git-download)
@@ -48,6 +48,8 @@
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages image)
   #:use-module (gnu packages xorg)
+  #:use-module (gnu packages tls)
+  #:use-module (gnu packages gl)
   #:use-module (ice-9 match))
 
 (define (mit-scheme-source-directory system version)
@@ -475,15 +477,25 @@ implementation techniques and as an expository tool.")
  %standard-phases))
#:tests? #f; XXX: how to run them?
))
-(inputs `(("libffi" ,libffi)
-  ("glib" ,glib)  ; for DrRacket
-  ("cairo" ,cairo)
-  ("pango" ,pango)
-  ("libjpeg" ,libjpeg-8)
-  ("fontconfig" ,fontconfig)
-  ("gdk-pixbuf" ,gdk-pixbuf)
-  ("gtk" ,gtk+-2)
-  ("sqlite" ,sqlite)));needed to build the doc
+(inputs
+ `(("libffi" ,libffi)
+   ;; Hardcode dynamically loaded libraries for better functionality.
+   ;; sqlite and libraries for `racket/draw' are needed to build the doc.
+   ("cairo" ,cairo)
+   ("fontconfig" ,fontconfig)
+   ("glib" ,glib)
+   ("glu" ,glu)
+   ("gmp" ,gmp)
+   ("gtk+" ,gtk+)  ; propagates gtk-pixbuf+svg
+   ("libjpeg" ,libjpeg)
+   ("libpng" ,libpng)
+   ("libx11" ,libx11)
+   ("mesa" ,mesa)
+   ("mpfr" ,mpfr)
+   ("openssl" ,openssl)
+   ("pango" ,pango)
+   ("sqlite" ,sqlite)
+   ("unixodbc" ,unixodbc)))
 (home-page "http://racket-lang.org";)
 (synopsis "Implementation of Scheme and related languages")
 (description
-- 
2.8.4




Re: [PATCH 5/6] gnu: mesa: Update to 12.0.0.

2016-07-10 Thread
David Craven  writes:

> * gnu/packages/gl.scm (mesa): Update to 12.0.0.
> * gnu/packages/gl.scm (mesa): Enable virtio gallium driver.
> * gnu/packages/gl.scm (mesa): Enable configure-flags required by
> wayland.
Likewise, I prefer 3 commits for update, virtio and wayland.

(And for 1 commit, no need to repeat the package in changelog)



Re: [PATCH 4/6] gnu: Order module imports in (gnu packages gl) alphabetically.

2016-07-10 Thread
David Craven  writes:

> * gnu/packages/gl.scm: Order module imports alphabetically.
> * gnu/packages/gl.scm: Rename #prefix l: to #prefix license:.
It's unrelated, how about make them 2 commit?

Thanks!



Re: [PATCH 0/5] Sphinx reproducibility update

2016-07-02 Thread
Leo Famulari  writes:
> [...]
>
> With this change, many Python 2 packages will become reproducible, at
> least on a single machine; the only thing holding them back was the
> manpage timestamps.
Cool!

>
> These changes will require 142 rebuilds, mostly of Python packages, but
> also of libreoffice (libreoffice seems to depend on *everything*) and a
> few others. If the patches are good, should they go to master or to
> another branch?
>
I prefer master, and I guess people who use libreoffice don't update it
frequently (we have a old version, but no one complain so far).



Re: [PATCH 3/5] gnu: Add python-snowballstemmer.

2016-07-02 Thread
Leo Famulari  writes:

> * gnu/packages/python.scm (python-snowballstemmer, python2-snowballstemmer): 
> New
> variables.
> ---
>  gnu/packages/python.scm | 22 ++
>  1 file changed, 22 insertions(+)
>
> diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
> index 4eed92f..73312e8 100644
> --- a/gnu/packages/python.scm
> +++ b/gnu/packages/python.scm
> @@ -9746,3 +9746,25 @@ default Sphinx theme.")
>(native-inputs
> `(("python2-setuptools" ,python2-setuptools)
>   ,@(package-native-inputs base))
> +
> +(define-public python-snowballstemmer
> +  (package
> +(name "python-snowballstemmer")
> +(version "1.2.1")
> +(source (origin
> +  (method url-fetch)
> +  (uri (pypi-uri "snowballstemmer" version))
> +  (sha256
> +   (base32
> +"0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"
> +(build-system python-build-system)
> +(arguments
> + `(#:tests? #f)) ; no test suite
> +(synopsis "Snowball stemming library collection for Python")
> +(description "This package provides 16 stemmer algorithms generated from
> +Snowball algorithms")
Missing period.



python-pycairo in core-updates (Re: core-updates!)

2016-07-01 Thread
Hi, python-wrapper has a broken `python3-config', which
output cflags to the wrapper instead of the origin python3,
leading the build failure of python-pycairo.


It was introduced in commit 478e75b53.  Does it really needed?



Re: [PATCH 08/10] gnu: Add python-email-validator and python2-email-validator.

2016-06-27 Thread
>> They're needed at runtime, and included in the pth file.
>> But I'm not sure whether or not inputs for python should be
>> native-inputs, I never cross build python modules for other
>> architertures.
>
> If they’re used at run time, they’re not ‘native-inputs’.  (In practice
> we cannot cross-compile Python stuff currently, so this is largely a
> theoretical concern, but it doesn’t cost much to get it right.)
>
>> Should I put dnspython and idna into inputs, or propagated-inputs?
>
> If the installed code “import”s them, then they should be propagated.
OK, done.  I'm fine with propagated them, but there are many python
packages use inputs for runtime depends and rely on the pth file too.

What's the current practice?


Also, last dicussed at:




Re: [PATCH 08/10] gnu: Add python-email-validator and python2-email-validator.

2016-06-25 Thread
Leo Famulari  writes:

> On Thu, Jun 23, 2016 at 11:20:02PM +0800, 宋文武 wrote:
>> * gnu/packages/python.scm (python-email-validator)
>> (python2-email-validator): New variables.
>> ---
>>  gnu/packages/python.scm | 32 
>>  1 file changed, 32 insertions(+)
>> 
>> diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
>> index ff3cb99..68123cc 100644
>> --- a/gnu/packages/python.scm
>> +++ b/gnu/packages/python.scm
>> @@ -9468,3 +9468,35 @@ It supports TSIG authenticated messages and EDNS0.")
>>  (define-public python2-dnspython
>>(package-with-python2 python-dnspython))
>>  
>> +(define-public python-email-validator
>> +  (package
>> +(name "python-email-validator")
>> +(version "1.0.1")
>> +(source
>> + (origin (method url-fetch)
>> + (uri (pypi-uri "email_validator" version))
>> + (sha256
>> +  (base32
>> +   "0mn8jg5h8ifl8w6a6m0hq8kbk0mzw9vm054qfamkn89b3npz52qw"
>
> The indentation should be shifted to the right.
OK.

>
>> +(build-system python-build-system)
>> +(arguments
>> + '(#:phases
>> +   (modify-phases %standard-phases
>> + (add-before 'build 'use-dnspython
>> +   (lambda _
>> + (substitute* "setup.py"
>> +   (("dnspython3") "dnspython"))
>> + #t)
>> +(native-inputs
>> + `(("python-dnspython" ,python-dnspython)
>> +   ("python-idna" ,python-idna)
>
> Do dnspython and idna need to be native-inputs? Are they only used to
> build?
They're needed at runtime, and included in the pth file.
But I'm not sure whether or not inputs for python should be
native-inputs, I never cross build python modules for other
architertures.

Should I put dnspython and idna into inputs, or propagated-inputs?



Re: [PATCH 10/10] gnu: Add python-fake-factory and python2-fake-factory.

2016-06-25 Thread
Leo Famulari  writes:

> On Thu, Jun 23, 2016 at 11:20:04PM +0800, 宋文武 wrote:
>> * gnu/packages/python.scm (python-fake-factory, python2-fake-factory):
>> New variables.
>
>> +  (arguments
>> +   '(#:phases
>> + (modify-phases %standard-phases
>> +   (add-before 'check 'disable-failing-test
>> + ;; XXX: faker/tests/ne_np/__init__.py, line 40, in test_names
>> + ;;  first_name, last_name = name.split()
>> + ;; ValueError: too many values to unpack (expected 2)
>> + (lambda _
>> +   (delete-file "faker/tests/ne_np/__init__.py")
>> +   #t)
>
> It's safe to disable this test?
Yes, the provider provides names in (first, last) or (prefix, first,
last) forms, I think the test code is just outdated.

>
>> +  (native-inputs
>> +   `(("python-dateutil" ,python-dateutil-2)
>> + ("python-setuptools" ,python-setuptools)
>> + ("python-six" ,python-six)
>> + ;; For testing
>> + ("python-email-validator" ,python-email-validator)
>> + ("python-mock" ,python-mock)
>> + ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
>
> It doesn't need to use dateutil, email-validator, and ukpostcodeparser
> at run-time?
It need dateutil and six at runtime, and they're included in the pth
file, I can import them in python from:
  `guix environment --ad-hoc python python-fake-factory -- python3'

IIUC, I don't need to propagate dateutil and six, right?

>
>> +  (home-page "http://github.com/joke2k/faker";)
>> +  (synopsis "Python package that generates fake data")
>> +  (description
>> +   "Faker is a Python package that generates fake data such as names,
>> +addresses, and phone numbers.")
>> +  (license license:expat)
>> +  (properties `((python2-variant . ,(delay python2-fake-factory))
>> +
>> +(define-public python2-fake-factory
>> +  (let ((base (package-with-python2 (strip-python2-variant
>> + python-fake-factory
>> +(package
>> +  (inherit base)
>> +  (native-inputs
>> +   `(("python2-ipaddress" ,python2-ipaddress)
>> + ,@(package-native-inputs base))
>
> I have the same question for python2-ipaddress.
Oh, it's needed and missing from PYTHONPATH, I should propagate it.

Thanks for the review!



[PATCH 09/10] gnu: Add python-ukpostcodeparser and python2-ukpostcodeparser.

2016-06-23 Thread
* gnu/packages/python.scm (python-ukpostcodeparser)
(python2-ukpostcodeparser): New variables.
---
 gnu/packages/python.scm | 22 ++
 1 file changed, 22 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 68123cc..50d9ee9 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -9500,3 +9500,25 @@ It supports TSIG authenticated messages and EDNS0.")
 (define-public python2-email-validator
   (package-with-python2 python-email-validator))
 
+(define-public python-ukpostcodeparser
+  (package
+(name "python-ukpostcodeparser")
+(version "1.0.3")
+(source (origin
+  (method url-fetch)
+  (uri (pypi-uri "UkPostcodeParser" version))
+  (sha256
+   (base32
+"1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"
+(build-system python-build-system)
+(native-inputs
+ `(("python-setuptools" ,python-setuptools)))
+(home-page "https://github.com/hamstah/ukpostcodeparser";)
+(synopsis "UK Postcode parser for Python")
+(description
+ "This library provides the @code{parse_uk_postcode} function for
+parsing UK postcodes.")
+(license license:expat)))
+
+(define-public python2-ukpostcodeparser
+  (package-with-python2 python-ukpostcodeparser))
-- 
2.8.4




[PATCH 03/10] gnu: Add python-inflection and python2-inflection.

2016-06-23 Thread
* gnu/packages/python.scm (python-inflection, python2-inflection):
New variables.
---
 gnu/packages/python.scm | 24 
 1 file changed, 24 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 6e30377..ced8232 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -9344,3 +9344,27 @@ datetime type.")
 (define-public python2-arrow
   (package-with-python2 python-arrow))
 
+(define-public python-inflection
+  (package
+(name "python-inflection")
+(version "0.3.1")
+(source
+ (origin (method url-fetch)
+ (uri (pypi-uri "inflection" version))
+ (sha256
+  (base32
+   "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"
+(build-system python-build-system)
+(native-inputs
+ `(("python-setuptools" ,python-setuptools)))
+(home-page "http://github.com/jpvanhal/inflection";)
+(synopsis "Python string transformation library")
+(description
+ "Inflection is a string transformation library.  It singularizes
+and pluralizes English words, and transforms strings from CamelCase to
+underscored string.")
+(license license:expat)))
+
+(define-public python2-inflection
+  (package-with-python2 python-inflection))
+
-- 
2.8.4




[PATCH 05/10] gnu: Add python-cleo and python2-cleo.

2016-06-23 Thread
* gnu/packages/python.scm (python-cleo, python2-cleo): New variables.
---
 gnu/packages/python.scm | 28 
 1 file changed, 28 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 1dc5212..d1d127b 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -9391,3 +9391,31 @@ Wikipedia code samples at
 (define-public python2-pylev
   (package-with-python2 python-pylev))
 
+(define-public python-cleo
+  (package
+(name "python-cleo")
+(version "0.4.1")
+(source (origin
+  (method url-fetch)
+  (uri (pypi-uri "cleo" version))
+  (sha256
+   (base32
+"1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"
+(build-system python-build-system)
+(native-inputs
+ `(("python-psutil" ,python-psutil)
+   ("python-pylev" ,python-pylev)
+   ("python-setuptools" ,python-setuptools)
+   ;; For testing
+   ("python-mock" ,python-mock)
+   ("python-pytest" ,python-pytest)))
+(home-page "https://github.com/sdispater/cleo";)
+(synopsis "Command-line arguments library for Python")
+(description
+ "Cleo allows you to create command-line commands with signature in
+docstring and colored output.")
+(license license:expat)))
+
+(define-public python2-cleo
+  (package-with-python2 python-cleo))
+
-- 
2.8.4




[PATCH 10/10] gnu: Add python-fake-factory and python2-fake-factory.

2016-06-23 Thread
* gnu/packages/python.scm (python-fake-factory, python2-fake-factory):
New variables.
---
 gnu/packages/python.scm | 47 +++
 1 file changed, 47 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 50d9ee9..7f3f95d 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -9522,3 +9522,50 @@ parsing UK postcodes.")
 
 (define-public python2-ukpostcodeparser
   (package-with-python2 python-ukpostcodeparser))
+
+(define-public python-fake-factory
+  (package
+  (name "python-fake-factory")
+  (version "0.5.7")
+  (source (origin
+(method url-fetch)
+(uri (pypi-uri "fake-factory" version))
+(sha256
+ (base32
+  "1chmarnrdzn4r017n8qlic0m0bbnhw04s3hkwribjvm3mqpb6pa0"
+  (build-system python-build-system)
+  (arguments
+   '(#:phases
+ (modify-phases %standard-phases
+   (add-before 'check 'disable-failing-test
+ ;; XXX: faker/tests/ne_np/__init__.py, line 40, in test_names
+ ;;  first_name, last_name = name.split()
+ ;; ValueError: too many values to unpack (expected 2)
+ (lambda _
+   (delete-file "faker/tests/ne_np/__init__.py")
+   #t)
+  (native-inputs
+   `(("python-dateutil" ,python-dateutil-2)
+ ("python-setuptools" ,python-setuptools)
+ ("python-six" ,python-six)
+ ;; For testing
+ ("python-email-validator" ,python-email-validator)
+ ("python-mock" ,python-mock)
+ ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
+  (home-page "http://github.com/joke2k/faker";)
+  (synopsis "Python package that generates fake data")
+  (description
+   "Faker is a Python package that generates fake data such as names,
+addresses, and phone numbers.")
+  (license license:expat)
+  (properties `((python2-variant . ,(delay python2-fake-factory))
+
+(define-public python2-fake-factory
+  (let ((base (package-with-python2 (strip-python2-variant
+ python-fake-factory
+(package
+  (inherit base)
+  (native-inputs
+   `(("python2-ipaddress" ,python2-ipaddress)
+ ,@(package-native-inputs base))
+
-- 
2.8.4




[PATCH 08/10] gnu: Add python-email-validator and python2-email-validator.

2016-06-23 Thread
* gnu/packages/python.scm (python-email-validator)
(python2-email-validator): New variables.
---
 gnu/packages/python.scm | 32 
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index ff3cb99..68123cc 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -9468,3 +9468,35 @@ It supports TSIG authenticated messages and EDNS0.")
 (define-public python2-dnspython
   (package-with-python2 python-dnspython))
 
+(define-public python-email-validator
+  (package
+(name "python-email-validator")
+(version "1.0.1")
+(source
+ (origin (method url-fetch)
+ (uri (pypi-uri "email_validator" version))
+ (sha256
+  (base32
+   "0mn8jg5h8ifl8w6a6m0hq8kbk0mzw9vm054qfamkn89b3npz52qw"
+(build-system python-build-system)
+(arguments
+ '(#:phases
+   (modify-phases %standard-phases
+ (add-before 'build 'use-dnspython
+   (lambda _
+ (substitute* "setup.py"
+   (("dnspython3") "dnspython"))
+ #t)
+(native-inputs
+ `(("python-dnspython" ,python-dnspython)
+   ("python-idna" ,python-idna)
+   ("python-setuptools" ,python-setuptools)))
+(home-page "https://github.com/JoshData/python-email-validator";)
+(synopsis "Email address validation library for Python")
+(description
+ "This library validates email address syntax and deliverability.")
+(license cc0)))
+
+(define-public python2-email-validator
+  (package-with-python2 python-email-validator))
+
-- 
2.8.4




[PATCH 06/10] gnu: Add python-lazy-object-proxy and python2-lazy-object-proxy.

2016-06-23 Thread
* gnu/packages/python.scm (python-lazy-object-proxy)
(python2-lazy-object-proxy): New variables.
---
 gnu/packages/python.scm | 23 +++
 1 file changed, 23 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index d1d127b..dc9879a 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -9419,3 +9419,26 @@ docstring and colored output.")
 (define-public python2-cleo
   (package-with-python2 python-cleo))
 
+(define-public python-lazy-object-proxy
+  (package
+(name "python-lazy-object-proxy")
+(version "1.2.2")
+(source (origin
+  (method url-fetch)
+  (uri (pypi-uri "lazy-object-proxy" version))
+  (sha256
+   (base32
+"0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"
+(build-system python-build-system)
+(native-inputs
+ `(("python-setuptools" ,python-setuptools)))
+(home-page "https://github.com/ionelmc/python-lazy-object-proxy";)
+(synopsis "Lazy object proxy for python")
+(description
+ "Lazy object proxy is an object that wraps a callable but defers the call
+until the object is actually required, and caches the result of said call.")
+(license bsd-2)))
+
+(define-public python2-lazy-object-proxy
+  (package-with-python2 python-lazy-object-proxy))
+
-- 
2.8.4




[PATCH 07/10] gnu: Add python-dnspython and python2-dnspython.

2016-06-23 Thread
* gnu/packages/python.scm (python-dnspython, python2-dnspython):
New variables.
---
 gnu/packages/python.scm | 26 ++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index dc9879a..ff3cb99 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -9442,3 +9442,29 @@ until the object is actually required, and caches the 
result of said call.")
 (define-public python2-lazy-object-proxy
   (package-with-python2 python-lazy-object-proxy))
 
+(define-public python-dnspython
+  (package
+  (name "python-dnspython")
+  (version "1.14.0")
+  (source (origin
+(method url-fetch)
+(uri (string-append "http://www.dnspython.org/kits/";
+version "/dnspython-" version ".tar.gz"))
+(sha256
+ (base32
+  "1z472r63gdqsxhsxj3plr5vs478yf4303vrqxxpsccc940g441hl"
+  (build-system python-build-system)
+  (arguments '(#:tests? #f)) ; XXX: requires internet access
+  (native-inputs
+   `(("python-setuptools" ,python-setuptools)))
+  (home-page "http://www.dnspython.org";)
+  (synopsis "DNS toolkit for Python")
+  (description
+   "dnspython is a DNS toolkit for Python.  It supports almost all record
+types.  It can be used for queries, zone transfers, and dynamic updates.
+It supports TSIG authenticated messages and EDNS0.")
+  (license license:expat)))
+
+(define-public python2-dnspython
+  (package-with-python2 python-dnspython))
+
-- 
2.8.4




[PATCH 04/10] gnu: Add python-pylev and python2-pylev.

2016-06-23 Thread
* gnu/packages/python.scm (python-pylev, python2-pylev): New variables.
---
 gnu/packages/python.scm | 23 +++
 1 file changed, 23 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index ced8232..1dc5212 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -9368,3 +9368,26 @@ underscored string.")
 (define-public python2-inflection
   (package-with-python2 python-inflection))
 
+(define-public python-pylev
+  (package
+(name "python-pylev")
+(version "1.3.0")
+(source (origin
+  (method url-fetch)
+  (uri (pypi-uri "pylev" version))
+  (sha256
+   (base32
+"1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"
+(build-system python-build-system)
+(native-inputs
+ `(("python-setuptools" ,python-setuptools)))
+(home-page "http://github.com/toastdriven/pylev";)
+(synopsis "Levenshtein distance implementation in Python")
+(description "Pure Python Levenshtein implementation, based off the
+Wikipedia code samples at
+@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.";)
+(license bsd-3)))
+
+(define-public python2-pylev
+  (package-with-python2 python-pylev))
+
-- 
2.8.4




[PATCH 02/10] gnu: Add python-arrow and python2-arrow.

2016-06-23 Thread
* gnu/packages/python.scm (python-arrow, python2-arrow): New variables.
---
 gnu/packages/python.scm | 28 
 1 file changed, 28 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 0c9bd22..6e30377 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -9316,3 +9316,31 @@ objects, patterned after the Mocha library for Ruby.")
 (define-public python2-chai
   (package-with-python2 python-chai))
 
+(define-public python-arrow
+  (package
+(name "python-arrow")
+(version "0.8.0")
+(source (origin
+  (method url-fetch)
+  (uri (pypi-uri "arrow" version))
+  (sha256
+   (base32
+"1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"
+(build-system python-build-system)
+(native-inputs
+ `(("python-setuptools" ,python-setuptools)
+   ("python-dateutil" ,python-dateutil-2)
+   ;; For testing
+   ("python-chai" ,python-chai)
+   ("python-simplejson" ,python-simplejson)))
+(home-page "https://github.com/crsmithdev/arrow/";)
+(synopsis "Dates and times for Python")
+(description
+ "Arrow is a Python library to creating, manipulating, formatting and
+converting dates, times, and timestamps.  It implements and updates the
+datetime type.")
+(license asl2.0)))
+
+(define-public python2-arrow
+  (package-with-python2 python-arrow))
+
-- 
2.8.4




[PATCH 01/10] gnu: Add python-chai and python2-chai.

2016-06-23 Thread
* gnu/packages/python.scm (python-chai, python2-chai): New variables.
---
 gnu/packages/python.scm | 25 +
 1 file changed, 25 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 8c34ff2..0c9bd22 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -21,6 +21,7 @@
 ;;; Copyright © 2016 Lukas Gradl 
 ;;; Copyright © 2016 Hartmut Goebel 
 ;;; Copyright © 2016 Daniel Pimentel 
+;;; Copyright © 2016 Sou Bunnbu 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -9291,3 +9292,27 @@ It supports both the original 1.0 specification, as well 
as the
 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
 etc.")
 (license asl2.0)))
+
+(define-public python-chai
+  (package
+(name "python-chai")
+(version "1.1.1")
+(source (origin
+  (method url-fetch)
+  (uri (pypi-uri "chai" version))
+  (sha256
+   (base32
+"016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"
+(build-system python-build-system)
+(native-inputs
+ `(("python-setuptools" ,python-setuptools)))
+(home-page "https://github.com/agoragames/chai";)
+(synopsis "Mocking framework for Python")
+(description
+ "Chai provides an api for mocking, stubbing and spying your python
+objects, patterned after the Mocha library for Ruby.")
+(license bsd-3)))
+
+(define-public python2-chai
+  (package-with-python2 python-chai))
+
-- 
2.8.4




[PATCH]: guix: python-build-system: Change pypi-uri to use https://pypi.io.

2016-06-23 Thread
Leo Famulari  writes:

> On Wed, Jun 22, 2016 at 01:35:17PM -0500, Christopher Allan Webber wrote:
>> Note that the old URL scheme no longer seemed to work.
>> 
>> I'm not thrilled by the new URL "scheme".  It seems like more work to
>> update with each version bump.  I'm not sure what the solution is?
>
> Please review Ben's 'pypi-origin' patch :)
>
> http://lists.gnu.org/archive/html/guix-devel/2016-06/msg00724.html
>
>>  (source (origin
>>(method url-fetch)
>> -  (uri (pypi-uri "Flask" version))
>> +  (uri
>> +   (string-append
>> +"https://pypi.python.org/packages/55/8a/";
>> +
>> "78e165d30f0c8bb5d57c429a30ee5749825ed461ad6c959688872643ffb3/"
>> +"Flask-0.11.1.tar.gz"))
>
> In the meantime, I think it's best to keep the hash on its own line, to
> reduce noise in the commit log if we do more updates in this format.

Ah, nixpkgs use pypi.io for it, and it will redirect the old uri
scheme to the new one.

I guess we should do the same?


>From 4605399da016c11314e8d4aef84f7007f82f8d75 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= 
Date: Thu, 23 Jun 2016 19:23:28 +0800
Subject: [PATCH] guix: python-build-system: Change pypi-uri to use
 https://pypi.io.

* guix/build-system/python.scm (pypi-uri): Use https://pypi.io.
* gnu/packages/python.scm (python-twisted)[uri]: Remove https://pypi.io.
---
 gnu/packages/python.scm  | 5 +
 guix/build-system/python.scm | 2 +-
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 4567a91..8c34ff2 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -9097,10 +9097,7 @@ to provide a high-level synchronous API on top of the libev event loop.")
 (version "16.2.0")
 (source (origin
   (method url-fetch)
-  (uri (list (pypi-uri "Twisted" version ".tar.bz2") ; 404
- (string-append
-  "https://pypi.io/packages/source/T/Twisted/";
-  "Twisted-" version ".tar.bz2")))
+  (uri (pypi-uri "Twisted" version ".tar.bz2"))
   (sha256
(base32
 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"
diff --git a/guix/build-system/python.scm b/guix/build-system/python.scm
index c3d6c62..705943e 100644
--- a/guix/build-system/python.scm
+++ b/guix/build-system/python.scm
@@ -48,7 +48,7 @@
   "Return a URI string for the Python package hosted on the Python Package
 Index (PyPI) corresponding to NAME and VERSION.  EXTENSION is the file name
 extension, such as '.tar.gz'."
-  (string-append "https://pypi.python.org/packages/source/";
+  (string-append "https://pypi.io/packages/source/";
  (string-take name 1) "/" name "/"
  name "-" version extension))
 
-- 
2.8.4



Re: [PATCH]: gnu: Add guile-dbi.

2016-06-21 Thread
l...@gnu.org (Ludovic Courtès) writes:

> Hi!
>
> Maurizio Boriani  skribis:
>
>>   I'm the maintainer and first author of guile-dbi
>
> Good to see you here!  :-)
>
Oh, nice!

>> >> Unfortunately, Guile DBI loads its backends using `dlopen', so I
>> >> have to set 'LD_LIBRARY_PATH' to '$guile-dbd-sqlite/lib' for
>> >> loading it.
>>
>> Ludovic> I don’t have any great ideas.
>>
>> Ludovic> If it uses lt_dlopen, then we should recommend setting
>> Ludovic> LTDL_LIBRARY_PATH instead of LD_LIBRARY_PATH, which is a
>> Ludovic> lesser evil.
>>
>> Ludovic> Otherwise, we could also hard-code the file name of, say,
>> Ludovic> guile-dbd-sqlite in guile-dbi, such that there’s always at
>> Ludovic> least one backend available.
>>
>> may be ok for you if I introduce and 'hardcoded' default search path
>> for library lookup in guile-dbi source code and do a new release? 
>
> I don’t think there’s any good default search path that we could hard
> code, though, except arbitrarily choosing one of the backends as I
> suggested above.
>
> Ideas?
I think it will be great to introduce a new search path (eg: GUILE_DBD_PATH)
in addition to LD_LIBRARY_PATH.  Find the absolute so filepath in it
ourself, then pass to dlopen.  


Another idea is changing dbd libraries to scheme modules.  Then dbi will
use the '(dbi dbd mysql)' module, the module may use 'load-extension'.
So we can patch the scheme file of each dbd module.



Re: [PATCH] gnu: perl-uri: Update to 1.71

2016-06-20 Thread
ng0  writes:

> From 06edc3084f643481e59b8bb5a7771a1aab9fb1db Mon Sep 17 00:00:00 2001
> From: ng0 
> Date: Mon, 20 Jun 2016 12:48:11 +
> Subject: [PATCH] gnu: perl-uri: Update to 1.71.
>
> * gnu/packages/web.scm (perl-uri): Update to 1.71.
> ---
>  gnu/packages/web.scm | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
Pushed, thanks!



[PATCH]: gnu: Add guile-dbi.

2016-06-18 Thread
Here are 'guile-dbi' and 'guile-dbd-sqlite3':

>From 8e73c3e1a798b134e341c71c4b1c17d60956e3d5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= 
Date: Fri, 17 Jun 2016 22:44:56 +0800
Subject: [PATCH 1/2] gnu: Add guile-dbi.

* gnu/packages/guile.scm (guile-dbi): New variable.
---
 gnu/packages/guile.scm | 38 ++
 1 file changed, 38 insertions(+)

diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index 6f00edb..284b123 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -958,4 +958,42 @@ provides access to that interface and its types from the Scheme level.")
 (home-page "http://www.nongnu.org/g-wrap/index.html";)
 (license lgpl2.1+)))
 
+(define-public guile-dbi
+  (package
+(name "guile-dbi")
+(version "2.1.6")
+(source (origin
+  (method url-fetch)
+  (uri (string-append
+"http://download.gna.org/guile-dbi/guile-dbi-";
+version ".tar.gz"))
+  (sha256
+   (base32
+"116njrprhgrsv1qm904sp3b02rq01fx639r433d657gyhw3x159n"
+(build-system gnu-build-system)
+(arguments
+ '(#:configure-flags
+   (list (string-append
+  "--with-guile-site-dir=" %output "/share/guile/site/2.0"))
+   #:phases
+   (modify-phases %standard-phases
+ (add-after 'install 'patch-extension-path
+   (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+(dbi.scm (string-append
+  out "/share/guile/site/2.0/dbi/dbi.scm"))
+(ext (string-append out "/lib/libguile-dbi")))
+   (substitute* dbi.scm (("libguile-dbi") ext))
+   #t))
+(propagated-inputs
+ `(("guile" ,guile-2.0)))
+(synopsis "Guile database abstraction layer")
+(home-page "http://home.gna.org/guile-dbi/guile-dbi.html";)
+(description
+ "guile-dbi is a library for Guile that provides a convenient interface to
+SQL databases.  Database programming with guile-dbi is generic in that the same
+programming interface is presented regardless of which database system is used.
+It currently supports MySQL, Postgres and SQLite3.")
+(license gpl2+)))
+
 ;;; guile.scm ends here
-- 
2.8.4

>From 87c3ef658e24035715b48606fb9ef24d55aaddfa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= 
Date: Sat, 18 Jun 2016 15:49:36 +0800
Subject: [PATCH 2/2] gnu: Add guile-dbd-sqlite3.

* gnu/packages/guile.scm (guile-dbd-sqlite3): New variable.
---
 gnu/packages/guile.scm | 27 +++
 1 file changed, 27 insertions(+)

diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index 284b123..29c7ed2 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -996,4 +996,31 @@ programming interface is presented regardless of which database system is used.
 It currently supports MySQL, Postgres and SQLite3.")
 (license gpl2+)))
 
+(define-public guile-dbd-sqlite3
+  (package
+(name "guile-dbd-sqlite3")
+(version "2.1.6")
+(source (origin
+  (method url-fetch)
+  (uri (string-append
+"http://download.gna.org/guile-dbi/guile-dbd-sqlite3-";
+version ".tar.gz"))
+  (sha256
+   (base32
+"0rg71jchxd2y8x496s8zmfmikr5g8zxi8zv2ar3f7a23pph92iw2"
+(build-system gnu-build-system)
+(native-inputs
+ `(("pkg-config" ,pkg-config)))
+(inputs
+ `(("sqlite" ,sqlite)
+   ("zlib" ,(@ (gnu packages compression) zlib
+(propagated-inputs
+ `(("guile-dbi" ,guile-dbi)))
+(synopsis "Guile DBI driver for SQLite")
+(home-page "https://github.com/jkalbhenn/guile-dbd-sqlite3";)
+(description
+ "guile-dbi is a library for Guile that provides a convenient interface to
+SQL databases.  This package implements the interface for SQLite.")
+(license gpl2+)))
+
 ;;; guile.scm ends here
-- 
2.8.4


Unfortunately, Guile DBI loads its backends using `dlopen',
so I have to set 'LD_LIBRARY_PATH' to '$guile-dbd-sqlite/lib'
for loading it.


Re: [PATCH] gnu: bluez: Install 'org.bluez.obex.service' and fix '97-hid2hci.rules'.

2016-06-17 Thread
l...@gnu.org (Ludovic Courtès) writes:

> 宋文武  skribis:
>
>> * gnu/packages/linux.scm (bluez)[arguments]: Add 'post-install' phase.
>
> [...]
>
>> +   (lambda* (#:key inputs outputs #:allow-other-keys)
>> + (let* ((out(assoc-ref outputs "out"))
>> +(servicedir (string-append out 
>> "/share/dbus-1/services"))
>> +(service"obexd/src/org.bluez.obex.service")
>> +(rule   (string-append
>> + out "/lib/udev/rules.d/97-hid2hci.rules")))
>> +   ;; Install the obex dbus service file.
>> +   (substitute* service
>> + (("/bin/false")
>> +  (string-append out "/libexec/bluetooth/obexd")))
>
> Why is it /bin/false by default?
It has a 'SystemdService' field, and supposed to be bus-activatable by
the systemd user unit file.


Pushed, thanks!



[PATCH] gnu: bluez: Install 'org.bluez.obex.service' and fix '97-hid2hci.rules'.

2016-06-17 Thread
* gnu/packages/linux.scm (bluez)[arguments]: Add 'post-install' phase.
---
 gnu/packages/linux.scm | 23 ++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index e71ecbe..16fd5d0 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -2429,7 +2429,28 @@ Bluetooth audio output devices like headphones or 
loudspeakers.")
"--disable-systemd"
;; Install dbus/udev files to the correct location.
(string-append "--with-dbusconfdir=" out "/etc")
-   (string-append "--with-udevdir=" out "/lib/udev")
+   (string-append "--with-udevdir=" out "/lib/udev")))
+   #:phases
+   (modify-phases %standard-phases
+ (add-after 'install 'post-install
+   (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out(assoc-ref outputs "out"))
+(servicedir (string-append out "/share/dbus-1/services"))
+(service"obexd/src/org.bluez.obex.service")
+(rule   (string-append
+ out "/lib/udev/rules.d/97-hid2hci.rules")))
+   ;; Install the obex dbus service file.
+   (substitute* service
+ (("/bin/false")
+  (string-append out "/libexec/bluetooth/obexd")))
+   (install-file service servicedir)
+   ;; Fix paths in the udev rule.
+   (substitute* rule
+ (("hid2hci --method")
+  (string-append out "/lib/udev/hid2hci --method"))
+ (("/sbin/udevadm")
+  (string-append (assoc-ref inputs "eudev") "/bin/udevadm")))
+   #t))
 (native-inputs
  `(("pkg-config" ,pkg-config)
("gettext" ,gnu-gettext)))
-- 
2.6.3




Re: [PATCH] gnu: services: Add bluetooth-service.

2016-06-16 Thread
Alex Griffin  writes:

> Thanks for writing this, I've been wanting bluetooth support for a
> while!
>
> I added this to my system services and added my user to the "lp" group,
> but I still ran into a few issues. GNOME still didn't recognize my
> bluetooth adaptor, so I tried using bluetoothctl from the command line.
> Several actions completed successfully but I still couldn't use my
> bluetooth mouse. Here's what I tried (I omitted all output except the
> error):
I haven't try it in GNOME yet.

>
> $ bluetoothctl
> [bluetooth]# scan on
> [bluetooth]# pair 
> [bluetooth]# trust 
> [bluetooth]# connect 
> Failed to connect: org.bluez.Error.Failed
Yep, I got this too for my headset + usb controller.
But now with bluez-enabled pulseaudio, it working :-)

>
> I also couldn't find any bluez files in /var. Is it possible that it's
> failing because it can't save its state?
Maybe, is there interesting things from /var/log/message?

>
> I can look into it more this weekend if you can't reproduce any issues.
Thanks for the feedback!



[PATCH] gnu: services: Add bluetooth-service.

2016-06-15 Thread
* gnu/services/desktop.scm (bluetooth-shepherd-service)
(bluetooth-service): New Prodecures.
(bluetooth-service-type): New variable.
* doc/guix.text (Desktop Services): Document it.
---
 doc/guix.texi|  7 +++
 gnu/services/desktop.scm | 34 ++
 2 files changed, 41 insertions(+)

diff --git a/doc/guix.texi b/doc/guix.texi
index e163f36..a6fd89a 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -7982,6 +7982,13 @@ location databases.  See
 web site} for more information.
 @end deffn
 
+@deffn {Scheme Procedure} bluetooth-service [#:bluez @var{bluez}]
+Return a service that runs the @command{bluetoothd} daemon, which manages
+all the Bluetooth devices and provides a number of D-Bus interfaces.
+
+Users need to be in the @code{lp} group to access the D-Bus service.
+@end deffn
+
 @node Database Services
 @subsubsection Database Services
 
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index f427d35..80ac0ac 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2014, 2015, 2016 Ludovic Courtès 
 ;;; Copyright © 2015 Andy Wingo 
 ;;; Copyright © 2015 Mark H Weaver 
+;;; Copyright © 2016 Sou Bunnbu 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -37,6 +38,7 @@
   #:use-module (gnu packages polkit)
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages suckless)
+  #:use-module (gnu packages linux)
   #:use-module (guix records)
   #:use-module (guix packages)
   #:use-module (guix store)
@@ -49,6 +51,7 @@
 geoclue-application
 %standard-geoclue-applications
 geoclue-service
+bluetooth-service
 polkit-service
 elogind-configuration
 elogind-service
@@ -346,6 +349,37 @@ site} for more information."
 
 
 ;;;
+;;; Bluetooth.
+;;;
+
+(define (bluetooth-shepherd-service bluez)
+  "Return a shepherd service for @command{bluetoothd}."
+  (shepherd-service
+   (provision '(bluetooth))
+   (requirement '(dbus-system udev))
+   (documentation "Run the bluetoothd daemon.")
+   (start #~(make-forkexec-constructor
+ (string-append #$bluez "/libexec/bluetooth/bluetoothd")))
+   (stop #~(make-kill-destructor
+
+(define bluetooth-service-type
+  (service-type
+   (name 'bluetooth)
+   (extensions
+(list (service-extension dbus-root-service-type list)
+  (service-extension shepherd-root-service-type
+ (compose list bluetooth-shepherd-service))
+
+(define* (bluetooth-service #:key (bluez bluez))
+  "Return a service that runs the @command{bluetoothd} daemon, which manages
+all the Bluetooth devices and provides a number of D-Bus interfaces.
+
+Users need to be in the @code{lp} group to access the D-Bus service.
+"
+  (service bluetooth-service-type bluez))
+
+
+;;;
 ;;; Polkit privilege management service.
 ;;;
 
-- 
2.6.3




Re: [PATCH] gnu: services: Add mysql-service.

2016-06-15 Thread
l...@gnu.org (Ludovic Courtès) writes:

> Hello!
>
> 宋文武  skribis:
>
>> * gnu/services/database.scm (): New record type.
>> (%mysql-accounts, mysql-service-type): New variables.
>> (mysql-configuration-file, %mysql-activation, mysql-shepherd-services)
>> (mysql-services): New procedures.
>> * doc/guix.texi (Database Services): Document it.
>
> [...]
>
>> +@deffn {Scheme Procedure} mysql-service [#:config (mysql-configuration)]
>> +Return a service that runs @command{mysqld}, the MySQL database server.
>
> s/MySQL/MySQL or MariaDB/
OK.

>
>> +@deftp {Data Type} mysql-configuration
>> +Data type representing the configuration of @var{mysql-service}.
>> +
>> +@table @asis
>> +@item @code{mysql} (default: @var{mariadb})
>> +Package object of the MySQL database server, can be either @var{mariadb}
>> +or @var{mysql}.
>> +@end table
>> +@end deftp
>
> Do you have plans to extend this type eventually?
Not yet, should I use a simple keywoard argument instead?

>
>> +(define (%mysql-activation config)
>
> Please add a docstring.  IIUC it initializes the ‘mysql’ database for
> user ‘mysql’, and that database contains configuration info, right?
Yes, it does what ‘mysql_install_db’ and ‘mysql_secure_installation’
do (which doesn’t work directly now due to missing coreutils, etc.
in PATH).

And now I realize that this doesn't work for mysql,
I need to rename this to ‘%mariadb-activation’ and write
another ‘%mysql-activation’.

>
> Otherwise LGTM!
>
> If you want, it would be awesome if you could come up with a (gnu tests
> databases) module that would run a GuixSD with the mysql service, and
> then spawn a mysql client to make sure the basics work as expected.
>
Sure, I’ll look that later.



[PATCH] gnu: services: Add mysql-service.

2016-06-14 Thread
* gnu/services/database.scm (): New record type.
(%mysql-accounts, mysql-service-type): New variables.
(mysql-configuration-file, %mysql-activation, mysql-shepherd-services)
(mysql-services): New procedures.
* doc/guix.texi (Database Services): Document it.
---
 doc/guix.texi  |  19 +++-
 gnu/services/databases.scm | 107 -
 2 files changed, 124 insertions(+), 2 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 46d9e77..e163f36 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -7985,7 +7985,7 @@ web site} for more information.
 @node Database Services
 @subsubsection Database Services
 
-The @code{(gnu services databases)} module provides the following service.
+The @code{(gnu services databases)} module provides the following services.
 
 @deffn {Scheme Procedure} postgresql-service [#:postgresql postgresql] @
[#:config-file] [#:data-directory ``/var/lib/postgresql/data'']
@@ -7997,6 +7997,23 @@ The PostgreSQL daemon loads its runtime configuration 
from
 @var{data-directory}.
 @end deffn
 
+@deffn {Scheme Procedure} mysql-service [#:config (mysql-configuration)]
+Return a service that runs @command{mysqld}, the MySQL database server.
+
+The optional @var{config} argument specifies the configuration for
+@command{mysqld}, which should be a @code{} object.
+@end deffn
+
+@deftp {Data Type} mysql-configuration
+Data type representing the configuration of @var{mysql-service}.
+
+@table @asis
+@item @code{mysql} (default: @var{mariadb})
+Package object of the MySQL database server, can be either @var{mariadb}
+or @var{mysql}.
+@end table
+@end deftp
+
 @node Mail Services
 @subsubsection Mail Services
 
diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm
index 690375e..fb063da 100644
--- a/gnu/services/databases.scm
+++ b/gnu/services/databases.scm
@@ -27,7 +27,9 @@
   #:use-module (guix records)
   #:use-module (guix gexp)
   #:use-module (ice-9 match)
-  #:export (postgresql-service))
+  #:export (postgresql-service
+mysql-service
+mysql-configuration))
 
 ;;; Commentary:
 ;;;
@@ -143,3 +145,106 @@ and stores the database cluster in @var{data-directory}."
 (postgresql postgresql)
 (config-file config-file)
 (data-directory data-directory
+
+
+;;;
+;;; MySQL.
+;;;
+
+(define-record-type* 
+  mysql-configuration make-mysql-configuration
+  mysql-configuration?
+  (mysql mysql-configuration-mysql (default mariadb)))
+
+(define %mysql-accounts
+  (list (user-group
+ (name "mysql")
+ (system? #t))
+(user-account
+ (name "mysql")
+ (group "mysql")
+ (system? #t)
+ (home-directory "/var/empty")
+ (shell #~(string-append #$shadow "/sbin/nologin")
+
+(define mysql-configuration-file
+  (match-lambda
+(($  mysql)
+ (plain-file "my.cnf" "[mysqld]
+datadir=/var/lib/mysql
+socket=/run/mysqld/mysqld.sock
+"
+
+(define (%mysql-activation config)
+  (let ((mysql  (mysql-configuration-mysql config))
+(my.cnf (mysql-configuration-file config)))
+#~(begin
+(use-modules (ice-9 popen)
+ (guix build utils))
+(let* ((mysqld  (string-append #$mysql "/bin/mysqld"))
+   (user(getpwnam "mysql"))
+   (uid (passwd:uid user))
+   (gid (passwd:gid user))
+   (datadir "/var/lib/mysql")
+   (rundir  "/run/mysqld"))
+  (mkdir-p datadir)
+  (chown datadir uid gid)
+  (mkdir-p rundir)
+  (chown rundir uid gid)
+  ;; Initialize the database when it doesn't exist.
+  (when (not (file-exists? (string-append datadir "/mysql")))
+(let ((p (open-pipe* OPEN_WRITE mysqld
+ (string-append "--defaults-file=" #$my.cnf)
+ "--bootstrap"
+ "--user=mysql")))
+  ;; Create the system database, according to 'mysql_install_db'.
+  (display "create database mysql;\n" p)
+  (display "use mysql;\n" p)
+  (for-each
+  (lambda (sql)
+(call-with-input-file
+(string-append #$mysql "/share/mysql/" sql)
+  (lambda (in) (dump-port in p
+  '("mysql_system_tables.sql"
+"mysql_performance_tables.sql"
+"mysql_system_tables_data.sql"
+"fill_help_tables.sql"))
+  ;; Remove the anonymous user and disable root access from
+  ;; remote machines, according to 'mysql_secure_installation'.
+  (display "
+DELETE FROM user WHERE User='';
+DELETE FROM user WHERE User='root' AND
+  Host NOT IN  ('localhost', '127.0.0.1', '::1');
+FLUSH PRIVILEGES;
+" p)
+  (close-pipe p)))
+
+(define (mysql-shepherd-service config)
+  (list (shepherd-service
+ (pr

Re: [PATCH] Fix gnome-autogen.sh on gnome-common

2016-06-12 Thread
"Jovany Leandro G.C"  writes:

> hi,
>
> This patch fix /bin/sh for gnome-autogen.sh
>
>
Hi, this is unnecessary, the '/bin/sh' shebang will be patched by
the 'patch-source-shebangs' phase of gnu-build-system.



Re: GNUNet packages

2016-06-12 Thread
ng0  writes:

> I believe the thread was broken in my mailbox because I used gmane
> for a while.
>
> Here is one question regarding the package:
> On Gentoo we created a user and group dedicated to gnunet
> (sample, unfinished post install notes from gentoo below),
> gnunet would be started under this user, and users who
> would want to use gnunet applications join its group.
>
> As the /gnu/store/ is unchangeable and I plan to make
> the gnunet config configurable by a service anyhow, this
> leaves (maybe already solved) questions open for me:
>
> 1. Is such behavior (a gnunet group to join) desired for Guix?
Yes, and for example, the wicd-service requires the 'netdev' group.

> 2. Does the default kernel ship with an enabled /dev/net/tun?
Yes, the module is builtin (CONFIG_TUN=y).



Re: [PATCH] gnu: fish: Update to 2.3.0.

2016-06-10 Thread

Pushed, thanks!



Re: [PATCH 1/4] gnu: Add librdkafka.

2016-06-10 Thread

Pushed, thanks for the review!



Re: gnome-tweak-tool tweaks

2016-06-10 Thread
l...@gnu.org (Ludovic Courtès) writes:

> [...]
>
>> I/O error : Permission denied
>> I/O error : Permission denied
>> Failed to write XML file; For permission problems, try rerunning as root
>
> I found that string comes from ‘shared-mime-info’, which is itself used
> by the ‘xdg-mime-database’ hook in (guix profiles) (a hook that runs
> when the profile is created to update the MIME database):
>
> static gboolean save_xml_file(xmlDocPtr doc, const gchar *filename, GError 
> **error)
> {
> #if LIBXML_VERSION > 20400
>   if (xmlSaveFormatFileEnc(filename, doc, "utf-8", 1) < 0)
>   {
>   g_set_error(error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
>   "Failed to write XML file; For permission problems, 
> try rerunning as root");
>   return FALSE;
>   }
> #else
>
> 宋文武: any idea what the problem might be?  Perhaps
> ‘update-mime-database’ is trying to write to /gnu/store/…-something?
Yep, it happends when '$out/share/mime/application' is not writable.
The xml files under 'application' are going to be generated by
update-mime-database, and the shared-mime-info package has it
pre-generated, so after union "share/mime", an un-writable 'application'
directory point to the store will cause the problem.

Commit 359f06aa fix this by union the "share/mime/packages" directory.

>
> Also, it’s a problem that ‘update-mime-database’ returns 0 here, as
> seems to be the case.
It returns 256 here for the problem, but the derivation still built and
profile got updated, I have no idea about this :-

Does a failing hook (returns #f) supposed to top the profile update?



Re: [PATCH] Hack font.

2016-06-07 Thread
Dmitry Nikolaev  writes:

> I've added Hack font family to fonts.scm. Patch in the attachment.
>
Pushed, thanks!



Re: [PATCH 1/3] gnu: Add arc-theme.

2016-06-07 Thread
David Thompson  writes:

> * gnu/packages/gnome.scm (arc-theme): New variable.

Cool, thanks!

> +(inputs
> + `(("gtk+" ,gtk+)))
> +(synopsis "A flat GTK theme with transparent elements")
Drop the leading 'A'.

> +(description "Arc is a flat theme with transparent elements for GTK 3, 
> GTK
> +2 and Gnome-Shell which supports GTK 3 and GTK 2 based desktop environments
> +like Gnome, Unity, Budgie, Pantheon, XFCE, Mate, etc.")

I think ".. for GTK+, with additional theme for window manager of GNOME,
Unity, ..." is better.



[PATCH 4/4] gnu: Add python-pykafka and python2-pykafka.

2016-06-07 Thread
* gnu/packages/python.scm (python-pykafka, python2-pykafka): New variables.
---
 gnu/packages/python.scm | 30 ++
 1 file changed, 30 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index ca97b4e..5a2347e 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -9067,3 +9067,33 @@ hassle-free experience that is less prone to errors.")
 
 (define-public python2-kazoo
   (package-with-python2 python-kazoo))
+
+(define-public python-pykafka
+  (package
+(name "python-pykafka")
+(version "2.4.0")
+(source (origin
+  (method url-fetch)
+  (uri (pypi-uri "pykafka" version))
+  (sha256
+   (base32
+"1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"
+(build-system python-build-system)
+(arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
+(native-inputs
+ `(("python-gevent" ,python-gevent)
+   ("python-kazoo" ,python-kazoo)
+   ("python-setuptools" ,python-setuptools)
+   ("python-tabulate" ,python-tabulate)))
+(inputs
+ `(("librdkafka" ,librdkafka)))
+(home-page "https://pykafka.readthedocs.io/";)
+(synopsis "Apache Kafka client for Python")
+(description
+ "PyKafka is an Apache Kafka client for Python.  It includes Python
+implementations of Kafka producers and consumers, which are optionally backed
+by a C extension built on librdkafka.")
+(license asl2.0)))
+
+(define-public python2-pykafka
+  (package-with-python2 python-pykafka))
-- 
2.6.3




[PATCH 3/4] gnu: Add python-kazoo and python2-kazoo.

2016-06-07 Thread
* gnu/packages/python.scm (python-kazoo, python2-kazoo): New variables.
---
 gnu/packages/python.scm | 26 ++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 1a83933..ca97b4e 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -9041,3 +9041,29 @@ data in Python.")
 
 (define-public python2-tabulate
   (package-with-python2 python-tabulate))
+
+(define-public python-kazoo
+  (package
+(name "python-kazoo")
+(version "2.2.1")
+(source
+ (origin
+   (method url-fetch)
+   (uri (pypi-uri "kazoo" version))
+   (sha256
+(base32
+ "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"
+(build-system python-build-system)
+(arguments '(#:tests? #f)) ; XXX: needs zookeeper
+(native-inputs
+ `(("python-setuptools" ,python-setuptools)
+   ("python-six" ,python-six)))
+(home-page "https://kazoo.readthedocs.org";)
+(synopsis "Higher Level Zookeeper Client")
+(description
+ "Kazoo is a Python library designed to make working with Zookeeper a more
+hassle-free experience that is less prone to errors.")
+(license asl2.0)))
+
+(define-public python2-kazoo
+  (package-with-python2 python-kazoo))
-- 
2.6.3




[PATCH 2/4] gnu: Add python-tabulate and python2-tabulate.

2016-06-07 Thread
* gnu/packages/python.scm (python-tabulate, python2-tabulate): New variables.
---
 gnu/packages/python.scm | 32 
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index dfbf2cc..1a83933 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -9009,3 +9009,35 @@ focus on event-based network programming and 
multiprotocol integration.")
 
 (define-public python2-twisted
   (package-with-python2 python-twisted))
+
+(define-public python-tabulate
+  (package
+(name "python-tabulate")
+(version "0.7.5")
+(source (origin
+ (method url-fetch)
+ (uri (pypi-uri "tabulate" version))
+ (sha256
+  (base32
+   "03l1r7ddd1a0j2snv1yd0hlnghjad3fg1an1jr8936ksv75slwch"))
+ ;; Fix tests
+ (modules '((guix build utils)))
+ (snippet '(substitute* '("test/test_cli.py"
+  "test/test_input.py"
+  "test/test_output.py"
+  "test/test_regression.py")
+ (("from common") "from nose.tools")
+(build-system python-build-system)
+(native-inputs
+ `(("python-setuptools" ,python-setuptools)
+   ;; For testing
+   ("python-nose" ,python-nose)))
+(home-page "https://bitbucket.org/astanin/python-tabulate";)
+(synopsis "Pretty-print tabular data")
+(description
+ "Tabulate is a library and command-line utility to pretty-print tabular
+data in Python.")
+(license license:expat)))
+
+(define-public python2-tabulate
+  (package-with-python2 python-tabulate))
-- 
2.6.3




[PATCH 1/4] gnu: Add librdkafka.

2016-06-07 Thread
* gnu/packages/networking.scm (librdkafka): New variable.
---
 gnu/packages/networking.scm | 37 +
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index ba8023a..d0062a6 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -149,6 +149,43 @@ filtering (subscriptions), seamless access to multiple 
transport protocols and
 more.")
 (license license:lgpl3+)))
 
+(define-public librdkafka
+  (package
+(name "librdkafka")
+(version "0.9.1")
+(source (origin
+  (method url-fetch)
+  (uri (string-append
+"https://github.com/edenhill/librdkafka/archive/";
+version ".tar.gz"))
+  (file-name (string-append name "-" version ".tar.gz"))
+  (sha256
+   (base32
+"10ldx7g7ymmg17snzx78vy4n8ma1rjx0agzi34g15j2fk867xmas"
+(build-system gnu-build-system)
+(arguments
+ '(#:phases
+   (modify-phases %standard-phases
+ (replace 'configure
+   ;; its custom configure script doesn't understand 'CONFIG_SHELL'.
+   (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+   ;; librdkafka++.so lacks RUNPATH for librdkafka.so
+   (setenv "LDFLAGS"
+   (string-append "-Wl,-rpath=" out "/lib"))
+   (zero? (system* "./configure"
+   (string-append "--prefix=" out)
+(native-inputs
+ `(("python" ,python-wrapper)))
+(propagated-inputs
+ `(("zlib" ,zlib))) ; in the Libs.private field of rdkafka.pc
+(home-page "https://github.com/edenhill/librdkafka";)
+(synopsis "Apache Kafka C/C++ client library")
+(description
+ "librdkafka is a C library implementation of the Apache Kafka protocol,
+containing both Producer and Consumer support.")
+(license license:bsd-2)))
+
 (define-public libndp
   (package
 (name "libndp")
-- 
2.6.3




Re: [PATCH] gnu: services: Add dicod-service.

2016-06-04 Thread
l...@gnu.org (Ludovic Courtès) writes:

> 宋文武  skribis:
>
>> * gnu/services/dict.scm: New file.
>> * gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
>> * doc/guix.texi (Various Services): Document it.
>
> Nice!  I’ve been wanting it for some time.  :-)
>
>> +@deffn {Scheme Procedure} dicod-service [#:config (dicod-configuration)]
>> +Return a service that runs the dicod daemon, an implementation of
>
> @command{dicod}
>
>> +DICT server.
>   ^
> Add @pxref{Dicod,,, dico, GNU Dico Manual}
>
>> The optional CONFIG argument specifies the configuration
>
> @var{config}
>
>> +for dicod, which should be a  object, by default
>
> @command{dicod}, @code{}
>
>> +it serving the GNU Collaborative International Dictonary of English.
>
> s/it serving/it serves/.
>
> It would be nice to document ‘dicod-configuration’ with @deftp, as done
> in some other places.
>
> Also, maybe we should mention or cross-reference how to configure dico
> to connect to localhost, since the default is to connect elsewhere;
> WDYT?
>
>> + (($  name module options)
>> +  `("
>> +load-module " ,module ";
>> +database {
>> +   name \"" ,name "\";
>> +   handler \"" ,module
>> +   ;; append the options list using space as separator before each element.
>> +   ,@(fold-right (cut cons* " " <> <>) '() options) "\";
>> +}\n")))
>> +   databases
>
> Maybe (string-join (fold-right cons '() options)) instead.
>
>> +(define* (dicod-service #:key (config (dicod-configuration)))
>> +  "Return a service that runs the dicod daemon, an implementation of
>> +DICT server."
>
> Use the guix.texi doc as a docstring.

All done, thanks for the review and guide!



[PATCH] gnu: services: Add dicod-service.

2016-06-03 Thread
* gnu/services/dict.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* doc/guix.texi (Various Services): Document it.
---
 doc/guix.texi |   8 
 gnu/local.mk  |   1 +
 gnu/services/dict.scm | 126 ++
 3 files changed, 135 insertions(+)
 create mode 100644 gnu/services/dict.scm

diff --git a/doc/guix.texi b/doc/guix.texi
index c8c7555..76579be 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -9388,6 +9388,14 @@ Finally, @var{extra-options} is a list of additional 
command-line options
 passed to @command{lircd}.
 @end deffn
 
+The @code{(gnu services dict)} module provides the following service:
+
+@deffn {Scheme Procedure} dicod-service [#:config (dicod-configuration)]
+Return a service that runs the dicod daemon, an implementation of
+DICT server.  The optional CONFIG argument specifies the configuration
+for dicod, which should be a  object, by default
+it serving the GNU Collaborative International Dictonary of English.
+@end deffn
 
 @node Setuid Programs
 @subsection Setuid Programs
diff --git a/gnu/local.mk b/gnu/local.mk
index 59aaccc..ae82149 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -373,6 +373,7 @@ GNU_SYSTEM_MODULES =\
   %D%/services/databases.scm   \
   %D%/services/dbus.scm\
   %D%/services/desktop.scm \
+  %D%/services/dict.scm\
   %D%/services/lirc.scm\
   %D%/services/mail.scm\
   %D%/services/networking.scm  \
diff --git a/gnu/services/dict.scm b/gnu/services/dict.scm
new file mode 100644
index 000..eaba6cc
--- /dev/null
+++ b/gnu/services/dict.scm
@@ -0,0 +1,126 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 Sou Bunnbu 
+;;;
+;;; 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 .
+;;;
+;;; Some of the help text was taken from the default dovecot.conf files.
+
+(define-module (gnu services dict)
+  #:use-module (guix gexp)
+  #:use-module (guix records)
+  #:use-module (gnu services)
+  #:use-module (gnu services shepherd)
+  #:use-module (gnu system shadow)
+  #:use-module ((gnu packages admin) #:select (shadow))
+  #:use-module (gnu packages dico)
+  #:use-module (gnu packages dictionaries)
+  #:use-module (srfi srfi-1)
+  #:use-module (srfi srfi-26)
+  #:use-module (ice-9 match)
+  #:export (dicod-service
+dicod-configuration
+dicod-database
+%dicod-database:gcide))
+
+
+;;;
+;;; GNU Dico.
+;;;
+
+(define-record-type* 
+  dicod-configuration make-dicod-configuration
+  dicod-configuration?
+  (dicodicod-configuration-dico   (default dico))
+  (databases   dicod-configuration-databases
+   ;; list of 
+   (default (list %dicod-database:gcide
+
+(define-record-type* 
+  dicod-database make-dicod-database
+  dicod-database?
+  (namedicod-database-name)
+  (module  dicod-database-module)
+  (options dicod-database-options(default '(
+
+(define %dicod-database:gcide
+  (dicod-database
+   (name "gcide")
+   (module "gcide")
+   (options (list #~(string-append "dbdir=" #$gcide "/share/gcide")
+  "idxdir=/var/run/dicod"
+
+(define %dicod-accounts
+  (list (user-group
+ (name "dicod")
+ (system? #t))
+(user-account
+ (name "dicod")
+ (group "dicod")
+ (system? #t)
+ (home-directory "/var/empty")
+ (shell #~(string-append #$shadow "/sbin/nologin")
+
+(define (dicod-configuration-file config)
+  (define dicod-configuration->text
+(match-lambda
+  (($  dico databases)
+   (append-map (match-lambda
+ (($  name module options)
+  `("
+load-module " ,module ";
+database {
+   name \"" ,name "\";
+   handler \"" ,module
+   ;; append the options list using space as separator before each element.
+   ,@(fold-right (cut cons* " " <> <>) '() options) "\";
+}\n")))
+   databases
+  (apply mixed-text-file "dicod.conf" (dicod-configuration->text config)))
+
+(define %dicod-activation
+  #~(begin
+  (use-modules (guix build utils))
+  (let ((user   (getpwnam "dicod"))
+   

Re: Hack font family for GuixSD.

2016-06-02 Thread
Dmitry Nikolaev  writes:

> Hi. I wrote expression for adding Hack font family to GuixSD. You can
> see it my guix package repository:
>
> https://github.com/8p8c/my-guix/blob/master/packages/font-hack.scm
>
> Here is patch for fonts.scm:

The indention is missing, you can get the patch from git by:

git format-patch -1 

And attach it in the mail.
>
> --- fonts.scm 2016-06-02 08:01:49.387086500 +0300
> +++ fonts.new.scm 2016-06-02 08:05:30.005373478 +0300
> @@ -9,6 +9,7 @@
> ;;; Copyright © 2016 Nils Gillmann 
> ;;; Copyright © 2016 Jookia <166...@gmail.com>
> ;;; Copyright © 2016 Eric Bavier 
> +;;; Copyright © 2016 Dmitry Nikolaev 
> ;;;
> ;;; This file is part of GNU Guix.
> ;;;
> @@ -921,3 +922,54 @@
> (home-page "https://fontlibrary.org/en/font/fantasque-sans-mono";)
> (license license:silofl1.1)))
>
> +(define-public font-hack
> + (package
> + (name "font-hack")
> + (version "2.020")
> + (source (origin
> + (method url-fetch)
> + (uri (string-append
> + "https://github.com/chrissimpkins/Hack/releases/download/v";
> + version
> + "/Hack-v"
> + "2_020" ;; FIXME
> + "-ttf.zip"))
> + (sha256
> + (base32
> + "16kkmc3psckw1b7k07ccn1gi5ymhlg9djh43nqjzg065g6p6d184"
> + (build-system trivial-build-system)
> + (arguments
> + `(#:modules ((guix build utils))
> + #:builder (begin
> + (use-modules (guix build utils)
> + (srfi srfi-26))
> +
> + (let ((PATH (string-append (assoc-ref %build-inputs
> + "unzip")
> + "/bin"))
> + (font-dir (string-append %output
> + "/share/fonts/truetype"))
> + (doc-dir (string-append %output "/share/doc/"
> + ,name "-" ,version)))
> + (setenv "PATH" PATH)
> + (system* "unzip" (assoc-ref %build-inputs "source"))
> +
> + (mkdir-p font-dir)
> + (mkdir-p doc-dir)
> + (for-each (lambda (ttf)
> + (copy-file ttf
> + (string-append font-dir "/" ttf)))
> + (find-files "." "\\.ttf$"))
> + (for-each (lambda (doc)
> + (copy-file doc
> + (string-append doc-dir "/" doc)))
> + (find-files "." "\\.txt$"))
> + (native-inputs `(("source" ,source)
> + ("unzip" ,unzip)))
> + (home-page "https://sourcefoundry.org/hack/";)
> + (synopsis "A typeface designed for sourcecode.")
Don't include the leading 'A'.

> + (description "The Hack Font is designed for the screen.")
Could expand it a bit, how about:

"Hack is designed to be a workhorse typeface for code, it expands
upon the Bitstream Vera & DejaVu projects, provides 1561 glyphs
including powerline support."

> + (license
> + (license:non-copyleft ;;FIXME
> + "https://github.com/chrissimpkins/Hack/blob/master/LICENSE.md";
> + "Hack Open Font License v2.0"
>
> But there are two FIXME issues. First with URI string generation.
> Sorry, I haven't mastered Scheme yet:
>
> (uri (string-append
> "https://github.com/chrissimpkins/Hack/releases/download/v";
> version
> "/Hack-v"
> "2_020" ;; FIXME. This should be generated from version "2.020"
> "-ttf.zip"))
You can use:  `(string-replace-substring version "." "_")', which
is the (guix utils) module.  (I find the behavior of `string-replace'
builtin in Guile a bit suprised.. while the string-replace procudure
in Racket actually is our string-replace-substring as I except.)

>
> And second with licence. I've marked it as non-copyleft, but I'm not
> sure about it:
>
> (license
> (license:non-copyleft ;;FIXME
> "https://github.com/chrissimpkins/Hack/blob/master/LICENSE.md";
> "Hack Open Font License v2.0"))
This license looks the same as Bitstream Vera font, which
use "license:x11-style".


Could you send a update?  Thanks!



Re: [PATCH] gnu: add vte-ng

2016-06-01 Thread
Mckinley Olsen  writes:

> Hey Alex, I'm hoping this patch is up to snuff.
> I've changed the package definition to depend on the latest tagged
> source and provided a synopsis & description specific to vte-ng.
> Let me know if you have any other concerns that need to be addressed.
> Thanks!
>
> From 5fa75edd3e03839dc7fc81134a9bd37072409f88 Mon Sep 17 00:00:00 2001
> From: McKinley Olsen 
> Date: Tue, 31 May 2016 14:28:44 -0600
> Subject: [PATCH] * gnu/packages/gnome.scm (vte-ng): New variable.
First line should be: "gnu: Add vte-ng."

>
> [...]
> +  name
> +  "/archive/"
> +  version
> +  ".tar.gz"))
  put these into one line.
> +  (file-name (string-append name "-" version ".tar.gz"))
> +  (sha256
> +   (base32
> +#:phases (modify-phases %standard-phases
> +  (add-after 'unpack 'bootstrap
> +(lambda _
> +  (setenv "NOCONFIGURE" "true")
> +  (zero? (system* "sh" "autogen.sh")))
> +  (synopsis "Enhanced VTE terminal widget")
> +  (description "VTE, with additional functions exposed for keyboard text
> +selection and URL hints.")))
I expand "VTE" a bit.


Pushed, thanks!



[PATCH] gnu: gprolog: Don't install files into "$out/gprolog-1.4.4".

2016-05-26 Thread
* gnu/packages/gprolog.scm (gprolog)[arguments]: Pass '--with-install-dir'
to #:configure-flags.
---
 gnu/packages/gprolog.scm | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gprolog.scm b/gnu/packages/gprolog.scm
index 1d9b994..87c833e 100644
--- a/gnu/packages/gprolog.scm
+++ b/gnu/packages/gprolog.scm
@@ -38,7 +38,10 @@
 "13miyas47bmijmadm68cbvb21n4s156gjafz7kfx9brk9djfkh0q"
 (build-system gnu-build-system)
 (arguments
- `(#:phases (alist-cons-before
+ `(#:configure-flags
+   (list (string-append
+  "--with-install-dir=" %output "/share/gprolog"))
+   #:phases (alist-cons-before
  'configure 'change-dir-n-fix-shells
  (lambda _
(chdir "src")
-- 
2.6.3




Re: [PATCH] gnu: Add wiredtiger.

2016-05-26 Thread
l...@gnu.org (Ludovic Courtès) writes:

> 宋文武  skribis:
>
>> * gnu/packages/database.scm (wiredtiger): New variable.
>
> [...]
>
>> +(arguments
>> + '(#:tests? #f ; XXX: timeout
>
> Could you elaborate a bit?  :-)
OK, and it turns out that skip 1 test is enough.

>
>> +(license gpl3) ; or GPL-2
>
> v3-only or v2-only, right?
>
Yes, sources say “See the file LICENSE” and there is no ‘later’
in the LICENSE file.

>> +;; WiredTiger requires a 64-bit build.
>> +(supported-systems '("x86_64-linux" "mips64el-linux"
>
> If there’s a file or something that explains this, could you mention it
> in the comment?
Yep, ‘configure.ac’ check it.


Updated:

>From 04ef953891f507a9f7a9398d6f35c474248b20a0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= 
Date: Sun, 15 May 2016 10:20:05 +0800
Subject: [PATCH] gnu: Add wiredtiger.

* gnu/packages/database.scm (wiredtiger): New variable.
---
 gnu/packages/databases.scm | 40 +++-
 1 file changed, 39 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index bd535a3..7e0188b 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -55,7 +55,7 @@
   #:use-module (gnu packages bison)
   #:use-module (gnu packages jemalloc)
   #:use-module ((guix licenses)
-#:select (gpl2 gpl3+ lgpl2.1+ lgpl3+ x11-style non-copyleft
+#:select (gpl2 gpl3 gpl3+ lgpl2.1+ lgpl3+ x11-style non-copyleft
   bsd-2 bsd-3 public-domain))
   #:use-module (guix packages)
   #:use-module (guix download)
@@ -914,3 +914,41 @@ sets, bitmaps and hyperloglogs.")
 and B+ Tree data storage models.  It is a fast key-value lightweight
 database and supports many programming languages.  It is a NoSQL database.")
 (license gpl3+)))
+
+(define-public wiredtiger
+  (package
+(name "wiredtiger")
+(version "2.8.0")
+(source (origin
+  (method url-fetch)
+  (uri (string-append
+"http://source.wiredtiger.com/releases/wiredtiger-";
+version ".tar.bz2"))
+  (sha256
+   (base32
+"1qh7y5paisdxq19jgg81ld7i32lz920n5k30hdpxnr8ll9c4hgjr"
+(build-system gnu-build-system)
+(arguments
+ '(#:configure-flags '("--enable-lz4" "--enable-zlib")
+   #:phases
+   (modify-phases %standard-phases
+ (add-before 'check 'disable-test/fops
+   (lambda _
+ ;; XXX: timed out after 3600 seconds of silence
+ (substitute* "Makefile"
+   (("test/fops") ""))
+ #t)
+(inputs
+ `(("lz4" ,lz4)
+   ("zlib" ,zlib)))
+(home-page "http://source.wiredtiger.com/";)
+(synopsis "NoSQL data engine")
+(description
+ "WiredTiger is an extensible platform for data management.  It supports
+row-oriented storage (where all columns of a row are stored together),
+column-oriented storage (where columns are stored in groups, allowing for
+more efficient access and storage of column subsets) and log-structured merge
+trees (LSM), for sustained throughput under random insert workloads.")
+(license gpl3) ; or GPL-2
+;; configure.ac: WiredTiger requires a 64-bit build.
+(supported-systems '("x86_64-linux" "mips64el-linux"
-- 
2.6.3



Thanks for the review!


[PATCH] gnu: wxmaxima: Wrap with GSETTINGS_SCHEMA_DIR and XDG_DATA_DIRS

2016-05-16 Thread

Hi, this is a patch for wxmaxima to hardcode gschemas and icons:

>From 67256140dc416c927795db7b01f33a7d3b47a07a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= 
Date: Sun, 15 May 2016 15:26:46 +0800
Subject: [PATCH] gnu: wxmaxima: Wrap with GSETTINGS_SCHEMA_DIR and
 XDG_DATA_DIRS.

Fixes  and .

* gnu/packages/math.scm (wxmaxima)[arguments]: Wrap with
GSETTINGS_SCHEMA_DIR and XDG_DATA_DIRS.
---
 gnu/packages/maths.scm | 19 +--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 73104a3..3da6e35 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -1600,7 +1600,11 @@ point numbers.")
 (build-system gnu-build-system)
 (inputs
  `(("wxwidgets" ,wxwidgets)
-   ("maxima" ,maxima)))
+   ("maxima" ,maxima)
+   ;; Runtime support.
+   ("adwaita-icon-theme" ,adwaita-icon-theme)
+   ("gtk+" ,gtk+)
+   ("shared-mime-info" ,shared-mime-info)))
 (arguments
  `(#:phases (modify-phases %standard-phases
   (add-after
@@ -1610,7 +1614,18 @@ point numbers.")
   "/bin/wxmaxima")
`("PATH" ":" prefix
  (,(string-append (assoc-ref inputs "maxima")
-  "/bin"
+  "/bin")))
+   ;; For GtkFileChooserDialog.
+   `("GSETTINGS_SCHEMA_DIR" =
+ (,(string-append (assoc-ref inputs "gtk+")
+  "/share/glib-2.0/schemas")))
+   `("XDG_DATA_DIRS" ":" prefix
+ (;; Needed by gdk-pixbuf to know supported icon formats.
+  ,(string-append
+(assoc-ref inputs "shared-mime-info") "/share")
+  ;; The default icon theme of GTK+.
+  ,(string-append
+(assoc-ref inputs "adwaita-icon-theme") "/share"
  #t)
 (home-page "https://andrejv.github.io/wxmaxima/";)
 (synopsis "Graphical user interface for the Maxima computer algebra system")
-- 
2.6.3



[PATCH] gnu: Add wiredtiger

2016-05-16 Thread
Hi, here is a patch for WiredTiger, a NoSQL data engine:

>From 7fda129fb863b6bb4a0d0f752c2c369fd30a50b8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= 
Date: Sun, 15 May 2016 10:20:05 +0800
Subject: [PATCH] gnu: Add wiredtiger.

* gnu/packages/database.scm (wiredtiger): New variable.
---
 gnu/packages/databases.scm | 33 -
 1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index a8998d8..2a93de2 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -55,7 +55,7 @@
   #:use-module (gnu packages bison)
   #:use-module (gnu packages jemalloc)
   #:use-module ((guix licenses)
-#:select (gpl2 gpl3+ lgpl2.1+ lgpl3+ x11-style non-copyleft
+#:select (gpl2 gpl3 gpl3+ lgpl2.1+ lgpl3+ x11-style non-copyleft
   bsd-2 bsd-3 public-domain))
   #:use-module (guix packages)
   #:use-module (guix download)
@@ -913,3 +913,34 @@ sets, bitmaps and hyperloglogs.")
 and B+ Tree data storage models.  It is a fast key-value lightweight
 database and supports many programming languages.  It is a NoSQL database.")
 (license gpl3+)))
+
+(define-public wiredtiger
+  (package
+(name "wiredtiger")
+(version "2.8.0")
+(source (origin
+  (method url-fetch)
+  (uri (string-append
+"http://source.wiredtiger.com/releases/wiredtiger-";
+version ".tar.bz2"))
+  (sha256
+   (base32
+"1qh7y5paisdxq19jgg81ld7i32lz920n5k30hdpxnr8ll9c4hgjr"
+(build-system gnu-build-system)
+(arguments
+ '(#:tests? #f ; XXX: timeout
+   #:configure-flags '("--enable-lz4" "--enable-zlib")))
+(inputs
+ `(("lz4" ,lz4)
+   ("zlib" ,zlib)))
+(home-page "http://source.wiredtiger.com/";)
+(synopsis "NoSQL data engine")
+(description
+ "WiredTiger is an extensible platform for data management.  It supports
+row-oriented storage (where all columns of a row are stored together),
+column-oriented storage (where columns are stored in groups, allowing for
+more efficient access and storage of column subsets) and log-structured merge
+trees (LSM), for sustained throughput under random insert workloads.")
+(license gpl3) ; or GPL-2
+;; WiredTiger requires a 64-bit build.
+(supported-systems '("x86_64-linux" "mips64el-linux"
-- 
2.6.3


It supports 64-bit systems (only tested on my x86_64-linux),
and tests are disabled due to timeout.


[PATCH] gnu: wxmaxima: Wrap with GSETTINGS_SCHEMA_DIR and XDG_DATA_DIRS.

2016-05-16 Thread
Fixes  and .

* gnu/packages/math.scm (wxmaxima)[arguments]: Wrap with
GSETTINGS_SCHEMA_DIR and XDG_DATA_DIRS.
---
 gnu/packages/maths.scm | 19 +--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 73104a3..3da6e35 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -1600,7 +1600,11 @@ point numbers.")
 (build-system gnu-build-system)
 (inputs
  `(("wxwidgets" ,wxwidgets)
-   ("maxima" ,maxima)))
+   ("maxima" ,maxima)
+   ;; Runtime support.
+   ("adwaita-icon-theme" ,adwaita-icon-theme)
+   ("gtk+" ,gtk+)
+   ("shared-mime-info" ,shared-mime-info)))
 (arguments
  `(#:phases (modify-phases %standard-phases
   (add-after
@@ -1610,7 +1614,18 @@ point numbers.")
   "/bin/wxmaxima")
`("PATH" ":" prefix
  (,(string-append (assoc-ref inputs "maxima")
-  "/bin"
+  "/bin")))
+   ;; For GtkFileChooserDialog.
+   `("GSETTINGS_SCHEMA_DIR" =
+ (,(string-append (assoc-ref inputs "gtk+")
+  "/share/glib-2.0/schemas")))
+   `("XDG_DATA_DIRS" ":" prefix
+ (;; Needed by gdk-pixbuf to know supported icon 
formats.
+  ,(string-append
+(assoc-ref inputs "shared-mime-info") "/share")
+  ;; The default icon theme of GTK+.
+  ,(string-append
+(assoc-ref inputs "adwaita-icon-theme") 
"/share"
  #t)
 (home-page "https://andrejv.github.io/wxmaxima/";)
 (synopsis "Graphical user interface for the Maxima computer algebra 
system")
-- 
2.6.3




[PATCH] gnu: Add wiredtiger.

2016-05-16 Thread
* gnu/packages/database.scm (wiredtiger): New variable.
---
 gnu/packages/databases.scm | 33 -
 1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index a8998d8..2a93de2 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -55,7 +55,7 @@
   #:use-module (gnu packages bison)
   #:use-module (gnu packages jemalloc)
   #:use-module ((guix licenses)
-#:select (gpl2 gpl3+ lgpl2.1+ lgpl3+ x11-style non-copyleft
+#:select (gpl2 gpl3 gpl3+ lgpl2.1+ lgpl3+ x11-style 
non-copyleft
   bsd-2 bsd-3 public-domain))
   #:use-module (guix packages)
   #:use-module (guix download)
@@ -913,3 +913,34 @@ sets, bitmaps and hyperloglogs.")
 and B+ Tree data storage models.  It is a fast key-value lightweight
 database and supports many programming languages.  It is a NoSQL database.")
 (license gpl3+)))
+
+(define-public wiredtiger
+  (package
+(name "wiredtiger")
+(version "2.8.0")
+(source (origin
+  (method url-fetch)
+  (uri (string-append
+"http://source.wiredtiger.com/releases/wiredtiger-";
+version ".tar.bz2"))
+  (sha256
+   (base32
+"1qh7y5paisdxq19jgg81ld7i32lz920n5k30hdpxnr8ll9c4hgjr"
+(build-system gnu-build-system)
+(arguments
+ '(#:tests? #f ; XXX: timeout
+   #:configure-flags '("--enable-lz4" "--enable-zlib")))
+(inputs
+ `(("lz4" ,lz4)
+   ("zlib" ,zlib)))
+(home-page "http://source.wiredtiger.com/";)
+(synopsis "NoSQL data engine")
+(description
+ "WiredTiger is an extensible platform for data management.  It supports
+row-oriented storage (where all columns of a row are stored together),
+column-oriented storage (where columns are stored in groups, allowing for
+more efficient access and storage of column subsets) and log-structured merge
+trees (LSM), for sustained throughput under random insert workloads.")
+(license gpl3) ; or GPL-2
+;; WiredTiger requires a 64-bit build.
+(supported-systems '("x86_64-linux" "mips64el-linux"
-- 
2.6.3




Re: [PATCH] gnu: Add surf.

2016-05-09 Thread
Al McElrath  writes:

> Attached is a patch to add surf, a simple WebKit browser. The
> suckless.org site doesn't support HTTPS.
>
I change it to use glib-or-gtk-build-system and add glib-networking
and gsettings-desktop-schemas to make it running and support https.
Also user should install dmenu, xprop and maybe st to make
surf more useful.

Applied, thanks!



Re: Gnome-updates

2016-05-02 Thread
Current poppler is 0.42.0 in gnome- updates, I think when merge back into 
master, with conflict resolved it will undo the graft.  Do you mean we resolve 
it explicitly in gnome-updates? That's better, thanks!  And perhaps we could 
update it to the lastest 0.43.0?

Re: Gnome-updates

2016-05-02 Thread
l...@gnu.org (Ludovic Courtès) writes:

> Hello!
>
> iyzs...@member.fsf.org (宋文武) skribis:
>
>> - Disable a failing rtprtx test of gst-plugins-good.
>>   I can pass it using `guix environment', but fail with `guix build'.
>
> The log for this commit contains a typo: it doesn’t mention the variable
> name, only the ‘arguments’ field.  Also, could you add a comment that
> says why we disable this test?
>
> With this comment, I think it’s OK.
Oh, thanks!

>
>> - Add xdg-desktop-database and xdg-mime-database hooks.
>>   I pick it from my old branch, and notice that my old code really
>>   requires shared-mime-info and desktop-file-utils to be installed
>>   explicitly..  So I factor out the 'manifest-lookup-package' proceduce
>>   used by gtk-icon-themes to allow find them in the propagated-inputs
>>   in manifest.  (or maybe I should lookup for glib?  but I think it's
>>   ok now since I add them to the gnome meta package)
>
> Sounds good, but it’s not directly related to this branch, is it?  Would
> have been best to submit for inclusion in ‘master’, if possible.
Yes..
>
> At first sight these 3 patches look good.
>
>> - Drop the 'loaders.cache' file from librsvg.
>>   Since we have use gdk-pixbuf+svg for gtk+, gtk+ applications can use
>>   SVG without wrap with it.  I have tested key-mon (works), but not
>>   solfege (too slow to download texlive..).
>
> OK.
>
>> - Disable the Spell plugin of gedit.
>>   It now needs gspell, which doesn't work due to enchant can't list
>>   dicts of aspell.  Report it as:
>>   <https://lists.gnu.org/archive/html/aspell-devel/2016-04/msg4.html>
>>   (Does it works before?)
>
> No idea, but OK.  (Thanks for emailing the Aspell folks!)
>
>> - Skip 'test_utf8_inout' of gjs.
>>   it fails with gobject-introspection-1.48.0, but use python3 to
>>   call the test in Regress.typelib will pass.  Report as:
>>   <https://bugzilla.gnome.org/show_bug.cgi?id=765465>
>>   (No one notice yet.)
>
> I would prefer this one to be fixed, because it’s worrisome that such a
> basic feature is broken.
Agree, but the only user of gjs is gnome-shell, and it seems works,
so I guess we could leave it for later?

>
> The bug report above mentions a dangling pointer.  Do you have a
> backtrace or something to illustrate that?  Did you set a breakpoint on
> ‘regress_test_utf8_inout’ or something?
No, I find it with some print functions..

>
>> Also, 1 test of libsoup on x86_64 fails (other systems fine):
>>  <http://hydra.gnu.org/build/1180730>.
>> Should we skip it, or retry the build on hydra?
>
> The failing test is:
>
> ERROR: multipart-test - exited with status 139 (terminated by signal 11?)
>
> Signal 11 doesn’t sound good.  :-)
>
> However, I can’t reproduce it on my machine:
>
> $ ./pre-inst-env guix build libsoup --check --no-grafts -q
> /gnu/store/km0g7xmsngs1yd8ix08pkifk152qifss-libsoup-2.54.1
> /gnu/store/fbq6hal96vfy556sybzwhyj879w8pgr5-libsoup-2.54.1-doc
> $ git describe
> v0.10.0-612-g0a24549
>
> So unless someone can reproduce it and get more info, I’d be in favor of
> retrying.
OK.


Thanks for the review.
I have rebase it upon master again with the one log change but
leave out the poppler CVE-2015-8868 fix (it's in 0.42.0) in master.
(I can't use force push so I delete and push it again..)



Re: Gnome-updates

2016-04-30 Thread
Hi, I have rebase it upon mastet, update more packages to their latest,
and test on my x86_64 laptop with 'gnome-desktop-service'.
It seems work fine so far.

And here are some 'questionable' changes:

- Disable a failing rtprtx test of gst-plugins-good.
  I can pass it using `guix environment', but fail with `guix build'.

- Add xdg-desktop-database and xdg-mime-database hooks.
  I pick it from my old branch, and notice that my old code really
  requires shared-mime-info and desktop-file-utils to be installed
  explicitly..  So I factor out the 'manifest-lookup-package' proceduce
  used by gtk-icon-themes to allow find them in the propagated-inputs
  in manifest.  (or maybe I should lookup for glib?  but I think it's
  ok now since I add them to the gnome meta package)

- Drop the 'loaders.cache' file from librsvg.
  Since we have use gdk-pixbuf+svg for gtk+, gtk+ applications can use
  SVG without wrap with it.  I have tested key-mon (works), but not
  solfege (too slow to download texlive..).

- Disable the Spell plugin of gedit.
  It now needs gspell, which doesn't work due to enchant can't list
  dicts of aspell.  Report it as:
  
  (Does it works before?)

- Skip 'test_utf8_inout' of gjs.
  it fails with gobject-introspection-1.48.0, but use python3 to
  call the test in Regress.typelib will pass.  Report as:
  
  (No one notice yet.)


Also, 1 test of libsoup on x86_64 fails (other systems fine):
 .
Should we skip it, or retry the build on hydra?


I think it's time to merge if the above changes are reviewed to be ok :-)



Re: [PATCH] gnu: Add Xft support to FLTK.

2016-04-27 Thread
Kei Yamashita  writes:

> On Wed, 27 Apr 2016 14:52:36 +0200
> l...@gnu.org (Ludovic Courtès) wrote:
>
>> Kei Yamashita  skribis:
>> 
>> > This patch is in preparation for the Dillo browser package.
>> >
>> > From 7755ae6d7afd46daed5fac1e626d1785b9875975 Mon Sep 17 00:00:00
>> > 2001 From: Kei Yamashita 
>> > Date: Sat, 16 Apr 2016 22:45:21 -0400
>> > Subject: [PATCH] gnu: Add Xft support to FLTK.
>> >
>> > * gnu/packages/fltk.scm (fltk)[inputs]: Add libxft.  
>> 
>> This appears to break Octave (see
>> ):
>> 
>> --8<---cut here---start->8---
>> ../run-octave  --norc --silent --no-history ./fntests.m .
>> error:
>> /tmp/guix-build-octave-4.0.0.drv-0/octave-4.0.0/libinterp/dldfcn/PKG_ADD:
>> /tmp/guix-build-octave-4.0.0.drv-0/octave-4.0.0/libinterp/dldfcn/__init_fltk__.oct:
>> failed to
>> load: 
>> /gnu/store/nfi0na44lk0fy0m6bpsa7q458wpyd5w5-fltk-1.3.3/lib/libfltk_gl.so.1.3:
>> undefined symbol: _ZN18Fl_XFont_On_Demand5valueEv
>> --8<---cut here---end--->8---
>> 
>> The undefined symbol (demangled: ‘Fl_XFont_On_Demand::value’) is
>> defined in Fltk’s ‘fl_font_xft.cxx’.  However, looking at the build
>> log of Fltk, this file is apparently not compiled, which sounds like
>> a bug in Fltk’s build system.

Fixed (octave) in commit 6fdc73e by apply patch from:

.



Re: Gnome-updates

2016-04-27 Thread
l...@gnu.org (Ludovic Courtès) writes:

> Andreas Enge  skribis:
>
>> the gnome-updates branch has built on x86, and compared to master, there are
>> not that many regressions:
>>http://hydra.gnu.org/eval/108921?compare=master#tabs-now-fail
>
> In fact this slightly overestimates the failures compared to master; in
> particular, all the Octave/Fltk-related failures are already in master.
>
>> I saw a few that seem to be related to fonts and freetype, but I am not
>> a specialist. Do you think we could nevertheless merge back to master?
>> In any case, it would be nice if people who are competent in these matters
>> could have a look at the few remaining build failures.
>
> Since ‘make assert-binaries-available’ passed, I went ahead and merge
> the branch.
Oh, luckily the merge doesn't have effect.
>
> If anything goes wrong, please let us know!
Sorry, this is still not ready yet!  I have skip a gjs test temporary,
and disable the spell plugin of gedit.  I'd continue to work on the
gnome-updates branch, and will reply to this thread when it's ok.



Re: [PATCH] gnu: xfce4-taskmanager: Build with GTK+ 3 support.

2016-04-26 Thread
Kei Yamashita  writes:

> This is a useful addition now that I know libwnck was stopping me from
> building the GTK+ 3 version of this tool!
Well, with gtk+-3, the libwnck-2 and gtk+-2  will not be
used (not in the closure), so I'd like leave only gtk+ in inputs,
but it seems gtk+-2 is required by the configure script even it's not
needed.

Maybe we should report it to upstream, but I think gtk+-2 version is
enough for us :-)

Thanks!




Re: [PATCH] gnu: Add xfce4-taskmanager.

2016-04-25 Thread
Kei Yamashita  writes:

> This patch contains a definition for Xfce's most recent task manager.
>
I replace libwnck with libwnck-2, as the gtk+-3 version is not detected
by the configure script.

Pushed, thanks!



ASPELL_CONF isn't honored by the 'aspell_provider_list_dicts' function of enchant

2016-04-25 Thread
Hi!  I have some problems to package gspell for GNU Guix, and I think it's
the issue of aspell...

In Guix, aspell and every dict are installed in seperated directory (prefix),
and then symlink together into a profile.  We have wraped the aspell
executable with `ASPELL_CONF=dict-dir $HOME/.guix-profile' to let it
finding dicts:
  

But the GNOME gspell, which is a GObject API wrapper upon enchant,
uses 'aspell_provider_list_dicts' (similiar to the list-dicts.c example)
to find all aspell dicts, where the ASPELL_CONF variable is not honored
at all.  Even with dicts avaliable in the dict-dir specidied by ASPELL_CONF,
gspell reports none.

The list-dicts example have this issue too.  shouldn't the default
AspellConfig returned by new_aspell_config honor ASPELL_CONF?
Or, maybe there are better way to handle dict localtions?
I'd be very happy to use a variable like ASPELL_DICT_DIRS :-)



Re: [PATCH] gnu: Add ristretto.

2016-04-24 Thread
Kei Yamashita  writes:

> XFCE's image viewer is packaged at last!
Pushed, thanks!



Re: [PATCH 3/4] gnu: glib: Disable tests in build phases instead of patches.

2016-04-19 Thread
Efraim Flashner  writes:

> [...]
>
> /tmp/guix-build-glib-2.46.1.drv-0/glib-2.46.1/gio/tests [env]#
> ./gapplication
> /gapplication/no-dbus: OK
> /gapplication/no-appid: OK
> /gapplication/properties: org.freedesktop.DBus.Error.AccessDenied:
> Failed to set fd limit to 65536: Operation not permitted
> OK
> /gapplication/app-id: OK
> /gapplication/local-actions: Segmentation fault
>
> followed by:
> /tmp/guix-build-glib-2.46.1.drv-0/glib-2.46.1/gio/tests [env]#
> ./gapplication -s '/gapplication/local-actions'
> /gapplication/no-dbus: OK
> /gapplication/no-appid: OK
> /gapplication/properties: org.freedesktop.DBus.Error.AccessDenied:
> Failed to set fd limit to 65536: Operation not permitted
> OK
> /gapplication/app-id: OK
> /gapplication/local-command-line: OK
> /gapplication/resource-path: OK
> /gapplication/test-help: OK
> /gapplication/test-busy: org.freedesktop.DBus.Error.AccessDenied: Failed
> to set fd limit to 65536: Operation not permitted
> OK
> /gapplication/test-handle-local-options1: OK
> /gapplication/test-handle-local-options2: OK
> /gapplication/test-handle-local-options3: OK
>
> so /gapplication/local-actions completely failed for me, so with my
> understanding of the error that I got above (only 4/12 tests run) the
> best course would be to patch/substitute the the
> /gapplication/local-actions test to either pass for real or to just
> return true. Or to tell it that there are only 4 (or 11) tests
>
> [...]
>
> Actually, I attached test-suite.log and gapplication.log but deleted the
> build environment before sending, and when I rebuilt it it built cleanly
> for me. I'm now rebuilding it with the --check flag (and -K). And it
> built again successfully.
Ah, I miss this email.  So it seems we only need to disable this randomly
failing 'local-actions' test.

Pushed, hopefully it will work.

Thanks!



Re: [PATCH] gnu: Add gnome-sudoku and qqwing

2016-04-12 Thread
k...@openmailbox.org writes:

>  Original Message 
> Subject: Re: [PATCH] gnu: Add gnome-sudoku and qqwing
> Date: 2016-04-12 12:58
> From: k...@openmailbox.org
> To: Leo Famulari 
>
> On 2016-04-11 17:57, Leo Famulari wrote:
>> On Mon, Apr 11, 2016 at 12:06:17PM -0400, k...@openmailbox.org wrote:
>>> I decided to add gnome-sudoku to gnome.scm because of how a new
>>> version
>>> is released with each new version of GNOME. Also, since qqwing
>>> seems to
>>> be used only by gnome-sudoku, I moved it over to gnome.scm as well.
>>
>> Okay, if gnome-sudoku has to stay in sync with GNOME, then I'd say it
>> makes some sense to put it in gnome.scm. Is there some GNOME package
>> that sets the version for the rest of our GNOME ecosystem? Should we be
>> pulling the version from some other package?
>>
>> I still think the best place is games.scm with the other games.
>>
>> CC-ing our GNOME expert, 宋文武, for some advice.
I prefer gnome.scm for it (and gnome-mines, etc) too, since those
packages follow the release cycle of GNOME, and don't have their
own homepages.

> [...]
>
> QQwing is added to game-development.scm, as it's more of a tool to
> facilitate
> gameplay than a game per se.
Agree :-)


I take the description of qqwing from debian:
 <https://packages.debian.org/jessie/qqwing>.

I think debian take it from the manpage.



Pushed, thanks for the patch and reviews!



hydra jobset timeout (Was: GNOME updates)

2016-04-12 Thread
l...@gnu.org (Ludovic Courtès) writes:

> iyzs...@member.fsf.org (宋文武) skribis:
>
>> Hi!  With the help of ‘guix refresh -t gnome’ I update many GNOME
>> packages to latest (the 3.20 release) in the ‘gnome-updates’ branch.
>>
>> Also:
>>   glib: Disable tests in build phases instead of patches.
>>   gtk+: Enable SVG support. (by using gdk-pixbuf+svg)
>>   gtk+-2: Look in system data dirs for themes. (by Jookia)
>>
>> I have build some packages locally (nautilus, gnome-terminal) but not
>> all,  I request to start a job for it on hydra.
>
> I think the non-trivial changes have already been discussed and LGTM.
>
> I’ve started a jobset: <https://hydra.gnu.org/jobset/gnu/gnome-updates>.
> Please keep an eye on it (M-x guix-hydra-jobsets FTW! :-)) and check for
> build failures.  You can merge it as soon as it’s built, if nobody
> objects.

Thanks!  but the jobset get:
--8<---cut here---start->8---
hydra-eval-guile-jobs returned signal -1:
timeout
--8<---cut here---end--->8---



[PATCH][UPDATE] utils: Add 'edit-expression'.

2016-04-08 Thread
Andy Wingo  writes:

> Looking really good!  A couple nits.
>
> On Wed 06 Apr 2016 12:37, 宋文武  writes:
>
>> diff --git a/guix/utils.scm b/guix/utils.scm
>> index de54179..1318dac 100644
>> --- a/guix/utils.scm
>> +++ b/guix/utils.scm
>> +(define* (edit-expression source-properties proc #:key (encoding "UTF-8"))
>> +  "Edit the expression specified by SOURCE-PROPERTIES using PROC, which 
>> should
>> +be a procedure that take the original expression in string and returns a new
>> +one.  ENCODING will be used to interpret all port I/O, it default to UTF-8."
>> +  (with-fluids ((%default-port-encoding encoding))
>> +(let*-values (((file line column)
>> +   (values
>> +(assoc-ref source-properties 'filename)
>> +(assoc-ref source-properties 'line)
>> +(assoc-ref source-properties 'column)))
>> +  ((start end) ; start and end byte positions of the 
>> expression
>> +   (call-with-input-file file
>> + (lambda (port)
>> +   (values
>> +(begin (while (not (and (= line (port-line port))
>> +(= column (port-column 
>> port
>> + (when (eof-object? (read-char port))
>> +   (error 'end-of-file file)))
>> +   (ftell port))
>> +(begin (read port)
>> +   (ftell port))
>
> I think this would be clearer as let*:
>
>   (let* ((file (assoc-ref source-properties 'filename))
>  ...
>  (port (open-input-file file))
>  (start (begin ... (ftell port)))
>  ...
>
>> +  ((pre-bv expr post-bv)
>> +   (call-with-input-file file
>> + (lambda (port)
>> +   (values (get-bytevector-n port start)
>> +   (get-string-n port (- end start))
>> +   (get-bytevector-all port))
>
> But especially here: `values' is not begin, and it doesn't have a
> defined order of evaluation.
Oh, thanks!
>
> I suggest instead of opening the file again, just (seek port 0
> SEEK_SET), and there you go.
OK.
>
> Also I suggest calling it "str" or something because it's not the
> expression -- it's the string representation of the expression.
>
>> +  (with-atomic-file-output file
>> +(lambda (port)
>> +  (put-bytevector port pre-bv)
>> +  (display (proc expr) port)
>
> Here you may want to verify that the result of (proc expr) is readable
> as a Scheme expression, to prevent problems down the line.  e.g.
>
>   (let ((str* (proc str)))
> (call-with-input-string str*
>   (lambda (port)
> (let lp ()
>   (let ((exp (read port)))
> (unless (eof-object? exp)
>   (lp)))
>
> Dunno, as you like :)
I think a simple ‘(call-with-input-string str* read)’ is enough, since
the original expression was from a read.  Also I think it can be emtpy
string (return ‘#’) to remove the expression.
>
> Finally it could be that the file has some other encoding because of a
> "coding: foo" directive or something; probably best to explicitly
> (set-port-encoding! output-port (port-encoding input-port)) or
> something before writing to the port.
OK, but it seems safe here, since ‘#:guess-encoding’ is default to ‘#f’,
so the I/O ports will both using ‘%default-port-encoding’.


Updated patch:

>From 7f48e10a37afc9b45daf76db7632d232bed0940b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= 
Date: Wed, 6 Apr 2016 17:35:13 +0800
Subject: [PATCH] utils: Add 'edit-expression'.

* guix/utils.scm (edit-expression): New procedure.
* tests/utils.scm (edit-expression): New test.
---
 guix/utils.scm  | 40 
 tests/utils.scm | 13 +
 2 files changed, 53 insertions(+)

diff --git a/guix/utils.scm b/guix/utils.scm
index de54179..d82589c 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -41,6 +41,7 @@
   #:use-module (ice-9 regex)
   #:use-module (ice-9 match)
   #:use-module (ice-9 format)
+  #:use-module ((ice-9 iconv) #:select (bytevector->string))
   #:use-module (system foreign)
   #:export (bytevector->base16-string
 base16-string->bytevector
@@ -86,6 +87,7 @@
 split
 cache-directory
 readlink*
+edit-expression
 

GNOME updates

2016-04-08 Thread
Hi!  With the help of ‘guix refresh -t gnome’ I update many GNOME
packages to latest (the 3.20 release) in the ‘gnome-updates’ branch.

Also:
  glib: Disable tests in build phases instead of patches.
  gtk+: Enable SVG support. (by using gdk-pixbuf+svg)
  gtk+-2: Look in system data dirs for themes. (by Jookia)

I have build some packages locally (nautilus, gnome-terminal) but not
all,  I request to start a job for it on hydra.

Please review, thanks in advance!



Re: [PATCH] gnu: Update pcre2 to 10.21

2016-04-08 Thread
Mckinley Olsen  writes:

> Updating pcre2 to satisfy the 10.21 requirement newer versions of
> vte/vte-ng have (which I hope to package)
OK, I have update vte to 0.44.0 in the 'gnome-updates' branch,
will add to it as depends.
>
>
> From 69a7536d8aa736ef4e5dbbbc08ebc3a4c93400b3 Mon Sep 17 00:00:00 2001
> From: McKinley Olsen 
> Date: Thu, 7 Apr 2016 16:12:24 -0600
> Subject: [PATCH] gnu/packages/pcre2.scm (pcre2): Update pcre2 to 10.21
No commit message and should be:
--8<---cut here---start->8---
gnu: pcre2: Update to 10.21.

* gnu/packages/pcre.scm (pcre2): Update to 10.21.
--8<---cut here---end--->8---

Pushed, thanks!



[PATCH 3/3] gnu-maintenance: update-package-source: Only update the desired package.

2016-04-06 Thread
Fixes .
Suggested by Andy Wingo.

* guix/upstream.scm (update-package-source): Rewrite in terms of 
'edit-expression'.
---
 guix/upstream.scm | 68 +++
 1 file changed, 23 insertions(+), 45 deletions(-)

diff --git a/guix/upstream.scm b/guix/upstream.scm
index cea23fe..02c50c0 100644
--- a/guix/upstream.scm
+++ b/guix/upstream.scm
@@ -22,8 +22,6 @@
   #:use-module (guix utils)
   #:use-module ((guix download)
 #:select (download-to-store))
-  #:use-module ((guix build utils)
-#:select (substitute))
   #:use-module (guix gnupg)
   #:use-module (guix packages)
   #:use-module (guix ui)
@@ -205,52 +203,32 @@ and 'interactive' (default)."
   "Modify the source file that defines PACKAGE to refer to VERSION,
 whose tarball has SHA256 HASH (a bytevector).  Return the new version string
 if an update was made, and #f otherwise."
-  (define (new-line line matches replacement)
-;; Iterate over MATCHES and return the modified line based on LINE.
-;; Replace each match with REPLACEMENT.
-(let loop ((m* matches)   ; matches
-   (o  0) ; offset in L
-   (r  '()))  ; result
-  (match m*
-(()
- (let ((r (cons (substring line o) r)))
-   (string-concatenate-reverse r)))
-((m . rest)
- (loop rest
-   (match:end m)
-   (cons* replacement
-  (substring line o (match:start m))
-  r))
-
-  (define (update-source file old-version version
- old-hash hash)
-;; Update source file FILE, replacing occurrences OLD-VERSION by VERSION
-;; and occurrences of OLD-HASH by HASH (base32 representation thereof).
-
-;; TODO: Currently this is a bit of a sledgehammer: if VERSION occurs in
-;; different unrelated places, we may modify it more than needed, for
-;; instance.  We should try to make changes only within the sexp that
-;; corresponds to the definition of PACKAGE.
+  (define (update-expression expr old-version version old-hash hash)
+;; Update package expression EXPR, replacing occurrences OLD-VERSION by
+;; VERSION and occurrences of OLD-HASH by HASH (base32 representation
+;; thereof).
 (let ((old-hash (bytevector->nix-base32-string old-hash))
   (hash (bytevector->nix-base32-string hash)))
-  (substitute file
-  `((,(regexp-quote old-version)
- . ,(cut new-line <> <> version))
-(,(regexp-quote old-hash)
- . ,(cut new-line <> <> hash
-  version))
-
-  (let ((name (package-name package))
-(loc  (package-field-location package 'version)))
-(if loc
-(let ((old-version (package-version package))
-  (old-hash(origin-sha256 (package-source package)))
-  (file(and=> (location-file loc)
-  (cut search-path %load-path <>
+  (string-replace-substring
+   (string-replace-substring expr old-hash hash)
+   old-version version)))
+
+  (let ((name(package-name package))
+(version-loc (package-field-location package 'version)))
+(if version-loc
+(let* ((loc (package-location package))
+   (old-version (package-version package))
+   (old-hash(origin-sha256 (package-source package)))
+   (file(and=> (location-file loc)
+   (cut search-path %load-path <>
   (if file
-  (update-source file
- old-version version
- old-hash hash)
+  (and (edit-expression
+;; Be sure to use absolute filename.
+(assq-set! (location->source-properties loc)
+   'filename file)
+(cut update-expression <>
+ old-version version old-hash hash))
+   version)
   (begin
 (warning (_ "~a: could not locate source file")
  (location-file loc))
-- 
2.6.3




[PATCH 1/3] utils: Add 'edit-expression'.

2016-04-06 Thread
* guix/utils.scm (edit-expression): New procedure.
* tests/utils.scm (edit-expression): New test.
---
 guix/utils.scm  | 37 +
 tests/utils.scm | 13 +
 2 files changed, 50 insertions(+)

diff --git a/guix/utils.scm b/guix/utils.scm
index de54179..1318dac 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -86,6 +86,7 @@
 split
 cache-directory
 readlink*
+edit-expression
 
 filtered-port
 compressed-port
@@ -318,6 +319,42 @@ a list of command-line arguments passed to the compression 
program."
 (unless (every (compose zero? cdr waitpid) pids)
   (error "compressed-output-port failure" pids))
 
+(define* (edit-expression source-properties proc #:key (encoding "UTF-8"))
+  "Edit the expression specified by SOURCE-PROPERTIES using PROC, which should
+be a procedure that take the original expression in string and returns a new
+one.  ENCODING will be used to interpret all port I/O, it default to UTF-8."
+  (with-fluids ((%default-port-encoding encoding))
+(let*-values (((file line column)
+   (values
+(assoc-ref source-properties 'filename)
+(assoc-ref source-properties 'line)
+(assoc-ref source-properties 'column)))
+  ((start end) ; start and end byte positions of the expression
+   (call-with-input-file file
+ (lambda (port)
+   (values
+(begin (while (not (and (= line (port-line port))
+(= column (port-column port
+ (when (eof-object? (read-char port))
+   (error 'end-of-file file)))
+   (ftell port))
+(begin (read port)
+   (ftell port))
+  ((pre-bv expr post-bv)
+   (call-with-input-file file
+ (lambda (port)
+   (values (get-bytevector-n port start)
+   (get-string-n port (- end start))
+   (get-bytevector-all port))
+  (with-atomic-file-output file
+(lambda (port)
+  (put-bytevector port pre-bv)
+  (display (proc expr) port)
+  ;; post-bv maybe the end-of-file object.
+  (when (not (eof-object? post-bv))
+(put-bytevector port post-bv))
+  #t)
+
 
 ;;;
 ;;; Advisory file locking.
diff --git a/tests/utils.scm b/tests/utils.scm
index 6b77255..d0ee02a 100644
--- a/tests/utils.scm
+++ b/tests/utils.scm
@@ -333,6 +333,19 @@
"This is a journey\r\nInto the sound\r\nA journey ...\n")))
 (get-string-all (canonical-newline-port port
 
+
+(test-equal "edit-expression"
+  "(display \"GNU Guix\")\n(newline)\n"
+  (begin
+(call-with-output-file temp-file
+  (lambda (port)
+(display "(display \"xiuG UNG\")\n(newline)\n" port)))
+(edit-expression `((filename . ,temp-file)
+   (line . 0)
+   (column   . 9))
+ string-reverse)
+(call-with-input-file temp-file get-string-all)))
+
 (test-end)
 
 (false-if-exception (delete-file temp-file))
-- 
2.6.3




[PATCH 2/3] utils: Add 'location->source-properties'.

2016-04-06 Thread
* guix/utils (location-source->properties): New procedure.
---
 guix/utils.scm | 8 
 1 file changed, 8 insertions(+)

diff --git a/guix/utils.scm b/guix/utils.scm
index 1318dac..50f4bcd 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -60,6 +60,7 @@
 location-line
 location-column
 source-properties->location
+location->source-properties
 
 nix-system->gnu-triplet
 gnu-triplet->nix-system
@@ -892,3 +893,10 @@ etc."
 ;; In accordance with the GCS, start line and column numbers at 1.  Note
 ;; that unlike LINE and `port-column', COL is actually 1-indexed here...
 (location file (and line (+ line 1)) col)))
+
+(define (location->source-properties loc)
+  "Return the source property association list based on the info in LOC,
+a location object."
+  `((line . ,(and=> (location-line loc) 1-))
+(column   . ,(location-column loc))
+(filename . ,(location-file loc
-- 
2.6.3




Re: [PATCH] gnu-maintenance: update-package-source: Only update the desired package.

2016-04-05 Thread
Andy Wingo  writes:

> On Tue 05 Apr 2016 11:47, l...@gnu.org (Ludovic Courtès) writes:
>
>> Andy Wingo  skribis:
>> [...]
>>>
>>> Sorry to tell you mixed signals, but did you consider Ludovic's
>>> suggestion to use `package-field-location' ?
>>
>> I mentioned it mostly as a possible source of inspiration, but I think
>> it cannot be used as-is here.
>
> Why not?  Using that, you could limit the edit to the field and not the
> whole package.  Anyway, just a thought.
>
>> The trick to determine the boundaries of the ‘package’ form looks
>> reasonable to me.
Yes, I copy the `goto' function from `package-field-location' and
happily notice that after do a `read' it's at the end location of the
object.  Without more thinking :-)


> In that case I think the ideal is something like "edit-expression",
> which takes a source location that starts an expression, uses "read" to
> advance to the end of the expression, then edits the intervening string
> using whatever but verifies that the result can still be read as one
> expression.  Having recorded the absolute byte positions of the start
> and end of the expression, you can then create the output by doing an
> efficient bytevector read of the prologue, then display the string for
> the edited expression, then the bytevector tail.
>
> Again, just a thought!  Feel free to incorporate or not as you like,
> 宋文武 :)
Indeed this is better!  To create the output from bytevector, it's
using `get-bytevector-n' to read and `utf8->string' to write, right?

And I think `edit-expression' could be:
--8<---cut here---start->8---
(define (edit-expression source-properties proc)
  "Edit the object specified by SOURCE-PROPERTIS using PROC, which
should be a procedure that take the original object and returns
a new one."
  ...)
--8<---cut here---end--->8---

I'll try it :-)



Re: [PATCH 2/2] gtk: Patch GTK+ to look for themes in profiles.

2016-04-05 Thread
Jookia <166...@gmail.com> writes:

> Hey there, just an update.
>
> There's an old bug report that deals with this issue. It seems it's something
> wanted by GTK+, even if it's a formality in dealing with XDG across the board.
>
> I've commented on it and hopefully gears will start turning again.
> https://bugzilla.gnome.org/show_bug.cgi?id=641354

Great work, and glad to hear that upstream has merged it in gtk+-3.20.1.

I'm doing package updates to gnome packages using 'guix refresh',
gtk+ will be update to 3.20.2, so we only need apply the patch for our
gtk+-2 package.

Thanks!



Re: [PATCH 2/2] gtk: Patch GTK+ to look for themes in profiles.

2016-04-05 Thread
Jookia <166...@gmail.com> writes:

> Hey there, just an update.
>
> There's an old bug report that deals with this issue. It seems it's something
> wanted by GTK+, even if it's a formality in dealing with XDG across the board.
>
> I've commented on it and hopefully gears will start turning again.
> https://bugzilla.gnome.org/show_bug.cgi?id=641354

Great work, and upstream has merged it in gtk+-3.20.1.

I'm doing package updates to gnome packages using 'guix refresh',
gtk+ will be update to 3.20.2, so we only need apply the patch for our
gtk+-2 package.

Thanks!



[PATCH] gnu-maintenance: update-package-source: Only update the desired package.

2016-04-04 Thread
Fixes .
Suggested by Andy Wingo.

* guix/upstream.scm (update-package-source): Use a customized 'substitute'
to work within lines of the package's source.
---
 guix/upstream.scm | 81 +--
 1 file changed, 67 insertions(+), 14 deletions(-)

diff --git a/guix/upstream.scm b/guix/upstream.scm
index cea23fe..f4bc09c 100644
--- a/guix/upstream.scm
+++ b/guix/upstream.scm
@@ -23,7 +23,11 @@
   #:use-module ((guix download)
 #:select (download-to-store))
   #:use-module ((guix build utils)
-#:select (substitute))
+#:select (with-atomic-file-replacement))
+  #:use-module ((ice-9 rdelim)
+#:select (read-line))
+  #:use-module ((rnrs io ports)
+#:select (get-string-all))
   #:use-module (guix gnupg)
   #:use-module (guix packages)
   #:use-module (guix ui)
@@ -205,6 +209,37 @@ and 'interactive' (default)."
   "Modify the source file that defines PACKAGE to refer to VERSION,
 whose tarball has SHA256 HASH (a bytevector).  Return the new version string
 if an update was made, and #f otherwise."
+  (define (substitute+ file start end pattern+procs)
+;; Same as substitute, but within lines from START to END.
+(let ((rx+proc  (map (match-lambda
+(((? regexp? pattern) . proc)
+ (cons pattern proc))
+((pattern . proc)
+ (cons (make-regexp pattern regexp/extended)
+   proc)))
+   pattern+procs)))
+(with-atomic-file-replacement file
+  (lambda (in out)
+(while (< (port-line in) (- start 1))
+  (display (read-line in 'concat) out))
+
+(let loop ((line (read-line in 'concat)))
+  (let ((line (fold (lambda (r+p line)
+  (match r+p
+((regexp . proc)
+ (match (list-matches regexp line)
+   ((and m+ (_ _ ...))
+(proc line m+))
+   (_ line)
+line
+rx+proc)))
+(display line out)
+(if (< (port-line in) end)
+(loop (read-line in 'concat))
+(begin
+  (display (get-string-all in) out)
+  #t
+
   (define (new-line line matches replacement)
 ;; Iterate over MATCHES and return the modified line based on LINE.
 ;; Replace each match with REPLACEMENT.
@@ -222,24 +257,40 @@ if an update was made, and #f otherwise."
   (substring line o (match:start m))
   r))
 
-  (define (update-source file old-version version
+  (define (update-source file start end old-version version
  old-hash hash)
-;; Update source file FILE, replacing occurrences OLD-VERSION by VERSION
-;; and occurrences of OLD-HASH by HASH (base32 representation thereof).
-
-;; TODO: Currently this is a bit of a sledgehammer: if VERSION occurs in
-;; different unrelated places, we may modify it more than needed, for
-;; instance.  We should try to make changes only within the sexp that
-;; corresponds to the definition of PACKAGE.
+;; Update source file FILE within lines from START to END,
+;; replacing occurrences OLD-VERSION by VERSION and occurrences
+;; of OLD-HASH by HASH (base32 representation thereof).
 (let ((old-hash (bytevector->nix-base32-string old-hash))
   (hash (bytevector->nix-base32-string hash)))
-  (substitute file
-  `((,(regexp-quote old-version)
- . ,(cut new-line <> <> version))
-(,(regexp-quote old-hash)
- . ,(cut new-line <> <> hash
+  (substitute+ file start end
+   `((,(regexp-quote old-version)
+  . ,(cut new-line <> <> version))
+ (,(regexp-quote old-hash)
+  . ,(cut new-line <> <> hash
   version))
 
+
+  (define (package-location-line-start package)
+(location-line (package-location package)))
+
+  (define (package-location-line-end package)
+(define (goto port line column)
+  (unless (and (= (port-column port)) (- column 1)
+   (= (port-line port) (- line 1)))
+(unless (eof-object? (read-char port))
+  (goto port line column
+
+(match (package-location package)
+  (($  file line column)
+   (call-with-input-file (search-path %load-path file)
+ (lambda (port)
+   (goto port line column)
+   (match (read port)
+ (('package _ ...)
+  (1+ (port-line port)
+
   (let ((name (package-name package))
 (loc  (package-field-location package 'version)))
 (if 

Re: bug#22693: `guix refresh -u` updates other packages with same version

2016-04-04 Thread
Leo Famulari  writes:

> I've noticed that `guix refresh -u` will update extraneous packages if
> they happen to have the same version and be in the same module.
>
> For example, from commit d694230ab, you can reproduce the bug:
>
> $ ./pre-inst-env guix environment guix -- ./pre-inst-env guix refresh -u 
> python-pytest
> $ git diff
> diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
> index 3dd3862..ae14404 100644
> --- a/gnu/packages/python.scm
> +++ b/gnu/packages/python.scm
> @@ -796,7 +796,7 @@ Python 3 support.")
>  (define-public python-pycrypto
>(package
>  (name "python-pycrypto")
> -(version "2.6.1")
> +(version "2.8.7")
>  (source
>   (origin
>(method url-fetch)
> @@ -1565,7 +1565,7 @@ code introspection, and logging.")
>  (define-public python-pytest
>(package
>  (name "python-pytest")
> -(version "2.6.1")
> +(version "2.8.7")
>  (source
>   (origin
> (method url-fetch)
> @@ -1574,7 +1574,7 @@ code introspection, and logging.")
>   version ".tar.gz"))
> (sha256
>  (base32
> - "0g2w4p0n42wvz8rq4k6gnzpkakgz3g8sfanxk8jrsra9675snkcr"))
> + "1bwb06g64x2gky8x5hcrfpg6r351xwvafimnhm5qxq7wajz8ck7w"))
> (modules '((guix build utils)))
> (snippet
>  ;; One of the tests involves the /usr directory, so it fails.
How to fix this?

The procedure is ‘update-package-source’ in (guix upstream).
it find the file, then use ‘substitute’ to replace the version and
hash.  ‘substitute’ works line-by-line, it can’t match mutiple lines.

I try:
 - use ‘package-location’ and ‘read’ to get the package object,
   but it lost all format and comments.
 - use ‘string-match’, but I have no idea how to match the whole
   package sexp.



Re: [PATCH 3/4] gnu: glib: Disable tests in build phases instead of patches.

2016-04-03 Thread
Efraim Flashner  writes:

> [...]
>
> I just applied the first three patches and glib failed to build, with
> the following errors from the test phase:
>
> ERROR: gapplication - too few tests run (expected 12, got 4)
> ERROR: gapplication - exited with status 139 (terminated by signal 11?)
>
> Unfortunately I didn't tell it to keep the output of the build so I
> can't attach the test-suite.log file. It would be best if glib built
> with this commit, just in case.

So these tests are really unreliable...  
I did get it build sucessful with the patch on my x86-64 machine,
and this patch doesn't enable the '/gapplication/quit' test (it pass
too on my machine).

Could you build it with '-K', show the log (not very useful, IMO), and
the run the test manually in a container environment by:
--8<---cut here---start->8---
$ guix environment -C --pure glib
# cd gio/tests
# ./gapplication
--8<---cut here---end--->8---

Also, one can skip some test cases using something like:
--8<---cut here---start->8---
./gapplication -s '/gapplication/quit' -s '/gapplication-remote-actions'
--8<---cut here---end--->8---
I use this to filter out mis-disabled test cases in the origin patches.

Thanks!



Re: [PATCH 3/4] gnu: glib: Disable tests in build phases instead of patches.

2016-04-02 Thread
Some patches don't apply to 2.48.0, and I think it's more easy to
maintain scheme code than patches.

Drawbacks are 'substitute' can't handle multiple line.
(fortunately, the failing tests of glib are all one line statement)

and will just pass through when no match occurs.



[PATCH 3/4] gnu: glib: Disable tests in build phases instead of patches.

2016-04-02 Thread
* gnu/packages/glib.scm (glib)[sources]: Remove glib-tests-desktop.patch,
glib-tests-prlimit.patch and glib-tests-gapplicatiotn.patch.
[arguments]: Add 'disable-falling-tests' phase.
* gnu/packages/patches/glib-tests-timer.patch: Adjust accordingly.
* gnu/packages/patches/glib-tests-desktop.patch,
  gnu/packages/patches/glib-tests-gapplication.patch,
  gnu/packages/patches/glib-tests-prlimit.patch: Remove files.
* gnu-system.am (dist_patch_DATA): Remove them.
---
 gnu-system.am  |   3 -
 gnu/packages/glib.scm  |  75 ---
 gnu/packages/patches/glib-tests-desktop.patch  | 138 -
 gnu/packages/patches/glib-tests-gapplication.patch |  28 -
 gnu/packages/patches/glib-tests-prlimit.patch  |  14 ---
 gnu/packages/patches/glib-tests-timer.patch|  11 --
 6 files changed, 61 insertions(+), 208 deletions(-)
 delete mode 100644 gnu/packages/patches/glib-tests-desktop.patch
 delete mode 100644 gnu/packages/patches/glib-tests-gapplication.patch
 delete mode 100644 gnu/packages/patches/glib-tests-prlimit.patch

diff --git a/gnu-system.am b/gnu-system.am
index 293bda3..0930455 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -485,10 +485,7 @@ dist_patch_DATA =  
\
   gnu/packages/patches/ghostscript-CVE-2015-3228.patch \
   gnu/packages/patches/ghostscript-runpath.patch   \
   gnu/packages/patches/glib-networking-ssl-cert-file.patch \
-  gnu/packages/patches/glib-tests-desktop.patch\
-  gnu/packages/patches/glib-tests-prlimit.patch\
   gnu/packages/patches/glib-tests-timer.patch  \
-  gnu/packages/patches/glib-tests-gapplication.patch   \
   gnu/packages/patches/glibc-CVE-2015-7547.patch   \
   gnu/packages/patches/glibc-bootstrap-system.patch\
   gnu/packages/patches/glibc-hurd-extern-inline.patch  \
diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index 2b90c12..71d2082 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -139,10 +139,7 @@ shared NFS home directories.")
 (sha256
  (base32
   "1yzxr1ip3l0m9ydk5nq32piq70c9f17p5f0jyvlsghzbaawh67ss"))
-(patches (list (search-patch "glib-tests-desktop.patch")
-   (search-patch "glib-tests-prlimit.patch")
-   (search-patch "glib-tests-timer.patch")
-   (search-patch "glib-tests-gapplication.patch")
+(patches (list (search-patch "glib-tests-timer.patch")
(build-system gnu-build-system)
(outputs '("out"   ; everything
   "bin"   ; glib-mkenums, gtester, etc.; depends on Python
@@ -177,16 +174,66 @@ shared NFS home directories.")
"glib/tests/utils.c"
"tests/spawn-test.c")
   (("/bin/sh")
-   (string-append (assoc-ref inputs "bash") "/bin/sh")))
-
-;; Disable a test that requires /etc/machine-id.
-(substitute* "gio/tests/gdbus-peer.c"
-  (("g_test_add_func.*/gdbus/codegen-peer-to-peer.*") ""))
-;; Disable a test that requires dbus.
-(substitute* "gio/tests/gdbus-serialization.c"
-  (("g_test_add_func \
-\\(\"/gdbus/message-serialize/double-array\", test_double_array\\);" all)
-   (string-append "/* " all " */"))
+   (string-append (assoc-ref inputs "bash") "/bin/sh")
+(add-before 'check 'disable-failing-tests
+  (lambda _
+(let ((disable
+   (lambda (test-file test-paths)
+ (define pattern+procs
+   (map (lambda (test-path)
+  (cons
+   ;; XXX: only works for single line statements.
+   (format #f "g_test_add_func.*\"~a\".*" 
test-path)
+   (const "")))
+test-paths))
+ (substitute test-file pattern+procs)))
+  (failing-tests
+   '(("glib/tests/thread.c"
+  (;; prlimit(2) returns ENOSYS on Linux 2.6.32-5-xen-amd64
+   ;; as found on hydra.gnu.org, and strace(1) doesn't
+   ;; recognize it.
+   "/thread/thread4"))
+
+ ("glib/tests/timer.c"
+  (;; fails if compiler optimizations are enabled, which 
they
+   ;; are by default.
+   "/timer/stop"))
+
+ ("gio/tests/gapplication.c"
+  (;; XXX: proven to be unreliable.  See:
+   ;;  
+   ;;  
+   "/gapplic

[PATCH 1/4] gnu: glib: Use modify-phases syntax.

2016-04-02 Thread
* gnu/packages/glib.scm (glib)[arguments]: Use 'modify-phases'.
---
 gnu/packages/glib.scm | 44 ++--
 1 file changed, 22 insertions(+), 22 deletions(-)

diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index 854a1f2..2fb601c 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -161,29 +161,29 @@ shared NFS home directories.")
   ("perl" ,perl)  ; needed by GIO tests
   ("bash" ,bash)))
(arguments
-'(#:phases (alist-cons-before
-'build 'pre-build
-(lambda* (#:key inputs outputs #:allow-other-keys)
-  ;; For tests/gdatetime.c.
-  (setenv "TZDIR"
-  (string-append (assoc-ref inputs "tzdata")
- "/share/zoneinfo"))
-
-  ;; Some tests want write access there.
-  (setenv "XDG_CACHE_HOME" (getcwd))
-
-  (substitute* '("glib/gspawn.c"
- "glib/tests/utils.c"
- "tests/spawn-test.c")
-(("/bin/sh")
- (string-append (assoc-ref inputs "bash") "/bin/sh")))
-
-  ;; Disable a test that requires dbus.
-  (substitute* "gio/tests/gdbus-serialization.c"
-(("g_test_add_func \
+'(#:phases
+  (modify-phases %standard-phases
+(add-before 'build 'pre-build
+  (lambda* (#:key inputs outputs #:allow-other-keys)
+;; For tests/gdatetime.c.
+(setenv "TZDIR"
+(string-append (assoc-ref inputs "tzdata")
+   "/share/zoneinfo"))
+
+;; Some tests want write access there.
+(setenv "XDG_CACHE_HOME" (getcwd))
+
+(substitute* '("glib/gspawn.c"
+   "glib/tests/utils.c"
+   "tests/spawn-test.c")
+  (("/bin/sh")
+   (string-append (assoc-ref inputs "bash") "/bin/sh")))
+
+;; Disable a test that requires dbus.
+(substitute* "gio/tests/gdbus-serialization.c"
+  (("g_test_add_func \
 \\(\"/gdbus/message-serialize/double-array\", test_double_array\\);" all)
- (string-append "/* " all " */"
-%standard-phases)
+   (string-append "/* " all " */"))
 
   ;; Note: `--docdir' and `--htmldir' are not honored, so work around it.
   #:configure-flags (list (string-append "--with-html-dir="
-- 
2.6.3




[PATCH 4/4] gnu: glib: Update to 2.48.0.

2016-04-02 Thread
* gnu/packages/glib.scm (glib): Update to 2.48.0.
[inputs]: Add pcre.
---
 gnu/packages/glib.scm | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index 71d2082..b2700a7 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -35,6 +35,7 @@
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages libffi)
+  #:use-module (gnu packages pcre)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
@@ -130,7 +131,7 @@ shared NFS home directories.")
 (define glib
   (package
(name "glib")
-   (version "2.46.1")
+   (version "2.48.0")
(source (origin
 (method url-fetch)
 (uri (string-append "mirror://gnome/sources/"
@@ -138,7 +139,7 @@ shared NFS home directories.")
 name "-" version ".tar.xz"))
 (sha256
  (base32
-  "1yzxr1ip3l0m9ydk5nq32piq70c9f17p5f0jyvlsghzbaawh67ss"))
+  "0d3w2hblrw7vvpx60l1kbvb830ygn3v8zhwdz65cc5593j9ycjvl"))
 (patches (list (search-patch "glib-tests-timer.patch")
(build-system gnu-build-system)
(outputs '("out"   ; everything
@@ -147,6 +148,7 @@ shared NFS home directories.")
(inputs
 `(("coreutils" ,coreutils)
   ("libffi" ,libffi)
+  ("pcre" ,pcre)
   ("zlib" ,zlib)
   ("tzdata" ,tzdata))) ; for tests/gdatetime.c
(native-inputs
-- 
2.6.3




[PATCH 2/4] gnu: glib: Drop glib-tests-homedir.patch.

2016-04-02 Thread
* gnu/packages/glib.scm (glib)[source]: Remave glib-tests-homedir.patch.
[arguments]: Set HOME and disable '/gdbus/codegen-peer-to-peer' test.
* gnu/packages/patches/glib-tests-homedir.patch: Remove file.
* gnu-system.am (dist_patch_DATA): Remove it.
---
 gnu-system.am |  1 -
 gnu/packages/glib.scm |  7 +++-
 gnu/packages/patches/glib-tests-homedir.patch | 59 ---
 3 files changed, 5 insertions(+), 62 deletions(-)
 delete mode 100644 gnu/packages/patches/glib-tests-homedir.patch

diff --git a/gnu-system.am b/gnu-system.am
index d45b3d1..293bda3 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -486,7 +486,6 @@ dist_patch_DATA =   
\
   gnu/packages/patches/ghostscript-runpath.patch   \
   gnu/packages/patches/glib-networking-ssl-cert-file.patch \
   gnu/packages/patches/glib-tests-desktop.patch\
-  gnu/packages/patches/glib-tests-homedir.patch\
   gnu/packages/patches/glib-tests-prlimit.patch\
   gnu/packages/patches/glib-tests-timer.patch  \
   gnu/packages/patches/glib-tests-gapplication.patch   \
diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index 2fb601c..2b90c12 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -139,8 +139,7 @@ shared NFS home directories.")
 (sha256
  (base32
   "1yzxr1ip3l0m9ydk5nq32piq70c9f17p5f0jyvlsghzbaawh67ss"))
-(patches (list (search-patch "glib-tests-homedir.patch")
-   (search-patch "glib-tests-desktop.patch")
+(patches (list (search-patch "glib-tests-desktop.patch")
(search-patch "glib-tests-prlimit.patch")
(search-patch "glib-tests-timer.patch")
(search-patch "glib-tests-gapplication.patch")
@@ -171,6 +170,7 @@ shared NFS home directories.")
"/share/zoneinfo"))
 
 ;; Some tests want write access there.
+(setenv "HOME" (getcwd))
 (setenv "XDG_CACHE_HOME" (getcwd))
 
 (substitute* '("glib/gspawn.c"
@@ -179,6 +179,9 @@ shared NFS home directories.")
   (("/bin/sh")
(string-append (assoc-ref inputs "bash") "/bin/sh")))
 
+;; Disable a test that requires /etc/machine-id.
+(substitute* "gio/tests/gdbus-peer.c"
+  (("g_test_add_func.*/gdbus/codegen-peer-to-peer.*") ""))
 ;; Disable a test that requires dbus.
 (substitute* "gio/tests/gdbus-serialization.c"
   (("g_test_add_func \
diff --git a/gnu/packages/patches/glib-tests-homedir.patch 
b/gnu/packages/patches/glib-tests-homedir.patch
deleted file mode 100644
index 0a2bcf1..000
--- a/gnu/packages/patches/glib-tests-homedir.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-`g_get_home_dir' looks at /etc/passwd first, which fails in chroot builds.
-The gdbus tests use it to lookup .dbus-keyrings, so they cannot run in our
-chroot build environment.  Thus, disable them.
-
 glib-2.34.3/gio/tests/gdbus-connection-flush.c 2013-01-16 
17:29:46.0 +0100
-+++ glib-2.34.3/gio/tests/gdbus-connection-flush.c 2013-01-16 
17:29:47.0 +0100
-@@ -373,10 +373,6 @@ main (int   argc,
-   g_type_init ();
-   g_test_init (&argc, &argv, NULL);
- 
--  g_test_add ("/gdbus/connection/flush/busy", Fixture, NULL,
--  setup, test_flush_busy, teardown);
--  g_test_add ("/gdbus/connection/flush/idle", Fixture, NULL,
--  setup, test_flush_idle, teardown);
- 
-   ret = g_test_run();
-
 glib-2.38.0.orig/gio/tests/gdbus-peer.c 2013-08-08 12:00:40.0 
+0200
-+++ glib-2.38.0/gio/tests/gdbus-peer.c  2013-09-30 19:36:40.0 +0200
-@@ -1746,11 +1746,6 @@
-
-   g_test_add_func ("/gdbus/peer-to-peer", test_peer);
-   g_test_add_func ("/gdbus/delayed-message-processing", 
delayed_message_processing);
--  g_test_add_func ("/gdbus/nonce-tcp", test_nonce_tcp);
--
--  g_test_add_func ("/gdbus/tcp-anonymous", test_tcp_anonymous);
--  g_test_add_func ("/gdbus/credentials", test_credentials);
--  g_test_add_func ("/gdbus/codegen-peer-to-peer", codegen_test_peer);
-
-   ret = g_test_run();
- 
 glib-2.37.1/gio/tests/gdbus-exit-on-close.c2013-06-07 
23:41:34.0 +0200
-+++ glib-2.37.1/gio/tests/gdbus-exit-on-close.c2013-06-07 
23:41:40.0 +0200
-@@ -211,6 +211,7 @@ main (int   argc,
- 
-   g_test_init (&argc, &argv, NULL);
- 
-+  return g_test_run();
-   for (i = 0; cases[i].name != NULL; i++)
- {
-   gchar *name;
-@@ -224,5 +225,4 @@ main (int   argc,
-   g_free (name);
- }
- 
--  return g_test_run();
- }
-
 glib-2.34.3/gio/tests/gdbus-non-socket.c   2013-01-16 18:13:25.0 
+0100
-+++ glib-2.34.3/gio/tests/gdbus-non-socket.c   2013-01-16 18:13:27.000

Re: How to configure default applications for GNOME?

2016-04-02 Thread
Chris Marusich  writes:

> Hi,
>
> I'm using GuixSD v0.10.0 with GNOME, and I'd like to configure my
> default applications (e.g., web browser), but I'm having trouble doing
> that.
>
> In GNOME, under the "Details" settings, when I click "Default
> Applications", everything is grayed out.  There appears to be no way for
> me to set up my default applications for different types of files in
> GNOME.  When I installed emacs, however, it did show up as an option for
> "Calendar" only, which I thought was rather curious.
>
> The GNOME documentation seems to suggest this is the way you set up
> default applications on a per-user basis [1].  Am I missing something,
> or is this a bug?  How do I set up my default applications in GNOME on
> GuixSD?
>
> [1]  https://wiki.debian.org/HOWTO/DefaultWebBrowser
Well, this requires hooks to profile to run
update-desktop-database and update-mime-database.


Sorry for my laziness, I'll pick it up :-)
https://lists.gnu.org/archive/html/guix-devel/2016-01/msg01030.html



Re: [PATCH] gnu: Add cgit.

2016-03-28 Thread
l...@gnu.org (Ludovic Courtès) writes:

> 宋文武  skribis:
>
>> * gnu/packages/version-control.scm (cgit): New variable.
>
> [...]
>
>> +(arguments
>> + '(#:tests? #f ;
>
> Please add a comment on why tests are disabled.  Better yet: fix’em!
> ;-)
It try to build a some kind of full version of git, but
failed.  (I give up on fixing it now.)

>> +(native-inputs
>> + `(("asciidoc" ,asciidoc)
>> +   ("xmllint" ,libxml2)
>> +   ("xsltprot" ,libxslt)))
>> +(inputs
>> + `(("docbook-xml" ,docbook-xml)
>> +   ("docbook-xsl" ,docbook-xsl)
>
> I would move DocBook to ‘native-inputs’.
OK, since they’re only for building the manpage.
>
>> +(description
>> + "CGit is an attempt to create a fast web interface for the Git SCM, 
>> using
>> +a built-in cache to decrease server I/O pressure.")
>> +(license gpl2)))
>
> Version 2 only, right?
Yes, the source don't mention “later version”.

Pushed, thanks for review!



Re: [PATCH] gnu: Add uwsgi.

2016-03-28 Thread
Ricardo Wurmus  writes:

>
> Is there any other reference to Python outside of this plugin?
>
No, that's why I split it out.
> Should Python by among the regular inputs when it’s used by the Python
> plugin?
OK, agree.


Pushed, thanks for review!



Re: [PATCH] gnu: font-gnu-freefont-ttf: Update to 20120503 and build from source.

2016-03-28 Thread
alírio eyng  writes:

> From dac1dfe1d9b6716d1aefa339e5145c26dd798565 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?al=C3=ADrio=20eyng?= 
> Date: Sat, 26 Mar 2016 14:39:27 +
> Subject: [PATCH] gnu: font-gnu-freefont-ttf: Update to 20120503 and build from
>  source.
Cool!
>
> * gnu/packages/fonts.scm (font-gnu-freefont-ttf): Update to 20120503.
> [arguments]: Build from source.
> * guix/gnu-maintenance.scm (%tarball-rx): Remove comment.
Not clear, how about “Remove comment about freefont-ttf.”?
> […]
> +(native-inputs `(("fontforge" ,(package (inherit fontforge)
> + (inputs `(("python-2" ,python-2)
> + ,@(package-inputs fontforge)))
Why not add ‘python-2’ to the fontforge package directly?


Thanks!



[PATCH] gnu: Add uwsgi.

2016-03-28 Thread
* gnu/packages/web.scm (uwsgi): New variable.
---
 gnu/packages/web.scm | 73 
 1 file changed, 73 insertions(+)

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 516e623..53ab1a6 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -7,6 +7,7 @@
 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer 
 ;;; Copyright © 2015, 2016 Eric Bavier 
 ;;; Copyright © 2015 Eric Dvorsak 
+;;; Copyright © 2016 Sou Bunnbu 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -3109,3 +3110,75 @@ callback or connection interfaces.")
  "Gumbo is an implementation of the HTML5 parsing algorithm implemented as
 a pure C99 library.")
 (license l:asl2.0)))
+
+(define-public uwsgi
+  (package
+(name "uwsgi")
+(version "2.0.12")
+(source (origin
+  (method url-fetch)
+  (uri (string-append "http://projects.unbit.it/downloads/uwsgi-";
+  version ".tar.gz"))
+  (sha256
+   (base32
+"02g46dnw5j1iw8fsq392bxbk8d21b9pdgb3ypcinv3b4jzdm2srh"
+(build-system gnu-build-system)
+(outputs '("out" "python"))
+(arguments
+ '(;; XXX: The 'check' target runs cppcheck to do static code analysis.
+   ;;  But there is no obvious way to run the real tests.
+   #:tests? #f
+   #:phases
+   (modify-phases %standard-phases
+ (replace 'configure
+   ;; Configuration is done by writting an ini file.
+   (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out   (assoc-ref outputs "out"))
+(bindir(string-append out "/bin"))
+(plugindir (string-append out "/lib/uwsgi")))
+   ;; The build phase outputs files to these directories directly.
+   (mkdir-p bindir)
+   (mkdir-p plugindir)
+   ;; XXX: Enable other plugins.
+   (call-with-output-file "buildconf/guix.ini"
+ (lambda (port)
+   (format port "[uwsgi]
+yaml = libyaml
+bin_name = ~a/uwsgi
+plugin_dir = ~a
+
+inherit = base
+plugins = cgi,python
+embedded_plugins =
+" bindir plugindir
+ (setenv "PROFILE" "guix")
+ #t))
+ (replace 'install
+   ;; Move plugins into their own output.
+   (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out   (assoc-ref outputs "out"))
+(plugindir (string-append out "/lib/uwsgi"))
+(python-plugin (string-append
+plugindir "/python_plugin.so")))
+   (install-file python-plugin
+ (string-append
+  (assoc-ref outputs "python") "/lib/uwsgi"))
+   (delete-file python-plugin)
+   #t))
+(native-inputs
+ `(("pkg-config" ,pkg-config)
+   ("python" ,python-wrapper)))
+(inputs
+ `(("jansson" ,jansson)
+   ("libxml2" ,libxml2)
+   ("libyaml" ,libyaml)
+   ("openssl" ,openssl)
+   ("pcre" ,pcre)
+   ("zlib" ,zlib)))
+(home-page "https://uwsgi-docs.readthedocs.org/";)
+(synopsis "Application container server")
+(description
+ "uWSGI presents a complete stack for networked/clustered web applications,
+implementing message/object passing, caching, RPC and process management.
+It uses the uwsgi protocol for all the networking/interprocess 
communications.")
+(license l:gpl2+))) ; with linking exception
-- 
2.6.3




Re: [PATCH] gnu: Add cgit.

2016-03-28 Thread
"Thompson, David"  writes:

> On Sun, Mar 27, 2016 at 10:14 AM, 宋文武  wrote:
>> I get it built, but haven't run it.
>>
>> For a cgit service, which CGI runner should we use?
>> IIUC, typical setup are:
>>   - nginx + fcgiwrap (or uwsgi)
>>   - apache httpd
>>   - lighttpd
>
> I'm partial to nginx, and it's the only one we have a service for, but
> it could be made sufficiently generic that it can use any web server
> that a user supplied a handler for.  The nginx service is currently
> missing a way to extend it with additional configuration.  I posted a
> patch for this awhile ago but it never made it to master due to some
> issues.  Once we make nginx extensible, writing a cgit service should
> be easy.
OK, nginx itself won't able to run CGI applications.
And since the website of fastcgi (used by fcgiwrap and lighttpd) is down
now, I'll try package uwsgi.
>
> BTW, have you verified that cgit does not distribute any minified
> JavaScript files?
No, and now it seems that cgit doesn't use javascript at all :-)

Thanks.



Re: [PATCH] gnu: Add cgit.

2016-03-27 Thread
I get it built, but haven't run it.

For a cgit service, which CGI runner should we use?
IIUC, typical setup are:
  - nginx + fcgiwrap (or uwsgi)
  - apache httpd
  - lighttpd



[PATCH] gnu: Add cgit.

2016-03-27 Thread
* gnu/packages/version-control.scm (cgit): New variable.
---
 gnu/packages/version-control.scm | 60 
 1 file changed, 60 insertions(+)

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 7d7276a..498885d 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -364,6 +364,66 @@ write native speed custom Git applications in any language 
with bindings.")
 ;; GPLv2 with linking exception
 (license gpl2)))
 
+(define-public cgit
+  (package
+(name "cgit")
+(version "0.12")
+(source (origin
+  (method url-fetch)
+  (uri (string-append
+"https://git.zx2c4.com/cgit/snapshot/cgit-";
+version ".tar.xz"))
+  (sha256
+   (base32
+"1dx54hgfyabmg9nm5qp6d01f54nlbqbbdwhwl0llb9imjf237qif"
+(build-system gnu-build-system)
+(arguments
+ '(#:tests? #f ;
+   #:test-target "test"
+   #:make-flags '("CC=gcc" "SHELL_PATH=sh")
+   #:phases
+   (modify-phases %standard-phases
+ (add-after 'unpack 'unpack-git
+   (lambda* (#:key inputs #:allow-other-keys)
+ ;; Unpack the source of git into the 'git' directory.
+ (zero? (system*
+ "tar" "--strip-components=1" "-C" "git" "-xf"
+ (assoc-ref inputs "git:src")
+ (delete 'configure) ; no configure script
+ (add-after 'build 'build-man
+   (lambda* (#:key make-flags #:allow-other-keys)
+ (zero? (apply system* `("make" ,@make-flags "doc-man")
+ (replace 'install
+   (lambda* (#:key make-flags outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+   (and (zero? (apply system*
+  `("make" ,@make-flags
+,(string-append "prefix=" out)
+,(string-append
+  "CGIT_SCRIPT_PATH=" out "/share/cgit")
+"install" "install-man")))
+;; Move the platform-dependent 'cgit.cgi' into lib
+;; to get it stripped.
+(rename-file (string-append out "/share/cgit/cgit.cgi")
+ (string-append out "/lib/cgit/cgit.cgi"))
+#t)))
+(native-inputs
+ `(("asciidoc" ,asciidoc)
+   ("xmllint" ,libxml2)
+   ("xsltprot" ,libxslt)))
+(inputs
+ `(("docbook-xml" ,docbook-xml)
+   ("docbook-xsl" ,docbook-xsl)
+   ("git:src" ,(package-source git))
+   ("openssl" ,openssl)
+   ("zlib" ,zlib)))
+(home-page "https://git.zx2c4.com/cgit/";)
+(synopsis "Web frontend for git repositories")
+(description
+ "CGit is an attempt to create a fast web interface for the Git SCM, using
+a built-in cache to decrease server I/O pressure.")
+(license gpl2)))
+
 (define-public shflags
   (package
 (name "shflags")
-- 
2.6.3




Re: [PATCH 2/2] gnu: gtk+: Enable SVG support.

2016-03-15 Thread
l...@gnu.org (Ludovic Courtès) writes:

> iyzs...@member.fsf.org (宋文武) skribis:
>
>> 宋文武  writes:
>>
>>> * gnu/packages/gtk.scm (gtk+, gtk+-2)[propagated-inputs]: Use 
>>> 'gtk-pixbuf+svg'
>>> instead of 'gtk-pixbuf'.
>> Typo, it's 'gdk-pixbuf'.
>>
>> This patch shouldn't apply directly to master right?  I think this
>> should be pushed with the themes patch and maybe some gtk+ releated
>> packages update to a seperated branch.
>
> Right, it should be in a separate branch, say ‘gtk-update’.
Sure, I push it and some packages updates to ‘gtk-update’, will pick
them later after the next guix release :-)



<    1   2   3   4   5   6   7   8   >