1{ stdenv, fetchurl, fetchpatch, pkgconfig
2, gperf, guile, guile-lib, libffi }:
3
4with stdenv.lib;
5stdenv.mkDerivation rec {
6
7 name = "guile-reader-${version}";
8 version = "0.6.2";
9
10 src = fetchurl {
11 url = "http://download.savannah.nongnu.org/releases/guile-reader/${name}.tar.gz";
12 sha256 = "0592s2s8ampqmqwilc4fvcild6rb9gy79di6vxv5kcdmv23abkgx";
13 };
14
15 patches = [
16 (fetchpatch {
17 name = "0001-fix-prototypes.patch";
18 url = https://aur.archlinux.org/cgit/aur.git/plain/reader_flag.patch?h=guile-reader&id=63ac0413a1aa65eb6a0db57bc16ef4481b70dc31;
19 sha256 = "01ar34xgpxyli8v2bk4kj6876kyrxhxhfpv9v07lx36d254bzrjb";
20 }) ];
21
22 nativeBuildInputs = [ pkgconfig ];
23 buildInputs = [ gperf guile guile-lib libffi ];
24
25 GUILE_SITE="${guile-lib}/share/guile/site";
26
27 configureFlags = [ "--with-guilemoduledir=$(out)/share/guile/site" ];
28
29 meta = with stdenv.lib; {
30 description = "A simple framework for building readers for GNU Guile";
31 longDescription = ''
32 Guile-Reader is a simple framework for building readers for GNU
33 Guile.
34
35 The idea is to make it easy to build procedures that extend
36 Guile's read procedure. Readers supporting various syntax
37 variants can easily be written, possibly by re-using existing
38 "token readers" of a standard Scheme readers. For example, it
39 is used to implement Skribilo's R5RS-derived document syntax.
40 '';
41 homepage = https://www.gnu.org/software/guile-reader;
42 license = licenses.lgpl3Plus;
43 maintainers = with maintainers; [ AndersonTorres ];
44 platforms = platforms.gnu;
45 };
46}