2019-05-22 03:00:54 +01:00
|
|
|
;;; Guix Package File for Gash
|
|
|
|
;;; Copyright © 2017, 2018, 2019 Timothy Sample <samplet@ngyro.com>
|
|
|
|
;;;
|
|
|
|
;;; This file is free software; as a special exception the author gives
|
|
|
|
;;; unlimited permission to copy and/or distribute it, with or without
|
|
|
|
;;; modifications, as long as this notice is preserved.
|
|
|
|
;;;
|
|
|
|
;;; This program is distributed in the hope that it will be useful, but
|
|
|
|
;;; WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
|
|
|
;;; implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
|
2018-12-06 01:50:01 +00:00
|
|
|
(use-modules (git)
|
|
|
|
(gnu packages)
|
2017-12-09 17:01:40 +00:00
|
|
|
(gnu packages autotools)
|
|
|
|
(gnu packages code)
|
|
|
|
(gnu packages guile)
|
|
|
|
(gnu packages pkg-config)
|
2019-05-18 01:32:55 +01:00
|
|
|
(gnu packages texinfo)
|
2020-02-07 01:21:52 +00:00
|
|
|
(gnu packages version-control)
|
2018-12-06 00:56:24 +00:00
|
|
|
(guix build utils)
|
2017-12-09 17:01:40 +00:00
|
|
|
(guix build-system gnu)
|
Add support for Guile 2.0.9.
* gash/compat.scm: New file.
* gash/compat/hash-table.scm: New file.
* Makefile.am: Add them.
* .dir-locals.scm: Add indentation for 'if-guile-version-below'.
* guix.scm (guile-2.0.9): New variable.
* gash/built-ins/echo.scm (escape->control): Use '#\esc'.
* gash/environment.scm: Use '(gash compat hash-table)'.
* gash/built-ins/break.scm,
gash/built-ins/cd.scm,
gash/built-ins/command.scm,
gash/built-ins/continue.scm,
gash/built-ins/dot.scm,
gash/built-ins/exec.scm,
gash/built-ins/exit.scm,
gash/built-ins/pwd.scm,
gash/built-ins/return.scm,
gash/built-ins/set.scm,
gash/built-ins/shift.scm,
gash/built-ins/trap.scm,
gash/built-ins/type.scm,
gash/built-ins/umask.scm,
gash/eval.scm,
tests/unit/automake.scm: Use '(gash compat)'.
squash! Add support for Guile 2.0.9.
2019-05-20 00:33:05 +01:00
|
|
|
(guix download)
|
2018-12-06 01:50:01 +00:00
|
|
|
(guix gexp)
|
2017-12-09 17:01:40 +00:00
|
|
|
((guix licenses) #:prefix license:)
|
2018-12-06 00:56:24 +00:00
|
|
|
(guix packages)
|
|
|
|
(guix utils)
|
|
|
|
(ice-9 popen)
|
|
|
|
(ice-9 textual-ports))
|
|
|
|
|
|
|
|
(define *srcdir* (canonicalize-path (current-source-directory)))
|
|
|
|
|
|
|
|
(define *version*
|
|
|
|
(with-directory-excursion *srcdir*
|
|
|
|
(let* ((script "./build-aux/git-version-gen")
|
|
|
|
(pipe (open-pipe* OPEN_READ script ".tarball-version"))
|
|
|
|
(version (get-string-all pipe)))
|
|
|
|
(close-pipe pipe)
|
|
|
|
version)))
|
2017-12-09 17:01:40 +00:00
|
|
|
|
2018-12-06 01:50:01 +00:00
|
|
|
(define (make-select)
|
2019-05-18 01:38:26 +01:00
|
|
|
(define paths
|
|
|
|
(or (false-if-exception
|
|
|
|
(let* ((directory (repository-discover *srcdir*))
|
|
|
|
(repository (repository-open directory))
|
|
|
|
(oid (reference-target (repository-head repository)))
|
|
|
|
(commit (commit-lookup repository oid))
|
|
|
|
(tree (commit-tree commit)))
|
|
|
|
(tree-list tree)))
|
|
|
|
(false-if-exception
|
|
|
|
(with-directory-excursion *srcdir*
|
|
|
|
(call-with-input-file ".tarball-manifest"
|
|
|
|
(lambda (port)
|
|
|
|
(let loop ((line (get-line port)) (acc '()))
|
|
|
|
(if (eof-object? line)
|
|
|
|
acc
|
|
|
|
(loop (get-line port) (cons line acc))))))))
|
|
|
|
(error "Cannot make file selector")))
|
|
|
|
(lambda (file stat)
|
|
|
|
(let ((relative (substring file (1+ (string-length *srcdir*)))))
|
2020-02-07 01:21:52 +00:00
|
|
|
(or (string=? relative ".git")
|
|
|
|
(string-prefix? ".git/" relative)
|
2019-05-18 01:38:26 +01:00
|
|
|
(member relative paths)))))
|
2018-12-06 01:50:01 +00:00
|
|
|
|
Add support for Guile 2.0.9.
* gash/compat.scm: New file.
* gash/compat/hash-table.scm: New file.
* Makefile.am: Add them.
* .dir-locals.scm: Add indentation for 'if-guile-version-below'.
* guix.scm (guile-2.0.9): New variable.
* gash/built-ins/echo.scm (escape->control): Use '#\esc'.
* gash/environment.scm: Use '(gash compat hash-table)'.
* gash/built-ins/break.scm,
gash/built-ins/cd.scm,
gash/built-ins/command.scm,
gash/built-ins/continue.scm,
gash/built-ins/dot.scm,
gash/built-ins/exec.scm,
gash/built-ins/exit.scm,
gash/built-ins/pwd.scm,
gash/built-ins/return.scm,
gash/built-ins/set.scm,
gash/built-ins/shift.scm,
gash/built-ins/trap.scm,
gash/built-ins/type.scm,
gash/built-ins/umask.scm,
gash/eval.scm,
tests/unit/automake.scm: Use '(gash compat)'.
squash! Add support for Guile 2.0.9.
2019-05-20 00:33:05 +01:00
|
|
|
(define guile-2.0.9
|
|
|
|
(package
|
|
|
|
(inherit guile-2.0)
|
|
|
|
(version "2.0.9")
|
|
|
|
(source
|
|
|
|
(origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri (string-append "mirror://gnu/guile/guile-" version ".tar.xz"))
|
|
|
|
(sha256
|
|
|
|
(base32
|
|
|
|
"0nw9y8vjyz4r61v06p9msks5lm58pd91irmzg4k487vmv743h2pp"))))
|
|
|
|
(arguments
|
|
|
|
(substitute-keyword-arguments (package-arguments guile-2.0)
|
|
|
|
;; XXX: There are some encoding and network test failures.
|
|
|
|
((#:tests? _ #f) #f)))))
|
|
|
|
|
2017-12-09 17:01:40 +00:00
|
|
|
(package
|
Remove (almost) all references to Geesh.
gash/environment.scm: Remove file.
geesh/*: Move these files into the 'gash' folder and replace all
instances of the word 'geesh'.
scripts/geesh.in: Remove file.
HACKING, INSTALL, Makefile.am, configure.ac, guix.scm,
tests/bootstrap/bash-without-bash.scm, tests/spec/Makefile.am,
tests/spec/check-spec, tests/spec/oil.scm, tests/unit/*,
tools/coverage.in: Replace all instances of the word 'geesh'.
Co-authored-by: Jan Nieuwenhuizen <janneke@gnu.org>
2019-02-15 00:55:07 +00:00
|
|
|
(name "gash")
|
2018-12-06 00:56:24 +00:00
|
|
|
(version *version*)
|
2018-12-06 01:50:01 +00:00
|
|
|
(source (local-file *srcdir* #:recursive? #t #:select? (make-select)))
|
2017-12-09 17:01:40 +00:00
|
|
|
(build-system gnu-build-system)
|
|
|
|
(native-inputs
|
|
|
|
`(("autoconf" ,autoconf)
|
|
|
|
("automake" ,automake)
|
2020-02-07 01:21:52 +00:00
|
|
|
("git" ,git-minimal)
|
2017-12-09 17:01:40 +00:00
|
|
|
("lcov" ,lcov) ; For generating test coverage data
|
2019-05-18 01:32:55 +01:00
|
|
|
("pkg-config" ,pkg-config)
|
|
|
|
("texinfo" ,texinfo)))
|
2017-12-09 17:01:40 +00:00
|
|
|
(inputs
|
2022-02-11 15:22:19 +00:00
|
|
|
`(("guile" ,guile-3.0)))
|
2019-06-01 15:02:09 +01:00
|
|
|
(home-page "https://savannah.nongnu.org/projects/gash/")
|
2018-12-06 01:56:18 +00:00
|
|
|
(synopsis "POSIX-compatible shell written in Guile Scheme")
|
Remove (almost) all references to Geesh.
gash/environment.scm: Remove file.
geesh/*: Move these files into the 'gash' folder and replace all
instances of the word 'geesh'.
scripts/geesh.in: Remove file.
HACKING, INSTALL, Makefile.am, configure.ac, guix.scm,
tests/bootstrap/bash-without-bash.scm, tests/spec/Makefile.am,
tests/spec/check-spec, tests/spec/oil.scm, tests/unit/*,
tools/coverage.in: Replace all instances of the word 'geesh'.
Co-authored-by: Jan Nieuwenhuizen <janneke@gnu.org>
2019-02-15 00:55:07 +00:00
|
|
|
(description "Gash is a POSIX-compatible shell written in Guile
|
2018-12-06 01:56:18 +00:00
|
|
|
Scheme. It is designed to be capable of bootstrapping Bash.")
|
|
|
|
(license license:gpl3+))
|