From 83d5d1535754016500af6854aab26c1fbdde73d0 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Tue, 11 Feb 2025 02:19:49 -0600 Subject: Copied guile-zig talk from FOSDEM-2023 --- guile-zig-local/guix.scm | 61 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 guile-zig-local/guix.scm (limited to 'guile-zig-local/guix.scm') diff --git a/guile-zig-local/guix.scm b/guile-zig-local/guix.scm new file mode 100644 index 0000000..920b27a --- /dev/null +++ b/guile-zig-local/guix.scm @@ -0,0 +1,61 @@ +;; To use this file to build HEAD of vcflib: +;; +;; guix build -f guix.scm +;; +;; To get a development container (emacs shell will work) +;; +;; guix shell -C -D -f guix.scm +;; + +(use-modules + ((guix licenses) #:prefix license:) + (guix gexp) + (guix packages) + (guix git-download) + (guix build-system gnu) + (gnu packages algebra) + (gnu packages autotools) + (gnu packages base) + (gnu packages compression) + (gnu packages build-tools) + (gnu packages check) + (gnu packages curl) + (gnu packages gcc) + (gnu packages gdb) + (gnu packages guile) + (gnu packages haskell-xyz) ; pandoc for help files + (gnu packages llvm) + (gnu packages parallel) + (gnu packages pkg-config) + (gnu packages tls) + (gnu packages zig) + (srfi srfi-1) + (ice-9 popen) + (ice-9 rdelim)) + +(define %source-dir (dirname (current-filename))) + +(define %git-commit + (read-string (open-pipe "git show HEAD | head -1 | cut -d ' ' -f 2" OPEN_READ))) + +(define-public guile-zig-git + (package + (name "guile-zig-git") + (version (git-version "0.0.1" "HEAD" %git-commit)) + (source (local-file %source-dir #:recursive? #t)) + (build-system gnu-build-system) + (inputs + `( + ("gdb" ,gdb) + ("guile" ,guile-3.0-latest) + ("guile-debug" ,guile-3.0-latest "debug") + ("zig" ,zig) ;; note we use zig-0.9.1 + )) + (native-inputs + `(("pkg-config" ,pkg-config))) + (home-page "https://github.com/pjotrp/guile-zig") + (synopsis "Example for binding guile agains zig") + (description "Example for binding guile agains zig.") + (license license:expat))) + +guile-zig-git -- cgit v1.2.3