On Mon, Nov 24, 2014 at 6:04 PM, Eric Bavier <ericbav...@gmail.com> wrote:
> Could you align the arguments to wrap-program here?

Does this correspond to the expected alignment? (This is formatted by
emacs. Indeed in the previous version I forgot to press TAB on a
line.)

> See commit de61113, and the discussion at
> https://lists.gnu.org/archive/html/guix-devel/2014-09/msg00190.html
>

OK

Thanks,
Fede
From 608884dfbf6cf2995531dcfb16986ab972803db3 Mon Sep 17 00:00:00 2001
From: Federico Beffa <be...@fbengineering.ch>
Date: Mon, 24 Nov 2014 14:22:16 +0100
Subject: [PATCH] gnu: xfig: Add 'wrap-xfig phase.

* gnu/packages/xfig.scm (xfig): Set XAPPLRESDIR environment variable to help
  xfig find the app-defaults resource files.
---
 gnu/packages/xfig.scm | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/xfig.scm b/gnu/packages/xfig.scm
index b154074..6436e52 100644
--- a/gnu/packages/xfig.scm
+++ b/gnu/packages/xfig.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014 Eric Bavier <bav...@member.fsf.org>
+;;; Copyright © 2014 Federico Beffa <be...@fbengineering.ch>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -118,7 +119,14 @@
                   (close-pipe in)
                   (close-port out)))
               (zero? (system* "make" "install.doc"))))
-          %standard-phases)))))
+          (alist-cons-after
+           'install 'wrap-xfig
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (wrap-program (string-append out "/bin/xfig")
+                             `("XAPPLRESDIR" suffix
+                               (,(string-append out "/etc/X11/app-defaults"))))))
+           %standard-phases))))))
     (home-page "http://xfig.org/";)
     (synopsis "Interactive drawing tool")
     (description
-- 
1.8.4

Reply via email to