all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Christopher Allan Webber <cwebber@dustycloud.org>
To: guix-devel@gnu.org
Subject: Add guile-minikanren
Date: Wed, 22 Apr 2015 10:15:27 -0500	[thread overview]
Message-ID: <87wq14dwd9.fsf@earlgrey.lan> (raw)

[-- Attachment #1: Type: text/plain, Size: 268 bytes --]

Here's a patch to add minikanren via ijp's port to r6rs packaging to
Guix.  It's my first Guix patch... I hope I did okay!

I named it guile-minikanren which isn't really accurate.  I'm not sure
how else I could name it though?  I'd be open to suggestions!

 - Chris


[-- Attachment #2: 0001-gnu-Add-guile-minikanren.patch --]
[-- Type: text/x-diff, Size: 3924 bytes --]

From ff72111b7f65afb02f6e52f8f48cf7ae02837380 Mon Sep 17 00:00:00 2001
From: Christopher Allan Webber <cwebber@dustycloud.org>
Date: Tue, 21 Apr 2015 22:40:15 -0500
Subject: [PATCH] gnu: Add guile-minikanren.

* gnu/packages/guile.scm (guile-minikanren): New variable.
---
 AUTHORS                |  1 +
 gnu/packages/guile.scm | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 51 insertions(+)

diff --git a/AUTHORS b/AUTHORS
index fa1835b..e2dafe0 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -35,5 +35,6 @@ alphabetical order):
           David Thompson <dthompson2@worcester.edu>
            Paul van der Walt <paul@denknerd.org>
         Mark H. Weaver <mhw@netris.org>
+ Christopher A. Webber <cwebber@dustycloud.org>
            Andy Wingo <wingo@pobox.com>
         Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index c605533..86bb4da 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2015 Christopher Allan Webber <cwebber@dustycloud.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -36,7 +37,9 @@
   #:use-module (gnu packages base)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix git-download)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system trivial)
   #:use-module (guix utils)
   #:use-module (ice-9 match))
 
@@ -358,4 +361,51 @@ http:://json.org specification.  These are the main features:
 - Allows JSON pretty printing.")
     (license lgpl3+)))
 
+(define-public guile-minikanren
+  (package
+    (name "guile-minikanren")
+    (version "2012.11.07")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/ijp/minikanren.git")
+                    (commit "10d507785eab30b0f8b47bf8bb37d880731fc031")))
+              ;; sha256 goes here
+              (sha256
+               (base32
+                "00cq5k3yk58yzmjl0c3d72590xprb2cg7zvhnalql4v4f2pd8ida"))))
+    (build-system trivial-build-system)
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder
+       (begin
+         (use-modules (guix build utils))
+         (begin
+           (let* ((out (assoc-ref %outputs "out"))
+                  (package-libs-dir
+                   (string-append out "/share/guile/site/2.0/"))
+                  (source (assoc-ref %build-inputs "source"))
+                  (doc (string-append out "share/doc")))
+             (mkdir-p package-libs-dir)
+             (copy-file (string-append source "/minikanren.scm")
+                        (string-append package-libs-dir "minikanren.scm"))
+             (copy-recursively (string-append source "/minikanren")
+                               (string-append package-libs-dir "/minikanren"))
+             (mkdir-p doc)
+             (copy-file (string-append source "/COPYING")
+                        (string-append doc "/guile-minikanren")))))))
+    (native-inputs `(("guile" ,guile-2.0)))
+    (home-page "https://github.com/ijp/minikanren")
+    (synopsis "The miniKanren declarative logic system, ported to Guile")
+    (description
+     "MiniKanren is a relational programming extension to the Scheme
+programming Language, written as a smaller version of Kanren suitable for
+pedagogical purposes. It is featured in the book, The Reasoned Schemer,
+written by Dan Friedman, William Byrd, and Oleg Kiselyov.
+
+This is a port to Guile.
+
+See http://minikanren.org/ for more on miniKanren generally.")
+    (license expat)))
+
 ;;; guile.scm ends here
-- 
2.1.4


             reply	other threads:[~2015-04-22 15:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-22 15:15 Christopher Allan Webber [this message]
2015-04-23 13:17 ` Add guile-minikanren Andreas Enge
2015-04-23 13:44   ` Taylan Ulrich Bayırlı/Kammer
2015-04-23 13:46   ` Thompson, David
2015-04-23 13:52     ` Andreas Enge
2015-04-23 18:57     ` Ludovic Courtès
2015-04-23 19:48       ` Eric Bavier
2015-04-23 19:51         ` Andreas Enge
2015-04-23 21:10         ` Ludovic Courtès
2015-04-24  2:46     ` Christopher Allan Webber
2015-04-25 21:30       ` Christopher Allan Webber
2015-04-27  1:46         ` David Thompson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wq14dwd9.fsf@earlgrey.lan \
    --to=cwebber@dustycloud.org \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.