feat: add guile-srfi-197 package to (radix packages guile-xyz) module
parent
075aad264a
commit
0585e8c173
|
@ -0,0 +1,73 @@
|
||||||
|
(define-module (packages guile)
|
||||||
|
#:use-module (guix gexp)
|
||||||
|
#:use-module (guix packages)
|
||||||
|
#:use-module (guix git-download)
|
||||||
|
#:use-module (gnu packages guile)
|
||||||
|
#:use-module (guix build-system guile)
|
||||||
|
#:use-module (guix build-system trivial)
|
||||||
|
#:use-module ((guix licenses) #:prefix license:))
|
||||||
|
|
||||||
|
;; This srfi was originally packaged by Nikita Domnitskii on
|
||||||
|
;; https://git.sr.ht/~krevedkokun/dotfiles/tree/master/item/channel/packages/guile.scm
|
||||||
|
(define-public guile-srfi-197
|
||||||
|
(let ((commit "78ced23a1af519ee2969939138b3ffff442f339a")
|
||||||
|
(revision "0"))
|
||||||
|
(package
|
||||||
|
(name "guile-srfi-197")
|
||||||
|
(version (git-version "0.0.0" revision commit))
|
||||||
|
(source
|
||||||
|
(origin
|
||||||
|
(method git-fetch)
|
||||||
|
(uri (git-reference
|
||||||
|
(url "https://github.com/ar-nelson/srfi-197")
|
||||||
|
(commit commit)))
|
||||||
|
(file-name (git-file-name name version))
|
||||||
|
(sha256
|
||||||
|
(base32 "19kh6zwad6bmhj0wabgbsbkk8l48s6lrgn701afjaab2w0gb30qg"))
|
||||||
|
(snippet
|
||||||
|
#~(begin
|
||||||
|
(use-modules (ice-9 rdelim)
|
||||||
|
(ice-9 pretty-print)
|
||||||
|
(guix build utils))
|
||||||
|
(call-with-input-file "srfi-197-syntax-case.scm"
|
||||||
|
(lambda (input-port)
|
||||||
|
(with-output-to-file "tmp.scm"
|
||||||
|
(lambda ()
|
||||||
|
(pretty-print
|
||||||
|
'(define-module (srfi srfi-197)
|
||||||
|
#:use-module (rnrs base)
|
||||||
|
#:use-module (rnrs io ports)
|
||||||
|
#:use-module (rnrs syntax-case)
|
||||||
|
#:export (chain
|
||||||
|
chain-when
|
||||||
|
chain-and
|
||||||
|
chain-lambda
|
||||||
|
nest
|
||||||
|
nest-reverse)))
|
||||||
|
(newline)
|
||||||
|
(let loop ()
|
||||||
|
(let ((line (read-line input-port)))
|
||||||
|
(unless (eof-object? line)
|
||||||
|
(write-line line)
|
||||||
|
(loop))))))))
|
||||||
|
(mkdir "srfi")
|
||||||
|
(rename-file "tmp.scm" "srfi/srfi-197.scm")
|
||||||
|
(for-each delete-file
|
||||||
|
'("srfi-197-syntax-case.scm"
|
||||||
|
"srfi-197.scm"
|
||||||
|
"srfi-197.sld"
|
||||||
|
"srfi-64-minimal.scm"
|
||||||
|
"test-kawa.scm"
|
||||||
|
"test-r6rs.scm"
|
||||||
|
"test-r7rs.scm"
|
||||||
|
"test.scm"))))))
|
||||||
|
(build-system guile-build-system)
|
||||||
|
(inputs
|
||||||
|
(list guile-3.0))
|
||||||
|
(home-page "https://github.com/ar-nelson/srfi-197")
|
||||||
|
(synopsis "SRFI 197 pipeline operators port for Guile")
|
||||||
|
(description
|
||||||
|
"This package provides an implementation of SRFI 197 for Guile.
|
||||||
|
SRFI 197 defines a large set of clojure-like threading macros for
|
||||||
|
representing nested data structures and code in a more readable way.")
|
||||||
|
(license license:expat))))
|
Loading…
Reference in New Issue