* [bug#67603] [PATCH] P4 compiler package
@ 2023-12-03 14:20 tyler parks
0 siblings, 0 replies; only message in thread
From: tyler parks @ 2023-12-03 14:20 UTC (permalink / raw)
To: 67603
[-- 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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2023-12-03 16:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-03 14:20 [bug#67603] [PATCH] P4 compiler package tyler parks
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).