GNU bug report logs - #78231
[PATCH] ocaml: binsec: Wrap program to set OCAMLPATH

Previous Next

Package: guix-patches;

Reported by: soeren <at> soeren-tempel.net

Date: Sat, 3 May 2025 14:41:01 UTC

Severity: normal

Tags: patch

Done: Andreas Enge <andreas <at> enge.fr>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Andreas Enge <andreas <at> enge.fr>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#78231: closed ([PATCH] ocaml: binsec: Wrap program to set
 OCAMLPATH)
Date: Sat, 07 Jun 2025 14:41:03 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sat, 7 Jun 2025 16:40:07 +0200
with message-id <aERPR3fg3EU1vThL <at> jurong>
and subject line Re: [PATCH] ocaml: binsec: Wrap program to set OCAMLPATH
has caused the debbugs.gnu.org bug report #78231,
regarding [PATCH] ocaml: binsec: Wrap program to set OCAMLPATH
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
78231: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=78231
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: soeren <at> soeren-tempel.net
To: guix-patches <at> gnu.org
Cc: jgart <at> dismail.de
Subject: [PATCH] ocaml: binsec: Wrap program to set OCAMLPATH
Date: Sat,  3 May 2025 16:38:26 +0200
From: Sören Tempel <soeren <at> soeren-tempel.net>

Otherwise, dune plugins cannot be loaded which results in some command
line options to not work correctly. For example, binsec --help errors
with "The library "binsec.sse.checkct" can't be found in the search
paths". To fix this, this patch adds a wrap-programs phase.

Fixes https://issues.guix.gnu.org/69996

* gnu/packages/ocaml.scm (binsec) <arguments>: Add wrap-programs phase.
---
 gnu/packages/ocaml.scm | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index a5632c6ad1..e86f59d2b3 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1419,6 +1419,17 @@ (define-public binsec
        (sha256
         (base32 "1szfqb6rj19w2jdyaxdgy3plhgr7picijf7l4k5qq80kna2h0zm8"))))
     (build-system dune-build-system)
+    (arguments
+      (list #:phases
+            #~(modify-phases %standard-phases
+                (add-after 'install 'wrap-programs
+                  (lambda _
+                    (let ((ocamlpath
+                            `(,(string-append #$output "/lib/ocaml/site-lib")
+                               ,@(search-path-as-string->list (getenv "OCAMLPATH")))))
+                      (wrap-program (string-append #$output "/bin/" "binsec")
+                                    `("OCAMLPATH" ":" prefix ,ocamlpath))))))))
+    (inputs (list bash-minimal))
     (native-inputs (list gmp ocaml-qcheck ocaml-ounit2))
     (propagated-inputs (list dune-site
                              ocaml-base

base-commit: 415e3d98d6faf5fd3d1b7b3daa2f20636e4ff822


[Message part 3 (message/rfc822, inline)]
From: Andreas Enge <andreas <at> enge.fr>
To: soeren <at> soeren-tempel.net
Cc: 69996-done <at> debbugs.gnu.org, jgart <at> dismail.de, 78231-done <at> debbugs.gnu.org
Subject: Re: [PATCH] ocaml: binsec: Wrap program to set OCAMLPATH
Date: Sat, 7 Jun 2025 16:40:07 +0200
Am Sat, May 03, 2025 at 04:38:26PM +0200 schrieb soeren <at> soeren-tempel.net:
> From: Sören Tempel <soeren <at> soeren-tempel.net>
> Otherwise, dune plugins cannot be loaded which results in some command
> line options to not work correctly. For example, binsec --help errors
> with "The library "binsec.sse.checkct" can't be found in the search
> paths". To fix this, this patch adds a wrap-programs phase.
> Fixes https://issues.guix.gnu.org/69996
> * gnu/packages/ocaml.scm (binsec) <arguments>: Add wrap-programs phase.

Pushed, thanks!

Andreas



This bug report was last modified 69 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.