all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jean-Pierre De Jesus DIAZ <jean@foundation.xyz>
To: 71748@debbugs.gnu.org
Cc: Jean-Pierre De Jesus DIAZ <jean@foundation.xyz>,
	Andreas Enge <andreas@enge.fr>, Eric Bavier <bavier@posteo.net>,
	Sharlatan Hellseher <sharlatanus@gmail.com>
Subject: [bug#71748] [PATCH 3/3] gnu: frama-c: Add wrap-programs phase.
Date: Mon, 24 Jun 2024 13:58:17 +0200	[thread overview]
Message-ID: <de935cc73b8a05ce49a9b626829eb417f86b86b7.1719229917.git.jean@foundation.xyz> (raw)
In-Reply-To: <cover.1719229917.git.jean@foundation.xyz>

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





  parent reply	other threads:[~2024-06-24 12:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-24 11:55 [bug#71748] [PATCH 0/3] gnu: frama-c: Update to 29.0 Jean-Pierre De Jesus DIAZ
2024-06-24 11:58 ` [bug#71748] [PATCH 1/3] " Jean-Pierre De Jesus DIAZ
2024-06-24 11:58 ` [bug#71748] [PATCH 2/3] gnu: frama-c: Use G-Expressions Jean-Pierre De Jesus DIAZ
2024-06-24 11:58 ` Jean-Pierre De Jesus DIAZ [this message]
2024-06-24 20:05 ` bug#71748: [PATCH 0/3] gnu: frama-c: Update to 29.0 jgart via Guix-patches via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=de935cc73b8a05ce49a9b626829eb417f86b86b7.1719229917.git.jean@foundation.xyz \
    --to=jean@foundation.xyz \
    --cc=71748@debbugs.gnu.org \
    --cc=andreas@enge.fr \
    --cc=bavier@posteo.net \
    --cc=sharlatanus@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.