summary refs log tree commit diff
path: root/gnu/packages/c.scm
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-04-01 14:10:55 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-05-12 12:45:24 -0400
commitdcd97606a3afba2cf72d2cecd87ecac36cfb4e36 (patch)
treee193703e0c68e384d2141cf5f0eebac29324c25e /gnu/packages/c.scm
parent13c19e3bfbf4b72aa149b034c9616eefcee1a53c (diff)
downloadguix-dcd97606a3afba2cf72d2cecd87ecac36cfb4e36.tar.gz
gnu: Add python-pcpp.
* gnu/packages/c.scm (python-pcpp): New variable.
Diffstat (limited to 'gnu/packages/c.scm')
-rw-r--r--gnu/packages/c.scm32
1 files changed, 32 insertions, 0 deletions
diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm
index 2680fe63f0..e14e56ad71 100644
--- a/gnu/packages/c.scm
+++ b/gnu/packages/c.scm
@@ -38,6 +38,7 @@
   #:use-module (guix git-download)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system python)
   #:use-module (guix build-system trivial)
   #:use-module (guix store)
   #:use-module (gnu packages)
@@ -144,6 +145,37 @@ compiler while still keeping it small, simple, fast and understandable.")
     ;; preferred.  See http://pcc.ludd.ltu.se/licenses/ for more details.
     (license (list license:bsd-2 license:bsd-3))))
 
+(define-public python-pcpp
+  (package
+    (name "python-pcpp")
+    (version "1.30")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/ned14/pcpp")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "1rihvlg11nzk70kfzz4i3gi5izcy46w05ismcx04p5j1hlim0brb"))))
+    (build-system python-build-system)
+    (arguments
+     (list
+      #:phases #~(modify-phases %standard-phases
+                   (add-after 'unpack 'unbundle-ply
+                     (lambda _
+                       (rmdir "pcpp/ply")
+                       (substitute* "setup.py"
+                         (("'pcpp/ply/ply'") "")))))))
+    (native-inputs (list python-pytest))
+    (propagated-inputs (list python-ply))
+    (home-page "https://github.com/ned14/pcpp")
+    (synopsis "C99 preprocessor written in Python")
+    (description "This package provides a C99 preprocessor written in pure
+Python.")
+    (license license:bsd-3)))
+
 (define-public libbytesize
   (package
     (name "libbytesize")