[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#71748] [PATCH 3/3] gnu: frama-c: Add wrap-programs phase.
From: |
Jean-Pierre De Jesus DIAZ |
Subject: |
[bug#71748] [PATCH 3/3] gnu: frama-c: Add wrap-programs phase. |
Date: |
Mon, 24 Jun 2024 13:58:17 +0200 |
Frama-C needs the OCAMLPATH variable to be defined to load libraries, so
define it using the OCAMLPATH variable generated during build time.
Related issues:
- <https://issues.guix.gnu.org/54094> (fixes it).
- <https://issues.guix.gnu.org/69996> (only Frama-C fixed from this one).
* gnu/packages/maths.scm (frama-c) <arguments>: Add wrap-programs phase.
Change-Id: Icc8a0be5fed6678b71649da2e39a83caaaee9df2
---
gnu/packages/maths.scm | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 1df9931c69..858e7e75cc 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -9548,9 +9548,20 @@ (define-public frama-c
#~(modify-phases %standard-phases
(add-before 'build 'set-env
(lambda _
- (setenv "CC" "gcc"))))))
+ (setenv "CC" "gcc")))
+ (add-after 'install 'wrap-programs
+ (lambda _
+ (let ((ocamlpath
+ `(,(string-append #$output "/lib/ocaml/site-lib")
+ ,@(search-path-as-string->list
+ (getenv "OCAMLPATH")))))
+ (for-each
+ (lambda (program)
+ (wrap-program (string-append #$output "/bin/" program)
+ `("OCAMLPATH" ":" prefix ,ocamlpath)))
+ '("frama-c" "frama-c-gui"))))))))
(inputs
- (list gmp zlib))
+ (list bash-minimal gmp zlib))
(propagated-inputs (list
graphviz
lablgtk3
--
2.45.1