|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(define-module (guile-package) |
|
#:use-module (guix) |
|
#:use-module (guix git-download) |
|
#:use-module (guix build-system gnu) |
|
#:use-module ((guix licenses) #:prefix license:) |
|
#:use-module (gnu packages autotools) |
|
#:use-module (gnu packages base) |
|
#:use-module (gnu packages bash) |
|
#:use-module (gnu packages bdw-gc) |
|
#:use-module (gnu packages compression) |
|
#:use-module (gnu packages flex) |
|
#:use-module (gnu packages gdb) |
|
#:use-module (gnu packages gettext) |
|
#:use-module (gnu packages gperf) |
|
#:use-module (gnu packages libffi) |
|
#:use-module (gnu packages libunistring) |
|
#:use-module (gnu packages linux) |
|
#:use-module (gnu packages pkg-config) |
|
#:use-module (gnu packages readline) |
|
#:use-module (gnu packages tex) |
|
#:use-module (gnu packages texinfo) |
|
#:use-module (gnu packages version-control)) |
|
|
|
(define-public guile |
|
(let ((vcs-file? (or (git-predicate |
|
(string-append (current-source-directory) |
|
"/../..")) |
|
(const #t)))) |
|
(package |
|
(name "guile") |
|
(version "3.0.99-git") |
|
(source (local-file "../.." "guile-checkout" |
|
#:recursive? #t |
|
#:select? vcs-file?)) |
|
(build-system gnu-build-system) |
|
(arguments |
|
(list #:configure-flags |
|
#~'("--enable-mini-gmp" |
|
#$@(if (target-x86-32?) ;<https://issues.guix.gnu.org/49368> |
|
'("--disable-static" "CFLAGS=-g -O2 -fexcess-precision=standard") |
|
'("--disable-static"))) |
|
|
|
#:phases |
|
#~(modify-phases %standard-phases |
|
(add-before 'bootstrap 'set-version |
|
(lambda _ |
|
;; Tell 'git-version-gen' what version this is, or it will |
|
;; just pick "UNKNOWN", making it unusable as a replacement |
|
;; for 'guile-3.0'. XXX: This is inaccurate when using |
|
;; '--with-branch' but using (package-version this-package) |
|
|
|
(call-with-output-file ".tarball-version" |
|
(lambda (port) |
|
(display #$version port))) |
|
|
|
|
|
(substitute* "GUILE-VERSION" |
|
(("^GUILE_MICRO_VERSION=.*") |
|
"GUILE_MICRO_VERSION=99\n")))) |
|
(add-before 'configure 'pre-configure |
|
(lambda* (#:key inputs #:allow-other-keys) |
|
|
|
(let ((bash (false-if-exception |
|
(search-input-file inputs "/bin/sh")))) |
|
(substitute* "module/ice-9/popen.scm" |
|
|
|
|
|
|
|
(("/bin/sh") |
|
(or bash "/bin/sh"))))))))) |
|
|
|
(native-inputs |
|
(append (list autoconf |
|
automake |
|
libtool |
|
gnu-gettext |
|
flex |
|
texinfo |
|
texlive-scheme-basic |
|
texlive-epsf |
|
gperf |
|
git |
|
gdb |
|
strace |
|
readline |
|
lzip |
|
|
|
|
|
pkg-config) |
|
|
|
|
|
|
|
(if (%current-target-system) |
|
(list this-package) |
|
'()))) |
|
(inputs |
|
(append (list libffi) |
|
|
|
|
|
|
|
|
|
(if (target-mingw?) |
|
(list libiconv) |
|
(list bash-minimal)))) |
|
(propagated-inputs |
|
(list libunistring libgc)) |
|
|
|
(outputs '("out" "debug")) |
|
|
|
(native-search-paths |
|
(list (search-path-specification |
|
(variable "GUILE_LOAD_PATH") |
|
(files '("share/guile/site/3.0"))) |
|
(search-path-specification |
|
(variable "GUILE_LOAD_COMPILED_PATH") |
|
(files '("lib/guile/3.0/site-ccache"))))) |
|
(synopsis "Scheme implementation intended especially for extensions") |
|
(description |
|
"Guile is the GNU Ubiquitous Intelligent Language for Extensions, the |
|
official extension language of the GNU system. It is an implementation of |
|
the Scheme language which can be easily embedded in other applications to |
|
provide a convenient means of extending the functionality of the application |
|
without requiring the source code to be rewritten.") |
|
(home-page "https://www.gnu.org/software/guile/") |
|
(license license:lgpl3+)))) |
|
|
|
(define (package-with-configure-flags p flags) |
|
"Return P with FLAGS as addition 'configure' flags." |
|
(package/inherit p |
|
(arguments |
|
(substitute-keyword-arguments (package-arguments p) |
|
((#:configure-flags original-flags #~'()) |
|
#~(append #$original-flags #$flags)))))) |
|
|
|
(define-public guile-without-threads |
|
(package |
|
(inherit (package-with-configure-flags guile |
|
#~'("--without-threads"))) |
|
(name "guile-without-threads"))) |
|
|
|
(define-public guile-without-networking |
|
(package |
|
(inherit (package-with-configure-flags guile |
|
#~'("--disable-networking"))) |
|
(name "guile-without-networking"))) |
|
|
|
(define-public guile-debug |
|
(package |
|
(inherit (package-with-configure-flags guile |
|
#~'("--enable-guile-debug"))) |
|
(name "guile-debug"))) |
|
|
|
(define-public guile-strict-typing |
|
(package |
|
(inherit (package-with-configure-flags |
|
guile |
|
#~'("CPPFLAGS=-DSCM_DEBUG_TYPING_STRICTNESS=2"))) |
|
(name "guile-strict-typing"))) |
|
|
|
guile |
|
|