all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] gnu: guile: Add guile-irregex.
@ 2015-11-06 14:03 Christopher Allan Webber
  2015-11-06 15:15 ` Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: Christopher Allan Webber @ 2015-11-06 14:03 UTC (permalink / raw)
  To: guix-devel

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

(Oops!  I originally sent this to guile-devel!)

Irregex, packaged for Guile!  Horray!

On a side note, it would really be nice to have a
r6rs-build-system... starting to result in a lot of similar spaghetti in
a few of these packages.

I don't know how that works though, so consider that a research project
for another day.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-guile-Add-guile-irregex.patch --]
[-- Type: text/x-diff, Size: 4606 bytes --]

From 38edbac8ab42e1518424fd2da4d53ece2c96094c Mon Sep 17 00:00:00 2001
From: Christopher Allan Webber <cwebber@dustycloud.org>
Date: Thu, 5 Nov 2015 12:20:03 -0600
Subject: [PATCH] gnu: guile: Add guile-irregex.

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

diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index da75add..5f8ad73 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -478,6 +478,85 @@ slightly from miniKanren mainline.
 See http://minikanren.org/ for more on miniKanren generally.")
     (license expat)))
 
+(define-public guile-irregex
+  (package
+    (name "guile-irregex")
+    (version "0.9.3")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "http://synthcode.com/scheme/irregex/irregex-"
+                    version
+                    ".tar.gz"))
+              (sha256
+               (base32
+                "1b8jl7bycyl2ssp6sb1j24pp9hvqyxm85ki9bmwd50glyyjs5zay"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:modules ((guix build utils)
+                  (ice-9 match)
+                  ,@%gnu-build-system-modules)
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'check)
+         (delete 'configure)
+         (delete 'build)
+         (delete 'check)
+         (replace 'install
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (begin
+               (use-modules (guix build utils)
+                            (ice-9 match))
+               (let* ((out (assoc-ref outputs "out"))
+                      (module-dir (string-append out "/share/guile/site/2.0"))
+                      (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.
+                                  (unless (zero? (system* guild "compile"
+                                                          "-L" (getcwd)
+                                                          "-o" go-file
+                                                          src-file))
+                                    (error (format #f "Failed to compile ~s to ~s!"
+                                                   src-file dest-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
+     `(("guile" ,guile-2.0)))
+    (home-page "http://synthcode.com/scheme/irregex")
+    (synopsis "S-expression based regular expressions, packaged for Guile")
+    (description
+     "Irregex is an s-expression based alternative to your classic
+string-based regular expressions.  It implements SRFI 115 and is deeply
+inspired by the SCSH regular expression system.")
+    (license bsd-3)))
 
 ;; There are two guile-gdbm packages, one using the FFI and one with
 ;; direct C bindings, hence the verbose name.
-- 
2.1.4


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

* Re: [PATCH] gnu: guile: Add guile-irregex.
  2015-11-06 14:03 [PATCH] gnu: guile: Add guile-irregex Christopher Allan Webber
@ 2015-11-06 15:15 ` Ludovic Courtès
  2015-11-06 16:58   ` Christopher Allan Webber
  0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2015-11-06 15:15 UTC (permalink / raw)
  To: Christopher Allan Webber; +Cc: guix-devel

Christopher Allan Webber <cwebber@dustycloud.org> skribis:

> On a side note, it would really be nice to have a
> r6rs-build-system... starting to result in a lot of similar spaghetti in
> a few of these packages.

Is there really a standard R6 way of doing things?

I agree some factorization would be welcome anyhow!

> From 38edbac8ab42e1518424fd2da4d53ece2c96094c Mon Sep 17 00:00:00 2001
> From: Christopher Allan Webber <cwebber@dustycloud.org>
> Date: Thu, 5 Nov 2015 12:20:03 -0600
> Subject: [PATCH] gnu: guile: Add guile-irregex.
>
> * gnu/packages/guile.scm (guile-irregex): New variable.

[...]

> +     `(#:modules ((guix build utils)
> +                  (ice-9 match)
> +                  ,@%gnu-build-system-modules)

I think (guix build gnu-build-system) is enough on the 3rd line.

> +    (synopsis "S-expression based regular expressions, packaged for Guile")

I’d remove “, packaged for Guile”.

Otherwise LGTM, thank you!

Ludo’.

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

* Re: [PATCH] gnu: guile: Add guile-irregex.
  2015-11-06 15:15 ` Ludovic Courtès
@ 2015-11-06 16:58   ` Christopher Allan Webber
  2015-11-07 18:59     ` Efraim Flashner
  0 siblings, 1 reply; 5+ messages in thread
From: Christopher Allan Webber @ 2015-11-06 16:58 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

Ludovic Courtès writes:

> Christopher Allan Webber <cwebber@dustycloud.org> skribis:
>
>> On a side note, it would really be nice to have a
>> r6rs-build-system... starting to result in a lot of similar spaghetti in
>> a few of these packages.
>
> Is there really a standard R6 way of doing things?
>
> I agree some factorization would be welcome anyhow!

I don't really know, that comes from reading the Guildhall README:

  https://github.com/ijp/guildhall/blob/master/README

  > === Background ==========================================================
  > Guildhall is a port of Andreas Rottmanns Dorodango portable package manager for
  > R6RS Scheme, adapted to better fit in with Guile Scheme environments. 
  > It is compatible with the R6RS Scheme package archives that Dorodango uses.
  >
  > dorodango is (intended to be) a package manager for R6RS
  > implementations. Its main concepts are outlined in this thread:
  > <http://groups.google.com/group/ikarus-users/browse_thread/thread/fabb890e3015f6f1>.

So I've thought there's something probably, but I haven't really looked
enough...

>> +     `(#:modules ((guix build utils)
>> +                  (ice-9 match)
>> +                  ,@%gnu-build-system-modules)
>
> I think (guix build gnu-build-system) is enough on the 3rd line.

Good call.

>> +    (synopsis "S-expression based regular expressions, packaged for Guile")
>
> I’d remove “, packaged for Guile”.
>
> Otherwise LGTM, thank you!
>
> Ludo’.

Done, and pushed!

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

* Re: [PATCH] gnu: guile: Add guile-irregex.
  2015-11-06 16:58   ` Christopher Allan Webber
@ 2015-11-07 18:59     ` Efraim Flashner
  2015-11-09 15:34       ` Christopher Allan Webber
  0 siblings, 1 reply; 5+ messages in thread
From: Efraim Flashner @ 2015-11-07 18:59 UTC (permalink / raw)
  To: Christopher Allan Webber; +Cc: guix-devel

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

On Fri, 06 Nov 2015 10:58:58 -0600
Christopher Allan Webber <cwebber@dustycloud.org> wrote:

> Ludovic Courtès writes:
> 
> > Christopher Allan Webber <cwebber@dustycloud.org> skribis:
> >  
> >> On a side note, it would really be nice to have a
> >> r6rs-build-system... starting to result in a lot of similar spaghetti in
> >> a few of these packages.  
> >
> > Is there really a standard R6 way of doing things?
> >
> > I agree some factorization would be welcome anyhow!  
> 
> I don't really know, that comes from reading the Guildhall README:
> 
>   https://github.com/ijp/guildhall/blob/master/README
> 
>   > === Background ==========================================================
>   > Guildhall is a port of Andreas Rottmanns Dorodango portable package manager for
>   > R6RS Scheme, adapted to better fit in with Guile Scheme environments. 
>   > It is compatible with the R6RS Scheme package archives that Dorodango uses.
>   >
>   > dorodango is (intended to be) a package manager for R6RS
>   > implementations. Its main concepts are outlined in this thread:
>   > <http://groups.google.com/group/ikarus-users/browse_thread/thread/fabb890e3015f6f1>.  
> 
> So I've thought there's something probably, but I haven't really looked
> enough...
> 
> >> +     `(#:modules ((guix build utils)
> >> +                  (ice-9 match)
> >> +                  ,@%gnu-build-system-modules)  
> >
> > I think (guix build gnu-build-system) is enough on the 3rd line.  
> 
> Good call.
> 
> >> +    (synopsis "S-expression based regular expressions, packaged for Guile")  
> >
> > I’d remove “, packaged for Guile”.
> >
> > Otherwise LGTM, thank you!
> >
> > Ludo’.  
> 
> Done, and pushed!
> 

I see its already pushed, but when you were busy replacing everything in
gnu-build-system except for 'patch-shebang, you deleted 'check twice.

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH] gnu: guile: Add guile-irregex.
  2015-11-07 18:59     ` Efraim Flashner
@ 2015-11-09 15:34       ` Christopher Allan Webber
  0 siblings, 0 replies; 5+ messages in thread
From: Christopher Allan Webber @ 2015-11-09 15:34 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: guix-devel

Efraim Flashner writes:

> I see its already pushed, but when you were busy replacing everything in
> gnu-build-system except for 'patch-shebang, you deleted 'check twice.

Thanks for catching this... pushed a fix!

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

end of thread, other threads:[~2015-11-09 16:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-06 14:03 [PATCH] gnu: guile: Add guile-irregex Christopher Allan Webber
2015-11-06 15:15 ` Ludovic Courtès
2015-11-06 16:58   ` Christopher Allan Webber
2015-11-07 18:59     ` Efraim Flashner
2015-11-09 15:34       ` Christopher Allan Webber

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.