Browse Source

modules, installation with guix cleaned up

master
Silas Vedder 2 years ago
parent
commit
230a6a9432
  1. 25
      Makefile.am
  2. 4
      NEWS
  3. 0
      bible-tools.scm
  4. 2
      bible-tools/count-words.scm
  5. 2
      bible-tools/latex-export.scm
  6. 4
      build-aux/test-driver.scm
  7. 2
      configure.ac
  8. 178
      guix.scm
  9. 32
      hall.scm
  10. 4
      scripts/bible-app.in
  11. 2
      scripts/bible2latex.in
  12. 2
      scripts/word-counter.in

25
Makefile.am

@ -36,7 +36,7 @@ SUFFIXES = .scm .go
SOURCES = bible-tools/latex-export.scm \
bible-tools/count-words.scm \
bible-tools/bible-tools.scm
bible-tools.scm
TESTS =
@ -57,24 +57,23 @@ AM_TESTS_ENVIRONMENT = abs_top_srcdir="$(abs_top_srcdir)"
info_TEXINFOS = doc/bible-tools.texi
dvi: # Don't build dvi docs
EXTRA_DIST += COPYING \
HACKING \
README \
README.org \
NEWS \
EXTRA_DIST += ChangeLog \
AUTHORS \
ChangeLog \
hall.scm \
.gitignore \
guix.scm \
NEWS \
README \
HACKING \
COPYING \
pre-inst-env.in \
Makefile.am \
configure.ac \
build-aux/test-driver.scm \
build-aux/texinfo.tex \
build-aux/mdate-sh \
build-aux/missing \
build-aux/install-sh \
configure.ac \
Makefile.am \
pre-inst-env.in \
guix.scm \
.gitignore \
hall.scm \
build-aux/test-driver.scm \
$(TESTS)

4
NEWS

@ -1,9 +1,9 @@
# -*- mode: org; coding: utf-8; -*-
#+TITLE: Bible-Tools NEWS ? history of user-visible changes
#+TITLE: Bible-Tools NEWS history of user-visible changes
#+STARTUP: content hidestars
Copyright ? (2022) <INSERT EMAIL HERE>
Copyright © (2022) <INSERT EMAIL HERE>
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright

0
bible-tools/bible-tools.scm → bible-tools.scm

2
bible-tools/count-words.scm

@ -1,4 +1,4 @@
(define-module (count-words)
(define-module (bible-tools count-words)
#:use-module (bible-tools)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)

2
bible-tools/latex-export.scm

@ -1,4 +1,4 @@
(define-module (latex-export)
(define-module (bible-tools latex-export)
#:use-module (bible-tools)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)

4
build-aux/test-driver.scm

@ -2,8 +2,8 @@
(define script-version "2019-01-15.13") ;UTC
;;; Copyright ? 2015, 2016 Mathieu Lirzin <mthl@gnu.org>
;;; Copyright ? 2019 Alex Sassmannshausen <alex@pompo.co>
;;; Copyright © 2015, 2016 Mathieu Lirzin <mthl@gnu.org>
;;; Copyright © 2019 Alex Sassmannshausen <alex@pompo.co>
;;;
;;; This program is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by

2
configure.ac

@ -5,7 +5,7 @@ AC_SUBST(HVERSION, "\"1.0\"")
AC_SUBST(AUTHOR, "\"\"")
AC_SUBST(COPYRIGHT, "'(2022)")
AC_SUBST(LICENSE, gpl3+)
AC_CONFIG_SRCDIR(bible-tools)
AC_CONFIG_SRCDIR(bible-tools.scm)
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([1.12 gnu silent-rules subdir-objects color-tests parallel-tests -Woverride -Wno-portability])
AM_SILENT_RULES([yes])

178
guix.scm

@ -1,95 +1,85 @@
(use-modules (guix packages)
((guix licenses)
#:prefix license:)
(guix download)
(guix git-download)
(guix build-system gnu)
(gnu packages)
(gnu packages autotools)
(gnu packages guile)
(gnu packages guile-xyz)
(gnu packages pkg-config)
(gnu packages texinfo))
(use-modules
(guix packages)
((guix licenses) #:prefix license:)
(guix download)
(guix build-system gnu)
(guix gexp)
(gnu packages)
(gnu packages autotools)
(gnu packages guile)
(gnu packages guile-xyz)
(gnu packages pkg-config)
(gnu packages texinfo))
(define-public bible-tools
(package
(name "bible-tools")
(version "1.0")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://git.silasvedder.xyz/silasfox/bible-tools.git")
(commit "bc925d8")))
(file-name "bible-tools-1.0-checkout")
(sha256 (base32 "07221jw4gl48cg45znwjkc7871in3pfq488ig4vnbjygqbg4wawh"))))
(build-system gnu-build-system)
(arguments
`(#:modules
((ice-9 match)
(ice-9 ftw)
,@%gnu-build-system-modules)
#:phases
(modify-phases
%standard-phases
(add-after
'install
'hall-wrap-binaries
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((compiled-dir
(lambda (out version)
(string-append
out
"/lib/guile/"
version
"/site-ccache")))
(uncompiled-dir
(lambda (out version)
(string-append
out
"/share/guile/site"
(if (string-null? version) "" "/")
version)))
(dep-path
(lambda (env modules path)
(list env
":"
'prefix
(cons modules
(map (lambda (input)
(string-append
(assoc-ref inputs input)
path))
,''())))))
(out (assoc-ref outputs "out"))
(bin (string-append out "/bin/"))
(site (uncompiled-dir out "")))
(match (scandir site)
(("." ".." version)
(for-each
(lambda (file)
(wrap-program
(string-append bin file)
(dep-path
"GUILE_LOAD_PATH"
(uncompiled-dir out version)
(uncompiled-dir "" version))
(dep-path
"GUILE_LOAD_COMPILED_PATH"
(compiled-dir out version)
(compiled-dir "" version))))
,''("bible-app" "word-counter" "bible2latex"))
#t))))))))
(native-inputs
`(("autoconf" ,autoconf)
("automake" ,automake)
("pkg-config" ,pkg-config)
("texinfo" ,texinfo)))
(inputs `(("guile" ,guile-3.0)))
(propagated-inputs `())
(synopsis "")
(description "")
(home-page "")
(license license:gpl3+)))
bible-tools
(package
(name "bible-tools")
(version "1.0")
(source (local-file "./bible-tools-1.0.tar.gz"))
(build-system gnu-build-system)
(arguments
`(#:modules
((ice-9 match)
(ice-9 ftw)
,@%gnu-build-system-modules)
#:phases
(modify-phases
%standard-phases
(add-after
'install
'hall-wrap-binaries
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((compiled-dir
(lambda (out version)
(string-append
out
"/lib/guile/"
version
"/site-ccache")))
(uncompiled-dir
(lambda (out version)
(string-append
out
"/share/guile/site"
(if (string-null? version) "" "/")
version)))
(dep-path
(lambda (env modules path)
(list env
":"
'prefix
(cons modules
(map (lambda (input)
(string-append
(assoc-ref inputs input)
path))
,''())))))
(out (assoc-ref outputs "out"))
(bin (string-append out "/bin/"))
(site (uncompiled-dir out "")))
(match (scandir site)
(("." ".." version)
(for-each
(lambda (file)
(wrap-program
(string-append bin file)
(dep-path
"GUILE_LOAD_PATH"
(uncompiled-dir out version)
(uncompiled-dir "" version))
(dep-path
"GUILE_LOAD_COMPILED_PATH"
(compiled-dir out version)
(compiled-dir "" version))))
,''("bible-app" "word-counter" "bible2latex"))
#t))))))))
(native-inputs
`(("autoconf" ,autoconf)
("automake" ,automake)
("pkg-config" ,pkg-config)
("texinfo" ,texinfo)))
(inputs `(("guile" ,guile-3.0)))
(propagated-inputs `())
(synopsis "")
(description "")
(home-page "")
(license license:gpl3+))

32
hall.scm

@ -14,8 +14,8 @@
((directory
"bible-tools"
((scheme-file "latex-export")
(scheme-file "count-words")
(scheme-file "bible-tools")))))
(scheme-file "count-words")))
(scheme-file "bible-tools")))
(tests ((directory "tests" ())))
(programs
((directory
@ -24,20 +24,18 @@
(in-file "word-counter")
(in-file "bible2latex")))))
(documentation
((directory
"doc"
((texi-file "bible-tools")))
(text-file "COPYING")
(text-file "HACKING")
(symlink "README" "README.org")
(org-file "README")
(text-file "NEWS")
((text-file "ChangeLog")
(text-file "AUTHORS")
(text-file "ChangeLog")))
(text-file "NEWS")
(symlink "README" "README.org")
(org-file "README")
(text-file "HACKING")
(text-file "COPYING")
(directory "doc" ((texi-file "bible-tools")))))
(infrastructure
((scheme-file "hall")
(text-file ".gitignore")
(scheme-file "guix")
((in-file "pre-inst-env")
(automake-file "Makefile")
(autoconf-file "configure")
(directory
"build-aux"
((scheme-file "test-driver")
@ -45,6 +43,6 @@
(text-file "mdate-sh")
(text-file "missing")
(text-file "install-sh")))
(autoconf-file "configure")
(automake-file "Makefile")
(in-file "pre-inst-env")))))
(scheme-file "guix")
(text-file ".gitignore")
(scheme-file "hall")))))

4
scripts/bible-app.in

@ -4,8 +4,8 @@ exec guile -e '(@ (bible-app) main)' -s "$0" "$@"
(define-module (bible-app)
#:use-module (bible-tools)
#:use-module (latex-export)
#:use-module (count-words)
#:use-module (bible-tools latex-export)
#:use-module (bible-tools count-words)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
#:export (main))

2
scripts/bible2latex.in

@ -4,7 +4,7 @@ exec guile -e '(@ (bible2latex) main)' -s "$0" "$@"
(define-module (bible2latex)
#:use-module (bible-tools)
#:use-module (latex-export)
#:use-module (bible-tools latex-export)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
#:export (main))

2
scripts/word-counter.in

@ -4,7 +4,7 @@ exec guile -e '(@ (word-counter) main)' -s "$0" "$@"
(define-module (word-counter)
#:use-module (bible-tools)
#:use-module (count-words)
#:use-module (bible-tools count-words)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
#:export (main))

Loading…
Cancel
Save