* [bug#63609] [PATCH 0/4] gnu: Add coccinelle.
@ 2023-05-20 12:48 Jean-Pierre De Jesus DIAZ via Guix-patches via
2023-05-21 11:34 ` [bug#63609] [PATCH 1/4] gnu: Add ocaml-parmap Jean-Pierre De Jesus DIAZ via Guix-patches via
2023-06-02 14:49 ` bug#63609: [PATCH 0/4] gnu: Add coccinelle Ludovic Courtès
0 siblings, 2 replies; 8+ messages in thread
From: Jean-Pierre De Jesus DIAZ via Guix-patches via @ 2023-05-20 12:48 UTC (permalink / raw)
To: 63609; +Cc: Jean-Pierre De Jesus DIAZ
Package definition for coccinelle semantic patch tool.
* ocaml-pyml is using a git commit as there's no recent version released yet
that wokrs with Python ^3.10.
* I thought of disabling the ocaml-parmap tests as these take a while
and possibly could take a bit of CPU time on CI, so in reality it's not
that long. Could send a revised patch to disable it though, however,
feel free to disable the tests if necessary.
Jean-Pierre De Jesus DIAZ (4):
gnu: Add ocaml-parmap.
gnu: Add ocaml-stdcompat.
gnu: Add ocaml-pyml.
gnu: Add coccinelle.
gnu/packages/ocaml.scm | 117 ++++++++++++++++++++++++++++++++++++
gnu/packages/patchutils.scm | 56 +++++++++++++++++
2 files changed, 173 insertions(+)
base-commit: 5b700945fb0b33eec410de8979cae2fbf0d4f118
--
2.34.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#63609] [PATCH 1/4] gnu: Add ocaml-parmap.
2023-05-20 12:48 [bug#63609] [PATCH 0/4] gnu: Add coccinelle Jean-Pierre De Jesus DIAZ via Guix-patches via
@ 2023-05-21 11:34 ` Jean-Pierre De Jesus DIAZ via Guix-patches via
2023-05-21 11:34 ` [bug#63609] [PATCH 2/4] gnu: Add ocaml-stdcompat Jean-Pierre De Jesus DIAZ via Guix-patches via
` (3 more replies)
2023-06-02 14:49 ` bug#63609: [PATCH 0/4] gnu: Add coccinelle Ludovic Courtès
1 sibling, 4 replies; 8+ messages in thread
From: Jean-Pierre De Jesus DIAZ via Guix-patches via @ 2023-05-21 11:34 UTC (permalink / raw)
To: 63609; +Cc: Jean-Pierre De Jesus DIAZ
* gnu/packages/ocaml.scm (ocaml-parmap): New variable.
Signed-off-by: Jean-Pierre De Jesus DIAZ <jean@foundationdevices.com>
---
gnu/packages/ocaml.scm | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index f0b8f9e912..08036ba401 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -28,6 +28,7 @@
;;; Copyright © 2022 John Kehayias <john.kehayias@protonmail.com>
;;; Copyright © 2022 Garek Dyszel <garekdyszel@disroot.org>
;;; Copyright © 2023 Csepp <raingloom@riseup.net>
+;;; Copyright © 2023 Foundation Devices, Inc. <hello@foundationdevices.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -2698,6 +2699,42 @@ (define-public ocaml-ppx-tools
syntactic tools.")
(license license:expat)))
+(define-public ocaml-parmap
+ (package
+ (name "ocaml-parmap")
+ (version "1.2.5")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/rdicosmo/parmap")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0x5gnfap9f7kmgh8j725vxlbkvlplwzbpn8jdx2ywfa3dd6bn6xl"))))
+ (build-system dune-build-system)
+ (propagated-inputs
+ (list ocaml-odoc))
+ (home-page "https://github.com/rdicosmo/parmap")
+ (synopsis "Parallel map and fold primtives for OCaml")
+ (description
+ "Library to perform parallel fold or map taking advantage of multiple
+core architectures for OCaml programs. Drop-in replacement for these
+@code{List} operations are provided:
+
+@itemize
+@item @code{List.map} -> @code{parmap}
+@item @code{List.map} -> @code{parfold}
+@item @code{List.mapfold} -> @code{parmapfold}
+@end itemize
+
+Also it allows specifying the number of cores to use with the optional
+parameter @code{ncores}.")
+ (license (list license:lgpl2.0
+ (license:fsdg-compatible "file://LICENSE"
+ "See LICENSE file for details")))))
+
(define-public ocaml-react
(package
(name "ocaml-react")
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [bug#63609] [PATCH 2/4] gnu: Add ocaml-stdcompat.
2023-05-21 11:34 ` [bug#63609] [PATCH 1/4] gnu: Add ocaml-parmap Jean-Pierre De Jesus DIAZ via Guix-patches via
@ 2023-05-21 11:34 ` Jean-Pierre De Jesus DIAZ via Guix-patches via
2023-05-21 11:34 ` [bug#63609] [PATCH 3/4] gnu: Add ocaml-pyml Jean-Pierre De Jesus DIAZ via Guix-patches via
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Jean-Pierre De Jesus DIAZ via Guix-patches via @ 2023-05-21 11:34 UTC (permalink / raw)
To: 63609; +Cc: Jean-Pierre De Jesus DIAZ
* gnu/packages/ocaml.scm (ocaml-stdcompat): New variable.
Signed-off-by: Jean-Pierre De Jesus DIAZ <jean@foundationdevices.com>
---
gnu/packages/ocaml.scm | 46 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 08036ba401..0656abb610 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -4606,6 +4606,52 @@ (define-public ocaml-expect
or a timeout.")
(license license:lgpl2.1+))) ; with the OCaml static compilation exception
+(define-public ocaml-stdcompat
+ (package
+ (name "ocaml-stdcompat")
+ (version "19")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/thierry-martinez/stdcompat")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (modules '((guix build utils)))
+ (snippet
+ #~(for-each delete-file '("Makefile.in" "configure")))
+ (sha256
+ (base32
+ "0r9qcfjkn8634lzxp5bkagzwsi3vmg0hb6vq4g1p1515rys00h1b"))))
+ (build-system dune-build-system)
+ (arguments
+ (list #:imported-modules `((guix build gnu-build-system)
+ ,@%dune-build-system-modules)
+ #:modules '((guix build dune-build-system)
+ ((guix build gnu-build-system) #:prefix gnu:)
+ (guix build utils))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'bootstrap
+ (assoc-ref gnu:%standard-phases 'bootstrap))
+ (add-before 'build 'prepare-build
+ (lambda _
+ (let ((bash (which "bash")))
+ (setenv "CONFIG_SHELL" bash)
+ (setenv "SHELL" bash)))))))
+ (native-inputs
+ (list autoconf
+ automake
+ ocaml
+ ocaml-findlib))
+ (home-page "https://github.com/thierry-martinez/stdcompat")
+ (synopsis "Compatibility module for OCaml standard library")
+ (description
+ "Compatibility module for OCaml standard library allowing programs to use
+some recent additions to the standard library while preserving the ability to
+be compiled on former versions of OCaml.")
+ (license license:bsd-2)))
+
(define-public ocaml-stdlib-shims
(package
(name "ocaml-stdlib-shims")
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [bug#63609] [PATCH 3/4] gnu: Add ocaml-pyml.
2023-05-21 11:34 ` [bug#63609] [PATCH 1/4] gnu: Add ocaml-parmap Jean-Pierre De Jesus DIAZ via Guix-patches via
2023-05-21 11:34 ` [bug#63609] [PATCH 2/4] gnu: Add ocaml-stdcompat Jean-Pierre De Jesus DIAZ via Guix-patches via
@ 2023-05-21 11:34 ` Jean-Pierre De Jesus DIAZ via Guix-patches via
2023-05-21 11:34 ` [bug#63609] [PATCH 4/4] gnu: Add coccinelle Jean-Pierre De Jesus DIAZ via Guix-patches via
2023-05-22 17:00 ` [bug#63609] [PATCH 1/4] gnu: Add ocaml-parmap Simon Tournier
3 siblings, 0 replies; 8+ messages in thread
From: Jean-Pierre De Jesus DIAZ via Guix-patches via @ 2023-05-21 11:34 UTC (permalink / raw)
To: 63609; +Cc: Jean-Pierre De Jesus DIAZ
* gnu/packages/ocaml.ml (ocaml-pyml): New variable.
Signed-off-by: Jean-Pierre De Jesus DIAZ <jean@foundationdevices.com>
---
gnu/packages/ocaml.scm | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 0656abb610..ab0aa0574a 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2735,6 +2735,40 @@ (define-public ocaml-parmap
(license:fsdg-compatible "file://LICENSE"
"See LICENSE file for details")))))
+(define-public ocaml-pyml
+ ;; NOTE: Using commit from master branch as 20220905 does not support
+ ;; Python 3.10.
+ (let ((revision "0")
+ (commit "e33f4c49cc97e7bc6f8e5faaa64cce994470642e"))
+ (package
+ (name "ocaml-pyml")
+ (version (git-version "20220905" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/thierry-martinez/pyml")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1v421i5cvj8mbgrg5cs78bz1yzdprm9r5r41niiy20d3j7j8jx9k"))))
+ (build-system dune-build-system)
+ (propagated-inputs
+ (list ocaml-stdcompat
+ python
+ python-numpy))
+ (home-page "https://github.com/thierry-martinez/pyml")
+ (synopsis "Python bindings for OCaml")
+ (description "Library that allows OCaml programs to interact with Python
+modules and objects. The library also provides low-level bindings to the
+Python C API.
+
+This library is an alternative to @code{pycaml} which is no longer
+maintained. The @code{Pycaml} module provides a signature close to
+@code{pycaml}, to ease migration of code to this library.")
+ (license license:bsd-2))))
+
(define-public ocaml-react
(package
(name "ocaml-react")
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [bug#63609] [PATCH 4/4] gnu: Add coccinelle.
2023-05-21 11:34 ` [bug#63609] [PATCH 1/4] gnu: Add ocaml-parmap Jean-Pierre De Jesus DIAZ via Guix-patches via
2023-05-21 11:34 ` [bug#63609] [PATCH 2/4] gnu: Add ocaml-stdcompat Jean-Pierre De Jesus DIAZ via Guix-patches via
2023-05-21 11:34 ` [bug#63609] [PATCH 3/4] gnu: Add ocaml-pyml Jean-Pierre De Jesus DIAZ via Guix-patches via
@ 2023-05-21 11:34 ` Jean-Pierre De Jesus DIAZ via Guix-patches via
2023-05-22 17:00 ` [bug#63609] [PATCH 1/4] gnu: Add ocaml-parmap Simon Tournier
3 siblings, 0 replies; 8+ messages in thread
From: Jean-Pierre De Jesus DIAZ via Guix-patches via @ 2023-05-21 11:34 UTC (permalink / raw)
To: 63609; +Cc: Jean-Pierre De Jesus DIAZ
* gnu/packages/patchutils.scm (coccinelle): New variable.
Signed-off-by: Jean-Pierre De Jesus DIAZ <jean@foundationdevices.com>
---
gnu/packages/patchutils.scm | 56 +++++++++++++++++++++++++++++++++++++
1 file changed, 56 insertions(+)
diff --git a/gnu/packages/patchutils.scm b/gnu/packages/patchutils.scm
index 1527590af5..2b30ee1b9d 100644
--- a/gnu/packages/patchutils.scm
+++ b/gnu/packages/patchutils.scm
@@ -7,6 +7,7 @@
;;; Copyright © 2022 jgart <jgart@dismail.de>
;;; Copyright © 2023 Andy Tai <atai@atai.org>
;;; Copyright © 2023 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2023 Foundation Devices, Inc. <hello@foundationdevices.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -33,8 +34,10 @@ (define-module (gnu packages patchutils)
#:use-module (guix build-system gnu)
#:use-module (guix build-system glib-or-gtk)
#:use-module (guix build-system meson)
+ #:use-module (guix build-system ocaml)
#:use-module (guix build-system python)
#:use-module (gnu packages)
+ #:use-module (gnu packages autotools)
#:use-module (gnu packages ed)
#:use-module (gnu packages base)
#:use-module (gnu packages bash)
@@ -53,6 +56,7 @@ (define-module (gnu packages patchutils)
#:use-module (gnu packages less)
#:use-module (gnu packages mail)
#:use-module (gnu packages ncurses)
+ #:use-module (gnu packages ocaml)
#:use-module (gnu packages package-management)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
@@ -62,6 +66,58 @@ (define-module (gnu packages patchutils)
#:use-module (gnu packages version-control)
#:use-module (gnu packages xml))
+(define-public coccinelle
+ (let ((revision "0")
+ (commit "6608e45f85a10c57a3c910154cf049a5df4d98e4"))
+ (package
+ (name "coccinelle")
+ (version (git-version "1.1.1" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/coccinelle/coccinelle")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (modules '((guix build utils)))
+ (snippet
+ #~(delete-file-recursively "bundles"))
+ (sha256
+ (base32
+ "08nycmjyckqmqjpi78dcqdbmjq1xp18qdc6023dl90gdi6hmxz9l"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'bootstrap 'prepare-version.sh
+ (lambda _
+ (setenv "MAKE_COCCI_RELEASE" "y")
+ (patch-shebang "version.sh")))
+ (add-before 'check 'set-batch-mode
+ (lambda _
+ (substitute* "Makefile"
+ (("--testall")
+ "--batch_mode --testall")))))))
+ (propagated-inputs
+ (list ocaml-menhir
+ ocaml-num
+ ocaml-parmap
+ ocaml-pcre
+ ocaml-pyml
+ ocaml-stdcompat))
+ (native-inputs
+ (list autoconf
+ automake
+ ocaml
+ ocaml-findlib
+ pkg-config))
+ (home-page "https://coccinelle.lip6.fr")
+ (synopsis "Transformation of C code using semantic patches")
+ (description "Coccinelle is a tool that allows modification of C code
+using semantic patches in the @acronym{SmPL, Semantic Patch Language} for
+specifying desired matches and transformations in the C code.")
+ (license gpl2))))
+
(define-public patchutils
(package
(name "patchutils")
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [bug#63609] [PATCH 1/4] gnu: Add ocaml-parmap.
2023-05-21 11:34 ` [bug#63609] [PATCH 1/4] gnu: Add ocaml-parmap Jean-Pierre De Jesus DIAZ via Guix-patches via
` (2 preceding siblings ...)
2023-05-21 11:34 ` [bug#63609] [PATCH 4/4] gnu: Add coccinelle Jean-Pierre De Jesus DIAZ via Guix-patches via
@ 2023-05-22 17:00 ` Simon Tournier
2023-05-23 14:07 ` Jean-Pierre De Jesus Diaz via Guix-patches via
3 siblings, 1 reply; 8+ messages in thread
From: Simon Tournier @ 2023-05-22 17:00 UTC (permalink / raw)
To: 63609; +Cc: Jean-Pierre De Jesus DIAZ
Hi,
Thanks for your patch.
On dim., 21 mai 2023 at 13:34, Jean-Pierre De Jesus DIAZ via Guix-patches via <guix-patches@gnu.org> wrote:
> +;;; Copyright © 2023 Foundation Devices, Inc. <hello@foundationdevices.com>
Just to be sure, the copyright is hold by that company named Foundation
Devices, Inc. and not by one person. Right?
Cheers,
simon
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#63609] [PATCH 1/4] gnu: Add ocaml-parmap.
2023-05-22 17:00 ` [bug#63609] [PATCH 1/4] gnu: Add ocaml-parmap Simon Tournier
@ 2023-05-23 14:07 ` Jean-Pierre De Jesus Diaz via Guix-patches via
0 siblings, 0 replies; 8+ messages in thread
From: Jean-Pierre De Jesus Diaz via Guix-patches via @ 2023-05-23 14:07 UTC (permalink / raw)
To: Simon Tournier; +Cc: 63609
Hi,
Yes Simon, that is correct. Sending again as I didn't reply to all.
Cheers,
On Mon, May 22, 2023 at 7:02 PM Simon Tournier <zimon.toutoune@gmail.com> wrote:
>
> Hi,
>
> Thanks for your patch.
>
> On dim., 21 mai 2023 at 13:34, Jean-Pierre De Jesus DIAZ via Guix-patches via <guix-patches@gnu.org> wrote:
>
> > +;;; Copyright © 2023 Foundation Devices, Inc. <hello@foundationdevices.com>
>
> Just to be sure, the copyright is hold by that company named Foundation
> Devices, Inc. and not by one person. Right?
>
>
> Cheers,
> simon
--
—
Jean-Pierre De Jesus DIAZ
Senior Software Engineer
Foundation Devices
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#63609: [PATCH 0/4] gnu: Add coccinelle.
2023-05-20 12:48 [bug#63609] [PATCH 0/4] gnu: Add coccinelle Jean-Pierre De Jesus DIAZ via Guix-patches via
2023-05-21 11:34 ` [bug#63609] [PATCH 1/4] gnu: Add ocaml-parmap Jean-Pierre De Jesus DIAZ via Guix-patches via
@ 2023-06-02 14:49 ` Ludovic Courtès
1 sibling, 0 replies; 8+ messages in thread
From: Ludovic Courtès @ 2023-06-02 14:49 UTC (permalink / raw)
To: Jean-Pierre De Jesus DIAZ; +Cc: 63609-done
Hi,
Jean-Pierre De Jesus DIAZ <jean@foundationdevices.com> skribis:
> gnu: Add ocaml-parmap.
> gnu: Add ocaml-stdcompat.
> gnu: Add ocaml-pyml.
> gnu: Add coccinelle.
Great work. Applied, thanks!
Ludo’.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-06-02 14:50 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-20 12:48 [bug#63609] [PATCH 0/4] gnu: Add coccinelle Jean-Pierre De Jesus DIAZ via Guix-patches via
2023-05-21 11:34 ` [bug#63609] [PATCH 1/4] gnu: Add ocaml-parmap Jean-Pierre De Jesus DIAZ via Guix-patches via
2023-05-21 11:34 ` [bug#63609] [PATCH 2/4] gnu: Add ocaml-stdcompat Jean-Pierre De Jesus DIAZ via Guix-patches via
2023-05-21 11:34 ` [bug#63609] [PATCH 3/4] gnu: Add ocaml-pyml Jean-Pierre De Jesus DIAZ via Guix-patches via
2023-05-21 11:34 ` [bug#63609] [PATCH 4/4] gnu: Add coccinelle Jean-Pierre De Jesus DIAZ via Guix-patches via
2023-05-22 17:00 ` [bug#63609] [PATCH 1/4] gnu: Add ocaml-parmap Simon Tournier
2023-05-23 14:07 ` Jean-Pierre De Jesus Diaz via Guix-patches via
2023-06-02 14:49 ` bug#63609: [PATCH 0/4] gnu: Add coccinelle Ludovic Courtès
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.