From: tyler parks <tsparks3264@gmail.com>
To: 67603@debbugs.gnu.org
Subject: [bug#67603] [PATCH] P4 compiler package
Date: Sun, 3 Dec 2023 08:20:49 -0600 [thread overview]
Message-ID: <CAMkVx_J+502QOjwPRN+KBRnOe6c1w+PBfKMY+5DLz+_0=KoHJA@mail.gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 147 bytes --]
Hello,
I got the compiler for the P4 language's compiler to build on Guix System,
and would like to submit the resulting package.
v/r
Tyler Parks
[-- Attachment #1.2: Type: text/html, Size: 236 bytes --]
[-- Attachment #2: 0001-added-p4.scm.patch --]
[-- Type: text/x-patch, Size: 3258 bytes --]
From 03c65f8f9525dd8aeb8407d29f92c7bd9d4462b0 Mon Sep 17 00:00:00 2001
From: example <example@example.com>
Date: Sun, 3 Dec 2023 07:58:48 -0600
Subject: [PATCH] added p4.scm
---
gnu/packages/p4.scm | 71 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 71 insertions(+)
create mode 100644 gnu/packages/p4.scm
diff --git a/gnu/packages/p4.scm b/gnu/packages/p4.scm
new file mode 100644
index 0000000000..01cae490e2
--- /dev/null
+++ b/gnu/packages/p4.scm
@@ -0,0 +1,71 @@
+(define-module (gnu packages p4)
+ #:use-module (guix packages)
+ #:use-module (guix download)
+ #:use-module (guix git-download)
+ #:use-module (guix build-system cmake)
+ #:use-module (guix licenses)
+ ;; p4c deps
+ #:use-module (gnu packages commencement) ;gcc
+ #:use-module (gnu packages base) ;glibc
+ #:use-module (gnu packages bison)
+ #:use-module (gnu packages flex)
+ #:use-module (gnu packages protobuf)
+ #:use-module (gnu packages multiprecision) ;gmp
+ #:use-module (gnu packages boost)
+ #:use-module (gnu packages python)
+ #:use-module (gnu packages documentation) ;doxygen
+ #:use-module (gnu packages graphviz)
+ #:use-module (gnu packages bdw-gc) ;libgc
+ ;; auxiliaries
+ #:use-module (gnu packages scheme) ;regex
+
+ )
+(define-public p4c-1.2.3.2
+ (package
+ (name "p4c-1.2.3.2")
+ (version "1.2.3.2")
+ (home-page "https://github.com/p4lang/p4c")
+ (synopsis "Reference compiler for the P4 network programming language")
+ (license asl2.0) ;apache2.0
+ (description
+ "p4c is a reference compiler for the P4 programming language. It supports both P4-14 and P4-16. ")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url (string-append home-page ".git"))
+ (commit (string-append "v" version))
+ (recursive? #t)))
+ (sha256
+ "18v3m7i0c9cd3zz31a0dgppbpkk873l2fwsf5z0z765cn0gxir0i")))
+ (build-system cmake-build-system)
+ (native-inputs `(("bison" ,bison)
+ ("flex" ,flex)
+ ("protobuf" ,protobuf)
+ ("gmp" ,gmp)
+ ("boost" ,boost)
+ ("python" ,python)
+ ("doxygen" ,doxygen)
+ ("graphviz" ,graphviz)
+ ("libgc" ,libgc)
+ ;; backends may have additional dependencies, see https://github.com/p4lang/p4c#dependencies
+ ))
+ (arguments
+ `(#:configure-flags (list "-DCFLAGS=-O3"
+ "-DCMAKE_BUILD_TYPE=Release"
+ "-DENABLE_TEST_TOOLS=ON"
+ "-DENABLE_DOCS=ON"
+ "-DENABLE_MULTITHREAD=ON"
+ "-DProtobuf_LIBRARIES=/gnu/store"
+ "-DProtobuf_LIBRARY=/gnu/store"
+ "-DCMAKE_EXE_LINKER_FLAGS=-lprotobuf"
+ "-DLINK_DIRECTORIES=/gnu/store")
+ #:tests? #f))))
+
+(define-public p4c
+ (package
+ (inherit p4c-1.2.3.2)
+ (version "latest-release")
+ (name "p4c")
+ (properties '((release-tag-prefix . "v")
+ (release-tag-version-delimiter . ".")))))
+p4c
--
2.41.0
reply other threads:[~2023-12-03 16:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAMkVx_J+502QOjwPRN+KBRnOe6c1w+PBfKMY+5DLz+_0=KoHJA@mail.gmail.com' \
--to=tsparks3264@gmail.com \
--cc=67603@debbugs.gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).