summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorEric Bavier <bavier@member.fsf.org>2017-11-01 17:12:06 -0500
committerEric Bavier <bavier@member.fsf.org>2017-11-01 17:15:10 -0500
commit0498d24866c4955faee95a4fc19ff6817e5483d2 (patch)
tree4053266a34a49c55d19aed71f0c56ba32caa6578 /gnu/packages
parentf11d2849a1147af2fc3376b8b08bfe0efead6398 (diff)
downloadguix-0498d24866c4955faee95a4fc19ff6817e5483d2.tar.gz
gnu: units: Add python input.
* gnu/packages/maths.scm (units)[inputs]: New field.
[arguments]: New field.  Add 'wrap-units_cur phase.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/maths.scm13
1 files changed, 13 insertions, 0 deletions
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index f0b3bf28f3..7529a41e91 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -200,6 +200,19 @@ programming languages.")
             (sha256 (base32
                      "11hnp3gcmcc5kci2caxw4hs6m08h2mhqs3xzqq7iafx1ha2ggwyw"))))
    (build-system gnu-build-system)
+   (inputs
+    `(("python" ,python-wrapper)        ;for 'units_cur' script
+      ("python-requests" ,python-requests)))
+   (arguments
+    `(#:phases (modify-phases %standard-phases
+                 (add-after 'install 'wrap-units_cur
+                   (lambda* (#:key outputs #:allow-other-keys)
+                     (let* ((out (assoc-ref outputs "out"))
+                            (bin (string-append out "/bin")))
+                       (wrap-program (string-append bin "/units_cur")
+                         `("PYTHONPATH" ":" prefix
+                           ,(search-path-as-string->list (getenv "PYTHONPATH"))))
+                       #t))))))
    (synopsis "Conversion between thousands of scales")
    (description
     "GNU Units converts numeric quantities between units of measure.  It