;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2015, 2018 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015, 2017 Christopher Allan Webber <cwebber@dustycloud.org>
;;; Copyright © 2016 Alex Sassmannshausen <alex@pompo.co>
-;;; Copyright © 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2016, 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2016 Erik Edrosa <erik.edrosa@gmail.com>
;;; Copyright © 2016 Eraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016, 2017 Alex Kost <alezost@gmail.com>
;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2017 Andy Wingo <wingo@igalia.com>
;;; Copyright © 2017 David Thompson <davet@gnu.org>
-;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2017, 2018 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2017 Theodoros Foradis <theodoros@foradis.org>
;;; Copyright © 2017 Nils Gillmann <ng0@n0.is>
;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2018 Pierre-Antoine Rouby <pierre-antoine.rouby@inria.fr>
+;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
;;;
;;; This file is part of GNU Guix.
;;;
#:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages)
#:use-module (gnu packages aspell)
+ #: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 dbm)
+ #:use-module (gnu packages ed)
+ #:use-module (gnu packages flex)
#:use-module (gnu packages gawk)
+ #:use-module (gnu packages gettext)
+ #:use-module (gnu packages gl)
#:use-module (gnu packages gperf)
+ #:use-module (gnu packages hurd)
+ #:use-module (gnu packages image)
#:use-module (gnu packages libffi)
- #:use-module (gnu packages autotools)
- #:use-module (gnu packages flex)
#:use-module (gnu packages libunistring)
#:use-module (gnu packages linux)
#:use-module (gnu packages m4)
+ #:use-module (gnu packages man)
+ #:use-module (gnu packages maths)
#:use-module (gnu packages multiprecision)
+ #:use-module (gnu packages ncurses)
+ #:use-module (gnu packages networking)
#:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages python)
#:use-module (gnu packages readline)
- #:use-module (gnu packages ncurses)
- #:use-module (gnu packages ed)
- #:use-module (gnu packages base)
+ #:use-module (gnu packages sdl)
+ #:use-module (gnu packages slang)
+ #:use-module (gnu packages sqlite)
#:use-module (gnu packages texinfo)
- #:use-module (gnu packages man)
- #:use-module (gnu packages gettext)
- #:use-module (gnu packages databases)
- #:use-module (gnu packages python)
#:use-module (gnu packages tls)
- #:use-module (gnu packages gl)
- #:use-module (gnu packages sdl)
- #:use-module (gnu packages maths)
- #:use-module (gnu packages image)
#:use-module (gnu packages version-control)
#:use-module (gnu packages xdisorg)
#:use-module (gnu packages xorg)
- #:use-module (gnu packages networking)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system guile)
#:use-module (guix build-system trivial)
#:use-module (guix utils)
#:use-module (ice-9 match)
(files '("share/guile/site/2.0")))
(search-path-specification
(variable "GUILE_LOAD_COMPILED_PATH")
- (files '("lib/guile/2.0/site-ccache"
- "share/guile/site/2.0")))))
+ (files '("lib/guile/2.0/site-ccache")))))
(synopsis "Scheme implementation intended especially for extensions")
(description
(home-page "https://www.gnu.org/software/guile/")
(license license:lgpl3+)))
+(define-public guile-2.0.13
+ ;; For testing a "minimal" Guix
+ (hidden-package
+ (package (inherit guile-2.0)
+ (name "guile")
+ (version "2.0.13")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/guile/guile-" version
+ ".tar.xz"))
+ (sha256
+ (base32
+ "12yqkr974y91ylgw6jnmci2v90i90s7h9vxa4zk0sai8vjnz4i1p")))))))
+
(define-public guile-2.2
(package (inherit guile-2.0)
(name "guile")
- (version "2.2.3")
+ (version "2.2.4")
(source (origin
(method url-fetch)
".tar.xz"))
(sha256
(base32
- "11j01agvnci2cx32wwpqs9078856yxmvs15gcsz7ganpkj2ahlw3"))
+ "07p3g0v2ba2vlfbfidqzlgbhnzdx46wh2rgc5gszq1mjyx5bks6r"))
(modules '((guix build utils)))
;; Remove the pre-built object files. Instead, build everything
(files '("share/guile/site/2.2")))
(search-path-specification
(variable "GUILE_LOAD_COMPILED_PATH")
- (files '("lib/guile/2.2/site-ccache"
- "share/guile/site/2.2")))))
+ (files '("lib/guile/2.2/site-ccache")))))
(arguments
(if (%current-target-system)
(substitute* "module/Makefile.in"
(("language/elisp/boot\\.el")
"\n"))
- #t)))))
+ #t))
+ ,@(if (hurd-target?)
+ `((add-after 'unpack 'allow-madvise-ENOSYS
+ (lambda _
+ ;; Do not warn about ENOSYS on 'madvise'. This is
+ ;; what Guile commit
+ ;; 45e4ace6603e00b297e6542362273041aebe7305 does.
+ ;; TODO: Remove for Guile >= 2.2.5.
+ (substitute* "libguile/vm.c"
+ (("perror \\(\"madvise failed\"\\)")
+ "if (errno != ENOSYS) perror (\"madvised failed\");"))
+ #t)))
+ '()))))
(package-arguments guile-2.0)))))
(define-public guile-2.2/fixed
(max-silent-time . 36000))))) ;10 hours (needed on ARM
; when heavily loaded)
-(define-public guile-2.2.2
- ;; Keep it so that, when 'guix' runs on 2.2.2, 'guix pull' compiles objects
- ;; with 2.2.2, thereby avoiding the ABI incompatibility issues described in
- ;; <https://bugs.gnu.org/29570>.
- (package
- (inherit guile-2.2)
- (version "2.2.2")
- (source (origin
- (inherit (package-source guile-2.2))
- (uri (string-append "mirror://gnu/guile/guile-" version
- ".tar.xz"))
- (sha256
- (base32
- "1azm25zcmxif0skxfrp11d2wc89nrzpjaann9yxdw6pvjxhs948w"))))))
-
(define-public guile-next
- (deprecated-package "guile-next" guile-2.2))
+ ;; This is the upcoming Guile 3.0, with JIT support.
+ (let ((commit "6f3357b0df64c4be17e72079864c09a542f1c779")
+ (revision "1"))
+ (package
+ (inherit guile-2.2)
+ (name "guile-next")
+ (version "2.9.1")
+ (source (origin
+ (inherit (package-source guile-2.2))
+ (uri (string-append "https://alpha.gnu.org/gnu/guile/guile-"
+ version ".tar.xz"))
+ (sha256
+ (base32
+ "0iba93yqn6mvgid0rfsrg4amym36pg9m8cqdplxsy222blrj9gh1"))))
+ (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"
+ "share/guile/site/3.0")))))
+ (properties '((ftp-server . "alpha.gnu.org")
+ (upstream-name . "guile"))))))
(define (make-guile-readline guile)
(package
;; FIXME: one of the database tests fails for unknown
;; reasons. It does not fail when run outside of Guix.
(("tests/database.scm") ""))
- #t))
- (add-after 'fix-bug-22 'autogen
- (lambda _
- (zero? (system* "sh" "autogen.sh")))))))
+ #t)))))
(inputs
`(("guile" ,guile-2.0)))
(native-inputs
;; This was mthl's mcron development branch, and it became mcron 1.1.
(deprecated-package "mcron2" mcron))
+(define-public guile-hall
+ (package
+ (name "guile-hall")
+ (version "0.1.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.com/a-sassmannshausen/guile-hall")
+ (commit "7d1094a12fe917209ce5b76c681cc8c862d4c65b")))
+ (file-name "guile-hall-0.1.1-checkout")
+ (sha256
+ (base32
+ "03kb09cjca98hlbx9mj12mqinzsnnvp6ci6i975n88pjhaxigyp1"))))
+ (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 outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin/"))
+ (site (string-append out "/share/guile/site")))
+ (match (scandir site)
+ (("." ".." version)
+ (let ((modules (string-append site "/" version))
+ (compiled-modules
+ (string-append
+ out
+ "/lib/guile/"
+ version
+ "/site-ccache")))
+ (for-each
+ (lambda (file)
+ (wrap-program
+ (string-append bin file)
+ `("GUILE_LOAD_PATH" ":" prefix (,modules))
+ `("GUILE_LOAD_COMPILED_PATH"
+ ":"
+ prefix
+ (,compiled-modules))))
+ ,(list 'list "hall"))
+ #t)))))))))
+ (native-inputs
+ `(("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("pkg-config" ,pkg-config)
+ ("texinfo" ,texinfo)))
+ (inputs `(("guile" ,guile-2.2)))
+ (propagated-inputs
+ `(("guile-config" ,guile-config)))
+ (synopsis "Guile project tooling")
+ (description
+ "Hall is a command-line application and a set of Guile libraries that
+allow you to quickly create and publish Guile projects. It allows you to
+transparently support the GNU build system, manage a project hierarchy &
+provides tight coupling to Guix.")
+ (home-page
+ "https://gitlab.com/a-sassmannshausen/guile-hall")
+ (license license:gpl3+)))
+
(define-public guile-ics
(package
(name "guile-ics")
(base32
"0qjjvadr7gibdq9jvwkmlkb4afsw9n2shfj9phpiadinxk3p4m2g"))))
(build-system gnu-build-system)
- (arguments
- '(#:phases (modify-phases %standard-phases
- (add-after 'unpack 'autoreconf
- (lambda _
- ;; Repository comes with a broken symlink
- (delete-file "README")
- (symlink "README.org" "README")
- (zero? (system* "autoreconf" "-fi")))))))
(native-inputs
`(("autoconf" ,autoconf-wrapper)
("automake" ,automake)
(define-public guile-lib
(package
(name "guile-lib")
- (version "0.2.5.1")
+ (version "0.2.6.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://savannah/guile-lib/guile-lib-"
version ".tar.gz"))
(sha256
(base32
- "19q420i3is3d4jmkdqs5y7ir7ipp4s795saflqgwf6617cx2zpj4"))))
+ "0aizxdif5dpch9cvs8zz5g8ds5s4xhfnwza2il5ji7fv2h7ks7bd"))))
(build-system gnu-build-system)
(arguments
'(#:make-flags
- '("GUILE_AUTO_COMPILE=0") ;to prevent guild errors
+ '("GUILE_AUTO_COMPILE=0") ; to prevent guild errors
#:phases
(modify-phases %standard-phases
(add-before 'configure 'patch-module-dir
(define-public guile-json
(package
(name "guile-json")
- (version "1.0.1")
+ (version "1.2.0")
(home-page "https://github.com/aconchillo/guile-json")
(source (origin
(method url-fetch)
- (uri (string-append home-page "/archive/"
- version ".tar.gz"))
- (file-name (string-append name "-" version ".tar.gz"))
+ (uri (string-append "https://download.savannah.nongnu.org/releases/"
+ name "/" name "-" version ".tar.gz"))
(sha256
(base32
- "16155dv30rhagz6dwv7xc87l386i8v0f1kgydqa2ajr166fi9qhr"))
- (modules '((guix build utils)))
- (snippet
- ;; Make sure everything goes under .../site/X.Y, like Guile's
- ;; search paths expects.
- '(begin
- (substitute* "configure.ac"
- (("GUILE_PROGS")
- (string-append "GUILE_PROGS\n"
- "AC_SUBST([GUILE_EFFECTIVE_VERSION])\n")))
- (substitute* '("Makefile.am" "json/Makefile.am")
- (("moddir[[:blank:]]*=.*/share/guile/site" all)
- (string-append all "/@GUILE_EFFECTIVE_VERSION@")))))))
+ "15gnb84d7hpazqhskkf3g9z4r6knw54wfj4ch5270kakz1lp70c9"))))
(build-system gnu-build-system)
- (native-inputs `(("autoconf" ,autoconf)
- ("automake" ,automake)
+ (native-inputs `(("pkg-config" ,pkg-config)
("guile" ,guile-2.2)))
(inputs `(("guile" ,guile-2.2)))
(synopsis "JSON module for Guile")
@item Unicode support for strings.
@item Allows JSON pretty printing.
@end itemize\n")
- (license license:lgpl3+)))
+
+ ;; Version 1.2.0 switched to GPLv3+ (from LGPLv3+).
+ (license license:gpl3+)))
(define-public guile2.2-json
(deprecated-package "guile2.2-json" guile-json))
(define-public guile2.0-json
(package-for-guile-2.0 guile-json))
+(define-public guile-json-3
+ ;; This version is incompatible with 1.x; see the 'NEWS' file.
+ (package
+ (inherit guile-json)
+ (name "guile-json")
+ (version "3.1.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://download.savannah.nongnu.org/releases/"
+ name "/" name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1yfqscz74i4vxylabd3s9l0wbdp8bg9qxnv1ixdm3b1l7zdx00z3"))))))
+
(define-public guile-minikanren
(package
(name "guile-minikanren")
(sha256
(base32
"0r50jlpzi940jlmxyy3ddqqwmj5r12gb4bcv0ssini9v8km13xz6"))))
- (build-system trivial-build-system)
- (arguments
- `(#:modules ((guix build utils))
- #:builder
- (begin
- (use-modules (guix build utils)
- (ice-9 match)
- (ice-9 popen)
- (ice-9 rdelim))
-
- (let* ((out (assoc-ref %outputs "out"))
- (guile (assoc-ref %build-inputs "guile"))
- (effective (read-line
- (open-pipe* OPEN_READ
- (string-append guile "/bin/guile")
- "-c" "(display (effective-version))")))
- (module-dir (string-append out "/share/guile/site/"
- effective))
- (source (assoc-ref %build-inputs "source"))
- (doc (string-append out "/share/doc/guile-minikanren"))
- (scm-files '("minikanren.scm"
- "minikanren/mkextraforms.scm"
- "minikanren/mkprelude.scm"
- "minikanren/mk.scm"))
- (guild (string-append (assoc-ref %build-inputs "guile")
- "/bin/guild")))
- ;; Make installation directories.
- (mkdir-p (string-append module-dir "/minikanren"))
- (mkdir-p doc)
-
- ;; Compile .scm files and install.
- (chdir source)
- (setenv "GUILE_AUTO_COMPILE" "0")
- (for-each (lambda (file)
- (let* ((dest-file (string-append module-dir "/"
- file))
- (go-file (match (string-split file #\.)
- ((base _)
- (string-append module-dir "/"
- base ".go")))))
- ;; Install source module.
- (copy-file file dest-file)
- ;; Install compiled module.
- (invoke guild "compile"
- "-L" source
- "-o" go-file
- file)))
- scm-files)
-
- ;; Also copy over the README.
- (install-file "README.org" doc)
-
- #t))))
- (inputs
+ (build-system guile-build-system)
+ (native-inputs
`(("guile" ,guile-2.2)))
(home-page "https://github.com/ijp/minikanren")
(synopsis "MiniKanren declarative logic system, packaged for Guile")
(sha256
(base32
"09q51zkw2fypad5xixskfzw2cjhjgs5cswdp3i7cpp651rb3zndh"))))
- (build-system gnu-build-system)
- (arguments
- `(#:modules ((guix build utils)
- (ice-9 popen)
- (ice-9 rdelim)
- (srfi srfi-1)
- (guix build gnu-build-system))
- #:tests? #f ; there is no test target
- #:phases
- (modify-phases %standard-phases
- (delete 'configure)
- (delete 'build)
- (replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((cwd (getcwd))
- (scm-files (find-files "." "\\.scm$"))
- (effective (read-line
- (open-pipe* OPEN_READ
- "guile" "-c"
- "(display (effective-version))")))
- (module-dir (string-append (assoc-ref outputs "out")
- "/share/guile/site/"
- effective)))
-
- ;; Make installation directories.
- (mkdir-p module-dir)
-
- (setenv "GUILE_AUTO_COMPILE" "0")
-
- ;; Compile .scm files and install.
- (every (lambda (file)
- (let ((go-file (string-append module-dir "/"
- (basename file ".scm") ".go")))
- ;; Install source module.
- (install-file file module-dir)
- ;; Compile and install module.
- (zero? (system* "guild" "compile" "-L" cwd
- "-o" go-file file))))
- scm-files)))))))
- (inputs
+ (build-system guile-build-system)
+ (native-inputs
`(("guile" ,guile-2.2)))
(home-page "https://github.com/fisherdj/miniAdapton")
(synopsis "Minimal implementation of incremental computation in Guile
(sha256
(base32
"1ia3m7dp3lcxa048q0gqbiwwsyvn99baw6xkhb4bhhzn4k7bwyqq"))))
- (build-system gnu-build-system)
+ (build-system guile-build-system)
(arguments
- `(#:modules ((guix build utils)
- (ice-9 match)
- (ice-9 rdelim)
- (ice-9 popen)
- (guix build gnu-build-system))
- #:phases
- (modify-phases %standard-phases
- (delete 'configure)
- (delete 'build)
- (delete 'check)
- (replace 'install
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (effective (read-line
- (open-pipe* OPEN_READ
- "guile" "-c"
- "(display (effective-version))")))
- (module-dir (string-append out "/share/guile/site/"
- effective))
- (source (assoc-ref inputs "source"))
- (doc (string-append out "/share/doc/guile-irregex/"))
- (guild (string-append (assoc-ref %build-inputs "guile")
- "/bin/guild")))
- ;; Make installation directories.
- (mkdir-p (string-append module-dir "/rx/source"))
- (mkdir-p doc)
-
- ;; Compile .scm files and install.
- (setenv "GUILE_AUTO_COMPILE" "0")
-
- (for-each (lambda (copy-info)
- (match copy-info
- ((src-file dest-file-basis)
- (let* ((dest-file (string-append
- module-dir dest-file-basis
- ".scm"))
- (go-file (string-append
- module-dir dest-file-basis
- ".go")))
- ;; Install source module.
- (copy-file src-file
- dest-file)
- ;; Install compiled module.
- (invoke guild "compile"
- "-L" (getcwd)
- "-o" go-file
- src-file)))))
- '(("irregex-guile.scm" "/rx/irregex")
- ("irregex.scm" "/rx/source/irregex")
- ;; Not really reachable via guile's packaging system,
- ;; but nice to have around
- ("irregex-utils.scm" "/rx/source/irregex-utils")))
-
- ;; Also copy over the README.
- (install-file "irregex.html" doc)
- #t))))))
- (inputs
+ '(#:phases (modify-phases %standard-phases
+ (add-after 'unpack 'move-files-around
+ (lambda _
+ ;; Move the relevant source files to src/ and create the
+ ;; rx/ directory to match the expected module hierarchy.
+ (mkdir-p "src/rx/source")
+ (rename-file "irregex-guile.scm"
+ "src/rx/irregex.scm")
+ (rename-file "irregex.scm"
+ "src/rx/source/irregex.scm")
+ ;; Not really reachable via guile's packaging system,
+ ;; but nice to have around.
+ (rename-file "irregex-utils.scm"
+ "src/rx/source/irregex-utils.scm")
+ #t)))
+ #:source-directory "src"))
+ (native-inputs
`(("guile" ,guile-2.2)))
(home-page "http://synthcode.com/scheme/irregex")
(synopsis "S-expression based regular expressions")
(url "https://github.com/ijp/guile-gdbm.git")
(commit "fa1d5b6231d0e4d096687b378c025f2148c5f246")))
(file-name (string-append name "-" version "-checkout"))
+ (patches (search-patches
+ "guile-gdbm-ffi-support-gdbm-1.14.patch"))
(sha256
(base32
"1j8wrsw7v9w6qkl47xz0rdikg50v16nn6kbs3lgzcymjzpa7babj"))))
- (build-system trivial-build-system)
+ (build-system guile-build-system)
+ (arguments
+ '(#:phases (modify-phases %standard-phases
+ (add-after 'unpack 'move-examples
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; Move examples where they belong.
+ (let* ((out (assoc-ref outputs "out"))
+ (doc (string-append out "/share/doc/"
+ (strip-store-file-name out)
+ "/examples")))
+ (copy-recursively "examples" doc)
+ (delete-file-recursively "examples")
+ #t)))
+ (add-after 'unpack 'set-libgdbm-file-name
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "gdbm.scm"
+ (("\\(dynamic-link \"libgdbm\"\\)")
+ (format #f "(dynamic-link \"~a/lib/libgdbm.so\")"
+ (assoc-ref inputs "gdbm"))))
+ #t)))))
+ (native-inputs
+ `(("guile" ,guile-2.2)))
(inputs
- `(("guile" ,guile-2.2)
- ;; patch-and-repack doesn't work for git checkouts,
- ;; so we must apply the patch manually.
- ("patch" ,patch)
- ("patch-file" ,(search-patch
- "guile-gdbm-ffi-support-gdbm-1.14.patch"))))
- (propagated-inputs
`(("gdbm" ,gdbm)))
- (arguments
- `(#:modules
- ((guix build utils))
- #:builder
- (begin
- (use-modules (guix build utils)
- (ice-9 rdelim)
- (ice-9 popen))
-
- ;; Avoid warnings we can safely ignore
- (setenv "GUILE_AUTO_COMPILE" "0")
-
- (let* ((out (assoc-ref %outputs "out"))
- (effective-version
- (read-line
- (open-pipe* OPEN_READ
- (string-append
- (assoc-ref %build-inputs "guile")
- "/bin/guile")
- "-c" "(display (effective-version))")))
- (module-dir (string-append out "/share/guile/site/"
- effective-version))
- (source (assoc-ref %build-inputs "source"))
- (doc (string-append out "/share/doc"))
- (guild (string-append (assoc-ref %build-inputs "guile")
- "/bin/guild"))
- (gdbm.scm-dest
- (string-append module-dir "/gdbm.scm"))
- (gdbm.go-dest
- (string-append module-dir "/gdbm.go"))
- (compile-file
- (lambda (in-file out-file)
- (invoke guild "compile" "-o" out-file in-file))))
- ;; Switch directory for compiling and installing
- (chdir source)
-
- ;; Install the documentation.
- (install-file "README.md" doc)
- (copy-recursively "examples" (string-append doc "/examples"))
-
- ;; Make installation directories.
- (mkdir-p module-dir)
-
- ;; copy the source
- (copy-file "gdbm.scm" gdbm.scm-dest)
-
- ;; Patch the FFI
- (substitute* gdbm.scm-dest
- (("\\(dynamic-link \"libgdbm\"\\)")
- (format #f "(dynamic-link \"~a/lib/libgdbm.so\")"
- (assoc-ref %build-inputs "gdbm"))))
-
- ;; Apply the patch to add support for gdbm-1.14.
- (let ((patch-command (string-append (assoc-ref %build-inputs "patch")
- "/bin/patch"))
- (patch-file (assoc-ref %build-inputs "patch-file")))
- (with-directory-excursion (dirname gdbm.scm-dest)
- (format #t "applying '~a'...~%" patch-file)
- (invoke patch-command "--force" "--input" patch-file)))
-
- ;; compile to the destination
- (compile-file gdbm.scm-dest gdbm.go-dest)
-
- #t))))
(home-page "https://github.com/ijp/guile-gdbm")
(synopsis "Guile bindings to the GDBM library via Guile's FFI")
(description
(deprecated-package "guile2.2-gdbm-ffi" guile-gdbm-ffi))
(define-public guile-sqlite3
- (let ((commit "10c13a7e02ab1655c8a758e560cafc9d6eff26f4")
- (revision "4"))
- (package
- (name "guile-sqlite3")
- (version (git-version "0.0" revision commit))
-
- ;; XXX: This used to be available read-only at
- ;; <https://www.gitorious.org/guile-sqlite3/guile-sqlite3.git/> but it
- ;; eventually disappeared, so we have our own copy here.
- (home-page "https://notabug.org/civodul/guile-sqlite3.git")
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url home-page)
- (commit commit)))
- (sha256
- (base32
- "0nhhswpd7nb2f0gfr55fzcc2xm3l2xx4rbljsd1clrm8fj2d7q9d"))
- (file-name (string-append name "-" version "-checkout"))
- (modules '((guix build utils)))
- (snippet
- ;; Upgrade 'Makefile.am' to the current way of doing things.
- '(begin
- (substitute* "Makefile.am"
- (("TESTS_ENVIRONMENT")
- "TEST_LOG_COMPILER"))
- #t))))
+ (package
+ (name "guile-sqlite3")
+ (version "0.1.0")
+ (home-page "https://notabug.org/guile-sqlite3/guile-sqlite3.git")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url home-page)
+ (commit (string-append "v" version))))
+ (sha256
+ (base32
+ "1nv8j7wk6b5n4p22szyi8lv8fs31rrzxhzz16gyj8r38c1fyp9qp"))
+ (file-name (string-append name "-" version "-checkout"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("pkg-config" ,pkg-config)))
+ (inputs
+ `(("guile" ,guile-2.2)
+ ("sqlite" ,sqlite)))
+ (synopsis "Access SQLite databases from Guile")
+ (description
+ "This package provides Guile bindings to the SQLite database system.")
+ (license license:gpl3+)))
- (build-system gnu-build-system)
- (native-inputs
- `(("autoconf" ,autoconf)
- ("automake" ,automake)
- ("pkg-config" ,pkg-config)))
- (inputs
- `(("guile" ,guile-2.2)
- ("sqlite" ,sqlite)))
- (arguments
- '(#:phases (modify-phases %standard-phases
- (add-after 'unpack 'autoreconf
- (lambda _
- (zero? (system* "autoreconf" "-vfi"))))
- (add-before 'build 'set-sqlite3-file-name
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* "sqlite3.scm"
- (("\"libsqlite3\"")
- (string-append "\"" (assoc-ref inputs "sqlite")
- "/lib/libsqlite3\"")))
- #t)))))
- (synopsis "Access SQLite databases from Guile")
- (description
- "This package provides Guile bindings to the SQLite database system.")
- (license license:gpl3+))))
+(define-public guile2.0-sqlite3
+ (package-for-guile-2.0 guile-sqlite3))
(define-public haunt
(package
(name "haunt")
- (version "0.2.2")
+ (version "0.2.4")
(source (origin
(method url-fetch)
(uri (string-append "https://files.dthompson.us/haunt/haunt-"
version ".tar.gz"))
(sha256
(base32
- "0nm00krmqq4zmqi2irh35dbf2cn6al58s620hijmhfvhgvdqznlp"))))
+ "056z4znikk83nr5mr0x2ac3iinqbywa2bvb37mhr566a1q50isfc"))))
(build-system gnu-build-system)
(arguments
`(#:modules ((ice-9 match) (ice-9 ftw)
#:tests? #f ; test suite is non-deterministic :(
#:phases (modify-phases %standard-phases
(add-after 'install 'wrap-haunt
- (lambda* (#:key outputs #:allow-other-keys)
+ (lambda* (#:key inputs outputs #:allow-other-keys)
;; Wrap the 'haunt' command to refer to the right
;; modules.
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin"))
(site (string-append
- out "/share/guile/site")))
+ out "/share/guile/site"))
+ (deps (list (assoc-ref inputs "guile-reader")
+ (assoc-ref inputs "guile-commonmark"))))
(match (scandir site)
(("." ".." version)
(let ((modules (string-append site "/" version))
"/site-ccache")))
(wrap-program (string-append bin "/haunt")
`("GUILE_LOAD_PATH" ":" prefix
- (,modules))
+ (,modules
+ ,@(map (lambda (dep)
+ (string-append dep
+ "/share/guile/site/"
+ version))
+ deps)))
`("GUILE_LOAD_COMPILED_PATH" ":" prefix
- (,compiled-modules)))
+ (,compiled-modules
+ ,@(map (lambda (dep)
+ (string-append dep "/lib/guile/"
+ version
+ "/site-ccache"))
+ deps))))
#t)))))))))
(native-inputs
`(("pkg-config" ,pkg-config)
(define-public guile-config
(package
(name "guile-config")
- (version "0.2")
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/a-sassmannshausen/guile-config")
- (commit "guile-config-0.2")))
- (file-name (string-append name "-" version "-checkout"))
- (sha256
- (base32
- "07q86vqdwmm81wwxz1d1ah27hbhs6qbn8kiizrfpj0s4bf95w3r9"))))
+ (version "0.3")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.com/a-sassmannshausen/guile-config")
+ (commit "ce12de3f438c6b2b59c43ee21bcd58251835fdf3")))
+ (file-name "guile-config-0.3-checkout")
+ (sha256 (base32 "02zbpin0r9m2vxmr7mv68v3xdn247dcck56kbzjn0gj4c2rhih85"))))
(build-system gnu-build-system)
- (arguments
- '(#:phases (modify-phases %standard-phases
- (add-after 'unpack 'autoreconf
- (lambda _
- (zero? (system* "autoreconf" "-fi")))))))
(native-inputs
`(("autoconf" ,autoconf)
("automake" ,automake)
("pkg-config" ,pkg-config)
("texinfo" ,texinfo)))
- (inputs
- `(("guile" ,guile-2.2)))
- (synopsis "Guile application configuration parsing library")
+ (inputs `(("guile" ,guile-2.2)))
+ (synopsis
+ "Guile application configuration parsing library.")
(description
"Guile Config is a library providing a declarative approach to
application configuration specification. The library provides clean
parameter parsing using getopt-long; basic GNU command-line parameter
generation (--help, --usage, --version); automatic output generation for the
above command-line parameters.")
- (home-page "https://github.com/a-sassmannshausen/guile-config")
+ (home-page
+ "https://gitlab.com/a-sassmannshausen/guile-config")
(license license:gpl3+)))
(define-public guile-redis
(package
(name "guile-redis")
- (version "0.1.0")
+ (version "1.0.0")
+ (home-page "https://github.com/aconchillo/guile-redis")
(source (origin
(method url-fetch)
- (uri (string-append "mirror://savannah/guile-redis/guile-redis-"
- version ".tar.gz"))
+ (uri (string-append home-page "/archive/" version ".tar.gz"))
(sha256
(base32
- "0vx6if6b4r3kwx64vzbs6vpc0cpcr85x11w9vkzq27gw8n7isv56"))
- (modules '((guix build utils)))
- (snippet
- ;; Make sure everything goes under .../site/X.Y, like Guile's
- ;; search paths expects.
- '(begin
- (substitute* "configure"
- (("ac_subst_vars='")
- "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
- (substitute* '("Makefile.in"
- "redis/Makefile.in"
- "redis/commands/Makefile.in")
- (("moddir =.*/share/guile/site" all)
- (string-append all "/@GUILE_EFFECTIVE_VERSION@")))
- #t))))
+ "1dp5fmqvma59pvp1nfpq6hqgbmjici8sd1y8llahl87fynw1dvr9"))))
(build-system gnu-build-system)
(native-inputs
- `(("guile" ,guile-2.2)))
- (home-page "https://savannah.nongnu.org/projects/guile-redis/")
+ `(("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("pkg-config" ,pkg-config)
+ ("guile" ,guile-2.2)))
(synopsis "Redis client library for Guile")
(description "Guile-redis provides a Scheme interface to the Redis
key-value cache and store.")
(("^guilesitedir =.*$")
"guilesitedir = \
$(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
- #t))
- (add-after 'unpack 'autoreconf
- (lambda _
- (zero? (system* "autoreconf" "-vfi")))))))
+ #t)))))
(home-page "https://github.com/artyom-poptsov/guile-dsv")
(synopsis "DSV module for Guile")
(description
(define-public guile-commonmark
(package
(name "guile-commonmark")
- (version "0.1")
+ (version "0.1.1")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/OrangeShark/" name
"/" name "-" version ".tar.gz"))
(sha256
(base32
- "12cb5fqvvgc87f5xp0ih5az305wnjia89l5jba83d0r2p8bfy0b0"))
+ "0kzclwkfijj8xka3g9kfj53y67c34ndfy84swdbw3j7y962ndxq6"))
(modules '((guix build utils)))
(snippet
- ;; Use the real effective version of Guile in directory names
- ;; instead of a hard-coded "/2.0".
+ ;; Install .scm files in the right place (see
+ ;; <https://github.com/OrangeShark/guile-commonmark/issues/12>.)
'(begin
- (substitute* "configure"
- (("ac_subst_vars='")
- "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
(substitute* "Makefile.in"
- (("/site/2.0")
- "/site/@GUILE_EFFECTIVE_VERSION@"))
+ (("^moddir = \\$\\(datadir\\)/share")
+ "moddir = $(datadir)"))
#t))))
(build-system gnu-build-system)
(inputs
`(("guile" ,guile-2.2)))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
(synopsis "CommonMark parser for Guile")
(description
"guile-commonmark is a library for parsing CommonMark, a fully specified
(define-public guile-bytestructures
(package
(name "guile-bytestructures")
- (version "1.0.1")
+ (version "1.0.3")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/TaylanUB/scheme-bytestructures"
"/bytestructures-" version ".tar.gz"))
(sha256
(base32
- "1lnfcy65mqj823lamy2n2vaghdz0g7mj011bgnhmd6hwpnaidnh2"))))
+ "0xf6s8gd3656j8k2ar6y7i62r68azawyzxhsagsk8nvldnrs1r18"))))
(build-system gnu-build-system)
(native-inputs
`(("pkg-config" ,pkg-config)))
(base32
"0vjkg72ghgdgphzbjz9ig8al8271rq8974viknb2r1rg4lz92ld0"))))
(build-system gnu-build-system)
+ (arguments
+ '(#:phases (modify-phases %standard-phases
+ (add-after 'install 'mode-guile-objects
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; .go files are installed to "lib/guile/X.Y/cache".
+ ;; This phase moves them to "…/site-ccache".
+ (let* ((out (assoc-ref outputs "out"))
+ (lib (string-append out "/lib/guile"))
+ (old (car (find-files lib "^ccache$"
+ #:directories? #t)))
+ (new (string-append (dirname old)
+ "/site-ccache")))
+ (rename-file old new)
+ #t))))))
(native-inputs
`(("texinfo" ,texinfo)
("pkg-config" ,pkg-config)))
(license license:lgpl3+)))
(define-public guile-git
- (let ((revision "6")
- (commit "36f93c174adc396c90ec3a6923487f0444fe5d69"))
- (package
- (name "guile-git")
- (version (string-append "0.0-" revision "." (string-take commit 7)))
- (home-page "https://gitlab.com/guile-git/guile-git.git")
- (source (origin
- (method git-fetch)
- (uri (git-reference (url home-page) (commit commit)))
- (sha256
- (base32
- "0z1dvn0scx59pbgjkpacam7p5n7630z4qm8fazim7ixq9xv3s8wx"))
- (file-name (git-file-name name version))))
- (build-system gnu-build-system)
- (arguments
- `(#:phases (modify-phases %standard-phases
- ;; FIXME: On i686, bytestructures miscalculates the offset
- ;; of the 'old-file' and 'new-file' fields within the
- ;; '%diff-delta' structure. See
- ;; <https://github.com/TaylanUB/scheme-bytestructures/issues/30>.
- ,@(if (string=? (%current-system) "x86_64-linux")
- '()
- '((add-before 'check 'skip-tests
- (lambda _
- (substitute* "Makefile"
- (("tests/status\\.scm")
- ""))
- #t)))))))
- (native-inputs
- `(("autoconf" ,autoconf)
- ("automake" ,automake)
- ("texinfo" ,texinfo)
- ("pkg-config" ,pkg-config)))
- (inputs
- `(("guile" ,guile-2.2)
- ("libgit2" ,libgit2)))
- (propagated-inputs
- `(("guile-bytestructures" ,guile-bytestructures)))
- (synopsis "Guile bindings for libgit2")
- (description
- "This package provides Guile bindings to libgit2, a library to
+ (package
+ (name "guile-git")
+ (version "0.1.0")
+ (home-page "https://gitlab.com/guile-git/guile-git.git")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference (url home-page)
+ (commit (string-append "v" version))))
+ (sha256
+ (base32
+ "1z3awa3i5il08dl2swbnli2j7cawdpray11zx4844j27bxqddcs2"))
+ (file-name (git-file-name name version))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("texinfo" ,texinfo)
+ ("pkg-config" ,pkg-config)))
+ (inputs
+ `(("guile" ,guile-2.2)
+ ("libgit2" ,libgit2)))
+ (propagated-inputs
+ `(("guile-bytestructures" ,guile-bytestructures)))
+ (synopsis "Guile bindings for libgit2")
+ (description
+ "This package provides Guile bindings to libgit2, a library to
manipulate repositories of the Git version control system.")
- (license license:gpl3+))))
+ (license license:gpl3+)))
(define-public guile2.0-git
(package-for-guile-2.0 guile-git))
(sha256
(base32
"16xhc3an6aglnca8xl3mvgi8hsqzqn68vsl5ga4bz8bvbap5fn4p"))))
- (build-system gnu-build-system)
- (arguments
- `(#:modules ((system base compile)
- ,@%gnu-build-system-modules)
- #:tests? #f ;No tests included
- #:phases
- (modify-phases %standard-phases
- (delete 'configure) ;No configure script
- (replace 'install
- (lambda* (#:key outputs inputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (module-dir (string-append out "/share/guile/site/2.2"))
- (language-dir (string-append module-dir "/ice-9"))
- (guild (string-append (assoc-ref inputs "guile")
- "/bin/guild")))
- ;; The original 'make install' is too primitive.
-
- ;; copy the source
- (install-file "ice-9/colorized.scm" language-dir)
-
- ;; compile to the destination
- (compile-file "ice-9/colorized.scm"
- #:output-file (string-append
- language-dir "/colorized.go"))
- #t))))))
- (inputs
+ (build-system guile-build-system)
+ (native-inputs
`(("guile" ,guile-2.2)))
(home-page "https://github.com/NalaGinrut/guile-colorized")
(synopsis "Colorized REPL for Guile")
"Guile-colorized provides you with a colorized REPL for GNU Guile.")
(license license:gpl3+)))
+(define-public guile-pfds
+ (package
+ (name "guile-pfds")
+ (version "0.3")
+ (home-page "https://github.com/ijp/pfds")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url home-page)
+ (commit (string-append "v" version))))
+ (sha256
+ (base32
+ "19y33wg94pf0n98dkfqd1zbw93fgky4sawxsxl6s3vyqwl0yi5vh"))
+ (file-name (string-append name "-" version "-checkout"))))
+ (build-system guile-build-system)
+ (arguments
+ '(#:source-directory "src"
+ #:phases (modify-phases %standard-phases
+ (add-after 'unpack 'move-files-around
+ (lambda _
+ ;; Move files under a pfds/ directory to reflect the
+ ;; module hierarchy.
+ (mkdir-p "src/pfds")
+ (for-each (lambda (file)
+ (rename-file file
+ (string-append "src/pfds/"
+ file)))
+ '("bbtrees.sls"
+ "deques"
+ "deques.sls"
+ "dlists.sls"
+ "fingertrees.sls"
+ "hamts.sls"
+ "heaps.sls"
+ "private"
+ "psqs.sls"
+ "queues"
+ "queues.sls"
+ "sequences.sls"
+ "sets.sls"))
+
+ ;; In Guile <= 2.2.4, there's no way to tell 'guild
+ ;; compile' to accept the ".sls" extension. So...
+ (for-each (lambda (file)
+ (rename-file file
+ (string-append
+ (string-drop-right file 4)
+ ".scm")))
+ (find-files "." "\\.sls$"))
+ #t)))))
+ (native-inputs
+ `(("guile" ,guile-2.2)))
+ (synopsis "Purely functional data structures for Guile")
+ (description
+ "This package provides purely functional data structures written in R6RS
+Scheme and compiled for Guile. It has been tested with Racket, Guile 2,
+Vicare Scheme and IronScheme. Right now it contains:
+
+@itemize
+@item queues
+@item deques
+@item bbtrees
+@item sets
+@item dlists
+@item priority search queues (PSQs)
+@item finger trees
+@item sequences
+@item heaps
+@item hash array mapped tries (HAMTs).
+@end itemize\n")
+ (license license:bsd-3)))
+
+(define-public guile-aa-tree
+ (package
+ (name "guile-aa-tree")
+ (version "3.1.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://savannah/guile-aa-tree/guile-aa-tree-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "0044c105r3q9vpl17pv3phl1b79kjm1llhkakqgiasixyav01blh"))))
+ (build-system guile-build-system)
+ (native-inputs `(("guile" ,guile-2.2)))
+ ;; https://savannah.nongnu.org/projects/guile-aa-tree
+ (home-page "https://qlfiles.net/guile-aa-tree/")
+ (synopsis "AA tree data structure for Guile")
+ (description
+ "This package provides an implementation of @dfn{AA trees}, a
+self-balancing binary tree data structure, for Guile. It ensure @math{O(log
+n)} worst case performance for core operations. The module provides
+non-mutating insert, delete, and search operations, with support for
+convenient nested tree operations.")
+ (license license:gpl3+)))
+
(define-public guile-simple-zmq
- (let ((commit "d76657aeb1cd10ef8136edc06bb90999914c7c3c")
- (revision "0"))
+ (let ((commit "68bedb6679716214fb9d3472da57544526f7a618")
+ (revision "3"))
(package
(name "guile-simple-zmq")
(version (git-version "0.0.0" revision commit))
(commit commit)))
(sha256
(base32
- "1w73dy5gpyv33jn34dqlkqpwh9w4y8wm6hgvbpb3wbp6xsa2mk4z"))
+ "1ad3xg69qqviy1f6dnlw0ysmfdbmp1jq65rfqb8nfd8dsrq2syli"))
(file-name (git-file-name name version))))
- (build-system trivial-build-system)
+ (build-system guile-build-system)
(arguments
- `(#:modules ((guix build utils))
- #:builder
- (begin
- (use-modules (guix build utils)
- (srfi srfi-26)
- (ice-9 match)
- (ice-9 popen)
- (ice-9 rdelim))
-
- (let* ((out (assoc-ref %outputs "out"))
- (guile (assoc-ref %build-inputs "guile"))
- (effective (read-line
- (open-pipe* OPEN_READ
- (string-append guile "/bin/guile")
- "-c" "(display (effective-version))")))
- (module-dir (string-append out "/share/guile/site/"
- effective))
- (go-dir (string-append out "/lib/guile/"
- effective "/site-ccache/"))
- (source (string-append (assoc-ref %build-inputs "source")
- "/src"))
- (scm-file "simple-zmq.scm")
- (guild (string-append (assoc-ref %build-inputs "guile")
- "/bin/guild"))
- (zmq (assoc-ref %build-inputs "zeromq"))
- (deps (list zmq))
- (path (string-join
- (map (cut string-append <>
- "/lib/")
- deps)
- ":")))
- ;; Make installation directories.
- (mkdir-p module-dir)
- (mkdir-p go-dir)
-
- ;; Compile .scm files and install.
- (chdir source)
- (setenv "GUILE_AUTO_COMPILE" "0")
- (for-each (lambda (file)
- (let* ((dest-file (string-append module-dir "/"
- file))
- (go-file (match (string-split file #\.)
- ((base _)
- (string-append go-dir "/"
- base ".go")))))
- ;; Install source module.
- (copy-file file dest-file)
- (substitute* dest-file
- (("\\(dynamic-link \"libzmq\"\\)")
- (format #f "(dynamic-link \"~a/lib/libzmq.so\")"
- (assoc-ref %build-inputs "zeromq"))))
-
- ;; Install and compile module.
- (unless (zero? (system* guild "compile"
- "-L" source
- "-o" go-file
- dest-file))
- (error (format #f "Failed to compile ~s to ~s!"
- file go-file)))))
- (list scm-file))
- #t))))
- (propagated-inputs
- `(("guile" ,guile-2.2)
- ("zeromq" ,zeromq)))
+ `(#:source-directory "src"
+ #:phases (modify-phases %standard-phases
+ (add-after 'unpack 'set-libzmq-file-name
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "src/simple-zmq.scm"
+ (("\\(dynamic-link \"libzmq\"\\)")
+ (format #f "(dynamic-link \"~a/lib/libzmq.so\")"
+ (assoc-ref inputs "zeromq"))))
+ #t)))))
+ (native-inputs
+ `(("guile" ,guile-2.2)))
+ (inputs
+ `(("zeromq" ,zeromq)))
(home-page "https://github.com/jerry40/guile-simple-zmq")
(synopsis "Guile wrapper over ZeroMQ library")
(description
(license license:gpl3+))))
(define-public jupyter-guile-kernel
- (let ((commit "a5c5f3ea3215b65e770bcb62f71117b0ec4575ed")
- (revision "0"))
+ (let ((commit "a7db9245a886e104138474df46c3e88b95cff629")
+ (revision "1"))
(package
(name "jupyter-guile-kernel")
(version (git-version "0.0.0" revision commit))
(commit commit)))
(sha256
(base32
- "0y5jr0f0dyskvsawqbf6n0bpg8jirw4mhqbarf2a6p9lxhqha9s9"))))
- (build-system trivial-build-system)
+ "0aj04853bqm47ivfcmrgpb7w3wkis847kc7qrwsa5zcn9h38qh2f"))))
+ (build-system guile-build-system)
(arguments
- `(#:modules ((guix build utils))
- #:builder
- (begin
- (use-modules (guix build utils)
- (srfi srfi-26)
- (ice-9 match)
- (ice-9 popen)
- (ice-9 rdelim))
-
- (let* ((out (assoc-ref %outputs "out"))
- (guile (assoc-ref %build-inputs "guile"))
- (effective (read-line
- (open-pipe* OPEN_READ
- (string-append guile "/bin/guile")
- "-c" "(display (effective-version))")))
- (module-dir (string-append out "/share/guile/site/"
- effective))
- (kernel-dir (string-append out "/share/jupyter/kernels/guile"))
- (go-dir (string-append out "/lib/guile/"
- effective
- "/site-ccache"))
- (source (string-append (assoc-ref %build-inputs "source")
- "/src"))
- (scm-files '("hmac.scm"
- "tools.scm"
- "guile-jupyter-kernel.scm"))
- (kernel-file "kernel.json")
- (guild (string-append (assoc-ref %build-inputs "guile")
- "/bin/guild"))
- (g-szmq (assoc-ref %build-inputs "guile-simple-zmq"))
- (json (assoc-ref %build-inputs "guile-json"))
- (deps (list g-szmq json))
- (path (string-join
- (map (cut string-append <>
- "/share/guile/site/"
- effective)
- deps)
- ":"))
- (gopath (string-join
- (map (cut string-append <>
- "/lib/guile/" effective
- "/site-ccache/")
- deps)
- ":")))
-
- ;; Make installation directories.
- (mkdir-p module-dir)
- (mkdir-p kernel-dir)
- (mkdir-p go-dir)
-
- ;; Make a writable copy of SOURCE.
- (copy-recursively source ".")
-
- ;; Record the absolute file name of the 'openssl' command.
- (substitute* "hmac.scm"
- (("openssl")
- (string-append (assoc-ref %build-inputs "openssl")
- "/bin/openssl")))
-
- ;; Compile .scm files and install.
- (setenv "GUILE_AUTO_COMPILE" "0")
- (setenv "GUILE_LOAD_PATH" path)
- (setenv "GUILE_LOAD_COMPILED_PATH" gopath)
-
- (for-each (lambda (file)
- (let* ((dest-file (string-append module-dir "/"
- file))
- (go-file (match (string-split file #\.)
- ((base _)
- (string-append go-dir "/"
- base ".go")))))
- ;; Install source module.
- (copy-file file dest-file)
-
- ;; Install compiled module.
- (unless (zero? (system* guild "compile"
- "-L" source
- "-o" go-file
- file))
- (error (format #f "Failed to compile ~s to ~s!"
- file go-file)))))
- scm-files)
-
- ;; Install kernel
- (copy-file kernel-file (string-append kernel-dir "/"
- kernel-file))
- ;; Fix hard-coded file name in the kernel
- (substitute* (string-append kernel-dir "/"
- kernel-file)
- (("/home/jerry/.local/share/jupyter/kernels/guile/guile-jupyter-kernel.scm")
- (string-append module-dir "/guile-jupyter-kernel.scm"))
- (("\"guile\"")
- (string-append "\"" (assoc-ref %build-inputs "guile")
- "/bin/guile\""))
- (("-s")
- (string-append "--no-auto-compile\", \"-s")))
-
- #t))))
+ '(#:phases (modify-phases %standard-phases
+ (add-after 'unpack 'set-openssl-file-name
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; Record the absolute file name of the 'openssl'
+ ;; command.
+ (substitute* "src/hmac.scm"
+ (("openssl")
+ (string-append (assoc-ref inputs "openssl")
+ "/bin/openssl")))
+ #t))
+
+ ;; XXX: The code uses 'include' to include its own source
+ ;; files, and "-L src" isn't enough in this case.
+ (add-before 'build 'chdir
+ (lambda _ (chdir "src") #t))
+ (add-after 'build 'chdir-back
+ (lambda _ (chdir "..") #t))
+
+ (add-after 'install 'install-kernel
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (json (assoc-ref inputs "guile-json"))
+ (zmq (assoc-ref inputs "guile-simple-zmq"))
+ (deps (list json zmq))
+ (dir (string-append
+ out "/share/jupyter/kernels/guile"))
+ (effective (target-guile-effective-version)))
+ ;; Install kernel.
+ (install-file "src/kernel.json" dir)
+
+ ;; Fix hard-coded file name in the kernel.
+ (substitute* (string-append dir "/kernel.json")
+ (("/home/.*/guile-jupyter-kernel.scm")
+ (string-append out "/share/guile/site/"
+ (target-guile-effective-version)
+ "/guile-jupyter-kernel.scm"))
+ (("\"guile\"")
+ (string-append "\"" (assoc-ref inputs "guile")
+ "/bin/guile\""))
+ (("-s")
+ ;; Add '-L' and '-C' flags so that the kernel
+ ;; finds its dependencies.
+ (let ((-L (map (lambda (item)
+ (string-append "\"" item
+ "/share/guile/site/"
+ effective "\""))
+ deps))
+ (-C (map (lambda (item)
+ (string-append "\"" item
+ "/lib/guile/"
+ effective
+ "/site-ccache\""))
+ deps)))
+ (string-append "--no-auto-compile\""
+ (string-join -L ", \"-L\", "
+ 'prefix)
+ (string-join -C ", \"-C\", "
+ 'prefix)
+ ", \"-s"))))
+ #t))))))
(inputs
`(("openssl" ,openssl)
- ("guile" ,guile-2.2)))
- (propagated-inputs
- `(("guile-json" ,guile-json)
+ ("guile" ,guile-2.2)
+ ("guile-json" ,guile-json)
("guile-simple-zmq" ,guile-simple-zmq)))
(synopsis "Guile kernel for the Jupyter Notebook")
(description
using S-expressions.")
(license license:gpl3+)))
+(define-public guile-debbugs
+ (package
+ (name "guile-debbugs")
+ (version "0.0.2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/guile-debbugs/guile-debbugs-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "16l8910p57im6s3j93xhdaqvgfy6ms5n97177mrch3y961z5hy0i"))
+ (modules '((guix build utils)))
+ (snippet
+ '(substitute* "Makefile.in"
+ (("^godir = (.*)/ccache" _ prefix)
+ (string-append "godir = " prefix "/site-ccache"))))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("guile" ,guile-2.2)
+ ("pkg-config" ,pkg-config)))
+ (home-page "https://savannah.gnu.org/projects/guile-debbugs/")
+ (synopsis "Guile interface to the Debbugs bug tracking service")
+ (description
+ "This package provides a Guile library to communicate with a Debbugs bug
+tracker's SOAP service, such as @url{https://bugs.gnu.org}.")
+ (license license:gpl3+)))
+
+(define-public guile-email
+ (let ((commit "fa52eac55e5946db89621a6c583d2aa357864dee")
+ (revision "1"))
+ (package
+ (name "guile-email")
+ (version (git-version "0.1.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://git.systemreboot.net/guile-email")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1037mbz7qd9bzaqp8ysyhnl9ipd97fmj3b9jr8qfzx9179vvsj63"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("autoconf" ,autoconf)
+ ("automake" ,automake)))
+ (inputs
+ `(("guile" ,guile-2.2)))
+ (home-page "https://git.systemreboot.net/guile-email")
+ (synopsis "Guile email parser")
+ (description "This package provides an email parser written in pure
+Guile.")
+ (license license:agpl3+))))
+
+(define-public guile-debbugs-next
+ (let ((commit "75a331d561c8b6f8efcf16216dab961c17759efe")
+ (revision "1"))
+ (package (inherit guile-debbugs)
+ (name "guile-debbugs")
+ (version (git-version "0.0.3" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://git.savannah.gnu.org/git/guile-debbugs.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0br3mgbw41bpc9x57jlghl0i8dz9nl63r4wzs5l47aqszf84870y"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("texinfo" ,texinfo)))
+ (inputs
+ `(("guile" ,guile-2.2)
+ ("guile-email" ,guile-email))))))
+
+;; There has not been any release yet.
+(define-public guile-newt
+ (let ((commit "a73889c57b0572347f7641facdb1bcf08922feff")
+ (revision "2"))
+ (package
+ (name "guile-newt")
+ (version (string-append "0-" revision "." (string-take commit 9)))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.com/mothacehe/guile-newt")
+ (commit commit)))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32
+ "0k37vir22r2sq121lyy74grfai4643s7kr55z01k4j0bh27i06c3"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:make-flags
+ '("GUILE_AUTO_COMPILE=0"))) ;to prevent guild warnings
+ (inputs
+ `(("guile" ,guile-2.2)
+ ("newt" ,newt)))
+ (native-inputs
+ `(("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("pkg-config" ,pkg-config)))
+ (synopsis "Guile bindings to Newt")
+ (description
+ "This package provides bindings for Newt, a programming library for
+color text mode, widget based user interfaces. The bindings are written in pure
+Scheme by using Guile’s foreign function interface.")
+ (home-page "https://gitlab.com/mothacehe/guile-newt")
+ (license license:gpl3+))))
+
+(define-public guile-mastodon
+ (package
+ (name "guile-mastodon")
+ (version "0.0.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://framagit.org/prouby/guile-mastodon.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1vblf3d1bbwna3l09p2ap5y8ycvl549bz6whgk78imyfmn28ygry"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("pkg-config" ,pkg-config)))
+ (inputs
+ `(("guile" ,guile-2.2)
+ ("gnutls" ,gnutls)
+ ("guile-json" ,guile-json)))
+ (home-page "https://framagit.org/prouby/guile-mastodon")
+ (synopsis "Guile Mastodon REST API module")
+ (description "This package provides Guile modules to access the
+@uref{https://docs.joinmastodon.org/api/, REST API of Mastodon}, a federated
+microblogging service.")
+ (license license:gpl3+)))
+
;;; guile.scm ends here