guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

03/03: gnu: translate-shell: Wrap binary.


From: guix-commits
Subject: 03/03: gnu: translate-shell: Wrap binary.
Date: Tue, 25 Dec 2018 15:06:09 -0500 (EST)

efraim pushed a commit to branch master
in repository guix.

commit cf51b828af5358c1303bbb797f58433dd8d4c043
Author: Efraim Flashner <address@hidden>
Date:   Tue Dec 25 21:57:09 2018 +0200

    gnu: translate-shell: Wrap binary.
    
    * gnu/packages/dictionaries.scm (translate-shell)[arguments]: Add custom
    phase to wrap the 'trans' binary with the inputs.
    [native-inputs]: Move curl, fribidi, rlwrap ...
    [inputs]: ... to here.
---
 gnu/packages/dictionaries.scm | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/dictionaries.scm b/gnu/packages/dictionaries.scm
index e32df64..9e06ac7 100644
--- a/gnu/packages/dictionaries.scm
+++ b/gnu/packages/dictionaries.scm
@@ -268,6 +268,20 @@ and a Python library.")
            (lambda _
              (delete-file "translate")
              #t))
+         (add-after 'install 'wrap-binary
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out     (assoc-ref outputs "out"))
+                    (bin     (string-append out "/bin/trans"))
+                    (curl    (assoc-ref inputs "curl"))
+                    (fribidi (assoc-ref inputs "fribidi"))
+                    (rlwrap  (assoc-ref inputs "rlwrap")))
+               (wrap-program bin
+                             `("PATH" ":" prefix
+                               (,(string-append out "/bin:"
+                                                curl "/bin:"
+                                                fribidi "/bin:"
+                                                rlwrap "/bin")))))
+             #t))
          (add-after 'install 'emacs-install
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let* ((out   (assoc-ref outputs "out"))
@@ -283,7 +297,7 @@ and a Python library.")
                   (guix build emacs-utils)
                   (guix build utils))
        #:test-target "test"))
-    (propagated-inputs
+    (inputs
      `(("curl" ,curl)
        ("fribidi" ,fribidi)
        ("rlwrap" ,rlwrap)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]