Re: [PATCH] scripts: Add 'environment' command.

2014-10-08 Thread Alex Kost
David Thompson (2014-10-09 02:48 +0400) wrote:

> Hello Guix hackers,
>
> Below is a preliminary version of a new guix command called
> 'environment'.  For those familiar with Nix, it works a lot like
> nix-shell.
>
> The purpose of 'guix environment' is to assist hackers in creating
> reproducible development environments without polluting their package
> profile.  'guix environment' takes a package (or packages), builds all
> of the necessary inputs, and creates a shell environment to use them.
> For example, 'guix environment guile' adds these environment variables:

[...]

> With this environment, you can grab the guile source code and build it,
> knowing that all the dependencies have been satisfied.  Furthermore,
> this system makes it easy to work on projects that require different
> versions of the same software without clashes.  Bye-bye RVM and
> virtualenv!

[...]

My only comment is: This is GREAT!!  Thank you very much for working on
this.



Re: ui: Move 'show-manifest-transaction' from (guix profiles).

2014-10-08 Thread Alex Kost
Ludovic Courtès (2014-10-08 23:55 +0400) wrote:

> Alex Kost  skribis:

[...]

> This is another circularity issue.  :-/
>
> There’s:
>
>   (guix store) -> (guix nar) -> (guix ui) -> (guix store) ...
>
> This shouldn’t be a problem, except that occasional uses of #:select
> trigger a bug (see .)

Ouch, thanks for the explanation.

> I’ve fiddled a bit on top of your patch, but couldn’t find any simple
> fix.
>
> However, back to the initial problem, is this a problem if the error
> conditions are defined in (guix profiles), which is then imported by
> (guix ui)?  This is suboptimal, but this kind of circular reference
> shouldn’t cause any troubles.

Do you mean to "#:select" condition types in (guix ui)?  I tried but it
failed for me even on “make” (the patch I tried and the make output are
attached).  So it looks like even selecting from (guix profile) won't
work in (guix ui) or did I miss something?

What about making an auxiliary (guix conditions) module with all
existing condition types, and use it where needed?  I could try to work
on it if it sounds reasonable.  WDYT?

>From 6b1c3edea51abb464f4265f36f25c5e314731ac2 Mon Sep 17 00:00:00 2001
From: Alex Kost 
Date: Wed, 8 Oct 2014 17:29:01 +0400
Subject: [PATCH] profiles: Add condition types for profiles and generations.

* guix/profiles.scm (&profile-error, &profile-not-found-error,
  &missing-generation-error): New condition types.
* guix/ui.scm (call-with-error-handling): Handle new types.
* guix/scripts/package.scm (roll-back, guix-package): Raise
  '&profile-not-found-error' where needed.
---
 guix/profiles.scm| 29 -
 guix/scripts/package.scm | 18 ++
 guix/ui.scm  | 12 
 3 files changed, 50 insertions(+), 9 deletions(-)

diff --git a/guix/profiles.scm b/guix/profiles.scm
index 18733a6..b1fa50e 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -35,7 +35,18 @@
   #:use-module (srfi srfi-11)
   #:use-module (srfi srfi-19)
   #:use-module (srfi srfi-26)
-  #:export (manifest make-manifest
+  #:use-module (srfi srfi-34)
+  #:use-module (srfi srfi-35)
+  #:export (&profile-error
+profile-error?
+profile-error-profile
+&profile-not-found-error
+profile-not-found-error?
+&missing-generation-error
+missing-generation-error?
+missing-generation-error-generation
+
+manifest make-manifest
 manifest?
 manifest-entries
 
@@ -84,6 +95,22 @@
 

 ;;;
+;;; Condition types.
+;;;
+
+(define-condition-type &profile-error &error
+  profile-error?
+  (profile profile-error-profile))
+
+(define-condition-type &profile-not-found-error &profile-error
+  profile-not-found-error?)
+
+(define-condition-type &missing-generation-error &profile-error
+  missing-generation-error?
+  (generation missing-generation-error-generation))
+
+
+;;;
 ;;; Manifests.
 ;;;
 
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index fc9c37b..9f3ed3a 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -38,6 +38,8 @@
   #:use-module (srfi srfi-11)
   #:use-module (srfi srfi-19)
   #:use-module (srfi srfi-26)
+  #:use-module (srfi srfi-34)
+  #:use-module (srfi srfi-35)
   #:use-module (srfi srfi-37)
   #:use-module (gnu packages)
   #:use-module (gnu packages base)
@@ -109,8 +111,8 @@ return PROFILE unchanged.  The goal is to treat '-p ~/.guix-profile' as if
  (previous-number (previous-generation-number profile number))
  (previous-generation (generation-file-name profile previous-number)))
 (cond ((not (file-exists? profile)) ; invalid profile
-   (leave (_ "profile '~a' does not exist~%")
-  profile))
+   (raise (condition (&profile-not-found-error
+  (profile profile)
   ((zero? number)   ; empty profile
(format (current-error-port)
(_ "nothing to do: already at the empty profile~%")))
@@ -723,8 +725,8 @@ more information.~%"))
 (match-lambda
  (('delete-generations . pattern)
   (cond ((not (file-exists? profile)) ; XXX: race condition
- (leave (_ "profile '~a' does not exist~%")
-profile))
+ (raise (condition (&profile-not-found-error
+(profile profile)
 ((string-null? pattern)
  (delete-generations
   (%store) profile
@@ -833,8 +835,8 @@ more information.~%"))
  (newline)))
 
  (cond ((not (file-exists? profile)) ; XXX: race condition
-(leave (_ "profile '~a' does not exist~%")
-   profile))
+(raise (condition (&profile-not-found-error
+   (profile profi

Re: [PATCH] gnu: icecat: Update to 31.1.1

2014-10-08 Thread Mark H Weaver
Mark H Weaver  writes:
> This is technically a pre-release, but given that our current Icecat has
> at least one security hole (and probably others), and fails to build on
> i686, I'm inclined to push it to master immediately.

After some more testing, I went ahead and pushed this.

 Mark



[PATCH] gnu: icecat: Update to 31.1.1

2014-10-08 Thread Mark H Weaver
This is technically a pre-release, but given that our current Icecat has
at least one security hole (and probably others), and fails to build on
i686, I'm inclined to push it to master immediately.

I suppose I should also mention that I've only tested it on i686.

What do you think?

  Mark


>From d74f4c12f005bbfbd419772f861d7693eb1b7c28 Mon Sep 17 00:00:00 2001
From: Mark H Weaver 
Date: Wed, 8 Oct 2014 23:37:37 -0400
Subject: [PATCH] gnu: icecat: Update to 31.1.1.

* gnu/packages/gnuzilla.scm (icecat): Update to 31.1.1.  Add 'pango',
  'freetype', 'libxft' and 'pulseaudio' as inputs.  Set
  'out-of-source?' to #t.  Remove 'sanitise' phase.  Adapt customized
  'configure' phase to handle 'out-of-source?' build.  Add
  '--with-l10n-base' argument to configure.
---
 gnu/packages/gnuzilla.scm | 61 +++
 1 file changed, 35 insertions(+), 26 deletions(-)

diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm
index 11515d4..1ae1f29 100644
--- a/gnu/packages/gnuzilla.scm
+++ b/gnu/packages/gnuzilla.scm
@@ -30,9 +30,11 @@
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages fontutils)
   #:use-module (gnu packages libevent)
   #:use-module (gnu packages image)
   #:use-module (gnu packages libffi)
+  #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages python)
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages gl)
@@ -42,16 +44,15 @@
 (define-public icecat
   (package
 (name "icecat")
-(version "24.0")
+(version "31.1.1")
 (source
  (origin
   (method url-fetch)
-  (uri (string-append "mirror://gnu/gnuzilla/"
-  (substring version 0 (string-index version #\.))
-  "/icecat-" version ".tar.gz"))
+  (uri (string-append "http://gnuzilla.gnu.org/releases/";
+  version "/" name "-" version ".tar.xz"))
   (sha256
(base32
-"1vxzjwmhad6yxx4sk9zvapjgv5salcv10id061q0991ii3dycy9a"
+"033p5b6akjbg33prqg57mhp5zx3svryqzbjb3k58ql6939bfmad8"
 (build-system gnu-build-system)
 (inputs
  `(("alsa-lib" ,alsa-lib)
@@ -62,9 +63,13 @@
("gstreamer" ,gstreamer-0.10)
("gst-plugins-base" ,gst-plugins-base-0.10)
("gtk+" ,gtk+-2)
+   ("pango" ,pango)
+   ("freetype" ,freetype)
+   ("libxft" ,libxft)
("libevent" ,libevent)
("libxt" ,libxt)
("libffi" ,libffi)
+   ("pulseaudio" ,pulseaudio)
("mesa" ,mesa)
("unzip" ,unzip)
("yasm" ,yasm)
@@ -76,7 +81,8 @@
("python2-pysqlite" ,python2-pysqlite)
("pkg-config" ,pkg-config)))
 (arguments
- `(#:tests? #f ; no check target
+ `(#:tests? #f  ; no check target
+   #:out-of-source? #t  ; must be built outside of the source directory
 
#:configure-flags '(;; Building with debugging symbols takes ~5GiB, so
;; disable it.
@@ -112,26 +118,29 @@
"--enable-system-ffi")
 
#:phases
- (alist-cons-before
-  'patch-source-shebangs 'sanitise
-  (lambda _
-;; delete dangling symlinks
-(delete-file "browser/base/content/.#aboutDialog.xul")
-(delete-file "browser/base/content/abouthome/.#aboutHome.xhtml")
-(delete-file "browser/branding/unofficial/content/.#aboutHome.xhtml")
-(delete-file "toolkit/crashreporter/google-breakpad/autotools/compile"))
- (alist-replace
-  'configure
-  ;; configure does not work followed by both "SHELL=..." and
-  ;; "CONFIG_SHELL=..."; set environment variables instead
-  (lambda* (#:key outputs configure-flags #:allow-other-keys)
-(let ((out (assoc-ref outputs "out")))
-  (setenv "SHELL" (which "bash"))
-  (setenv "CONFIG_SHELL" (which "bash"))
-  (zero? (apply system* "./configure"
-(string-append "--prefix=" out)
-configure-flags
-  %standard-phases
+   (alist-replace
+'configure
+;; configure does not work followed by both "SHELL=..." and
+;; "CONFIG_SHELL=..."; set environment variables instead
+(lambda* (#:key outputs configure-flags #:allow-other-keys)
+  (let* ((out (assoc-ref outputs "out"))
+ (bash (which "bash"))
+ (abs-srcdir (getcwd))
+ (srcdir (string-append "../" (basename abs-srcdir)))
+ (flags `(,(string-append "--prefix=" out)
+  ,(string-append "--with-l10n-base="
+  abs-srcdir "/l10n")
+  ,@configure-flags)))
+(setenv "SHELL" bash)
+(setenv "CONFIG_SHELL" bash)
+(mkdir "../

Having trouble packaging 'tidy'

2014-10-08 Thread David Thompson
Tidy is an application/library for fixing problems with HTML markup that
is depended on by a number of other projects.  However, tidy hasn't been
updated since about 2009 and does not provide release tarballs.  There's
only a CVS repo, and it seems impossible to download a tarball snapshot
of a specific revision.

Their homepage is here: http://tidy.sourceforge.net/

Debian hosts a tarball for their source package, but we probably don't
want to rely on that.

I'm not sure how to proceed.  Thoughts?

-- 
David Thompson
Web Developer - Free Software Foundation - http://fsf.org
GPG Key: 0FF1D807
Support the FSF: https://fsf.org/donate



[PATCH] scripts: Add 'environment' command.

2014-10-08 Thread David Thompson
Hello Guix hackers,

Below is a preliminary version of a new guix command called
'environment'.  For those familiar with Nix, it works a lot like
nix-shell.

The purpose of 'guix environment' is to assist hackers in creating
reproducible development environments without polluting their package
profile.  'guix environment' takes a package (or packages), builds all
of the necessary inputs, and creates a shell environment to use them.
For example, 'guix environment guile' adds these environment variables:

  export 
PATH="/gnu/store/hzq21w0m7akpc3b9gxq9p0vlr74k8pib-pkg-config-0.27.1/bin:/gnu/store/3yiqz9wmwx6b7hpbapg5q39sjx33kh0j-bash-4.3.27/bin:/gnu/store/26vfhzfgl2iqfwa92ij8zqssgc4amh9y-gcc-4.8.3/bin:/gnu/store/2x8wq5w4cxgmz0f982gz37wzdglj0865-ld-wrapper-boot3-0/bin:/gnu/store/4cbvfyx31xyh7pmmvv3w5h0689pcnlnw-glibc-2.20/bin:/gnu/store/4cbvfyx31xyh7pmmvv3w5h0689pcnlnw-glibc-2.20/sbin:/gnu/store/dlg2zv7w3d3bfj5qg7yhskvgj65080p2-binutils-cross-boot0-2.24/bin:/gnu/store/pcizz33yzwyiirfsinbg08v3aha6krx4-make-boot0-4.0/bin:/gnu/store/qgx70g83pab3b08ff6cl0rrzv33bf074-diffutils-3.3/bin:/gnu/store/37w1i5q2iqm0alymc1iiibs12nv87wap-findutils-4.4.2/bin:/gnu/store/1qza3p5n6w5ciphli8wm05jam72jczfd-file-5.19/bin:/gnu/store/jfavabhnk1am05pyivk7ryixznqa49l4-binutils-bootstrap-0/bin:/gnu/store/mbacj3k992756mxskp26pd8b476mynhk-bootstrap-binaries-0/bin:/gnu/store/52vg2sr63d5vpz4np3sa1vf5y5gyhnrf-readline-6.3/bin:/gnu/store/z8ifyrrgawhmd5w3v0fdjdv52cwhb0pd-ncurses-5.9/bin"
  export 
PKG_CONFIG_PATH="/gnu/store/8f9db6s6j77w130y9b13wsnsbalhfrf9-libffi-3.1/lib/pkgconfig:/gnu/store/8g6zcbj2fzzl6xis3mcsmpxrqsfsaxs4-libgc-7.4.2/lib/pkgconfig"
  export 
CPATH="/gnu/store/26vfhzfgl2iqfwa92ij8zqssgc4amh9y-gcc-4.8.3/include:/gnu/store/4cbvfyx31xyh7pmmvv3w5h0689pcnlnw-glibc-2.20/include:/gnu/store/rw5s9immq72plzajqm8g8i4sfg8z0kyc-linux-libre-headers-3.3.8/include:/gnu/store/1qza3p5n6w5ciphli8wm05jam72jczfd-file-5.19/include:/gnu/store/8f9db6s6j77w130y9b13wsnsbalhfrf9-libffi-3.1/include:/gnu/store/52vg2sr63d5vpz4np3sa1vf5y5gyhnrf-readline-6.3/include:/gnu/store/z8ifyrrgawhmd5w3v0fdjdv52cwhb0pd-ncurses-5.9/include:/gnu/store/3j7h3gz5qh1v0j1xjjb2xxr2b3kqcsv6-libunistring-0.9.4/include:/gnu/store/wz94w6nr5wsvy06inwfpc0pxqp1cpkly-libtool-2.4.2/include:/gnu/store/8g6zcbj2fzzl6xis3mcsmpxrqsfsaxs4-libgc-7.4.2/include:/gnu/store/l61k4nkiw8wc064ynf17l40sfgczyh56-gmp-6.0.0a/include"
  export 
LIBRARY_PATH="/gnu/store/4cbvfyx31xyh7pmmvv3w5h0689pcnlnw-glibc-2.20/lib:/gnu/store/1qza3p5n6w5ciphli8wm05jam72jczfd-file-5.19/lib:/gnu/store/8f9db6s6j77w130y9b13wsnsbalhfrf9-libffi-3.1/lib:/gnu/store/52vg2sr63d5vpz4np3sa1vf5y5gyhnrf-readline-6.3/lib:/gnu/store/z8ifyrrgawhmd5w3v0fdjdv52cwhb0pd-ncurses-5.9/lib:/gnu/store/3j7h3gz5qh1v0j1xjjb2xxr2b3kqcsv6-libunistring-0.9.4/lib:/gnu/store/wz94w6nr5wsvy06inwfpc0pxqp1cpkly-libtool-2.4.2/lib:/gnu/store/8g6zcbj2fzzl6xis3mcsmpxrqsfsaxs4-libgc-7.4.2/lib:/gnu/store/l61k4nkiw8wc064ynf17l40sfgczyh56-gmp-6.0.0a/lib"

With this environment, you can grab the guile source code and build it,
knowing that all the dependencies have been satisfied.  Furthermore,
this system makes it easy to work on projects that require different
versions of the same software without clashes.  Bye-bye RVM and
virtualenv!

By default, running 'guix environment' spawns a new $SHELL process,
because it is usually what one would want to do.  However, the '--exec'
flag can be used to specify the command to run.

Additionally, the default behavior is to prepend search paths to the
existing environment variable values so that one has access to other
installed software e.g. git.  To clear the existing environment firstf,
the '--pure' flag can be used.

Finally, the '--load' flag can be used to read a package from a file
instead of searching $GUIX_PACKAGE_PATH.

There is no documentation yet.  I wanted to get feedback first before
writing it in case substantial changes are made.  :)

WDYT?

>From 298dcc1dd3aac49e033debeea154c91b25229c14 Mon Sep 17 00:00:00 2001
From: David Thompson 
Date: Sun, 21 Sep 2014 13:40:05 -0400
Subject: [PATCH] scripts: Add 'environment' command.

* guix/scripts/environment.scm: New file.
* Makefile.am (MODULES): Add it.
---
 Makefile.am  |   1 +
 guix/scripts/environment.scm | 212 +++
 2 files changed, 213 insertions(+)
 create mode 100644 guix/scripts/environment.scm

diff --git a/Makefile.am b/Makefile.am
index 7eecef2..4b823ec 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -94,6 +94,7 @@ MODULES =	\
   guix/scripts/system.scm			\
   guix/scripts/lint.scm\
   guix/scripts/import/nix.scm			\
+  guix/scripts/environment.scm			\
   guix.scm	\
   $(GNU_SYSTEM_MODULES)
 
diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
new file mode 100644
index 000..a4aaa86
--- /dev/null
+++ b/guix/scripts/environment.scm
@@ -0,0 +1,212 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2014 David Thompson 
+;;;
+;;; This file is 

Re: [PATCH] glib-or-gtk-build-system: added documentation

2014-10-08 Thread Ludovic Courtès
I took the freedom to slightly amend the text (see diff below), tweaked
the commit log, and pushed it.

Thanks!

Ludo’.

diff --git a/doc/guix.texi b/doc/guix.texi
index 36337f1..ed2b81b 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -1644,27 +1644,27 @@ debugging information''), which roughly means that code is compiled with
 
 @defvr {Scheme Variable} glib-or-gtk-build-system
 This variable is exported by @code{(guix build-system glib-or-gtk)}.  It
-is intended for use with packages making use of
-@url{https://developer.gnome.org/glib/stable, glib} or
-@url{https://developer.gnome.org/gtk3/stable, gtk+}.
+is intended for use with packages making use of GLib or GTK+.
 
-This build-system adds the following two phases to the ones defined by
-the @code{gnu-build-system}:
+This build system adds the following two phases to the ones defined by
+@var{gnu-build-system}:
 
 @table @code
 @item glib-or-gtk-wrap
 The phase @code{glib-or-gtk-wrap} ensures that programs found under
-@file{bin/} are able to find @code{glib} schemas and @code{gtk+}
-libraries.  This is achieved by appropriately setting the environment
-variables @code{XDG_DATA_DIRS} and @code{GTK_PATH}; and by wrapping the
-programs in suitable launch scripts.
+@file{bin/} are able to find GLib's ``schemas'' and
+@uref{https://developer.gnome.org/gtk3/stable/gtk-running.html, GTK+
+modules}.  This is achieved by wrapping the programs in launch scripts
+that appropriately set the @code{XDG_DATA_DIRS} and @code{GTK_PATH}
+environment variables.
 
 @item glib-or-gtk-compile-schemas
-The phase @code{glib-or-gtk-compile-schemas} makes sure that all
-@code{glib} schemas are compiled.  Compilation is performed by the
-program @code{glib-compile-schemas}.  It is provided by the package
+The phase @code{glib-or-gtk-compile-schemas} makes sure that all GLib's
+@uref{https://developer.gnome.org/gio/stable/glib-compile-schemas.html,
+GSettings schemas} are compiled.  Compilation is performed by the
+@command{glib-compile-schemas} program.  It is provided by the package
 @code{glib:bin} which is automatically imported by the build system.
-The @code{glib} package providing @code{glib-compile-schemas} can be
+The @code{glib} package providing @command{glib-compile-schemas} can be
 specified with the @code{#:glib} parameter.
 @end table
 


Re: ui: Move 'show-manifest-transaction' from (guix profiles).

2014-10-08 Thread Ludovic Courtès
Alex Kost  skribis:

>?: 16 [primitive-load-path "guix/profiles" ...]
> In guix/profiles.scm:
>   21: 15 [#]
> In ice-9/boot-9.scm:
> 2951: 14 [define-module* (guix profiles) #:filename ...]
> 2926: 13 [resolve-imports (((guix utils)) ((guix records)) ((guix 
> derivations)) ...)]
> 2864: 12 [resolve-interface (guix gexp) #:select ...]
> 2789: 11 [# autoload version #:key ensure)> # ...]
> 3065: 10 [try-module-autoload (guix gexp) #f]
> 2401: 9 [save-module-excursion # ice-9/boot-9.scm:3066:17 ()>]
> 3085: 8 [#]
> In unknown file:
>?: 7 [primitive-load-path "guix/gexp" ...]
> In guix/gexp.scm:
>   19: 6 [#]
> In ice-9/boot-9.scm:
> 2951: 5 [define-module* (guix gexp) #:filename ...]
> 2926: 4 [resolve-imports ((# # #) (#) (# # #) (#) ...)]
> 2877: 3 [resolve-interface (guix store) #:select ...]
>  768: 2 [for-each # #]
> 2883: 1 [# 
> direct-store-path?]
> In unknown file:
>?: 0 [scm-error misc-error #f ...]
>
> ERROR: In procedure scm-error:
> ERROR: no binding `direct-store-path?' in module (guix store)

This is another circularity issue.  :-/

There’s:

  (guix store) -> (guix nar) -> (guix ui) -> (guix store) ...

This shouldn’t be a problem, except that occasional uses of #:select
trigger a bug (see .)

I’ve fiddled a bit on top of your patch, but couldn’t find any simple
fix.

However, back to the initial problem, is this a problem if the error
conditions are defined in (guix profiles), which is then imported by
(guix ui)?  This is suboptimal, but this kind of circular reference
shouldn’t cause any troubles.

HTH,
Ludo’.



Re: [PATCH] gnu: cmake: Use our curl, zlib, expat, bzip2, and libarchive.

2014-10-08 Thread Ludovic Courtès
Eric Bavier  skribis:

> Sending this patch to the list, as it would likely cause a lot of
> rebuilds.
>
>
> From c824d34faecc173bafc513d0b2052597a46dddfd Mon Sep 17 00:00:00 2001
> From: Eric Bavier 
> Date: Wed, 8 Oct 2014 11:55:40 -0500
> Subject: [PATCH] gnu: cmake: Use our curl, zlib, expat, bzip2, and
>  libarchive.
>
> * gnu/packages/cmake.scm (cmake)[arguments]: Move sh-patching to new
>   'patch-bin-sh phase.  New 'set-paths phase.
>   [inputs]: Add curl, zlib, expat, bzip2, and libarchive.
>   [description]: Fix space after end-of-sentence.

LGTM.  I think it’s fine to apply it on ‘master’ now (MIPS builds are
lagging behind, but that’s OK.)

Ludo’.



Re: [PATCH] glib-or-gtk-build-system: new build-system

2014-10-08 Thread Ludovic Courtès
Federico Beffa  skribis:

> On Wed, Oct 8, 2014 at 12:04 PM, Ludovic Courtès  wrote:
>> Federico Beffa  skribis:
>>> I've checked Evince and it works fine.
>>
>
> By the way, note that when started, it complains about missing
> libcanberra as does emacs.
> The problem is solved by adding libcanberra as an input to both programs.
> Maybe libcanberra should be made a propagating-input of some lower
> level library?

Not sure.  Is libcanberra dlopened?  Do you know what dlopens it, and
whether it systematically does?

> Also, as emacs, it give the warning
>
> GLib-GIO-Message: Using the 'memory' GSettings backend.  Your settings
> will not be saved or shared with other applications.
>
> I believe this is because they can't find dconf. Any particular reason
> for not being in gnome.scm?

I think it’s just that nobody did it.  :-)

So this is the daemon the GSettings API normally connects to, right?

Thanks,
Ludo’.



[PATCH] glib-or-gtk-build-system: added documentation

2014-10-08 Thread Federico Beffa
I've added documentation for the glib-or-gtk-build-system.

Regards,
Fede
From 27748f063513260cf4dac7d56e5148fbc154b4c1 Mon Sep 17 00:00:00 2001
From: Federico Beffa 
Date: Wed, 8 Oct 2014 21:04:25 +0200
Subject: [PATCH 2/2] glib-or-gtk-build-system: added documentation

* doc/guix.texi: added description of glib-or-gtk-build-system
---
 doc/guix.texi | 29 +
 1 file changed, 29 insertions(+)

diff --git a/doc/guix.texi b/doc/guix.texi
index f6357bd..977b375 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -1637,6 +1637,35 @@ debugging information''), which roughly means that code is compiled with
 @code{-O2 -g}, as is the case for Autoconf-based packages by default.
 @end defvr
 
+@defvr {Scheme Variable} glib-or-gtk-build-system
+This variable is exported by @code{(guix build-system glib-or-gtk)}.  It
+is intended for use with packages making use of
+@url{https://developer.gnome.org/glib/stable, glib} or
+@url{https://developer.gnome.org/gtk3/stable, gtk+}.
+
+This build-system adds the following two phases to the ones defined by
+the @code{gnu-build-system}:
+
+@table @code
+@item glib-or-gtk-wrap
+The phase @code{glib-or-gtk-wrap} ensures that programs found under
+@file{bin/} are able to find @code{glib} schemas and @code{gtk+}
+libraries.  This is achieved by appropriately setting the environment
+variables @code{XDG_DATA_DIRS} and @code{GTK_PATH}; and by wrapping the
+programs in suitable launch scripts.
+
+@item glib-or-gtk-compile-schemas
+The phase @code{glib-or-gtk-compile-schemas} makes sure that all
+@code{glib} schemas are compiled.  Compilation is performed by the
+program @code{glib-compile-schemas}.  It is provided by the package
+@code{glib:bin} which is automatically imported by the build system.
+The @code{glib} package providing @code{glib-compile-schemas} can be
+specified with the @code{#:glib} parameter.
+@end table
+
+Both phases are executed after the @code{install} phase.
+@end defvr
+
 @defvr {Scheme Variable} python-build-system
 This variable is exported by @code{(guix build-system python)}.  It
 implements the more or less standard build procedure used by Python
-- 
1.8.4



Re: ui: Move 'show-manifest-transaction' from (guix profiles).

2014-10-08 Thread Alex Kost
Sorry, I've found that the patch I sent is not cleanly applied to the
latest master checkout.  The modified patch is attached.

It seems the fail happens only if there is

  #:use-module (guix profiles)

in (guix ui).  If (guix profiles) is not used, there are no problems.
I'm stuck.

>From 480c22f37437ce138d4fe822f5b1c15f1f65be0e Mon Sep 17 00:00:00 2001
From: Alex Kost 
Date: Wed, 8 Oct 2014 17:15:49 +0400
Subject: [PATCH] ui: Move 'show-manifest-transaction' from (guix profiles).

* guix/profiles.scm: Do not use (guix ui) module.
  (right-arrow, manifest-show-transaction): Move and rename to...
* guix/ui.scm (right-arrow, show-manifest-transaction): ... here.
* tests/profiles.scm ("manifest-show-transaction"): Move to...
* tests/ui.scm ("show-manifest-transaction"): ... here.
  (guile-1.8.8, guile-2.0.9): New variables.
* emacs/guix-main.scm (process-package-actions): Rename
  'manifest-show-transaction' to 'show-manifest-transaction'.
* guix/scripts/package.scm (guix-package): Likewise.
---
 emacs/guix-main.scm  |  2 +-
 guix/profiles.scm| 93 
 guix/scripts/package.scm |  2 +-
 guix/ui.scm  | 93 
 tests/profiles.scm   | 17 -
 tests/ui.scm | 32 +
 6 files changed, 127 insertions(+), 112 deletions(-)

diff --git a/emacs/guix-main.scm b/emacs/guix-main.scm
index b85bb5c..fe599fb 100644
--- a/emacs/guix-main.scm
+++ b/emacs/guix-main.scm
@@ -797,7 +797,7 @@ OUTPUTS is a list of package outputs (may be an empty list)."
(new-profile (derivation->output-path derivation)))
   (set-build-options store
  #:use-substitutes? use-substitutes?)
-  (manifest-show-transaction store manifest transaction
+  (show-manifest-transaction store manifest transaction
  #:dry-run? dry-run?)
   (show-what-to-build store derivations
   #:use-substitutes? use-substitutes?
diff --git a/guix/profiles.scm b/guix/profiles.scm
index 18733a6..f2eb754 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -19,7 +19,6 @@
 ;;; along with GNU Guix.  If not, see .
 
 (define-module (guix profiles)
-  #:use-module (guix ui)
   #:use-module (guix utils)
   #:use-module (guix records)
   #:use-module (guix derivations)
@@ -63,7 +62,6 @@
 manifest-transaction-remove
 manifest-perform-transaction
 manifest-transaction-effects
-manifest-show-transaction
 
 profile-manifest
 package->manifest-entry
@@ -315,97 +313,6 @@ it."
 (manifest-add (manifest-remove manifest remove)
   install)))
 
-(define (right-arrow port)
-  "Return either a string containing the 'RIGHT ARROW' character, or an ASCII
-replacement if PORT is not Unicode-capable."
-  (with-fluids ((%default-port-encoding (port-encoding port)))
-(let ((arrow "→"))
-  (catch 'encoding-error
-(lambda ()
-  (call-with-output-string
-(lambda (port)
-  (set-port-conversion-strategy! port 'error)
-  (display arrow port
-(lambda (key . args)
-  "->")
-
-(define* (manifest-show-transaction store manifest transaction
-#:key dry-run?)
-  "Display what will/would be installed/removed from MANIFEST by TRANSACTION."
-  (define (package-strings name version output item)
-(map (lambda (name version output item)
-   (format #f "   ~a~:[:~a~;~*~]\t~a\t~a"
-   name
-   (equal? output "out") output version
-   (if (package? item)
-   (package-output store item output)
-   item)))
- name version output item))
-
-  (define →;an arrow that can be represented on stderr
-(right-arrow (current-error-port)))
-
-  (define (upgrade-string name old-version new-version output item)
-(format #f "   ~a~:[:~a~;~*~]\t~a ~a ~a\t~a"
-name (equal? output "out") output
-old-version → new-version
-(if (package? item)
-(package-output store item output)
-item)))
-
-  (let-values (((remove install upgrade)
-(manifest-transaction-effects manifest transaction)))
-(match remove
-  ((($  name version output item) ..1)
-   (let ((len(length name))
- (remove (package-strings name version output item)))
- (if dry-run?
- (format (current-error-port)
- (N_ "The following package would be removed:~%~{~a~%~}~%"
- "The following packages would be removed:~%~{~a~%~}~%"
- len)
- remove)
- (format (current-error-port)
- (N_ "The

[PATCH] gnu: cmake: Use our curl, zlib, expat, bzip2, and libarchive.

2014-10-08 Thread Eric Bavier
Sending this patch to the list, as it would likely cause a lot of
rebuilds.

>From c824d34faecc173bafc513d0b2052597a46dddfd Mon Sep 17 00:00:00 2001
From: Eric Bavier 
Date: Wed, 8 Oct 2014 11:55:40 -0500
Subject: [PATCH] gnu: cmake: Use our curl, zlib, expat, bzip2, and
 libarchive.

* gnu/packages/cmake.scm (cmake)[arguments]: Move sh-patching to new
  'patch-bin-sh phase.  New 'set-paths phase.
  [inputs]: Add curl, zlib, expat, bzip2, and libarchive.
  [description]: Fix space after end-of-sentence.
---
 gnu/packages/cmake.scm |   73 +++-
 1 file changed, 47 insertions(+), 26 deletions(-)

diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm
index 87a70de..2c20c73 100644
--- a/gnu/packages/cmake.scm
+++ b/gnu/packages/cmake.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013 Cyril Roelandt 
 ;;; Copyright © 2014 Mark H Weaver 
+;;; Copyright © 2014 Eric Bavier 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -18,12 +19,16 @@
 ;;; along with GNU Guix.  If not, see .
 
 (define-module (gnu packages cmake)
-  #:use-module (guix licenses)
+  #:use-module ((guix licenses) #:select (bsd-3))
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
   #:use-module (gnu packages)
+  #:use-module (gnu packages backup)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages curl)
   #:use-module (gnu packages file)
+  #:use-module (gnu packages xml)
   #:use-module (srfi srfi-1))
 
 (define-public cmake
@@ -43,13 +48,12 @@
 (build-system gnu-build-system)
 (arguments
  `(#:test-target "test"
-   #:phases (alist-replace
- 'configure
- (lambda* (#:key outputs #:allow-other-keys)
-   (let ((out (assoc-ref outputs "out")))
- ;; Replace "/bin/sh" by the right path in... a lot of
- ;; files.
- (substitute*
+   #:phases (alist-cons-before
+ 'configure 'patch-bin-sh
+ (lambda _
+   ;; Replace "/bin/sh" by the right path in... a lot of
+   ;; files.
+   (substitute*
'("Modules/CompilerId/Xcode-3.pbxproj.in"
  "Modules/CompilerId/Xcode-1.pbxproj.in"
  "Modules/CompilerId/Xcode-2.pbxproj.in"
@@ -62,29 +66,46 @@
  "Utilities/Release/release_cmake.cmake"
  "Utilities/cmlibarchive/libarchive/archive_write_set_format_shar.c"
  "Tests/CMakeLists.txt")
-   (("/bin/sh") (which "sh")))
- (zero? (system*
- "./configure"
- (string-append "--prefix=" out)
- ;; By default, the man pages and other docs land
- ;; in PREFIX/man and PREFIX/doc, but we want them
- ;; in share/{man,doc}.  Note that unlike
- ;; autoconf-generated configure scripts, cmake's
- ;; configure prepends "PREFIX/" to what we pass
- ;; to --mandir and --docdir.
- "--mandir=share/man"
- ,(string-append
-   "--docdir=share/doc/cmake-"
-   (string-join (take (string-split version #\.) 2)
-"."))
- %standard-phases)))
+ (("/bin/sh") (which "sh"
+ (alist-cons-before
+  'configure 'set-paths
+  (lambda _
+;; Help cmake's bootstrap process to find system libraries
+(begin
+  (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
+  (setenv "CMAKE_INCLUDE_PATH" (getenv "CPATH"
+  (alist-replace
+   'configure
+   (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+   (zero? (system*
+   "./configure"
+   (string-append "--prefix=" out)
+   "--system-libs"
+   ;; By default, the man pages and other docs land
+   ;; in PREFIX/man and PREFIX/doc, but we want them
+   ;; in share/{man,doc}.  Note that unlike
+   ;; autoconf-generated configure scripts, cmake's
+   ;; configure prepends "PREFIX/" to what we pass
+   ;; to --mandir and --docdir.
+   "--mandir=share/man"

ui: Move 'show-manifest-transaction' from (guix profiles).

2014-10-08 Thread Alex Kost
Hello, I tried to move (and rename for consistency with other ‘show-…’
procedures) ‘manifest-show-transaction’ from (guix profiles) to (guix
ui) as we were discussing on #guix today, but I found that tests began
to fail. And I can't figure it out.  The first failed test is
"builders.scm".  Its log and the patch with the changes I made are
attached.

Need help :(

>From bc27ebd215a16c52d434245bd618b10262fa9562 Mon Sep 17 00:00:00 2001
From: Alex Kost 
Date: Wed, 8 Oct 2014 17:15:49 +0400
Subject: [PATCH] ui: Move 'show-manifest-transaction' from (guix profiles).
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Suggested by Ludovic Courtès.

* guix/profiles.scm: Do not use (guix ui) module.
  (right-arrow, manifest-show-transaction): Move and rename to...
* guix/ui.scm (right-arrow, show-manifest-transaction): ... here.
* tests/profiles.scm ("manifest-show-transaction"): Move to...
* tests/ui.scm ("show-manifest-transaction"): ... here.
  (guile-1.8.8, guile-2.0.9): New variables.
* emacs/guix-main.scm (process-package-actions): Rename
  'manifest-show-transaction' to 'show-manifest-transaction'.
* guix/scripts/package.scm (guix-package): Likewise.
---
 emacs/guix-main.scm  |  2 +-
 guix/profiles.scm| 93 
 guix/scripts/package.scm |  2 +-
 guix/ui.scm  | 93 
 tests/profiles.scm   | 17 -
 tests/ui.scm | 32 +
 6 files changed, 127 insertions(+), 112 deletions(-)

diff --git a/emacs/guix-main.scm b/emacs/guix-main.scm
index 7dbfa61..c25dd50 100644
--- a/emacs/guix-main.scm
+++ b/emacs/guix-main.scm
@@ -797,7 +797,7 @@ OUTPUTS is a list of package outputs (may be an empty list)."
  (new-profile (derivation->output-path derivation)))
 (set-build-options store
#:use-substitutes? use-substitutes?)
-(manifest-show-transaction store manifest transaction
+(show-manifest-transaction store manifest transaction
#:dry-run? dry-run?)
 (show-what-to-build store derivations
 #:use-substitutes? use-substitutes?
diff --git a/guix/profiles.scm b/guix/profiles.scm
index 18733a6..f2eb754 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -19,7 +19,6 @@
 ;;; along with GNU Guix.  If not, see .
 
 (define-module (guix profiles)
-  #:use-module (guix ui)
   #:use-module (guix utils)
   #:use-module (guix records)
   #:use-module (guix derivations)
@@ -63,7 +62,6 @@
 manifest-transaction-remove
 manifest-perform-transaction
 manifest-transaction-effects
-manifest-show-transaction
 
 profile-manifest
 package->manifest-entry
@@ -315,97 +313,6 @@ it."
 (manifest-add (manifest-remove manifest remove)
   install)))
 
-(define (right-arrow port)
-  "Return either a string containing the 'RIGHT ARROW' character, or an ASCII
-replacement if PORT is not Unicode-capable."
-  (with-fluids ((%default-port-encoding (port-encoding port)))
-(let ((arrow "→"))
-  (catch 'encoding-error
-(lambda ()
-  (call-with-output-string
-(lambda (port)
-  (set-port-conversion-strategy! port 'error)
-  (display arrow port
-(lambda (key . args)
-  "->")
-
-(define* (manifest-show-transaction store manifest transaction
-#:key dry-run?)
-  "Display what will/would be installed/removed from MANIFEST by TRANSACTION."
-  (define (package-strings name version output item)
-(map (lambda (name version output item)
-   (format #f "   ~a~:[:~a~;~*~]\t~a\t~a"
-   name
-   (equal? output "out") output version
-   (if (package? item)
-   (package-output store item output)
-   item)))
- name version output item))
-
-  (define →;an arrow that can be represented on stderr
-(right-arrow (current-error-port)))
-
-  (define (upgrade-string name old-version new-version output item)
-(format #f "   ~a~:[:~a~;~*~]\t~a ~a ~a\t~a"
-name (equal? output "out") output
-old-version → new-version
-(if (package? item)
-(package-output store item output)
-item)))
-
-  (let-values (((remove install upgrade)
-(manifest-transaction-effects manifest transaction)))
-(match remove
-  ((($  name version output item) ..1)
-   (let ((len(length name))
- (remove (package-strings name version output item)))
- (if dry-run?
- (format (current-error-port)
- (N_ "The following package would be removed:~%~{~a~%~}~%"
- "The

Re: [PATCH] glib-or-gtk-build-system: new build-system

2014-10-08 Thread Federico Beffa
On Wed, Oct 8, 2014 at 12:04 PM, Ludovic Courtès  wrote:
> Federico Beffa  skribis:
>> I've checked Evince and it works fine.
>

By the way, note that when started, it complains about missing
libcanberra as does emacs.
The problem is solved by adding libcanberra as an input to both programs.
Maybe libcanberra should be made a propagating-input of some lower
level library?

Also, as emacs, it give the warning

GLib-GIO-Message: Using the 'memory' GSettings backend.  Your settings
will not be saved or shared with other applications.

I believe this is because they can't find dconf. Any particular reason
for not being in gnome.scm?

Regards,
Fede



Re: [PATCH] glib-or-gtk-build-system: new build-system

2014-10-08 Thread Ludovic Courtès
Federico Beffa  skribis:

> On Mon, Oct 6, 2014 at 11:32 PM, Ludovic Courtès  wrote:
>> Excellent!  Would be nice to check Evince and EOG, which were known to
>> have this kind of problem.
>
> I've checked Evince and it works fine.

Great.

> I couldn't find EOG. What's the name of the package?

I remember Cyril mentioned it in a discussion, but it’s not in the tree,
so forget about it.

> Attached an updated patch. If it is fine, I will update the
> documentation in a separate patch to follow.

OK.

> From 3bcb914162de1950ff927bc44cb91ea20bd5c1d4 Mon Sep 17 00:00:00 2001
> From: Federico Beffa 
> Date: Mon, 6 Oct 2014 15:49:29 +0200
> Subject: [PATCH] glib-or-gtk-build-system: New files
>
> * guix/build-system/glib-or-gtk.scm, guix/build/glib-or-gtk-build-system.scm:
>   Add initial version of a new build-system called 'glib-or-gtk-build-system'.

I’ve pushed the patch after adding the files to Makefile.am and tweaking
the commit log (I realize I wasn’t clear: “New files” is for the body of
the commit log, whereas the subject line is typically a sentence.)

Thanks!

Ludo’.



Re: [PATCH] glib-or-gtk-build-system: new build-system

2014-10-08 Thread Ludovic Courtès
Federico Beffa  skribis:

> On Wed, Oct 8, 2014 at 9:28 AM, Federico Beffa  wrote:
>> Attached an updated patch. If it is fine, I will update the
>> documentation in a separate patch to follow.
>
> I forgot to mention that I'm not sure how to update gnu-system.am. I
> looked for cmake-build-system as an example, but it is not mentioned
> in the file.

It’s actually in Makefile.am.  gnu-system.am is for things under gnu/.

Ludo’.



Re: [PATCH] gnu: conkeror: install conkeror-spawn-helper.

2014-10-08 Thread Ludovic Courtès
Eric Bavier  skribis:

> From 16e2259eb3860686a30d40e94c4c5bd39d60dfe0 Mon Sep 17 00:00:00 2001
> From: Eric Bavier 
> Date: Tue, 7 Oct 2014 17:33:00 -0500
> Subject: [PATCH] gnu: conkeror: install conkeror-spawn-helper.
>
> * gnu/packages/conkeror.scm (conkeror)[build-system]: Change to
>   gnu-build-system.  Adjust arguments accordingly.
>   [inputs]: Remove now-implicit bash.
>   [native-inputs]: Remove now-implicit tar and gzip.
>   [description]: Fix two-space-after-end-of-sentence.  Remove comment
>   about separate conkeror-spawn-process-helper package.

OK to push.

(I had got used to spawning the PDF viewer by hand, but this is
definitely an improvement!)

Thanks,
Ludo’.



Re: [PATCH] guix package: Add '--switch-generation' option.

2014-10-08 Thread Ludovic Courtès
Alex Kost  skribis:

> Ludovic Courtès (2014-10-07 20:00 +0400) wrote:
>
>> Alex Kost  skribis:

[...]

>> It’d be enough for me to just call ‘switch-symlinks’ and let it throw
>> ‘system-error’ if something’s wrong.  The exception will be caught, the
>> user will see a “No such file” error, and ‘guix package’ with exit with
>> non-zero (this is done by ‘call-with-error-handling’.)
>
> ‘switch-symlinks’ does not throw an error even if files don't exist, so…

Oh right, ‘symlink’ doesn’t care about its first argument.

>> It’s less informative than what you did, though.  The other option would
>> be to define specific error condition types and throw them from here.
>>
>> WDYT?
>
> … I tried to make it this way, thank you for pointing.  I made another
> commit for adding and using condition types (3 patches are attached
> now).

Great.

> Also I moved ‘process-query’ inside ‘with-error-handling’ (because I
> used ‘raise’ there).  Could there be unwanted consequences after that?

No, I think it’s fine.

> From d5e9abb0395a21e79d4f77181597103d4daf138c Mon Sep 17 00:00:00 2001
> From: Alex Kost 
> Date: Wed, 8 Oct 2014 00:32:28 +0400
> Subject: [PATCH 1/3] profiles: Add condition types for profile and generation.
>
> * guix/profiles.scm (&profile-error, &generation-error): New condition types.
> * guix/ui.scm (call-with-error-handling): Handle these types.
> * guix/scripts/package.scm (roll-back, guix-package): Raise '&profile-error'
>   where needed.

This is bikeshedding, but I would make a hierarchy like this:

 &profile-error, with ‘profile’ field
^
   .———–+———–.
   | |
  &profile-not-found-error&missing-generation-error, with ‘generation’ 
field

WDYT?

Other than that the patch looks good.

> From e47644b43aaa73885ca648118b6fc59fdb499303 Mon Sep 17 00:00:00 2001
> From: Alex Kost 
> Date: Wed, 8 Oct 2014 00:39:42 +0400
> Subject: [PATCH 2/3] profiles: Add procedures for switching generations.
>
> * guix/scripts/package.scm (switch-to-previous-generation): Move to...
> * guix/profiles.scm: ... here. Use 'switch-to-generation'.
>   (relative-generation): New procedure.
>   (previous-generation-number): Use it.
>   (switch-to-generation): New procedure.

OK.

> From 003e5c192796e8ea07491a94a85824a533155825 Mon Sep 17 00:00:00 2001
> From: Alex Kost 
> Date: Wed, 8 Oct 2014 00:45:38 +0400
> Subject: [PATCH 3/3] guix package: Add '--switch-generation' option.
>
> * guix/scripts/package.scm: Add '--switch-generation' option.
>   (guix-package): Adjust accordingly.
> * tests/guix-package.sh: Test it.
> * doc/guix.texi (Invoking guix package): Document it.

OK.

Thanks again!

Ludo’.



Re: [PATCH] glib-or-gtk-build-system: new build-system

2014-10-08 Thread Federico Beffa
On Wed, Oct 8, 2014 at 9:28 AM, Federico Beffa  wrote:
> Attached an updated patch. If it is fine, I will update the
> documentation in a separate patch to follow.

I forgot to mention that I'm not sure how to update gnu-system.am. I
looked for cmake-build-system as an example, but it is not mentioned
in the file.

Regards,
Fede



Re: [PATCH] glib-or-gtk-build-system: new build-system

2014-10-08 Thread Federico Beffa
On Mon, Oct 6, 2014 at 11:32 PM, Ludovic Courtès  wrote:
> Excellent!  Would be nice to check Evince and EOG, which were known to
> have this kind of problem.

I've checked Evince and it works fine. I couldn't find EOG. What's the
name of the package?

> Great.  The strategy looks good to me.  Mark had concerns about the
> wrapper approach in general, but IMO it’s OK here.  Thoughts?

Yes, I've read Mark's comments. I'm not ignoring his comments. I just
do not have a better idea.

Attached an updated patch. If it is fine, I will update the
documentation in a separate patch to follow.

Regards,
Fede
From 3bcb914162de1950ff927bc44cb91ea20bd5c1d4 Mon Sep 17 00:00:00 2001
From: Federico Beffa 
Date: Mon, 6 Oct 2014 15:49:29 +0200
Subject: [PATCH] glib-or-gtk-build-system: New files

* guix/build-system/glib-or-gtk.scm, guix/build/glib-or-gtk-build-system.scm:
  Add initial version of a new build-system called 'glib-or-gtk-build-system'.
---
 guix/build-system/glib-or-gtk.scm   | 195 
 guix/build/glib-or-gtk-build-system.scm | 130 +
 2 files changed, 325 insertions(+)
 create mode 100644 guix/build-system/glib-or-gtk.scm
 create mode 100644 guix/build/glib-or-gtk-build-system.scm

diff --git a/guix/build-system/glib-or-gtk.scm b/guix/build-system/glib-or-gtk.scm
new file mode 100644
index 000..8abdf9f
--- /dev/null
+++ b/guix/build-system/glib-or-gtk.scm
@@ -0,0 +1,195 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2013, 2014 Ludovic Courtès 
+;;; Copyright © 2013 Cyril Roelandt 
+;;; Copyright © 2014 Federico Beffa 
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see .
+
+(define-module (guix build-system glib-or-gtk)
+  #:use-module (guix store)
+  #:use-module (guix utils)
+  #:use-module (guix derivations)
+  #:use-module (guix build-system)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix packages)
+  #:use-module (ice-9 match)
+  #:export (glib-or-gtk-build
+glib-or-gtk-build-system))
+
+;; Commentary:
+;;
+;; This build system is an extension of the 'gnu-build-system'.  It
+;; accomodates the needs of applications making use of glib or gtk+ (with "or"
+;; to be interpreted in the mathematical sense).  This is achieved by adding
+;; two phases run after the 'install' phase:
+;;
+;; 'glib-or-gtk-wrap' phase:
+;; 
+;; a) This phase looks for GSettings schemas by verifying the existence of
+;; path "datadir/glib-2.0/schemas" in all input packages.  If the path is
+;; found in any package, then all programs in "out/bin" are wrapped in scripts
+;; where the environment variable "XDG_DATA_DIRS" is set and points to the
+;; list of found schemas directories.
+;;
+;; b) Looks for the existence of "libdir/gtk-3.0" directories in all input
+;; packages.  If any is found, then the environment variable "GTK_PATH" is
+;; suitably set and added to the wrappers.  The variable "GTK_PATH" has been
+;; preferred over "GTK_EXE_PREFIX" because the latter can only point to a
+;; single directory, while we may need to point to several ones.
+;;
+;; 'glib-or-gtk-compile-schemas' phase:
+;; 
+;; Looks for the presence of "out/share/glib-2.0/schemas".  If that directory
+;; exists and does not include a file named "gschemas.compiled", then
+;; "glib-compile-schemas" is run in that directory.
+;;
+;; Code:
+
+(define %default-modules
+  ;; Build-side modules made available in the build environment.
+  '((guix build glib-or-gtk-build-system)
+(guix build utils)))
+
+(define %default-imported-modules
+  ;; Build-side modules imported and used by default.
+  '((guix build gnu-build-system)
+(guix build glib-or-gtk-build-system)
+(guix build utils)))
+
+(define (default-glib)
+  "Return the default glib package from which we use
+\"glib-compile-schemas\"."
+  ;; Do not use `@' to avoid introducing circular dependencies.
+  (let ((module (resolve-interface '(gnu packages glib
+(module-ref module 'glib)))
+
+(define* (lower name
+#:key source inputs native-inputs outputs system target
+(glib (default-glib)) (implicit-inputs? #t)
+(strip-binaries? #t)
+#:allow-other-keys
+#:rest arguments)
+  "Return a bag for NAME."
+  (define private-keywords
+'(#:source #:target #:glib #:inputs #:nat