From 534faca0eec12d8bfdfdf29aec3b726daaf1dfb0 Mon Sep 17 00:00:00 2001 From: Vivianne Langdon Date: Wed, 6 Mar 2024 14:13:10 -0500 Subject: [PATCH] Fix build, add goblins, and add empty example --- .gitignore | 2 + Makefile.am | 5 +-- build-aux/missing | 2 +- configure.ac | 4 +- guix.scm | 75 ++++++++++++++++++++++----------- scripts/examples/select-list.in | 5 +++ 6 files changed, 63 insertions(+), 30 deletions(-) create mode 100644 scripts/examples/select-list.in diff --git a/.gitignore b/.gitignore index 0a123e7..2554985 100644 --- a/.gitignore +++ b/.gitignore @@ -63,3 +63,5 @@ stamp-h[0-9] tmp /.version /doc/stamp-[0-9] +scripts/examples/* +!scripts/examples/*.in \ No newline at end of file diff --git a/Makefile.am b/Makefile.am index a8cddb3..5e45563 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ -bin_SCRIPTS = +bin_SCRIPTS = scripts/examples/select-list nodist_noinst_SCRIPTS = pre-inst-env @@ -26,8 +26,7 @@ SUFFIXES = .scm .go SOURCES = buttercup.scm -TESTS = tests/test-ansi.scm \ - tests/test-wrap.scm +TESTS = TEST_EXTENSIONS = .scm SCM_LOG_DRIVER = \ diff --git a/build-aux/missing b/build-aux/missing index 1fe1611..b5a84d2 100755 --- a/build-aux/missing +++ b/build-aux/missing @@ -1,4 +1,4 @@ -#! /bin/sh +#!/bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2018-03-07.03; # UTC diff --git a/configure.ac b/configure.ac index e0d27ae..f97f924 100644 --- a/configure.ac +++ b/configure.ac @@ -12,6 +12,7 @@ AM_SILENT_RULES([yes]) AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([pre-inst-env], [chmod +x pre-inst-env]) +AC_CONFIG_FILES([scripts/examples/select-list], [chmod +x scripts/examples/select-list]) dnl Search for 'guile' and 'guild'. This macro defines dnl 'GUILE_EFFECTIVE_VERSION'. @@ -28,8 +29,9 @@ if test "$cross_compiling" != no; then fi dnl Hall auto-generated guile-module dependencies -GUILE_MODULE_REQUIRED([reflow]) +GUILE_MODULE_REQUIRED([reflow wrap]) GUILE_MODULE_REQUIRED([termenv]) +GUILE_MODULE_REQUIRED([goblins]) dnl Installation directories for .scm and .go files. guilemoduledir="${datarootdir}/guile/site/$GUILE_EFFECTIVE_VERSION" diff --git a/guix.scm b/guix.scm index d74097e..6f76d86 100644 --- a/guix.scm +++ b/guix.scm @@ -6,35 +6,60 @@ (gnu packages pkg-config) (gnu packages texinfo) (guix build-system gnu) - (guix download) + (guix git-download) (guix gexp) ((guix licenses) #:prefix license:) (guix packages) (solarpunk packages guile) (srfi srfi-1)) +(define (keep-file? file stat) + (not (any (lambda (my-string) + (string-contains file my-string)) + (list ".git" ".dir-locals.el" "guix.scm")))) + +(define guile-goblins-git + (package + (inherit guile-goblins) + (version "git") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.com/spritely/guile-goblins.git") + ;; Need version with IO and Christine's call-with-vat fixes! :D + (commit "0ebfdef75c921b6b125db2e674153ce55b25fd7b"))) + (sha256 + (base32 + "0ac7mprsaccl8lapb8bbrvybfih6nkpphfbafav5zd26mwg63mgc")))) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("pkg-config" ,pkg-config) + ,@(package-native-inputs guile-goblins))))) + + (package - (name "guile-buttercup") - (version "0.1") - (source - (local-file - (dirname (current-filename)) - #:recursive? - #t - #:select? - (lambda (file stat) - (not (any (lambda (my-string) - (string-contains file my-string)) - (list ".git" ".dir-locals.el" "guix.scm")))))) - (build-system gnu-build-system) - (arguments `()) - (native-inputs - (list autoconf automake pkg-config texinfo)) - (inputs (list guile-3.0)) - (propagated-inputs (list guile-uniseg)) - (synopsis "Guile library for creating terminal applications") - (description - "A Guile library, inspired by Go's Bubbletea, for creating beautiful terminal applications using Spritely Goblins.") - (home-page - "https://git.solarpunk.moe/solarpunk-guile/guile-buttercup") - (license license:gpl3+)) + (name "guile-buttercup") + (version "0.1") + (source + (local-file + (dirname (current-filename)) + #:recursive? + #t + #:select? + (lambda (file stat) + (not (any (lambda (my-string) + (string-contains file my-string)) + (list ".git" ".dir-locals.el" "guix.scm")))))) + (build-system gnu-build-system) + (arguments `()) + (native-inputs + (list autoconf automake pkg-config texinfo)) + (inputs (list guile-3.0)) + (propagated-inputs (list guile-reflow guile-termenv guile-goblins-git)) + (synopsis "Guile library for creating terminal applications") + (description + "A Guile library, inspired by Go's Bubbletea, for creating beautiful terminal applications using Spritely Goblins.") + (home-page + "https://git.solarpunk.moe/solarpunk-guile/guile-buttercup") + (license license:gpl3+)) diff --git a/scripts/examples/select-list.in b/scripts/examples/select-list.in new file mode 100644 index 0000000..05834b8 --- /dev/null +++ b/scripts/examples/select-list.in @@ -0,0 +1,5 @@ +#!@GUILE@ --no-auto-compile +-*- scheme -*- +!# + +(use-modules (goblins))