From 874e229b3f75bb43ad78ccfb3c43c511e5ac5768 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sat, 22 Jul 2017 08:44:53 +0100 Subject: WIP --- gnu/packages/guile.scm | 79 ++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 73 insertions(+), 6 deletions(-) diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm index dd852cb3e6..8163300dcc 100644 --- a/gnu/packages/guile.scm +++ b/gnu/packages/guile.scm @@ -47,6 +47,7 @@ #:use-module (gnu packages linux) #:use-module (gnu packages m4) #:use-module (gnu packages multiprecision) + #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages readline) #:use-module (gnu packages ncurses) @@ -1073,7 +1074,7 @@ Guile's foreign function interface.") (file-name (string-append name "-" version "-checkout")) (modules '((guix build utils))) (snippet - ;; Upgrade 'Makefile.am' to the current way of doing things. + ;; Upgrade 'Makefile.am' to the currxent way of doing things. '(substitute* "Makefile.am" (("TESTS_ENVIRONMENT") "TEST_LOG_COMPILER"))))) @@ -1378,18 +1379,27 @@ provides access to that interface and its types from the Scheme level.") (source (origin (method url-fetch) (uri (string-append - "http://download.gna.org/guile-dbi/guile-dbi-" + "https://github.com/opencog/guile-dbi/archive/guile-dbi-" version ".tar.gz")) (sha256 (base32 - "116njrprhgrsv1qm904sp3b02rq01fx639r433d657gyhw3x159n")))) + "0za1vs8jgr4v8xx07nnxz8x0syp98kycxsz1qiqwns2d1ipff5ls")))) (build-system gnu-build-system) + (native-inputs + `(("perl" ,perl) + ("automake" ,automake) + ("autoconf" ,autoconf) + ("texinfo" ,texinfo) + ("libtool" ,libtool))) (arguments '(#:configure-flags (list (string-append "--with-guile-site-dir=" %output "/share/guile/site/2.0")) #:phases (modify-phases %standard-phases + (add-before 'configure 'autogen + (lambda _ + (zero? (system* "sh" "autogen.sh")))) (add-after 'install 'patch-extension-path (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) @@ -1400,6 +1410,10 @@ provides access to that interface and its types from the Scheme level.") #t)))))) (propagated-inputs `(("guile" ,guile-2.0))) + (native-search-paths + (list (search-path-specification + (variable "LD_LIBRARY_PATH") + (files '("lib"))))) (synopsis "Guile database abstraction layer") (home-page "http://home.gna.org/guile-dbi/guile-dbi.html") (description @@ -1416,14 +1430,24 @@ It currently supports MySQL, Postgres and SQLite3.") (source (origin (method url-fetch) (uri (string-append - "http://download.gna.org/guile-dbi/guile-dbd-sqlite3-" + "https://github.com/opencog/guile-dbi/archive/guile-dbd-sqlite3-" version ".tar.gz")) (sha256 (base32 - "0rg71jchxd2y8x496s8zmfmikr5g8zxi8zv2ar3f7a23pph92iw2")))) + "0j9wnnjzhcfw209kxqh64rzwfr22wv9bglcfaprbh4xnff8lcz6h")))) (build-system gnu-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (add-before 'configure 'autogen + (lambda _ + (zero? (system* "sh" "autogen.sh"))))))) (native-inputs - `(("pkg-config" ,pkg-config))) + `(("pkg-config" ,pkg-config) + ("perl" ,perl) + ("automake" ,automake) + ("autoconf" ,autoconf) + ("libtool" ,libtool))) (inputs `(("sqlite" ,sqlite) ("zlib" ,(@ (gnu packages compression) zlib)))) @@ -1436,6 +1460,49 @@ It currently supports MySQL, Postgres and SQLite3.") SQL databases. This package implements the interface for SQLite.") (license license:gpl2+))) +(define-public guile-dbd-postgresql + (package + (name "guile-dbd-postgresql") + (version "2.1.6") + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/opencog/guile-dbi/archive/guile-dbd-postgresql-" + version ".tar.gz")) + (sha256 + (base32 + "00rinwifarsifl3cxkirssbr4gs78m7bqjv0bgxbdy3xsgzri5n4")))) + (build-system gnu-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'lib-pq-include + (lambda _ + (substitute* + "src/guile-dbd-postgresql.c" + (("postgresql/libpq-fe.h") + "libpq-fe.h")))) + (add-before 'configure 'autogen + (lambda _ + (zero? (system* "sh" "autogen.sh"))))))) + (native-inputs + `(("pkg-config" ,pkg-config) + ("perl" ,perl) + ("automake" ,automake) + ("autoconf" ,autoconf) + ("libtool" ,libtool))) + (inputs + `(("postgresql" ,postgresql) + ("zlib" ,zlib))) + (propagated-inputs + `(("guile-dbi" ,guile-dbi))) + (synopsis "Guile DBI driver for SQLite") + (home-page "TODO") + (description + "guile-dbi is a library for Guile that provides a convenient interface to +SQL databases. This package implements the interface for PostgreSQL.") + (license license:gpl2+))) + (define-public guile-xosd (package (name "guile-xosd") -- cgit v1.2.3