gnu: cadabra2: Fix paths.

* gnu/packages/engineering.scm (cadabra2)[arguments]<#:phases>[patch-paths]:
New phase.

Change-Id: If22ed61f74531bd685c0e588a954982e63cb2d33
This commit is contained in:
Danny Milosavljevic 2024-12-23 19:24:26 +01:00
parent 907b6bb51a
commit 8b94d3d5b1
No known key found for this signature in database
GPG key ID: E71A35542C30BAA5

View file

@ -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"))))))