unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* bug#26863: guile-squee
@ 2017-05-10  6:35 Catonano
  2017-05-10  6:59 ` Catonano
  2017-06-18 11:28 ` [bug#26863] guile-squee Ricardo Wurmus
  0 siblings, 2 replies; 5+ messages in thread
From: Catonano @ 2017-05-10  6:35 UTC (permalink / raw)
  To: 26863


[-- Attachment #1.1: Type: text/plain, Size: 18 bytes --]

I hope this is ok

[-- Attachment #1.2: Type: text/html, Size: 58 bytes --]

[-- Attachment #2: 0002-gnu-Add-guile-squee.patch --]
[-- Type: text/x-patch, Size: 3772 bytes --]

From 16e30382f69a46e8d7d6299c338b76a6cd13721b Mon Sep 17 00:00:00 2001
From: Adriano Peluso <catonano@gmail.com>
Date: Wed, 10 May 2017 08:32:40 +0200
Subject: [PATCH 2/2] gnu: Add guile-squee.

* gnu/packages/guile.scm (guile-squee): New variable.
---
 gnu/packages/guile.scm | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 65 insertions(+)

diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index c7f3b8241..0dc2baab0 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -863,6 +863,71 @@ microAdapton.  Both miniAdapton and microAdapton are designed to be easy to
 understand, extend, and port to host languages other than Scheme.")
       (license license:expat))))
 
+(define-public guile-squee
+  (let ((commit "a85902a92bf6f58a1d35fd974a01ade163deda8d")
+        (revision "1"))
+    (package
+      (name "guile-squee")
+      (version (string-append "0-" revision "." (string-take commit 9)))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://notabug.org/cwebber/guile-squee.git")
+                      (commit commit)))
+                (file-name (string-append name "-" version "-checkout"))
+                (sha256
+                 (base32
+                  "0p1lpsp4kx57j3ai1dkxilm4ziavzzx8wbbc42m3hpziq0a7qz5z"))))
+      (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
+       `(("guile" ,guile-2.2)))
+      (home-page "https://notabug.org/cwebber/guile-squee")
+      (synopsis "Postgresql bindings for Guile")
+      (description "Squee is a library for connecting to the excellent
+PostgreSQL database using Guile.  It uses Guile's \"foreign function
+interface\" support, which means you don't need to compile
+anything... it all happens through the magic of dynamic linking!")
+      (license license:gpl3))))
+
+
 (define-public guile-irregex
   (package
     (name "guile-irregex")
-- 
2.12.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-06-18 14:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-10  6:35 bug#26863: guile-squee Catonano
2017-05-10  6:59 ` Catonano
2017-06-18 11:28 ` [bug#26863] guile-squee Ricardo Wurmus
2017-06-18 11:56   ` Catonano
2017-06-18 14:17     ` bug#26863: guile-squee Ricardo Wurmus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).