From 06e420c301b46a0db29546aa757c75abcd6e69bf Mon Sep 17 00:00:00 2001 From: Ekaitz Zarraga Date: Thu, 15 Dec 2022 13:02:25 +0100 Subject: [PATCH 2/2] Add a sample package for testing the zig build system --- gnu/packages/zig.scm | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/gnu/packages/zig.scm b/gnu/packages/zig.scm index cda93bed2e..43b2f60722 100644 --- a/gnu/packages/zig.scm +++ b/gnu/packages/zig.scm @@ -25,7 +25,9 @@ (define-module (gnu packages zig) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix build-system cmake) #:use-module (gnu packages) - #:use-module (gnu packages llvm)) + #:use-module (gnu packages llvm) + #:use-module (guix build-system zig) + #:use-module (gnu packages commencement)) (define-public zig (package @@ -104,3 +106,41 @@ (define-public zig ;; https://github.com/ziglang/zig/issues/6485 (supported-systems %64bit-supported-systems) (license license:expat))) + + +(define-public tigerbeetle + (let ((commit-id "2022-12-12-weekly") + (revision "0")) + (package + (name "tigerbeetle") + (version (string-append revision "-" commit-id)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/tigerbeetledb/tigerbeetle.git") + (commit commit-id))) + (file-name (git-file-name name version)) + (sha256 + (base32 "18rawl8rhyplw8hpa3fzbq9fqg088x0calz688c7zdff6y6f6mcr")))) + (build-system zig-build-system) + + (arguments + `(#:phases + (modify-phases %standard-phases + ;; TODO: Zig needs the gcc-toolchain in order to find the libc. + ;; we need to think about how to solve this in the build system + ;; directly: --libc + (add-before 'build 'set-env + (lambda _ + (setenv "CC" "gcc")))))) + + (synopsis "Distributed financial accounting database designed for mission +critical safety and performance") + + (description "Financial accounting database designed for mission critical +safet y and performance to power the future of financial +services.") + (home-page "https://github.com/tigerbeetledb/tigerbeetle.git") + (supported-systems %64bit-supported-systems) + (license license:asl2.0)))) -- 2.38.0