summaryrefslogtreecommitdiff
path: root/gnu/packages/engineering.scm
diff options
context:
space:
mode:
authorDanny Milosavljevic <dannym@friendly-machines.com>2024-12-23 19:24:26 +0100
committerDanny Milosavljevic <dannym@friendly-machines.com>2024-12-23 19:26:17 +0100
commit8b94d3d5b1963e2ddce0431c64a6e1c2ba173f7f (patch)
tree140feafc66533772cf56f674a59fe5fe71d53b51 /gnu/packages/engineering.scm
parent907b6bb51af8af15a0d6dd3ab1e33109a4ad4d2e (diff)
gnu: cadabra2: Fix paths.
* gnu/packages/engineering.scm (cadabra2)[arguments]<#:phases>[patch-paths]: New phase. Change-Id: If22ed61f74531bd685c0e588a954982e63cb2d33
Diffstat (limited to 'gnu/packages/engineering.scm')
-rw-r--r--gnu/packages/engineering.scm12
1 files changed, 12 insertions, 0 deletions
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 9e920912cd..f2f595a3a3 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -4840,6 +4840,18 @@ server for Python and pypy3.")
(assoc-ref %outputs "out")))
#:phases
#~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-paths
+ (lambda* (#:key outputs #:allow-other-keys)
+ (substitute* "client_server/ComputeThread.cc"
+ (("[(]\"cadabra-server\"[)]")
+ (string-append "(\"" (assoc-ref outputs "out")
+ "/bin/cadabra-server\")")))
+ (substitute* "client_server/Server.cc"
+ (("'\" [+] python_path [+]")
+ (string-append "'\" + std::string(\""
+ (assoc-ref outputs "out")
+ "/lib/python3.10/site-packages"
+ "\") +")))))
(add-before 'check 'prepare-checks
(lambda _
(setenv "HOME" "/tmp"))))))