summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-03-29 13:14:28 +0200
committerLudovic Courtès <ludo@gnu.org>2017-03-29 13:18:37 +0200
commita4cdcffb19f38b47bb7e0234c1244edbede35d59 (patch)
tree32c78ff01f13a66e0cc30f145ac116ea55b76aba /gnu
parentf8279ba46baa5a1ad7e6c32546d71819eff72e4e (diff)
downloadguix-a4cdcffb19f38b47bb7e0234c1244edbede35d59.tar.gz
gnu: lxsession: Build Vala code from source.
* gnu/packages/lxde.scm (lxsession)[source](snippet): New field.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/lxde.scm15
1 files changed, 14 insertions, 1 deletions
diff --git a/gnu/packages/lxde.scm b/gnu/packages/lxde.scm
index 0844263713..e7654053d8 100644
--- a/gnu/packages/lxde.scm
+++ b/gnu/packages/lxde.scm
@@ -333,7 +333,20 @@ in LXDE.")
        (patches (search-patches "lxsession-use-gapplication.patch"))
        (sha256
         (base32
-         "1a0zmyywwzdh59nc0l94cir18vhp633z4q2xfhn5zx11ajj45gwh"))))
+         "1a0zmyywwzdh59nc0l94cir18vhp633z4q2xfhn5zx11ajj45gwh"))
+       (modules '((guix build utils)))
+       (snippet
+        ;; Remove C files generated by Vala so we can build from source.
+        '(let* ((c->vala
+                 (lambda (file)
+                   (string-append (string-drop-right file 2)
+                                  ".vala")))
+                (generated-c-file?
+                 (lambda (file stat)
+                   (and (string-suffix? ".c" file)
+                        (file-exists? (c->vala file))))))
+           (for-each delete-file
+                     (find-files "." generated-c-file?))))))
     (build-system gnu-build-system)
     (arguments
      `(#:phases