Re: FOSDEM soon!

2016-01-24 Thread Andreas Enge
On Tue, Jan 05, 2016 at 12:00:38AM +0100, Ludovic Courtès wrote:
> There’ll be “a few” Guix talks at FOSDEM:

This is actually quite dramatic; Saturday there will be an exciting and full
programme in the Guile/Guix devroom, and the links you give mention talks
in the Python and HPC sessions. So we will miss the keynotes and have no time
for other interesting events!

Looking forward to seeing so many of you,

Andreas

PS: It would be nice if people from the mailing list who are not speaking
would give away that they are coming, so that we can get to know
each other better in the Guix community!




submit package vinagre

2016-01-24 Thread rennes

Hi,

i create a definition package for vinagre program. Can you review and 
return comments?


i test vinagre in gnome environment and works.


regards
(define-module (gnu packages vinagre)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix build-system gnu)
  #:use-module (guix build-system glib-or-gtk)
  #:use-module (gnu packages)
  #:use-module (gnu packages xorg)
  #:use-module (gnu packages freedesktop)
  #:use-module (gnu packages photo)
  #:use-module (gnu packages glib)
  #:use-module (gnu packages gnome)
  #:use-module (gnu packages gtk)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages xml)
  #:use-module (gnu packages tls)
  #:use-module (gnu packages python)
  #:use-module (gnu packages gnupg)
  #:use-module (gnu packages avahi))

(define-public gtk-vnc
  (package
(name "gtk-vnc")
(version "0.5.4")
(source
 (origin
  (method url-fetch)
  (uri (string-append "http://ftp.gnome.org/pub/gnome/sources/gtk-vnc/0.5/";
  name "-" version ".tar.xz"))
  (sha256
   (base32
"1rwwdh7lb16xdmy76ca6mpqfc3zfl3a4bkcr0qb6hs6ffrxak2j8"
(build-system gnu-build-system)
(arguments
 `(#:configure-flags
   (list "--with-gtk=3.0" "--enable-vala" "--without-sasl")))
(inputs
 `(("gnome-desktop" ,gnome-desktop)
   ("gobject-introspection" ,gobject-introspection)
   ("vala" ,vala)
   ("python" ,python-2)
   ("gjs" ,gjs)
   ("libgcrypt" ,libgcrypt)
   ("gtk+" ,gtk+-2)
   ("gnutls" ,gnutls)
   ("libgnome-keyring" ,libgnome-keyring)
   ("telepathy-glib" ,telepathy-glib)
   ("vte" ,vte)
   ("avahi" ,avahi)))
(native-inputs
 `(("pkg-config" ,pkg-config)
   ("glib" ,glib "bin")
   ("intltool" ,intltool)))
(home-page "http://www.gnome.org";)
(synopsis
 "gtk-vnc")
(description
 "gtk-vnc is a VNC viewer widget for GTK.")
(license license:lgpl3)))


(define-public vinagre
  (package (inherit gtk-vnc)
(name "vinagre")
(version "3.18.2")
(source
 (origin
  (method url-fetch)
  (uri (string-append "http://ftp.gnome.org/pub/gnome/sources/vinagre/3.18/";
  name "-" version ".tar.xz"))
  (sha256
   (base32
"1i7v90zw1s7526qx7b5pxzaray1l9wqxam2n7r1sjx8bvsci5f35"
(build-system gnu-build-system)
(inputs
 `(("gnome-desktop" ,gnome-desktop)
   ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
   ("libgnome-keyring" ,libgnome-keyring)
   ("adwaita-icon-theme" ,adwaita-icon-theme)
   ("gtk+" ,gtk+)
   ("icon-naming-utils" ,icon-naming-utils)
   ("libxml2" ,libxml2)
   ("libsecret" ,libsecret)
   ("gtk-vnc" ,gtk-vnc)
   ("avahi" ,avahi)))
(native-inputs
 `(("pkg-config" ,pkg-config)
   ;("python" ,python-2)
   ("intltool" ,intltool)
   ("itstool" ,itstool)
   ("glib:bin" ,glib "bin")))
(home-page "http://www.gnome.org";)
(synopsis
 "Vinagre")
(description
 "Vinagre is a remote desktop viewer for GNOME.")
(license license:lgpl3)))

vinagre

Re: [PATCH 3/4] Rename 'dmd' service to 'shepherd'.

2016-01-24 Thread Alex Kost
Ludovic Courtès (2016-01-24 00:24 +0300) wrote:

> Alex Kost  skribis:
>
>
> [...]
>
>>> It seemed natural to me to rename 'dmd' service to 'shepherd' service.
>>> But I like 'root' more!  So if people agree on naming the main service
>>> the 'root' instead of 'shepherd', I will send an updated patch.
>>>
>>> OTOH 'herd load root foo.scm' looks strange for me.
>
> Yeah, but ‘load dmd foo.scm’ also looks weird, after all.

I agree, that's why I wrote that just ‘herd load foo.scm’ would be
better IMO.

>> Also in user init.scm we'll have "(action 'root 'daemonize)" which also
>> looks less preferable than "(action 'shepherd 'daemonize)" for me.  So
>> now I don't really know what name I prefer :-)
>
> As long as it’s clear that it’s Smalltalk-style message passing, and
> that ‘root’ is that special service, that’s fine, IMO.
>
> Now that I think of it, since a service can provide several things, we
> could simply change dmd-service to have:
>
> #:provides '(root shepherd)
>
> Thoughts?

Oh, right!  I think it is the best variant.  I'm about to send a
patchset for this change.

-- 
Alex



[PATCH 3/5] service: 'service-list' returns unique services.

2016-01-24 Thread Alex Kost
* modules/shepherd/service.scm (service-list): Remove duplicates from
  the final list.
---
 modules/shepherd/service.scm | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/modules/shepherd/service.scm b/modules/shepherd/service.scm
index 7cf557f..0a13626 100644
--- a/modules/shepherd/service.scm
+++ b/modules/shepherd/service.scm
@@ -827,10 +827,12 @@ Return #f if service is not found."
 
 (define (service-list)
   "Return the list of services currently defined."
-  (hash-fold (lambda (key services result)
-   (append services result))
- '()
- %services))
+  (delete-duplicates
+   (hash-fold (lambda (key services result)
+(append services result))
+  '()
+  %services)
+   eq?))
 
 (define (find-service pred)
   "Return the first service that matches PRED, or #f if none was found."
-- 
2.6.3




[PATCH 4/5] service: Add docstring to 'lookup-services'.

2016-01-24 Thread Alex Kost
* modules/shepherd/service.scm (lookup-services): Use docstring instead
  of a comment.
---
 modules/shepherd/service.scm | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/modules/shepherd/service.scm b/modules/shepherd/service.scm
index 0a13626..fd9c7e2 100644
--- a/modules/shepherd/service.scm
+++ b/modules/shepherd/service.scm
@@ -845,9 +845,8 @@ Return #f if service is not found."
 %services)
  #f)))
 
-;; Lookup the services that provide NAME.  Returns a (possibly empty)
-;; list of those.
 (define (lookup-services name)
+  "Return a (possibly empty) list of services that provide NAME."
   (hashq-ref %services name '()))
 
 (define waitpid*
-- 
2.6.3




[SHEPHERD] [PATCH 0/5] Replace 'dmd' service with 'root/shepherd'.

2016-01-24 Thread Alex Kost
As discussed in a parallel thread, this patchset is for renaming 'dmd'
service to 'root' service (which also provides 'shepherd' name).

Actually, patches 1, 2 and 4 are not related, I just made some changes
that I noticed and I believe should be made :-)

Patches:

[PATCH 1/5] service: Rename 'services' variable to '%services'.
[PATCH 2/5] service: Improve style of 'for-each-service'.

[PATCH 3/5] service: 'service-list' returns unique services.

Without this change, if the root service provides 2 names, 'herd status'
would display:

Started: (root root)
Stopped: ()

[PATCH 4/5] service: Add docstring to 'lookup-services'.
[PATCH 5/5] Rename 'dmd' service to 'root'.



[PATCH 5/5] Rename 'dmd' service to 'root'.

2016-01-24 Thread Alex Kost
* modules/shepherd/service.scm (dmd-service): Rename to...
(shepherd-service): ... this.  Provide both 'root' and 'shepherd' names.
Adjust the rest file accordingly.
* modules/shepherd.scm: Likewise.
* modules/herd.scm: Likewise.
* modules/halt.scm: Likewise.
* modules/reboot.scm: Likewise.
* modules/shepherd/support.scm (make-bare-init-file): Likewise.
* shepherd.texi: Likewise.
* tests/basic.sh: Likewise.
* tests/no-home.sh: Likewise.
* tests/status-sexp.sh: Likewise.
---
 modules/herd.scm | 12 ++
 modules/shepherd.scm | 10 
 modules/shepherd/service.scm | 46 +--
 modules/shepherd/support.scm |  4 ++--
 shepherd.texi| 57 ++--
 tests/basic.sh   | 28 +++---
 tests/no-home.sh |  4 ++--
 tests/respawn.sh |  2 +-
 tests/status-sexp.sh | 19 ---
 9 files changed, 93 insertions(+), 89 deletions(-)

diff --git a/modules/herd.scm b/modules/herd.scm
index c2cca85..a5e6c16 100644
--- a/modules/herd.scm
+++ b/modules/herd.scm
@@ -88,7 +88,8 @@ of pairs."
 the daemon via SOCKET-FILE."
   (with-system-error-handling
(let ((sock(open-connection socket-file))
- (action* (if (and (eq? service 'dmd) (eq? action 'detailed-status))
+ (action* (if (and (eq? action 'detailed-status)
+   (memq service '(root shepherd)))
   'status
   action)))
  ;; Send the command.
@@ -110,9 +111,9 @@ the daemon via SOCKET-FILE."
 
 ;; Then interpret the result
 (match (list action service)
-  (('status 'dmd)
+  (('status (or 'root 'shepherd))
(display-status-summary (first result)))
-  (('detailed-status 'dmd)
+  (('detailed-status (or 'root 'shepherd))
(display-detailed-status (first result)))
   (('status _)
;; We get a list of statuses, in case several services have the
@@ -135,7 +136,8 @@ the daemon via SOCKET-FILE."
((? eof-object?)
 ;; When stopping shepherd, we may get an EOF in lieu of a real reply,
 ;; and that's fine.  In other cases, a premature EOF is an error.
-(unless (and (eq? action 'stop) (eq? service 'dmd))
+(unless (and (eq? action 'stop)
+ (memq service '(root shepherd)))
   (report-error (l10n "premature end-of-file while \
 talking to shepherd"))
   (exit 1
@@ -167,7 +169,7 @@ talking to shepherd"))
 
   (match (reverse command-args)
 (((and action (or "status" "detailed-status"))) ;one argument
- (run-command socket-file (string->symbol action) 'dmd '()))
+ (run-command socket-file (string->symbol action) 'root '()))
 ((action service args ...)
  (run-command socket-file
   (string->symbol action)
diff --git a/modules/shepherd.scm b/modules/shepherd.scm
index ce24513..5e26b4f 100644
--- a/modules/shepherd.scm
+++ b/modules/shepherd.scm
@@ -140,8 +140,8 @@
 ;; Send output to log and clients.
 (set-current-output-port shepherd-output-port)
 
-;; Start the dmd service.
-(start dmd-service)
+;; Start the 'root' service.
+(start root-service)
 ;; This _must_ succeed.  (We could also put the `catch' around
 ;; `main', but it is often useful to get the backtrace, and
 ;; `caught-error' does not do this yet.)
@@ -175,7 +175,7 @@
 ;; ctrlaltdel(8).
 (sigaction SIGINT
   (lambda _
-(stop dmd-service)))
+(stop root-service)))
 
 ;; Ignore SIGPIPE so that we don't die if a client closes the connection
 ;; prematurely.
@@ -267,7 +267,7 @@
   port
(lambda (key)
  ;; Most likely we're receiving 'quit' from the 'stop' method of
- ;; DMD-SERVICE.  So, if we're running as 'root', just reboot.
+ ;; ROOT-SERVICE.  So, if we're running as 'root', just reboot.
  (if (zero? (getuid))
  (begin
(local-output "Rebooting...")
@@ -283,7 +283,7 @@ would write them on the 'herd' command line."
 (if (eof-object? line)
 
 ;; Exit on `C-d'.
-(stop dmd-service)
+(stop root-service)
 
 (begin
   (match (string-tokenize line)
diff --git a/modules/shepherd/service.scm b/modules/shepherd/service.scm
index fd9c7e2..1c280aa 100644
--- a/modules/shepherd/service.scm
+++ b/modules/shepherd/service.scm
@@ -70,7 +70,7 @@
 make-system-destructor
 make-init.d-service
 
-dmd-service
+root-service
 make-actions
 
 &service-error
@@ -344,8 +344,8 @@ wire."
   (slot-ref obj 'running)
   args))
  (lambda (key . args)
-   ;; Special case: `dmd' may quit.
-   (and (eq? dmd-service obj)

[PATCH 2/5] service: Improve style of 'for-each-service'.

2016-01-24 Thread Alex Kost
* modules/shepherd/service.scm (lookup-canonical-service): New procedure.
(for-each-service): Use it.  Use 'hash-for-each' instead of 'hash-fold'.
---
 modules/shepherd/service.scm | 19 +--
 1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/modules/shepherd/service.scm b/modules/shepherd/service.scm
index 808372c..7cf557f 100644
--- a/modules/shepherd/service.scm
+++ b/modules/shepherd/service.scm
@@ -2,6 +2,7 @@
 ;; Copyright (C) 2013, 2014, 2015, 2016 Ludovic Courtès 
 ;; Copyright (C) 2002, 2003 Wolfgang Järling 
 ;; Copyright (C) 2014 Alex Sassmannshausen 
+;; Copyright (C) 2016 Alex Kost 
 ;;
 ;; This file is part of the GNU Shepherd.
 ;;
@@ -810,13 +811,19 @@ given USER and/or GROUP to run COMMAND."
 
 ;;; Perform actions with services:
 
-;; Call PROC once for each registered service.
+(define (lookup-canonical-service name services)
+  "Return service with canonical NAME from SERVICES list.
+Return #f if service is not found."
+  (find (lambda (service)
+  (eq? name (canonical-name service)))
+services))
+
 (define (for-each-service proc)
-  (hash-fold (lambda (key value unused)
-  (and (eq? key (canonical-name (car value)))
-   (proc (car value
-#f ;; Unused
-%services))
+  "Call PROC for each registered service."
+  (hash-for-each (lambda (name services)
+   (and=> (lookup-canonical-service name services)
+  proc))
+ %services))
 
 (define (service-list)
   "Return the list of services currently defined."
-- 
2.6.3




[PATCH 1/5] service: Rename 'services' variable to '%services'.

2016-01-24 Thread Alex Kost
* modules/shepherd/service.scm (services): Rename to...
(%services): ... this.
(for-each-service, service-list, find-service, lookup-services,
register-services, deregister-service): Adjust accordingly.
---
 modules/shepherd/service.scm | 18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/modules/shepherd/service.scm b/modules/shepherd/service.scm
index 64d56ef..808372c 100644
--- a/modules/shepherd/service.scm
+++ b/modules/shepherd/service.scm
@@ -806,7 +806,7 @@ given USER and/or GROUP to run COMMAND."
 ;;; Registered services.
 
 ;; All registered services.
-(define services (make-hash-table 75))
+(define %services (make-hash-table 75))
 
 ;;; Perform actions with services:
 
@@ -816,14 +816,14 @@ given USER and/or GROUP to run COMMAND."
   (and (eq? key (canonical-name (car value)))
(proc (car value
 #f ;; Unused
-services))
+%services))
 
 (define (service-list)
   "Return the list of services currently defined."
   (hash-fold (lambda (key services result)
(append services result))
  '()
- services))
+ %services))
 
 (define (find-service pred)
   "Return the first service that matches PRED, or #f if none was found."
@@ -833,13 +833,13 @@ given USER and/or GROUP to run COMMAND."
   (and=> (find pred services)
  return))
 #f
-services)
+%services)
  #f)))
 
 ;; Lookup the services that provide NAME.  Returns a (possibly empty)
 ;; list of those.
 (define (lookup-services name)
-  (hashq-ref services name '()))
+  (hashq-ref %services name '()))
 
 (define waitpid*
   (let ((waitpid (EINTR-safe waitpid)))
@@ -931,7 +931,7 @@ otherwise by updating its state."
 (for-each (lambda (name)
(let ((old (lookup-services name)))
  ;; Actually add the new service now.
- (hashq-set! services name (cons new old
+ (hashq-set! %services name (cons new old
  (provided-by new)))
 
   (for-each register-single-service new-services))
@@ -953,9 +953,9 @@ requested to be removed."
(let ((old (lookup-services name)))
  (if (= 1 (length old))
  ;; Only service provides this service; remove it.
- (hashq-remove! services name)
+ (hashq-remove! %services name)
  ;; ELSE: remove service from providing services.
- (hashq-set! services name
+ (hashq-set! %services name
  (remove
   (lambda (lk-service)
 (eq? (canonical-name service)
@@ -973,7 +973,7 @@ requested to be removed."
(not (eq? key 'dmd))
(cons key service)))
  (_ #f)))   ; all other cases: #f.
- services)))
+ %services)))
 
   (let ((name (string->symbol service-name)))
 (cond ((eq? name 'all)
-- 
2.6.3




Re: submit package vinagre

2016-01-24 Thread Ricardo Wurmus
Hi,

> i create a definition package for vinagre program. Can you review and 
> return comments?

thanks for making the effort to package vinagre.

Normally, we expect contributions to be sent in patch format.  The best
way to do this is to clone the git repository, perform changes there,
commit them with appropriate summaries, and then use “git format-patch
-1”.  The file that is produced by the last command can then be attached
to an email.

For each new variable/package we usually have one commit/patch.

Following are some comments about the file you sent.

* All modules should have a license header.  You can adapt this from
  any of the other modules.

* The module definition declares to use “(guix build-system
  glib-or-gtk)”, but none of the packages you defined use this build
  system.  Are all the modules you import there really needed?

> (define-public gtk-vnc
>   (package
> (name "gtk-vnc")
> (version "0.5.4")
> (source
>  (origin
>   (method url-fetch)
>   (uri (string-append 
> "http://ftp.gnome.org/pub/gnome/sources/gtk-vnc/0.5/";

This line is too long.  You can split the string, but even better: you
can probably use “mirror://gnome/sources” here.

> (home-page "http://www.gnome.org";)

Is there no separate project webpage?

> (synopsis
>  "gtk-vnc")

“guix lint” would probably complain about this.  A synopsis should be
more than just the name.  It also should fit on one line.  Something
like “VNC viewer widget for GTK” maybe.

> (description
>  "gtk-vnc is a VNC viewer widget for GTK.")

That’s a little short.

> (license license:lgpl3)))

Only this version or is any later version of this license accepted?

> (define-public vinagre
>   (package (inherit gtk-vnc)

There is no good reason to inherit from “gtk-vnc”.

> (name "vinagre")
> (version "3.18.2")
> (source
>  (origin
>   (method url-fetch)
>   (uri (string-append 
> "http://ftp.gnome.org/pub/gnome/sources/vinagre/3.18/";
>   name "-" version ".tar.xz"))

Same as above: please use “mirror://gnome” here, and make sure the line
isn’t overly long.

>   (sha256
>(base32
> "1i7v90zw1s7526qx7b5pxzaray1l9wqxam2n7r1sjx8bvsci5f35"
> (build-system gnu-build-system)
> (inputs
>  `(("gnome-desktop" ,gnome-desktop)
>("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
>("libgnome-keyring" ,libgnome-keyring)
>("adwaita-icon-theme" ,adwaita-icon-theme)
>("gtk+" ,gtk+)
>("icon-naming-utils" ,icon-naming-utils)
>("libxml2" ,libxml2)
>("libsecret" ,libsecret)
>("gtk-vnc" ,gtk-vnc)
>("avahi" ,avahi)))
> (native-inputs
>  `(("pkg-config" ,pkg-config)
>;("python" ,python-2)

Why is this commented?

>("intltool" ,intltool)
>("itstool" ,itstool)
>("glib:bin" ,glib "bin")))
> (home-page "http://www.gnome.org";)

Does Vinagre have its own project home page?  How about
https://wiki.gnome.org/Apps/Vinagre instead?

> (synopsis
>  "Vinagre")

We need a real synopsis here...

> (description
>  "Vinagre is a remote desktop viewer for GNOME.")

...and something more descriptive here.

> (license license:lgpl3)))

Is this license correct?  Most files are licensed under GPLv2+, as far
as I can see (even though COPYING contains the text of the GPLv3).

~~ Ricardo




[PATCH] segfaulting gnunet-gtk.

2016-01-24 Thread Ricardo Wurmus
Hi,

the attached patches make for a buildable gnunet-gtk package, but it
doesn’t seem fully functional.  I see a segfault when switching tabs
in “gnunet-setup” after first interacting with the URL dropdown.

In “gnunet-gtk” I also don’t see anything more than the images.  There
should be more, I’m sure.

Maybe someone with some more familiarity with GNUnet could take a look
at this and come up with a fix.

~~ Ricardo

>From 5d277184ce57b792a5de13d5a607ca68159694f5 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus 
Date: Sun, 17 Jan 2016 15:28:53 +0100
Subject: [PATCH 1/2] gnu: gnunet: Add gstreamer and plugins to inputs.

* gnu/packages/gnunet.scm (gnunet)[inputs]: Add "gstreamer" and
  "gst-plugins-base".
---
 gnu/packages/gnunet.scm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gnu/packages/gnunet.scm b/gnu/packages/gnunet.scm
index 11e5aa8..0b55c1a 100644
--- a/gnu/packages/gnunet.scm
+++ b/gnu/packages/gnunet.scm
@@ -208,6 +208,8 @@ supports HTTPS, HTTPS and GnuTLS.")
(inputs
 `(("glpk" ,glpk)
   ("gnurl" ,gnurl)
+  ("gstreamer" ,gstreamer)
+  ("gst-plugins-base" ,gst-plugins-base)
   ("gnutls" ,gnutls)
   ("libextractor" ,libextractor)
   ("libgcrypt" ,libgcrypt)
-- 
2.6.3

>From 29708ddfff95b06ae2e7076d1e2fd13d93b782b9 Mon Sep 17 00:00:00 2001
From: Ni* Gillmann 
Date: Wed, 13 Jan 2016 18:36:31 +0100
Subject: [PATCH 2/2] gnu: Add gnunet-gtk.

* gnu/packages/gnunet.scm (gnunet-gtk): New variable.

Co-authored-by: Ricardo Wurmus 
---
 gnu/packages/gnunet.scm | 32 
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/gnunet.scm b/gnu/packages/gnunet.scm
index 0b55c1a..e06fe90 100644
--- a/gnu/packages/gnunet.scm
+++ b/gnu/packages/gnunet.scm
@@ -3,6 +3,8 @@
 ;;; Copyright © 2014 Sree Harsha Totakura 
 ;;; Copyright © 2015 Ludovic Courtès 
 ;;; Copyright © 2015 Efraim Flashner 
+;;; Copyright © 2016 Ni* Gillmann 
+;;; Copyright © 2016 Ricardo Wurmus 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -22,14 +24,17 @@
 (define-module (gnu packages gnunet)
   #:use-module (gnu packages)
   #:use-module (gnu packages file)
+  #:use-module (gnu packages aidc)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages geeqie)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages glib)
+  #:use-module (gnu packages gnome)
   #:use-module (gnu packages gnupg)
   #:use-module (gnu packages groff)
+  #:use-module (gnu packages gtk)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages libidn)
@@ -288,3 +293,30 @@ GNUnet services, including the @dfn{identity} and @dfn{file sharing}
 services.")
   (home-page "http://gnu.org/software/guix";)
   (license license:gpl3+
+
+(define-public gnunet-gtk
+  (package (inherit gnunet)
+(name "gnunet-gtk")
+(version (package-version gnunet))
+(source (origin
+  (method url-fetch)
+  (uri (string-append "mirror://gnu/gnunet/gnunet-gtk-"
+  version ".tar.gz"))
+  (sha256
+   (base32
+"1p38k1s6a2fmcfc9a7cf1zrdycm9h06kqdyand4s3k500nj6mb4g"
+(arguments
+ `(#:configure-flags
+   (list "--without-libunique"
+ "--with-qrencode")))
+(inputs
+ `(("gnunet" ,gnunet)
+   ("libgcrypt" ,libgcrypt)
+   ("gtk+" ,gtk+)
+   ("libextractor" ,libextractor)
+   ("glade3" ,glade3)
+   ("qrencode" ,qrencode)))
+(native-inputs
+ `(("pkg-config" ,pkg-config)
+   ("libglade" ,libglade)))
+(synopsis "Graphical front-end tools for GNUnet")))
-- 
2.6.3



Re: FOSDEM soon!

2016-01-24 Thread Andreas Enge
I just registered for the keysigning party at FOSDEM:
   https://fosdem.org/2016/keysigning/
If you intend to participate, today (whatever this means...) is the last
day for uploading the key.

Andreas




Re: [PATCH 1/1] doc: Show how to boot result of 'vm-image'.

2016-01-24 Thread Ludovic Courtès
Leo Famulari  skribis:

> * doc/guix.texi (Invoking guix system): Explain how to boot the QEMU
> images created by vm-image.

Hey!  Sorry for the looong delay!  I think this is a useful addition.

> @@ -9058,9 +9058,6 @@ Return a virtual machine or disk image of the operating 
> system declared
>  in @var{file} that stands alone.  Use the @option{--image-size} option
>  to specify the size of the image.
>  
> -When using @code{vm-image}, the returned image is in qcow2 format, which
> -the QEMU emulator can efficiently use.

I’m thinking there are often questions about using GuixSD in a VM etc.,
so it may well deserve one or two sections of its own.

What about leaving the above sentence here, and appending:

  @xref{Running GuixSD in a VM}, for more information on how to run the
  image in a virtual machine.

?

The rest of the material you added would then go to the new “Running
GuixSD in a VM” section, which could go maybe right after “Invoking guix
system”.  WDYT?

> +When using @code{vm-image}, the returned image is in qcow2 format, which
> +the QEMU emulator can efficiently use.

In the new section, this would need to be slightly adjusted to give more
context, like:

  One way to run GuixSD in a virtual machine is to build a GuixSD
  virtual machine image using @command{guix system vm-image}
  (@pxref{Invoking guix system}).  The returned image is in qcow2
  format, which the @uref{http://qemu.org/, QEMU emulator} can
  efficiently use.

> +To run the image in QEMU, copy it out of the store and give yourself
> +permission to write to the copy. When invoking QEMU, you must choose a
> +system emulator that is suitable for your hardware platform.  Here is a
> +minimal QEMU invocation that will boot GuixSD on x86_64 hardware:
> +
> +@example
> +$ qemu-system-x86_64 \
> +-net user \
> +-net nic,model=virtio \
> +-enable-kvm \
> +-m 256 \
> +/tmp/qemu-image
> +@end example

I think it would be nicer to put it on 3 lines.

> +And the annotated version:
> +
> +@example
> +# Hardware platform to emulate. This should match the host.
> +$ qemu-system-x86_64 \
> +# Unpriviliged user mode networking. Guest can access host but not vice
> +# versa. If you don't choose a network stack, the boot will fail.
> +-net user \
> +# You must create a network interface of a given model. If you don't
> +# create a NIC, the boot will fail. You can get a list of available NIC
> +# models by running `qemu-system-x86_64 -net nic,model=help`.
> +-net nic,model=virtio \
> +# If your system is x86 with hardware virtualization extensions,
> +# enabling the kernel virtual machine will make things run faster.
> +-enable-kvm \
> +# RAM available to the guest OS. Defaults to 128 megabytes, which is not
> +# enough for the Guix daemon.
> +-m 256 \
> +/tmp/qemu-image
> +@end example

I would typeset it as:

  @table @code
  @item qemu-system-x86_64
  This specifies the hardware platform to…

  @item -net user
  Enable unpriviliged user-mode networking…
  …

  @end @table

With all this, it’s going to look perfect!  :-)

Another question that people often ask is how to install GuixSD from the
installation image in a VM.  Maybe that could be added eventually in a
subsection of this new node?

Thank you!

Ludo’.



Re: Add "guix update" command

2016-01-24 Thread Christopher Allan Webber
Fabian Harfert writes:

> Hello,
>
> on IRC I already mentioned that, but there wasn't much resonance: I
> think for the purposes of non-developers the behavior of the "guix
> pull" command is too complicated.
>
> Normal users don't need a development version of the package manager,
> when they just want to get the newest package definitions to update
> their installed software. So it would be much easier and faster if
> there was a separate repository just containing the most recent package
> definitions.
>
> I propose to add a new command line option - e.g. "guix update" -
> fetching these latest package definitions and not doing anything else.
> They could be contained by a package whose definition is downloaded,
> for example "guix-packages".
>
> To avoid compatibility issues when there's a new release of Guix itself
> this package must be versioned equal to the Guix version numbers. I'm
> thinking of the following:
>
>   The user is running Guix 1.2.1 and has installed the package
>   guix-packages-1.2.1-4 containing the package definitions. Now he runs
>   "guix update" and fetches guix-packages-1.2.1-5 with the new package
>   definitions including the new Guix release 1.2.2. He now updates Guix
>   to this version which has the new guix-packages-1.2.2-0 as an input.
>   When he runs "guix update" again, guix-packages-1.2.2-1 is installed,
>   which contains package definitions that make use of some new features.
>
> This would just be for the time between the Guix releases. I think we
> don't need support for older versions of Guix except from keeping the
> last guix-packages package, but we could also do some security
> or minor updates to the older package definitions which would provide
> users the possibility to use GuixSD as a stable distribution like
> Debian.
>
> Another advantage of the separation between Guix itself and the package
> definitions is that it's easy to provide an own or foreign
> guix-packages package which would promote the decentralization of Guix.

I'm not really for this.  It would require a lot of careful planning.
Additionally, right now the packages depend on Guix code generally, so
as Guix evolves its internal APIs, packages shipped with it can depend
on that.  That seems valuable for the "core" set of packages.

I'm afraid we'd lose this if we'd take the above suggested route.



Qt-5 in core-updates

2016-01-24 Thread Andreas Enge
Hello,

qt-5 fails to build on both x86_64 and armhf in core-updates with the
following error:
Traceback (most recent call last):
  File 
"/tmp/nix-build-qt-5.5.1.drv-0/qt-everywhere-opensource-src-5.5.1/qtwebkit/Source/WebKit2/Scripts/generate-messages-header.py",
 line 28, in 
import webkit2.messages
EOFError: EOF read where object expected
Makefile.WebKit2.DerivedSources:881: recipe for target 
'generated/PluginProxyMessages.h' failed
make[3]: *** [generated/PluginProxyMessages.h] Error 1

Surprisingly, it succeeds on i686 (and its build is disabled on mips).

宋文武, you appear to be the most knowledgeable among us concerning Qt;
could you maybe have look?

Thank you,

Andreas




Re: [PATCH] import: pypi: read requirements from wheels.

2016-01-24 Thread Ludovic Courtès
Cyril Roelandt  skribis:

> * guix/import/pypi.scm (latest-wheel-release): New function.

s/function/procedure/  :-)

Please also mention the changes in ‘guess-requirements’,
‘compute-inputs’, etc.

So do I get it right that pypi now provides packages both in Wheels and
in “traditional” format, but that Wheels provides more info about
dependencies?

IOW: What does this buy us?  :-)

> +(define (latest-wheel-release pypi-package)
> +  "Return the url of the wheel for the latest release of pypi-package, of #f 
> if

Line a bit long.  s/of/or/

> +  (define (read-wheel-metadata wheel-archive)
> +;; Given WHEEL-ARCHIVE, a ZIP Python wheel archive, return the package's
> +;; requirements.
> +(let* ((dirname (string-append
> + (string-join
> +  (list-head
> +   (string-split (last (string-split wheel-url #\/))  
> #\-) 2)
> +"-")

"-" should be aligned with (list-head.

I would be best to turn this transformation into a top-level procedure,
say ‘wheel-url->extracted-directory’.

> + ".dist-info"))
> +   (json-file (string-append dirname "/metadata.json")))
> +  (and (system* "unzip" "-q" wheel-archive json-file)
> +   (dynamic-wind
> + (const #t)
> + (lambda ()
> +   (call-with-input-file json-file
> + (lambda (port)
> +   (let* ((metadata (json->scm port))
> +  (run_requires (hash-ref metadata "run_requires"))
> +  (requirements (hash-ref (list-ref run_requires 0)
> +  "requires")))
> + (map (lambda (r)
> +(python->package-name (clean-requirement r)))
> +  requirements)
> + (lambda ()
> +   (delete-file json-file)
> +   (rmdir dirname))

Eventually I wonder if we should do this in a derivation instead of
hoping for ‘unzip’ & co. to be available there (“eventually”, because
the problem is already present with the ‘requirements.txt’ thingie.)

Could you add a test in tests/pypi.scm?

Thanks!

Ludo’.



[PATCH 12/13] build: Use 'GEN' and 'at' silent rules.

2016-01-24 Thread Mathieu Lirzin

* daemon.am (nix/libstore/schema.sql.hh, etc/guix-daemon.service)
(etc/guix-daemon.conf): Use $(AM_V_GEN).
* doc.am (doc/os-config-%.texi, .png.eps): Likewise.
* Makefile.am (guix-binary.%.tar.xz, gen-ChangeLog, gen-AUTHORS):
Likewise.
(assert-binaries-available, assert-final-inputs-self-contained)
(assert-no-store-file-names, sync-descriptions): Use $(AM_V_at).
---
 Makefile.am | 14 +++---
 daemon.am   | 11 ++-
 doc.am  |  4 ++--
 3 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index bc015e2..6784da0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -420,7 +420,7 @@ include emacs.am
 
 # The self-contained tarball.
 guix-binary.%.tar.xz:
-	-GUIX_PACKAGE_PATH= \
+	$(AM_V_GEN)GUIX_PACKAGE_PATH= \
 	$(top_builddir)/pre-inst-env "$(GUILE)"			\
 	  "$(top_srcdir)/build-aux/make-binary-tarball.scm" "$*" "$@"
 
@@ -431,11 +431,11 @@ dist-hook: assert-no-store-file-names
 distcheck-hook: assert-binaries-available assert-final-inputs-self-contained
 
 sync-descriptions:
-	-GUIX_PACKAGE_PATH= \
+	$(AM_V_at)GUIX_PACKAGE_PATH= \
 	 $(top_builddir)/pre-inst-env guix lint --checkers=gnu-description
 
 gen-ChangeLog:
-	if test -d .git; then\
+	$(AM_V_GEN)if test -d .git; then		\
 	  $(top_srcdir)/build-aux/gitlog-to-changelog	\
 	> $(distdir)/cl-t;\
 	  rm -f $(distdir)/ChangeLog;			\
@@ -443,7 +443,7 @@ gen-ChangeLog:
 	fi
 
 gen-AUTHORS:
-	if test -d .git; then	\
+	$(AM_V_GEN)if test -d .git; then			\
 	  rm -f "$(distdir)/AUTHORS";\
 	  $(top_builddir)/pre-inst-env "$(GUILE)"		\
 	"$(top_srcdir)/build-aux/generate-authors.scm"	\
@@ -452,7 +452,7 @@ gen-AUTHORS:
 
 # Make sure we're not shipping a file that embeds a local /gnu/store file name.
 assert-no-store-file-names:
-	if grep -r --exclude=*.texi --exclude=*.info\
+	$(AM_V_at)if grep -r --exclude=*.texi --exclude=*.info			\
 	 "$(storedir)/[a-z0-9]{32}-" $(distdir) ;\
 	then	\
 	  echo "error: store file names embedded in the distribution" >&2 ;	\
@@ -461,12 +461,12 @@ assert-no-store-file-names:
 
 # Make sure hydra.gnu.org has the important binaries.
 assert-binaries-available:
-	$(top_builddir)/pre-inst-env "$(GUILE)"\
+	$(AM_V_at)$(top_builddir)/pre-inst-env "$(GUILE)"			\
 	  "$(top_srcdir)/build-aux/check-available-binaries.scm"
 
 # Make sure the final inputs don't refer to bootstrap tools.
 assert-final-inputs-self-contained:
-	$(top_builddir)/pre-inst-env "$(GUILE)"\
+	$(AM_V_at)$(top_builddir)/pre-inst-env "$(GUILE)"			\
 	  "$(top_srcdir)/build-aux/check-final-inputs-self-contained.scm"
 
 .PHONY: sync-descriptions gen-ChangeLog gen-AUTHORS clean-go make-go
diff --git a/daemon.am b/daemon.am
index ba4be50..3c15531 100644
--- a/daemon.am
+++ b/daemon.am
@@ -1,5 +1,6 @@
 # GNU Guix --- Functional package management for GNU
 # Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès 
+# Copyright © 2016 Mathieu Lirzin 
 #
 # This file is part of GNU Guix.
 #
@@ -155,7 +156,7 @@ noinst_HEADERS =		\
   $(guix_daemon_headers)
 
 nix/libstore/schema.sql.hh: nix/libstore/schema.sql
-	$(GUILE) --no-auto-compile -c\
+	$(AM_V_GEN)$(GUILE) --no-auto-compile -c		\
 	  "(use-modules (rnrs io ports))			\
 	   (call-with-output-file \"$@\"			\
 	 (lambda (out)	\
@@ -185,9 +186,9 @@ nodist_systemdservice_DATA = etc/guix-daemon.service
 
 etc/guix-daemon.service: etc/guix-daemon.service.in	\
 			 $(top_builddir)/config.status
-	$(MKDIR_P) "`dirname "$@"`"
+	$(AM_V_GEN)$(MKDIR_P) "`dirname $@`";\
 	$(SED) -e 's|@''bindir''@|$(bindir)|' <\
-	   "$(srcdir)/etc/guix-daemon.service.in" > "$@.tmp"
+	   "$(srcdir)/etc/guix-daemon.service.in" > "$@.tmp";	\
 	mv "$@.tmp" "$@"
 
 # The '.conf' job for Upstart.
@@ -196,9 +197,9 @@ nodist_upstartjob_DATA = etc/guix-daemon.conf
 
 etc/guix-daemon.conf: etc/guix-daemon.conf.in	\
 			 $(top_builddir)/config.status
-	$(MKDIR_P) "`dirname "$@"`"
+	$(AM_V_GEN)$(MKDIR_P) "`dirname $@`";\
 	$(SED) -e 's|@''bindir''@|$(bindir)|' <\
-	   "$(srcdir)/etc/guix-daemon.conf.in" > "$@.tmp"
+	   "$(srcdir)/etc/guix-daemon.conf.in" > "$@.tmp";		\
 	mv "$@.tmp" "$@"
 
 EXTRA_DIST +=	\
diff --git a/doc.am b/doc.am
index 73db930..6706682 100644
--- a/doc.am
+++ b/doc.am
@@ -53,7 +53,7 @@ EXTRA_DIST   += $(OS_CONFIG_EXAMPLES_TEXI)
 MAINTAINERCLEANFILES  = $(OS_CONFIG_EXAMPLES_TEXI)
 
 doc/os-config-%.texi: gnu/system/examples/%.tmpl
-	$(MKDIR_P) "`dirname "$@"`"
+	$(AM_V_GEN)$(MKDIR_P) "`dirname $@`";	\
 	cp "$<" "$@"
 
 infoimagedir = $(infodir)/images
@@ -80,7 +80,7 @@ DOT_OPTIONS =	\
 	mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
 
 .png.eps:
-	convert "$<" "$@-tmp.eps"
+	$(AM_V_GEN)convert "$<" "$@-tmp.eps"; \
 	mv "$@-tmp.eps" "$@"
 
 # We cannot add new dependencies to `doc/guix.pdf' & co. (info "(automake)


[PATCH 03/13] lint: Rewrite 'check-patch-file-names'.

2016-01-24 Thread Mathieu Lirzin

* guix/scripts/lint.scm (check-patch-file-names): Improve clarity by
reversing the logic.
---
 guix/scripts/lint.scm | 29 +
 1 file changed, 13 insertions(+), 16 deletions(-)

diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm
index 25f49a7..e729398 100644
--- a/guix/scripts/lint.scm
+++ b/guix/scripts/lint.scm
@@ -413,24 +413,21 @@ warning for PACKAGE mentionning the FIELD."
 (define (check-patch-file-names package)
   "Emit a warning if the patches requires by PACKAGE are badly named or if the
 patch could not be found."
-  (guard (c ((message-condition? c)   ;raised by 'search-patch'
+  (guard (c ((message-condition? c) ;raised by 'search-patch'
  (emit-warning package (condition-message c)
'patch-file-names)))
-(let ((patches   (and=> (package-source package) origin-patches))
-  (name  (package-name package)))
-  (when (and patches
- (any (match-lambda
-((? string? patch)
- (let ((file (basename patch)))
-   (not (eq? (string-contains file name) 0
-(_
- ;; This must be an  or something like that.
- #f))
-  patches))
-(emit-warning package
-  (_ "file names of patches should start with \
-the package name")
-  'patch-file-names)
+(unless (every (match-lambda;patch starts with package name?
+ ((? string? patch)
+  (and=> (string-contains (basename patch)
+  (package-name package))
+ zero?))
+ (_  #f)) ;must be an  or something like that.
+   (or (and=> (package-source package) origin-patches)
+   '()))
+  (emit-warning
+   package
+   (_ "file names of patches should start with the package name")
+   'patch-file-names
 
 (define (escape-quotes str)
   "Replace any quote character in STR by an escaped quote character."


[PATCH 07/13] build: Add 'DL' silent rule.

2016-01-24 Thread Mathieu Lirzin

* Makefile.am (AM_V_DL, AM_V_DL_, AM_V_DL_0): New variables.
* gnu-system.am (gnu/packages/bootstrap/x86_64-linux/guile-2.0.9.tar.xz)
(gnu/packages/bootstrap/i686-linux/guile-2.0.9.tar.xz)
(gnu/packages/bootstrap/armhf-linux/guile-2.0.11.tar.xz)
(gnu/packages/bootstrap/mips64el-linux/guile-2.0.9.tar.xz): Use $(AM_V_DL).
---
 Makefile.am   | 10 ++
 gnu-system.am | 21 +
 2 files changed, 23 insertions(+), 8 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 1ede6d4..754c19a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,6 +2,7 @@
 # Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès 
 # Copyright © 2013 Andreas Enge 
 # Copyright © 2015 Alex Kost 
+# Copyright © 2016 Mathieu Lirzin 
 #
 # This file is part of GNU Guix.
 #
@@ -471,3 +472,12 @@ assert-final-inputs-self-contained:
 .PHONY: sync-descriptions gen-ChangeLog gen-AUTHORS clean-go make-go
 .PHONY: assert-no-store-file-names assert-binaries-available
 .PHONY: assert-final-inputs-self-contained
+
+## -- ##
+## Silent rules.  ##
+## -- ##
+
+AM_V_DL = $(AM_V_DL_$(V))
+AM_V_DL_ = $(AM_V_DL_$(AM_DEFAULT_VERBOSITY))
+AM_V_DL_0 = @echo "  DL  " $@;
+
diff --git a/gnu-system.am b/gnu-system.am
index 3426056..a3d43e1 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -1,6 +1,7 @@
 # GNU Guix --- Functional package management for GNU
 # Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès 
 # Copyright © 2013, 2014, 2015, 2016 Andreas Enge 
+# Copyright © 2016 Mathieu Lirzin 
 # Copyright © 2013, 2014, 2015, 2016 Mark H Weaver 
 #
 # This file is part of GNU Guix.
@@ -808,14 +809,18 @@ DOWNLOAD_FILE =\
"$(top_srcdir)/build-aux/download.scm"
 
 gnu/packages/bootstrap/x86_64-linux/guile-2.0.9.tar.xz:
-	$(MKDIR_P) `dirname "$@"`
-	$(DOWNLOAD_FILE) "$@" "037b103522a2d0d7d69c7ffd8de683dfe5bb4b59c1fafd70b4ffd397fd2f57f0"
+	$(AM_V_DL)$(MKDIR_P) `dirname "$@"`;			\
+	$(AM_V_P) && fd=1 || fd=- ; $(DOWNLOAD_FILE) "$@"	\
+	  "037b103522a2d0d7d69c7ffd8de683dfe5bb4b59c1fafd70b4ffd397fd2f57f0" >&$$fd
 gnu/packages/bootstrap/i686-linux/guile-2.0.9.tar.xz:
-	$(MKDIR_P) `dirname "$@"`
-	$(DOWNLOAD_FILE) "$@" "b757cd46bf13ecac83fb8e955fb50096ac2d17bb610ca8eb816f29302a00a846"
+	$(AM_V_DL)$(MKDIR_P) `dirname "$@"`;	\
+	$(AM_V_P) && fd=1 || fd=- ; $(DOWNLOAD_FILE) "$@"	\
+	  "b757cd46bf13ecac83fb8e955fb50096ac2d17bb610ca8eb816f29302a00a846" >&$$fd
 gnu/packages/bootstrap/armhf-linux/guile-2.0.11.tar.xz:
-	$(MKDIR_P) `dirname "$@"`
-	$(DOWNLOAD_FILE) "$@" "e551d05d4d385d6706ab8d574856a087758294dc90ab4c06e70a157a685e23d6"
+	$(AM_V_DL)$(MKDIR_P) `dirname "$@"`;	\
+	$(AM_V_P) && fd=1 || fd=- ; $(DOWNLOAD_FILE) "$@"	\
+	  "e551d05d4d385d6706ab8d574856a087758294dc90ab4c06e70a157a685e23d6" >&$$fd
 gnu/packages/bootstrap/mips64el-linux/guile-2.0.9.tar.xz:
-	$(MKDIR_P) `dirname "$@"`
-	$(DOWNLOAD_FILE) "$@" "994680f0001346864aa2c2cc5110f380ee7518dcd701c614291682b8e948f73b"
+	$(AM_V_DL)$(MKDIR_P) `dirname "$@"`;	\
+	$(AM_V_P) && fd=1 || fd=- ; $(DOWNLOAD_FILE) "$@"	\
+	  "994680f0001346864aa2c2cc5110f380ee7518dcd701c614291682b8e948f73b" >&$$fd


[PATCH 00/13] New syntax 'package@version' and compilation improvements.

2016-01-24 Thread Mathieu Lirzin

Here is a set of patches, following  and the
poll about the new syntax for separating package names and version.  As a
bonus it contains:

  - a bug fix for guix lint tests
  - a compilation speed increase
  - some nice custom silent rules

It is more than possible, that I overkooked some usage of of "PACKAGE-VERSION"
that should be fixed.  Don't hesitate to tell me if you spot one.

Mathieu Lirzin (13):
  tests: Use 'dummy-origin' for lint tests when possible.
  lint: Remove an unneeded clause in 'check-patch-file-names'.
  lint: Rewrite 'check-patch-file-names'.
  utils: Use '@' for separating package names and version numbers.
  packages: Use '@' in package record printers.
  build: Generate man pages after compiling guile objects.
  build: Add 'DL' silent rule.
  build: Add 'DOT' silent rule.
  build: Add 'EMACS' silent rule.
  build: Add 'HELP2MAN' silent rule.
  build: Delete emacs/guix-autoloads.el when 'make clean'.
  build: Use 'GEN' and 'at' silent rules.
  Update .gitignore.

 .gitignore  | 158 ++--
 Makefile.am |  35 +++--
 NEWS|  13 
 configure.ac|   4 +
 daemon.am   |  11 +--
 doc.am  | 100 -
 doc/guix.texi   |  12 +--
 emacs.am|   5 +-
 emacs/guix-base.el  |   2 +-
 emacs/guix-main.scm |   4 +-
 gnu-system.am   |  21 --
 gnu/packages.scm|  10 +--
 gnu/packages/commencement.scm   |   2 +-
 guix/build/utils.scm|  25 ++-
 guix/import/cabal.scm   |   2 +-
 guix/import/elpa.scm|   2 +-
 guix/packages.scm   |  11 ++-
 guix/scripts/import/hackage.scm |   2 +-
 guix/scripts/lint.scm   |  34 -
 guix/ui.scm |   4 +-
 tests/graph.scm |   2 +-
 tests/guix-build.sh |   4 +-
 tests/guix-lint.sh  |   2 +-
 tests/guix-package.sh   |   4 +-
 tests/lint.scm  |  12 +--
 tests/packages.scm  |   4 +-
 tests/ui.scm|   6 +-
 tests/utils.scm |   4 +-
 28 files changed, 252 insertions(+), 243 deletions(-)

-- 
2.7.0.rc3



[PATCH 09/13] build: Add 'EMACS' silent rule.

2016-01-24 Thread Mathieu Lirzin

* Makefile.am (AM_V_EMACS, AM_V_EMACS_, AM_V_EMACS_0): New variables.
* emacs.am [HAVE_EMACS] ($(AUTOLOADS)): Use $(AM_V_EMACS).
---
 Makefile.am | 4 
 emacs.am| 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index 4c71a12..d29a49d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -485,3 +485,7 @@ AM_V_DOT = $(AM_V_DOT_$(V))
 AM_V_DOT_ = $(AM_V_DOT_$(AM_DEFAULT_VERBOSITY))
 AM_V_DOT_0 = @echo "  DOT " $@;
 
+AM_V_EMACS = $(AM_V_EMACS_$(V))
+AM_V_EMACS_ = $(AM_V_EMACS_$(AM_DEFAULT_VERBOSITY))
+AM_V_EMACS_0 = @echo "  EMACS   " $@;
+
diff --git a/emacs.am b/emacs.am
index d0d4dfb..0342574 100644
--- a/emacs.am
+++ b/emacs.am
@@ -1,5 +1,6 @@
 # GNU Guix --- Functional package management for GNU
 # Copyright © 2014, 2015 Alex Kost 
+# Copyright © 2016 Mathieu Lirzin 
 #
 # This file is part of GNU Guix.
 #
@@ -59,7 +60,7 @@ dist_lisp_DATA =\
 nodist_lisp_DATA = emacs/guix-config.el
 
 $(AUTOLOADS): $(ELFILES)
-	$(EMACS) --batch --eval		\
+	$(AM_V_EMACS)$(EMACS) --batch --eval\
 	  "(let ((backup-inhibited t)	\
 	 (generated-autoload-file\
 	  (expand-file-name \"$(AUTOLOADS)\" \"$(srcdir)\")))	\


[PATCH 06/13] build: Generate man pages after compiling guile objects.

2016-01-24 Thread Mathieu Lirzin

This improves compilation speed since scripts are not compiled twice.
When building with ‘make -j4‘ from a clean repository on an Intel
i5-2540M, the time of compilation gets from:

real5m7.220s
user18m49.788s
sys 0m12.964s

down to:

real2m20.820s
user7m25.992s
sys 0m7.464s

* configure.ac (BUILD_FROM_GIT): New Automake conditional.
* doc.am (SUBCOMMANDS): Delete variable.
(dist_man1_MANS): List all subcommands man pages.
(doc/guix.1): Build only if BUILD_FROM_GIT.  Depend on 'scripts/guix'
instead of all subcommands.
[BUILD_DAEMON] (doc/guix-daemon): Likewise.  Replace the
'nix/nix-daemon/guix-daemon.cc' prerequisite with 'guix-daemon'.
[BUILD_FROM_GIT] (gen_man): New variable.
[BUILD_FROM_GIT] (doc/guix-%.1): New target.
(CLEANFILES) [BUILD_FROM_GIT]: Add $(dist_man1_MANS).
---
 configure.ac |  4 +++
 doc.am   | 90 +---
 2 files changed, 47 insertions(+), 47 deletions(-)

diff --git a/configure.ac b/configure.ac
index f61c04c..0bd9144 100644
--- a/configure.ac
+++ b/configure.ac
@@ -198,6 +198,10 @@ AC_CACHE_SAVE
 
 m4_include([config-daemon.ac])
 
+dnl Are we building from git checked-out sources, or a tarball ?  This allows
+dnl specifying some rules used only when bootstrapping.
+AM_CONDITIONAL([BUILD_FROM_GIT], [test -d "$srcdir/.git"])
+
 dnl `dot' (from the Graphviz package) is only needed for maintainers.
 dnl See `Building from Git' in the manual for more info.
 AM_MISSING_PROG([DOT], [dot])
diff --git a/doc.am b/doc.am
index f15efcc..9214405 100644
--- a/doc.am
+++ b/doc.am
@@ -2,6 +2,7 @@
 # Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès 
 # Copyright © 2013 Andreas Enge 
 # Copyright © 2016 Taylan Ulrich Bayırlı/Kammer 
+# Copyright © 2016 Mathieu Lirzin 
 #
 # This file is part of GNU Guix.
 #
@@ -91,55 +92,50 @@ ps-local: $(DOT_FILES=%.dot=$(top_srcdir)/%.eps)		\
 	  $(top_srcdir)/doc/images/coreutils-size-map.eps
 dvi-local: ps-local
 
-
-# Manual pages.
-
-doc/guix.1: $(SUBCOMMANDS:%=guix/scripts/%.scm)
-	-LANGUAGE= $(top_builddir)/pre-inst-env	\
-	  $(HELP2MAN) --output="$@" guix
-
-# Note: Do not depend on 'guix-daemon' since that would trigger a rebuild even
-# for people building from a tarball.
-doc/guix-daemon.1: nix/nix-daemon/guix-daemon.cc
-	-LANGUAGE= $(top_builddir)/pre-inst-env	\
-	  $(HELP2MAN) --output="$@" guix-daemon
-
-define subcommand-manual-target
-
-doc/guix-$(1).1: guix/scripts/$(1).scm
-	-LANGUAGE= $(top_builddir)/pre-inst-env		\
-	  $(HELP2MAN) --output="$$@" "guix $(1)"
-
-endef
-
-SUBCOMMANDS :=	\
-  archive	\
-  build		\
-  challenge	\
-  download	\
-  edit		\
-  environment	\
-  gc		\
-  hash		\
-  import	\
-  lint		\
-  package	\
-  publish	\
-  pull		\
-  refresh	\
-  size		\
-  system
-
-$(eval $(foreach subcommand,$(SUBCOMMANDS),			\
-  $(call subcommand-manual-target,$(subcommand
-
-dist_man1_MANS =\
-  doc/guix.1	\
-  $(SUBCOMMANDS:%=doc/guix-%.1)
+##  ##
+##  Man pages.  ##
+##  ##
+
+# The man pages are generated using 'help2man'.
+dist_man1_MANS = 			\
+  doc/guix.1\
+  doc/guix-archive.1			\
+  doc/guix-build.1			\
+  doc/guix-challenge.1			\
+  doc/guix-download.1			\
+  doc/guix-edit.1			\
+  doc/guix-environment.1		\
+  doc/guix-gc.1\
+  doc/guix-hash.1			\
+  doc/guix-import.1			\
+  doc/guix-lint.1			\
+  doc/guix-package.1			\
+  doc/guix-publish.1			\
+  doc/guix-pull.1			\
+  doc/guix-refresh.1			\
+  doc/guix-size.1			\
+  doc/guix-system.1
 
 if BUILD_DAEMON
+dist_man1_MANS += doc/guix-daemon.1
+endif
+
+# Avoid re-generating the man pages when building from tarballs.
+if BUILD_FROM_GIT
+
+gen_man = LANGUAGE= $(top_builddir)/pre-inst-env $(HELP2MAN)
+
+doc/guix.1: scripts/guix
+	  $(gen_man) --output="$@" `basename $<`
 
-dist_man1_MANS +=\
-  doc/guix-daemon.1
+doc/guix-%.1: guix/scripts/%.go
+	  $(gen_man) --output="$@"  "guix `basename $< .go`"
 
+if BUILD_DAEMON
+doc/guix-daemon.1: guix-daemon
+	  $(gen_man) --output="$@" "$<"
 endif
+
+CLEANFILES += $(dist_man1_MANS)
+
+endif BUILD_FROM_GIT


[PATCH 02/13] lint: Remove an unneeded clause in 'check-patch-file-names'.

2016-01-24 Thread Mathieu Lirzin

* guix/scripts/lint.scm (check-patch-file-names): Don't check if patches
start with the package full name since matching the package name (which
is a prefix of the full name) is sufficient.
---
 guix/scripts/lint.scm | 9 +++--
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm
index e2cc965..25f49a7 100644
--- a/guix/scripts/lint.scm
+++ b/guix/scripts/lint.scm
@@ -2,7 +2,7 @@
 ;;; Copyright © 2014 Cyril Roelandt 
 ;;; Copyright © 2014, 2015 Eric Bavier 
 ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès 
-;;; Copyright © 2015 Mathieu Lirzin 
+;;; Copyright © 2015, 2016 Mathieu Lirzin 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -417,15 +417,12 @@ patch could not be found."
  (emit-warning package (condition-message c)
'patch-file-names)))
 (let ((patches   (and=> (package-source package) origin-patches))
-  (name  (package-name package))
-  (full-name (package-full-name package)))
+  (name  (package-name package)))
   (when (and patches
  (any (match-lambda
 ((? string? patch)
  (let ((file (basename patch)))
-   (not (or (eq? (string-contains file name) 0)
-(eq? (string-contains file full-name)
- 0)
+   (not (eq? (string-contains file name) 0
 (_
  ;; This must be an  or something like that.
  #f))


[PATCH 05/13] packages: Use '@' in package record printers.

2016-01-24 Thread Mathieu Lirzin

* guix/packages.scm : Use '@' in record printer.
* guix/import/cabal.scm : Likewise
* guix/import/elpa.scm : Likewise.
* tests/packages.scm: Adapt to it.
---
 guix/import/cabal.scm | 2 +-
 guix/import/elpa.scm  | 2 +-
 guix/packages.scm | 2 +-
 tests/packages.scm| 4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/guix/import/cabal.scm b/guix/import/cabal.scm
index c20e074..09130e4 100644
--- a/guix/import/cabal.scm
+++ b/guix/import/cabal.scm
@@ -608,7 +608,7 @@ If #f use the function 'port-filename' to obtain it."
 
 (set-record-type-printer! 
   (lambda (package port)
-(format port "#"
+(format port "#"
   (cabal-package-name package)
   (cabal-package-version package
 
diff --git a/guix/import/elpa.scm b/guix/import/elpa.scm
index 8c10668..529de4f 100644
--- a/guix/import/elpa.scm
+++ b/guix/import/elpa.scm
@@ -121,7 +121,7 @@ REPO."
 
 (set-record-type-printer! 
   (lambda (package port)
-(format port "#"
+(format port "#"
   (elpa-package-name package)
   (elpa-package-version package
 
diff --git a/guix/packages.scm b/guix/packages.scm
index c43b36f..48c012a 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -279,7 +279,7 @@ name of its URI."
   (lambda (package port)
 (let ((loc(package-location package))
   (format simple-format))
-  (format port "#"
+  (format port "#"
   (package-name package)
   (package-version package)
   (if loc
diff --git a/tests/packages.scm b/tests/packages.scm
index 6a2f4f0..9d37fb6 100644
--- a/tests/packages.scm
+++ b/tests/packages.scm
@@ -58,7 +58,7 @@
 (test-begin "packages")
 
 (test-assert "printer with location"
-  (string-match "^#$"
+  (string-match "^#$"
 (with-output-to-string
   (lambda ()
 (write
@@ -66,7 +66,7 @@
(location (make-location "foo.scm" 42 7
 
 (test-assert "printer without location"
-  (string-match "^#$"
+  (string-match "^#$"
 (with-output-to-string
   (lambda ()
 (write


[PATCH 13/13] Update .gitignore.

2016-01-24 Thread Mathieu Lirzin

* .gitignore: Sort lines.  Use globbing for "*.{eps,pdf,png,tar.xz}"
files.
---
 .gitignore | 158 -
 1 file changed, 72 insertions(+), 86 deletions(-)

diff --git a/.gitignore b/.gitignore
index 098c9bb..b5bbbaa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,9 +1,16 @@
-*~
-,*
-*.tmp
+*.eps
 *.go
-tmp
 *.log
+*.pdf
+*.png
+*.tar.xz
+*.tmp
+*~
+,*
+/ABOUT-NLS
+/INSTALL
+/aclocal.m4
+/autom4te.cache
 /build-aux/compile
 /build-aux/config.guess
 /build-aux/config.rpath
@@ -14,14 +21,41 @@ tmp
 /build-aux/missing
 /build-aux/test-driver
 /build-aux/texinfo.tex
-/configure
-Makefile.in
-Makefile
-/autom4te.cache
-config.cache
-/aclocal.m4
 /config.status
-/ABOUT-NLS
+/configure
+/doc/*.1
+/doc/.dirstamp
+/doc/guix.aux
+/doc/guix.cp
+/doc/guix.cps
+/doc/guix.fn
+/doc/guix.fns
+/doc/guix.info
+/doc/guix.info-[0-9]
+/doc/guix.ky
+/doc/guix.pg
+/doc/guix.toc
+/doc/guix.tp
+/doc/guix.vr
+/doc/guix.vrs
+/doc/os-config-bare-bones.texi
+/doc/os-config-desktop.texi
+/doc/stamp-vti
+/doc/version.texi
+/emacs/Makefile
+/emacs/Makefile.in
+/emacs/guix-autoloads.el
+/emacs/guix-config.el
+/emacs/guix-helper.scm
+/etc/guix-daemon.conf
+/etc/guix-daemon.service
+/guix-daemon
+/guix-register
+/guix/config.scm
+/libformat.a
+/libstore.a
+/libutil.a
+/m4/*
 /m4/ChangeLog
 /m4/gettext.m4
 /m4/iconv.m4
@@ -31,6 +65,20 @@ config.cache
 /m4/nls.m4
 /m4/po.m4
 /m4/progtest.m4
+/nix-setuid-helper
+/nix/AUTHORS
+/nix/COPYING
+/nix/config.h
+/nix/config.h.in
+/nix/nix-daemon/nix-daemon.cc
+/nix/nix-setuid-helper/nix-setuid-helper.cc
+/nix/scripts/guix-authenticate
+/nix/scripts/list-runtime-roots
+/nix/scripts/offload
+/nix/scripts/substitute
+/po/guix/*.gmo
+/po/guix/*.insert-header
+/po/guix/*.mo
 /po/guix/ChangeLog
 /po/guix/Makefile.in.in
 /po/guix/Makevars.template
@@ -39,15 +87,15 @@ config.cache
 /po/guix/boldquot.sed
 /po/guix/en@boldquot.*
 /po/guix/en@quot.*
+/po/guix/guix.pot
 /po/guix/insert-header.sin
-/po/guix/*.insert-header
 /po/guix/quot.sed
 /po/guix/remove-potcdate.sed
 /po/guix/remove-potcdate.sin
 /po/guix/stamp-po
-/po/guix/guix.pot
-/po/guix/*.mo
-/po/guix/*.gmo
+/po/packages/*.gmo
+/po/packages/*.insert-header
+/po/packages/*.mo
 /po/packages/ChangeLog
 /po/packages/Makefile.in.in
 /po/packages/Makevars.template
@@ -56,84 +104,22 @@ config.cache
 /po/packages/boldquot.sed
 /po/packages/en@boldquot.*
 /po/packages/en@quot.*
+/po/packages/guix-packages.pot
 /po/packages/insert-header.sin
-/po/packages/*.insert-header
 /po/packages/quot.sed
 /po/packages/remove-potcdate.sed
 /po/packages/remove-potcdate.sin
 /po/packages/stamp-po
-/po/packages/guix-packages.pot
-/po/packages/*.mo
-/po/packages/*.gmo
-/tests/*.trs
-/INSTALL
-/m4/*
 /pre-inst-env
-/doc/.dirstamp
-/doc/guix.info
-/doc/guix.info-[0-9]
-/doc/guix.pdf
-/doc/stamp-vti
-/doc/version.texi
-/gnu/packages/bootstrap/x86_64-linux/guile-2.0.9.tar.xz
-/gnu/packages/bootstrap/i686-linux/guile-2.0.9.tar.xz
-/gnu/packages/bootstrap/armhf-linux/guile-2.0.11.tar.xz
-/gnu/packages/bootstrap/mips64el-linux/guile-2.0.9.tar.xz
-/guix/config.scm
-/nix/nix-daemon/nix-daemon.cc
-/nix/config.h
-/nix/config.h.in
-stamp-h[0-9]
-/nix/AUTHORS
-/nix/COPYING
-/libformat.a
-/libstore.a
-/libutil.a
-/guix-daemon
-/test-tmp
-/nix/scripts/list-runtime-roots
-/test-env
-/nix/nix-setuid-helper/nix-setuid-helper.cc
 /scripts/guix
-/doc/guix.aux
-/doc/guix.cp
-/doc/guix.cps
-/doc/guix.fn
-/doc/guix.fns
-/doc/guix.ky
-/doc/guix.pg
-/doc/guix.toc
-/doc/guix.tp
-/doc/guix.vr
-/doc/guix.vrs
-/nix/scripts/substitute
-/doc/images/bootstrap-graph.png
-/doc/images/bootstrap-graph.eps
-/guix-register
+/test-env
+/test-tmp
+/tests/*.trs
 GPATH
 GRTAGS
 GTAGS
-/nix-setuid-helper
-/nix/scripts/guix-authenticate
-/nix/scripts/offload
-/emacs/Makefile.in
-/emacs/Makefile
-/emacs/guix-autoloads.el
-/emacs/guix-helper.scm
-/emacs/guix-config.el
-/doc/os-config-bare-bones.texi
-/doc/os-config-desktop.texi
-/doc/*.1
-/etc/guix-daemon.service
-/etc/guix-daemon.conf
-/doc/images/bootstrap-graph.pdf
-/doc/images/coreutils-bag-graph.png
-/doc/images/coreutils-graph.png
-/doc/images/coreutils-size-map.eps
-/doc/images/service-graph.png
-/doc/images/service-graph.eps
-/doc/images/service-graph.pdf
-/doc/images/dmd-graph.png
-/doc/images/bootstrap-packages.png
-/doc/images/bootstrap-packages.eps
-/doc/images/bootstrap-packages.pdf
+Makefile
+Makefile.in
+config.cache
+stamp-h[0-9]
+tmp


[PATCH 11/13] build: Delete emacs/guix-autoloads.el when 'make clean'.

2016-01-24 Thread Mathieu Lirzin

* emacs.am (CLEANFILES) [HAVE_EMACS]: Add $(AUTOLOADS).
---
 emacs.am | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/emacs.am b/emacs.am
index 0342574..37cf183 100644
--- a/emacs.am
+++ b/emacs.am
@@ -67,4 +67,6 @@ $(AUTOLOADS): $(ELFILES)
 	 (update-directory-autoloads\
 	  (expand-file-name \"emacs\" \"$(srcdir)\")))"
 
+CLEANFILES += $(AUTOLOADS)
+
 endif HAVE_EMACS


[PATCH 01/13] tests: Use 'dummy-origin' for lint tests when possible.

2016-01-24 Thread Mathieu Lirzin

* guix/tests/lint.scm ("patches: file names", "patches: not found"): Use
'dummy-origin'.  'sha256' field was wrongly set to a string instead of a
bytevector.
---
 tests/lint.scm | 12 +++-
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/tests/lint.scm b/tests/lint.scm
index b8dad13..54be50d 100644
--- a/tests/lint.scm
+++ b/tests/lint.scm
@@ -2,7 +2,7 @@
 ;;; Copyright © 2012, 2013 Cyril Roelandt 
 ;;; Copyright © 2014, 2015 Eric Bavier 
 ;;; Copyright © 2014, 2015, 2016 Ludovic Courtès 
-;;; Copyright © 2015 Mathieu Lirzin 
+;;; Copyright © 2015, 2016 Mathieu Lirzin 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -308,10 +308,7 @@ requests."
  (with-warnings
(let ((pkg (dummy-package "x"
 (source
- (origin
-   (method url-fetch)
-   (uri "someurl")
-   (sha256 "somesha")
+ (dummy-origin
(patches (list "/path/to/y.patch")))
  (check-patch-file-names pkg)))
  "file names of patches should start with the package name")))
@@ -322,10 +319,7 @@ requests."
  (with-warnings
(let ((pkg (dummy-package "x"
 (source
- (origin
-   (method url-fetch)
-   (uri "someurl")
-   (sha256 "somesha")
+ (dummy-origin
(patches
 (list (search-patch "this-patch-does-not-exist!"
  (check-patch-file-names pkg)))


[PATCH 08/13] build: Add 'DOT' silent rule.

2016-01-24 Thread Mathieu Lirzin

* Makefile.am (AM_V_DOT, AM_V_DOT_, AM_V_DOT_0): New variables.
* doc.am (.dot.png, .dot.pdf, .dot.eps): Use $(AM_V_DOT).
---
 Makefile.am | 4 
 doc.am  | 6 +++---
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 754c19a..4c71a12 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -481,3 +481,7 @@ AM_V_DL = $(AM_V_DL_$(V))
 AM_V_DL_ = $(AM_V_DL_$(AM_DEFAULT_VERBOSITY))
 AM_V_DL_0 = @echo "  DL  " $@;
 
+AM_V_DOT = $(AM_V_DOT_$(V))
+AM_V_DOT_ = $(AM_V_DOT_$(AM_DEFAULT_VERBOSITY))
+AM_V_DOT_0 = @echo "  DOT " $@;
+
diff --git a/doc.am b/doc.am
index 9214405..9e95349 100644
--- a/doc.am
+++ b/doc.am
@@ -68,15 +68,15 @@ DOT_OPTIONS =	\
   -Nfontsize=9 -Nheight=.1 -Nwidth=.1
 
 .dot.png:
-	$(DOT) -Tpng $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"
+	$(AM_V_DOT)$(DOT) -Tpng $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"; \
 	mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
 
 .dot.pdf:
-	$(DOT) -Tpdf $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"
+	$(AM_V_DOT)$(DOT) -Tpdf $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"; \
 	mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
 
 .dot.eps:
-	$(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"
+	$(AM_V_DOT)$(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"; \
 	mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
 
 .png.eps:


[PATCH 04/13] utils: Use '@' for separating package names and version numbers.

2016-01-24 Thread Mathieu Lirzin

Fixes .

* guix/build/utils.scm (package-name->name+version): Use '@' for
separating package names and version numbers instead of '-'.  This
provides the ability to use numbers in package names.
* guix/packages.scm (package-full-name): Add an optional SEPARATOR
argument defaulting to "@".
* doc/guix.texi (Invoking guix package, Invoking guix import): Adapt to
the new syntax.
* guix/ui.scm (package-specification->name+version+output): Likewise.
* guix/scripts/import/hackage.scm (show-help): Likewise.
* gnu/packages.scm (check-package-freshness, specification->package)
(specification->package+output): Likewise.
* emacs/guix-base.scm (guix-package-name-specification): Likewise.
* emacs/guix-main.scm (full-name->name+version)
(name+version->full-name): Likewise.
* tests/guix-build.sh: Likewise.
* tests/guix-lint.sh: Likewise.
* tests/guix-package.sh: Likewise.
* tests/packages.scm: Likewise.
* tests/ui.scm: Likewise.
* tests/utils.scm: Likewise.
* tests/graph.scm ("bag-emerged DAG"): Use 'package-full-name' optional
SEPARATOR argument.
* gnu/packages/commencement.scm (gcc-boot0): Likewise.
* NEWS: Mention new syntax.
---
 NEWS| 13 +
 doc/guix.texi   | 12 ++--
 emacs/guix-base.el  |  2 +-
 emacs/guix-main.scm |  4 ++--
 gnu/packages.scm| 10 +-
 gnu/packages/commencement.scm   |  2 +-
 guix/build/utils.scm| 25 +++--
 guix/packages.scm   |  9 ++---
 guix/scripts/import/hackage.scm |  2 +-
 guix/ui.scm |  4 ++--
 tests/graph.scm |  2 +-
 tests/guix-build.sh |  4 ++--
 tests/guix-lint.sh  |  2 +-
 tests/guix-package.sh   |  4 ++--
 tests/ui.scm|  6 +++---
 tests/utils.scm |  4 ++--
 16 files changed, 55 insertions(+), 50 deletions(-)

diff --git a/NEWS b/NEWS
index 0084394..ed45ab4 100644
--- a/NEWS
+++ b/NEWS
@@ -14,17 +14,25 @@ Please send Guix bug reports to bug-g...@gnu.org.
 
 ** Package management
 
+*** New syntax for separating package names and version numbers
+
+Use ‘@’ instead of ‘-’ as a separator.  This new separator is a reserved
+character which is not allowed both in package names and version numbers.
+
 *** Emacs interface for system generations
 *** Emacs interface for hydra.gnu.org
 *** Changes in Emacs interface variables
+
 In the following names, BUFFER-TYPE means "info" or "list";
 ENTRY-TYPE means "package", "output" or "generation".
 
  Removed
+
 - guix-info-fill-column
 - guix-info-insert-ENTRY-TYPE-function
 
  Renamed
+
 - guix-info-ignore-empty-vals -> guix-info-ignore-empty-values
 - guix-output-name-width -> guix-generation-output-name-width
 - guix-buffer-name-function -> guix-ui-buffer-name-function
@@ -32,6 +40,7 @@ ENTRY-TYPE means "package", "output" or "generation".
 - guix-search-params -> guix-package-search-params
 
  Replaced
+
 - guix-list-column-format, guix-list-column-value-methods ->
   guix-ENTRY-TYPE-list-format
 - guix-info-displayed-params, guix-info-insert-methods,
@@ -42,6 +51,10 @@ ENTRY-TYPE means "package", "output" or "generation".
   guix-ENTRY-TYPE-list-describe-warning-count
 - guix-package-info-fill-heading -> guix-info-fill
 
+** Noteworthy bug fixes
+
+*** Numbers in package names are correctly handled (http://bugs.gnu.org/19219)
+
 * Changes in 0.9.0 (since 0.8.3)
 
 ** Package management
diff --git a/doc/guix.texi b/doc/guix.texi
index 4ce6ef5..1173d94 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -13,7 +13,7 @@
 Copyright @copyright{} 2012, 2013, 2014, 2015, 2016 Ludovic Courtès@*
 Copyright @copyright{} 2013, 2014 Andreas Enge@*
 Copyright @copyright{} 2013 Nikita Karetnikov@*
-Copyright @copyright{} 2015 Mathieu Lirzin@*
+Copyright @copyright{} 2015, 2016 Mathieu Lirzin@*
 Copyright @copyright{} 2014 Pierre-Antoine Rault@*
 Copyright @copyright{} 2015 Taylan Ulrich Bayırlı/Kammer
 Copyright @copyright{} 2015 Leo Famulari
@@ -1244,14 +1244,14 @@ The @var{options} can be among the following:
 Install the specified @var{package}s.
 
 Each @var{package} may specify either a simple package name, such as
-@code{guile}, or a package name followed by a hyphen and version number,
-such as @code{guile-1.8.8} or simply @code{guile-1.8} (in the latter
+@code{guile}, or a package name followed by an at-sign and version number,
+such as @code{guile@@1.8.8} or simply @code{guile@@1.8} (in the latter
 case, the newest version prefixed by @code{1.8} is selected.)
 
 If no version number is specified, the
 newest available version will be selected.  In addition, @var{package}
 may contain a colon, followed by the name of one of the outputs of the
-package, as in @code{gcc:doc} or @code{binutils-2.22:lib}
+package, as in @code{gcc:doc} or @code{binutils@@2.22:lib}
 (@pxref{Packages with Multiple Outputs}).  Packages with a corresponding
 name (and option

[PATCH 10/13] build: Add 'HELP2MAN' silent rule.

2016-01-24 Thread Mathieu Lirzin

* Makefile.am (AM_V_HELP2MAN, AM_V_HELP2MAN_, AM_V_HELP2MAN_0): New
variables.
* doc.am [BUILD_FROM_GIT] (gen_man): Use $(AM_V_EMACS).
---
 Makefile.am | 3 +++
 doc.am  | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index d29a49d..bc015e2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -489,3 +489,6 @@ AM_V_EMACS = $(AM_V_EMACS_$(V))
 AM_V_EMACS_ = $(AM_V_EMACS_$(AM_DEFAULT_VERBOSITY))
 AM_V_EMACS_0 = @echo "  EMACS   " $@;
 
+AM_V_HELP2MAN = $(AM_V_HELP2MAN_$(V))
+AM_V_HELP2MAN_ = $(AM_V_HELP2MAN_$(AM_DEFAULT_VERBOSITY))
+AM_V_HELP2MAN_0 = @echo "  HELP2MAN" $@;
diff --git a/doc.am b/doc.am
index 9e95349..73db930 100644
--- a/doc.am
+++ b/doc.am
@@ -123,7 +123,7 @@ endif
 # Avoid re-generating the man pages when building from tarballs.
 if BUILD_FROM_GIT
 
-gen_man = LANGUAGE= $(top_builddir)/pre-inst-env $(HELP2MAN)
+gen_man = $(AM_V_HELP2MAN)LANGUAGE= $(top_builddir)/pre-inst-env $(HELP2MAN)
 
 doc/guix.1: scripts/guix
 	  $(gen_man) --output="$@" `basename $<`


Re: [PATCH] import: pypi: read requirements from wheels.

2016-01-24 Thread Cyril Roelandt
On 01/24/2016 09:08 PM, Ludovic Courtès wrote:
> Cyril Roelandt  skribis:
> 
>> * guix/import/pypi.scm (latest-wheel-release): New function.
> 
> s/function/procedure/  :-)
> 
> Please also mention the changes in ‘guess-requirements’,
> ‘compute-inputs’, etc.
> 
> So do I get it right that pypi now provides packages both in Wheels and
> in “traditional” format, but that Wheels provides more info about
> dependencies?
> 
> IOW: What does this buy us?  :-)

When uploading a package to PyPI, one may provide a wheel in addition to
a tarball. The wheel is built by setuptools, and contains metadata,
which includes *all* the requirements specified by the authors.

It is much better than reading "requirements.txt", because this file is
not mandatory.

Since wheels may not be provided, we need to keep the old way of
retrieving dependencies, even though it is not extremely reliable.

> 
>> +(define (latest-wheel-release pypi-package)
>> +  "Return the url of the wheel for the latest release of pypi-package, of 
>> #f if
> 
> Line a bit long.  s/of/or/
> 
>> +  (define (read-wheel-metadata wheel-archive)
>> +;; Given WHEEL-ARCHIVE, a ZIP Python wheel archive, return the package's
>> +;; requirements.
>> +(let* ((dirname (string-append
>> + (string-join
>> +  (list-head
>> +   (string-split (last (string-split wheel-url #\/))  
>> #\-) 2)
>> +"-")
> 
> "-" should be aligned with (list-head.
> 
> I would be best to turn this transformation into a top-level procedure,
> say ‘wheel-url->extracted-directory’.
> 
>> + ".dist-info"))
>> +   (json-file (string-append dirname "/metadata.json")))
>> +  (and (system* "unzip" "-q" wheel-archive json-file)
>> +   (dynamic-wind
>> + (const #t)
>> + (lambda ()
>> +   (call-with-input-file json-file
>> + (lambda (port)
>> +   (let* ((metadata (json->scm port))
>> +  (run_requires (hash-ref metadata "run_requires"))
>> +  (requirements (hash-ref (list-ref run_requires 0)
>> +  "requires")))
>> + (map (lambda (r)
>> +(python->package-name (clean-requirement r)))
>> +  requirements)
>> + (lambda ()
>> +   (delete-file json-file)
>> +   (rmdir dirname))
> 
> Eventually I wonder if we should do this in a derivation instead of
> hoping for ‘unzip’ & co. to be available there (“eventually”, because
> the problem is already present with the ‘requirements.txt’ thingie.)
> 

I think it is fine as is, seeing how it makes Python packaging much
easier :)

> Could you add a test in tests/pypi.scm?
> 

Will do!

Cyril.




Re: Composing service definitions (and maybe fmt)

2016-01-24 Thread Ludovic Courtès
Christopher Allan Webber  skribis:

> You may remember my post to the list about how I'm interested in
> service configurations which know about each others' variables.  I wrote
> about why I think this is really important to solving deployment here:
>
>   http://lists.gnu.org/archive/html/guix-devel/2015-09/msg00736.html
>
> If we build procedures which go from procedure inputs -> text and that's
> all that gets passed to the service, do we lose the ability to
> introspect the arguments being used to set up the service?

Not necessarily:  object have a ‘parameters’ field to hold the
service’s arguments, and this can always be introspected and
manipulated.

It’s just that there’s a “preferred form” to manipulate these service
parameters.  For instance, a high-level struct is easy to deal with, an
argument list is OK but less convenient, and a file-like object is
pretty bad.

> Would it be possible to have services which themselves set up services?
> Eg, imagine I had something imaginary like:
>
>   (3dprinter-service
>#:model "lawlsbot-3000"
>#:fill-pattern "hex")
>
> (Ignore whether or not this is a sane way to configure a 3d printer at
> all at the moment, I'm just making something up)
>
> So, this might actually build the "implied" service of:
>
>   (3dprinter-raw-service
>"[printconfig]
> model = lawlsbot-3000
> fill-pattern = hex")
>
> ... this way, daring users can provide their own config file if our
> config file builders aren't good enough, but it's still possible to
> have some other service or tool read that the 3dprinter-service has a
> model with lawlsbot-3000, so it can show it in a menu, or something.
>
> Is this possible, or even sane? :)

So you’re suggesting to systematically have a high-level interface as
well as a lower-level interface that gives access to the raw config
file, right?

The problem is that often, the service configuration does not to just
one config file.  Often it also translates into command-line options,
user accounts, etc.  For instance, ‘tor-service’ expects users to pass a
raw config file, but it also needs to create a user account whose name
is given in that config file, so it needs to control that part of the
config file.

That being said, it’s always possible to extend ‘etc-service-type’ and
give it raw config files.

Not offering any concrete solution but… does that make sense?  :-)

Thanks,
Ludo’.



Re: Supporting non-GRUB bootloaders?

2016-01-24 Thread Ludovic Courtès
Jookia <166...@gmail.com> skribis:

> I'm interested to know how hard it'd be to support a non-GRUB bootloader, such
> as u-boot. On NixOS this is relatively easy, but I'm under the impression that
> on Guix this is borderline impossible due to hard coding.

GuixSD currently pretty much assumes GRUB, because it’s the GNU
bootloader and, one would hope, it does the job.

That said, the (gnu system grub) module is less than 300 lines.  Then
there are also assumptions in (guix scripts system) and (gnu system).

> I'd like to do this:
>
> * Copy initramfs and kernels to /boot.
> * Write a extlinux.conf file for U-Boot to read.
> * Not have GRUB installed or running.
>
> How hard would this be?

You would need a module similar to (gnu system grub) for U-Boot and a
U-Boot package.  The you would need to abstract things in the
aforementioned modules.

> My motivation is that GRUB on ARM doesn't work on my system (Novena)

Too bad.  Would be nice to see exactly what’s missing.

> so the next best thing is to use U-Boot.

Yeah.

Apparently GRUB can also be used on top of U-Boot, FWIW:
.

So I would suggest that you get started and let us know when you
encounter specific stumbling blocks!

HTH,
Ludo’.



Re: [PATCH 2/7] licenses: Add a list of licenses.

2016-01-24 Thread Ludovic Courtès
Alex Kost  skribis:

> Ludovic Courtès (2016-01-23 20:08 +0300) wrote:
>
>> Alex Kost  skribis:
>>
>>> * guix/licenses.scm (%licenses): New variable.
>>
>> For the purposes of this patch set, I think we’d rather avoid that, and
>> instead do something like:
>>
>> (module-map (lambda (sym var)
>>   (variable-ref var))
>> (resolve-interface '(guix licenses)))
>>
>> WDYT?
>
> Oh, great, I didn't know about 'module-map', thanks!  But since there
> are also things like 'license?' or 'license-uri' in this module, we need
> to ignore objects which are not licenses.  Would it be ok to do it like
> this:
>
>   (hash-fold (lambda (sym var res)
>(let ((object (variable-ref var)))
>  (if (license? object)
>  (cons object res)
>  res)))
>  '()
>  (module-obarray (resolve-interface '(guix licenses
>
> or is there a more idiomatic way?

Good point.  I’d rather write it as:

  (filter license? (module-map …))

(‘module-obarray’ is an implementation detail that may not be here
forever.)

Ludo’.



Re: [PATCH 3/7] emacs: Add 'guix-browse-license-url' command.

2016-01-24 Thread Ludovic Courtès
Alex Kost  skribis:

> Ludovic Courtès (2016-01-23 20:18 +0300) wrote:
>
>> Alex Kost  skribis:
>>
>>> +(define license-name->license
>>
>> I just realized that I’d rather call it ‘lookup-license’ for
>> consistency, because it’s not a conversion.
>
> OK, I'll rename it, and what about:
>
> (define (license-name->uri name)
>   (and=> (license-name->license name)
>  license-uri))
>
> Should it be called ‘lookup-license-uri’ maybe?

Sounds good.

Ludo’.



Re: [PATCH 1/1] doc: Show how to boot result of 'vm-image'.

2016-01-24 Thread Leo Famulari
On Sun, Jan 24, 2016 at 06:32:57PM +0100, Ludovic Courtès wrote:
> Leo Famulari  skribis:
> 
> > * doc/guix.texi (Invoking guix system): Explain how to boot the QEMU
> > images created by vm-image.
> 

[...]

> I’m thinking there are often questions about using GuixSD in a VM etc.,
> so it may well deserve one or two sections of its own.
> 
> What about leaving the above sentence here, and appending:
> 
>   @xref{Running GuixSD in a VM}, for more information on how to run the
>   image in a virtual machine.
> 
> ?
> 
> The rest of the material you added would then go to the new “Running
> GuixSD in a VM” section, which could go maybe right after “Invoking guix
> system”.  WDYT?

That sounds good, done!

> 
> > +When using @code{vm-image}, the returned image is in qcow2 format, which
> > +the QEMU emulator can efficiently use.
> 
> In the new section, this would need to be slightly adjusted to give more
> context, like:
> 
>   One way to run GuixSD in a virtual machine is to build a GuixSD
>   virtual machine image using @command{guix system vm-image}
>   (@pxref{Invoking guix system}).  The returned image is in qcow2
>   format, which the @uref{http://qemu.org/, QEMU emulator} can
>   efficiently use.

Thanks for this :)

[...]

> > +@example
> > +$ qemu-system-x86_64 \
> > +-net user \
> > +-net nic,model=virtio \
> > +-enable-kvm \
> > +-m 256 \
> > +/tmp/qemu-image
> > +@end example
> 
> I think it would be nicer to put it on 3 lines.

Done.

[...]

> I would typeset it as:
> 
>   @table @code
>   @item qemu-system-x86_64
>   This specifies the hardware platform to…
> 
>   @item -net user
>   Enable unpriviliged user-mode networking…
>   …
> 
>   @end @table
> 
> With all this, it’s going to look perfect!  :-)

Thank you for this example. I really need to study what Texinfo can do.

> 
> Another question that people often ask is how to install GuixSD from the
> installation image in a VM.  Maybe that could be added eventually in a
> subsection of this new node?

I agree, that would be useful. If anybody knows how to do that, they
should chime in.

> 
> Thank you!

Thanks for your helpful feedback!

> 
> Ludo’.



Re: [SHEPHERD] [PATCH 0/5] Replace 'dmd' service with 'root/shepherd'.

2016-01-24 Thread Ludovic Courtès
Alex Kost  skribis:

> As discussed in a parallel thread, this patchset is for renaming 'dmd'
> service to 'root' service (which also provides 'shepherd' name).
>
> Actually, patches 1, 2 and 4 are not related, I just made some changes
> that I noticed and I believe should be made :-)

Indeed, there are occasionally stylistic issues.  :-)

> Patches:
>
> [PATCH 1/5] service: Rename 'services' variable to '%services'.
> [PATCH 2/5] service: Improve style of 'for-each-service'.
>
> [PATCH 3/5] service: 'service-list' returns unique services.
>
> Without this change, if the root service provides 2 names, 'herd status'
> would display:
>
> Started: (root root)
> Stopped: ()
>
> [PATCH 4/5] service: Add docstring to 'lookup-services'.
> [PATCH 5/5] Rename 'dmd' service to 'root'.

Excellent!  I’ve pushed all 5 patches.

While I was at it, I’ve added Mathieu and you as committers.

Thanks!

Ludo’.



[v2 0/1] Revised QEMU instructions for manual

2016-01-24 Thread Leo Famulari
Here is my revised patch adding to the manual instructions on how to
boot the output of `guix system vm-image`.

Thoughts?

Leo Famulari (1):
  doc: Show how to boot result of 'vm-image'.

 doc/guix.texi | 58 +++---
 1 file changed, 55 insertions(+), 3 deletions(-)

-- 
2.7.0.rc3




[v2 1/1] doc: Show how to boot result of 'vm-image'.

2016-01-24 Thread Leo Famulari
* doc/guix.texi (Running GuixSD in a VM): New node.
(Invoking guix system): Add reference to 'Running GuixSD in a VM'.
---
 doc/guix.texi | 58 +++---
 1 file changed, 55 insertions(+), 3 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 4ce6ef5..cd5ced4 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -15,8 +15,8 @@ Copyright @copyright{} 2013, 2014 Andreas Enge@*
 Copyright @copyright{} 2013 Nikita Karetnikov@*
 Copyright @copyright{} 2015 Mathieu Lirzin@*
 Copyright @copyright{} 2014 Pierre-Antoine Rault@*
-Copyright @copyright{} 2015 Taylan Ulrich Bayırlı/Kammer
-Copyright @copyright{} 2015 Leo Famulari
+Copyright @copyright{} 2015 Taylan Ulrich Bayırlı/Kammer@*
+Copyright @copyright{} 2015, 2016 Leo Famulari
 
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -174,6 +174,7 @@ System Configuration
 * Initial RAM Disk::Linux-Libre bootstrapping.
 * GRUB Configuration::  Configuring the boot loader.
 * Invoking guix system::Instantiating a system configuration.
+* Running GuixSD in a VM::  How to run GuixSD in a virtual machine.
 * Defining Services::   Adding new service definitions.
 
 Services
@@ -5693,6 +5694,7 @@ instance to support new system services.
 * Initial RAM Disk::Linux-Libre bootstrapping.
 * GRUB Configuration::  Configuring the boot loader.
 * Invoking guix system::Instantiating a system configuration.
+* Running GuixSD in a VM::  How to run GuixSD in a virtual machine.
 * Defining Services::   Adding new service definitions.
 @end menu
 
@@ -9193,7 +9195,8 @@ in @var{file} that stands alone.  Use the 
@option{--image-size} option
 to specify the size of the image.
 
 When using @code{vm-image}, the returned image is in qcow2 format, which
-the QEMU emulator can efficiently use.
+the QEMU emulator can efficiently use. @xref{Running GuixSD in a VM},
+for more information on how to run the image in a virtual machine.
 
 When using @code{disk-image}, a raw disk image is produced; it can be
 copied as is to a USB stick, for instance.  Assuming @code{/dev/sdc} is
@@ -9332,6 +9335,55 @@ graph} of dmd services of the operating system defined 
in @var{file}.
 
 @end table
 
+@node Running GuixSD in a VM
+@subsection Running GuixSD in a VM
+
+One way to run GuixSD in a virtual machine is to build a GuixSD virtual
+machine image using @command{guix system vm-image} (@pxref{Invoking guix
+system}). The returned image is in qcow2 format, which the
+@uref{http://qemu.org/, QEMU emulator} can efficiently use.
+
+To run the image in QEMU, copy it out of the store (@pxref{The Store})
+and give yourself permission to write to the copy. When invoking QEMU,
+you must choose a system emulator that is suitable for your hardware
+platform. Here is a minimal QEMU invocation that will boot the result of
+@command{guix system vm-image} on x86_64 hardware:
+
+@example
+$ qemu-system-x86_64 \
+-net user -net nic,model=virtio \
+-enable-kvm -m 256 /tmp/qemu-image
+@end example
+
+And the annotated version:
+
+@table @code
+@item qemu-system-x86_64
+This specifies the hardware platform to emulate. This should match the
+host.
+
+@item -net user
+Enable the unprivileged user-mode network stack. The guest OS can access
+the host but not vice versa. This is the simplest way to get the guest
+OS online. If you don't choose a network stack, the boot will fail.
+
+@item -net nic,model=virtio
+You must create a network interface of a given model. If you don't
+create a NIC, the boot will fail. Assuming your hardware platform is
+x86_64, you can get a list of available NIC models by running
+`qemu-system-x86_64 -net nic,model=help`.
+
+@item -enable-kvm
+If your system has hardware virtualization extensions, enabling the
+kernel virtual machine will make things run faster.
+
+@item -m 256
+RAM available to the guest OS, in megabytes. Defaults to 128 megabytes,
+which is not enough for the Guix daemon.
+
+@item /tmp/qemu-image
+The filesystem path of the qcow2 image.
+@end table
 
 @node Defining Services
 @subsection Defining Services
-- 
2.7.0.rc3




Re: [SHEPHERD] [PATCH 0/5] Replace 'dmd' service with 'root/shepherd'.

2016-01-24 Thread Mathieu Lirzin
l...@gnu.org (Ludovic Courtès) writes:

> Excellent!  I’ve pushed all 5 patches.
>
> While I was at it, I’ve added Mathieu and you as committers.

Thanks!

--
Mathieu Lirzin



Re: Composing service definitions (and maybe fmt)

2016-01-24 Thread Christopher Allan Webber
Ludovic Courtès writes:

> So you’re suggesting to systematically have a high-level interface as
> well as a lower-level interface that gives access to the raw config
> file, right?
>
> The problem is that often, the service configuration does not to just
> one config file.  Often it also translates into command-line options,
> user accounts, etc.  For instance, ‘tor-service’ expects users to pass a
> raw config file, but it also needs to create a user account whose name
> is given in that config file, so it needs to control that part of the
> config file.
>
> That being said, it’s always possible to extend ‘etc-service-type’ and
> give it raw config files.
>
> Not offering any concrete solution but… does that make sense?  :-)
>
> Thanks,
> Ludo’.

It makes sense... I get the feeling that in order for us to really get a
sense of what to do right here, we're going to have to forge ahead and
maybe even get it a bit wrong, which is ok!

It could even be that the thing I really want to build has to be build
with an abstraction layer another layer up.  Not the worst thing!



Re: [PATCH] Add SortMeRNA.

2016-01-24 Thread Ben Woodcroft



On 23/01/16 09:00, Leo Famulari wrote:

On Sat, Jan 23, 2016 at 07:55:37AM +1000, Ben Woodcroft wrote:

On 23/01/16 06:35, Leo Famulari wrote:

On Fri, Jan 22, 2016 at 10:12:54PM +1000, Ben Woodcroft wrote:

[..]

Thanks Leo. As well as responding to your review the attached patch breaks
out the rRNA databases out into a separate output "db", removing 73MB from
the default package. Is "db" a good name?

Sounds like a good name. It's a good idea to split the package up if the
database is not necessary for a basic installation. I haven't used
multiple outputs in my packages yet so I can't say if your
implementation is correct or not.

I went ahead and pushed just now. Thanks for the reviews.
ben



[PATCH]: Add pixz.

2016-01-24 Thread Ben Woodcroft

Ta.
>From 1546ab1d5f48871a23521f7629aed1493a3dcbf6 Mon Sep 17 00:00:00 2001
From: Ben Woodcroft 
Date: Mon, 25 Jan 2016 08:31:14 +1000
Subject: [PATCH] gnu: Add pixz.

* gnu/packages/compression.scm (pixz): New variable.
---
 gnu/packages/compression.scm | 29 +
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index fd3a9ce..0f27fa9 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -8,6 +8,7 @@
 ;;; Copyright © 2015 Leo Famulari 
 ;;; Copyright © 2015 Jeff Mickey 
 ;;; Copyright © 2015 Efraim Flashner 
+;;; Copyright © 2016 Ben Woodcroft 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -32,8 +33,10 @@
   #:use-module (guix git-download)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system perl)
+  #:use-module (gnu packages backup)
   #:use-module (gnu packages base)
   #:use-module (gnu packages perl)
+  #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages valgrind)
   #:use-module ((srfi srfi-1) #:select (last)))
 
@@ -659,3 +662,29 @@ multiple processors and multiple cores when compressing data.")
 ;; Things under zopfli/ are under ASL2.0, but 4 files at the top-level,
 ;; written by Mark Adler, are under another non-copyleft license.
 (license license:asl2.0)))
+
+(define-public pixz
+  (package
+(name "pixz")
+(version "1.0.6")
+(source (origin
+  (method url-fetch)
+  (uri (string-append
+"https://github.com/vasi/pixz/releases/download/v"; version
+"/pixz-" version ".tar.xz"))
+  (sha256
+   (base32
+"1s3j7zw6j5zi3fhdxg287ndr3wf6swac7z21mqd1pyiln530gi82"
+(build-system gnu-build-system)
+(native-inputs
+ `(("pkg-config" ,pkg-config)
+   ("libarchive" ,libarchive)))
+(home-page "https://github.com/vasi/pixz";)
+(synopsis "Parallel indexing implementation of LZMA")
+(description
+ "The existing XZ Utils provide great compression in the .xz file format,
+but they produce just one big block of compressed data.  Pixz instead produces
+a collection of smaller blocks which makes random access to the original data
+possible and can compress in parallel.  This is especially useful for large
+tarballs.")
+(license license:bsd-2)))
-- 
2.6.3



Re: Version numbers for VCS snapshots

2016-01-24 Thread Ludovic Courtès
Ricardo Wurmus  skribis:

> Ludovic Courtès  writes:
>
>> Ricardo Wurmus  skribis:
>>
>>> Ludovic Courtès  writes:
>>>
 +
 +It is a good idea to strip commit identifiers to, say, 7 digits so that
 +they do not become aesthetically disturbing (assuming aesthetics have a
 +role to play here.)  It is best to use the full commit identifiers in
 +@code{origin}s, though, to avoid ambiguities.
 +
>>>
>>> I would probably find this a little confusing if I didn’t already know
>>> what you meant.  Where should commit identifiers be stripped?  Are there
>>> more places than just the ‘version’ field?  Could we name the ‘version’
>>> field as an example?
>>>
>>> Is it only aesthetics or also a matter of keeping shebangs shorter (in
>>> case the output provides an interpreter that could end up in a shebang
>>> line).  The version is usually part of the output name, so maybe it
>>> would make sense to mention the ‘version’ field explicitly.
>>
>> You’re right on both points.
>>
>> How about this variant?
>
> Beautiful.  Thanks!

Pushed!

Ludo’.



Re: Qt-5 in core-updates

2016-01-24 Thread Andreas Enge
In fact, the same problem manifests itself in webkitgtk itself:
   http://hydra.gnu.org/build/954055/nixlog/1/tail-reload
after only two minutes of building.

Andreas




Re: Qt-5 in core-updates

2016-01-24 Thread 宋文武
Andreas Enge  writes:

> Hello,
>
> qt-5 fails to build on both x86_64 and armhf in core-updates with the
> following error:
> Traceback (most recent call last):
>   File 
> "/tmp/nix-build-qt-5.5.1.drv-0/qt-everywhere-opensource-src-5.5.1/qtwebkit/Source/WebKit2/Scripts/generate-messages-header.py",
>  line 28, in 
> import webkit2.messages
> EOFError: EOF read where object expected
> Makefile.WebKit2.DerivedSources:881: recipe for target 
> 'generated/PluginProxyMessages.h' failed
> make[3]: *** [generated/PluginProxyMessages.h] Error 1
>
> Surprisingly, it succeeds on i686 (and its build is disabled on mips).
>
This seems like a parallel build issue after I find that,
Writing a pyc file is not atomic in python:

  

It was fixed in Python 3.3+, but not in Python 2.7.x (the one for
building WebKit).

I think we can try:
 - Patch our python-2.7.x like Ubuntu does.
   


 - Patch the build phases of qt and webkitgtk to pre-generate *.pyc
   files before the actually building.
   Or disable parallel build completely.

 - Restart the builds on hydra, hope it will pass.



Re: gst-plugins-good

2016-01-24 Thread Efraim Flashner
On Thu, 21 Jan 2016 09:54:25 +0800
iyzs...@member.fsf.org (宋文武) wrote:

> Andreas Enge  writes:
> 
> > On Wed, Jan 20, 2016 at 10:23:20PM +0200, Efraim Flashner wrote:  
> >> ANYWAY, it turns out gstreamer 1.7.x is an unstable release, and 1.8.x 
> >> should
> >> be coming out "soon". Extremely frusterating to bang my head against this 
> >> for
> >> so long and find out this is why.  
> >
> > Yes, this is why I had decided against updating it in Guix, the test 
> > failures
> > on non-x86 notwithstanding. I think we should wait for the stable release.
> > What do you and others think?  
> Sure, we should use stable releases of GStreamer, and 1.6.3 is just
> comming out.  I'll do the update later.
> 
> 
> Sorry I didn't follow the issue.  What break on master due to the update
> of libvpx?  Since hydra is busy with core-updates, I think we can work
> on a separate branch, and pick it later after core-updates merged.

Against my local gstreamer- and gst-plugin-*-1.7.1 I updated libvpx to 1.5.0
and pulseaudio to 8.0 and gst-plugins-good-1.7.1 built with no issues. When I
compiled gst-plugins-good-1.6.3 against libvpx-1.5.0 and pulseaudio-8.0 I got
the same failure as before (which I forgot to write down), so I'm thinking
this will mostly resolve itself when the gstreamer-1.8 release comes out.

As a side note, I think the interaction between debian's pulseaudio and
guix's pulseaudio where I have no sound from my speakers might be solved with
updating guix's pulseaudio to 8.0. Now to leave sound playing for a while and
see if that's the case.

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


pgpv4uSF2NKaT.pgp
Description: OpenPGP digital signature