all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jean-Pierre De Jesus DIAZ via Guix-patches via <guix-patches@gnu.org>
To: 63609@debbugs.gnu.org
Cc: Jean-Pierre De Jesus DIAZ <jean@foundationdevices.com>
Subject: [bug#63609] [PATCH 4/4] gnu: Add coccinelle.
Date: Sun, 21 May 2023 13:34:17 +0200	[thread overview]
Message-ID: <20230521113417.76939-4-jean@foundationdevices.com> (raw)
In-Reply-To: <20230521113417.76939-1-jean@foundationdevices.com>

* 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





  parent reply	other threads:[~2023-05-21 11:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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   ` Jean-Pierre De Jesus DIAZ via Guix-patches via [this message]
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

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=20230521113417.76939-4-jean@foundationdevices.com \
    --to=guix-patches@gnu.org \
    --cc=63609@debbugs.gnu.org \
    --cc=jean@foundationdevices.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.