summaryrefslogtreecommitdiff
path: root/gnu/packages/c.scm
diff options
context:
space:
mode:
authorMaxim Cournoyer <[email protected]>2023-03-31 15:07:00 -0400
committerMaxim Cournoyer <[email protected]>2023-04-14 15:11:52 -0400
commit46e56eb001751d127c38a7a4f5a23dc4cc214453 (patch)
treed11e7b22d5659d552a640633bef6d548d5101918 /gnu/packages/c.scm
parent0d5746ee7ca337dcc82553ca6dd794b04bb6563d (diff)
gnu: Add orangeduck-mpc.
* gnu/packages/c.scm (orangeduck-mpc): New variable. * gnu/packages/patches/orangeduck-mpc-fix-pkg-config.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it.
Diffstat (limited to 'gnu/packages/c.scm')
-rw-r--r--gnu/packages/c.scm50
1 files changed, 49 insertions, 1 deletions
diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm
index b2f16613dd..96b4e904f7 100644
--- a/gnu/packages/c.scm
+++ b/gnu/packages/c.scm
@@ -9,7 +9,7 @@
;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <[email protected]>
;;; Copyright © 2020, 2021 Marius Bakke <[email protected]>
;;; Copyright © 2020 Katherine Cox-Buday <[email protected]>
-;;; Copyright © 2020, 2022 Maxim Cournoyer <[email protected]>
+;;; Copyright © 2020, 2022, 2023 Maxim Cournoyer <[email protected]>
;;; Copyright © 2020, 2021 Greg Hogan <[email protected]>
;;; Copyright © 2021 David Dashyan <[email protected]>
;;; Copyright © 2021 Foo Chuan Wei <[email protected]>
@@ -1145,6 +1145,54 @@ Telemetry Transport (MQTT) publish-subscribe messaging protocol.")
(home-page "https://microsoft.github.io/mimalloc/")
(license license:expat)))
+;;; The package is named orangeduck-mpc to differentiate it from GNU mpc.
+(define-public orangeduck-mpc
+ ;; The last release lacks an 'install' target.
+ (let ((commit "7c910e9303833c349f7432188ff77f2745254df2")
+ (revision "0"))
+ (package
+ (name "orangeduck-mpc")
+ (version (git-version "0.9.0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/orangeduck/mpc")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "01a4vcxdnz0fbn90c9zc3jzklyqqvp9sfjpjwpq0f5r0l2pp37ad"))
+ (patches
+ (search-patches "orangeduck-mpc-fix-pkg-config.patch"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:make-flags #~(list (string-append "CC=" #$(cc-for-target))
+ (string-append "PREFIX=" #$output))
+ #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-Makefile
+ (lambda _
+ (substitute* "Makefile"
+ ;; Do not attempt to alter the permissions,
+ ;; otherwise 'install' would error with
+ ;; "cannot stat [...] Permission denied"
+ ;; errors.
+ (("\\s\\-m[0-9]{3}\\s")
+ " "))))
+ (delete 'configure))))
+ (home-page "https://github.com/orangeduck/mpc")
+ (synopsis "Parser Combinator library for C ")
+ (description "@code{mpc} is a lightweight Parser Combinator library for C.
+@code{mpc} can help with tasks such as:
+@itemize
+@item Building a new programming language
+@item Building a new data format
+@item Parsing an existing programming language
+@item Parsing an existing data format
+@item Embedding a Domain Specific Language
+@item Implementing Greenspun's Tenth Rule.
+@end itemize")
+ (license license:bsd-2))))
+
;;; Factored out of the ck package so that it can be adjusted and called on
;;; the host side easily, without impacting the package definition.
(define (gnu-triplet->ck-machine target)