tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
guile-irregex: init at 0.9.11
knightpp.bsky.social
9 months ago
711ccb63
dbc11c41
+66
1 changed file
expand all
collapse all
unified
split
pkgs
by-name
gu
guile-irregex
package.nix
+66
pkgs/by-name/gu/guile-irregex/package.nix
···
1
1
+
{
2
2
+
stdenv,
3
3
+
fetchzip,
4
4
+
mitscheme,
5
5
+
guile,
6
6
+
lib,
7
7
+
}:
8
8
+
stdenv.mkDerivation (finalAttrs: {
9
9
+
pname = "guile-irregex";
10
10
+
version = "0.9.11";
11
11
+
12
12
+
src = fetchzip {
13
13
+
url = "https://synthcode.com/scheme/irregex/irregex-${finalAttrs.version}.tar.gz";
14
14
+
hash = "sha256-abBCMNsr6GTBOm+eQWuOX8JYx/qMA/V6TwGdYRjznWU=";
15
15
+
};
16
16
+
17
17
+
strictDeps = true;
18
18
+
19
19
+
nativeBuildInputs = [
20
20
+
guile
21
21
+
mitscheme
22
22
+
];
23
23
+
24
24
+
buildInputs = [
25
25
+
guile
26
26
+
];
27
27
+
28
28
+
env.GUILE_AUTO_COMPILE = "0";
29
29
+
30
30
+
buildPhase = ''
31
31
+
runHook preBuild
32
32
+
33
33
+
site_dir="$out/share/guile/site/3.0"
34
34
+
lib_dir="$out/lib/guile/3.0/site-ccache"
35
35
+
36
36
+
mkdir -p $site_dir/rx/source
37
37
+
mkdir -p $lib_dir/rx/source
38
38
+
39
39
+
cp $src/irregex-guile.scm $site_dir/rx/irregex.scm
40
40
+
cp $src/irregex.scm $site_dir/rx/source/irregex.scm
41
41
+
cp $src/irregex-utils.scm $site_dir/rx/source/irregex-utils.scm
42
42
+
guild compile --r7rs $site_dir/rx/irregex.scm -o $lib_dir/rx/irregex.go
43
43
+
guild compile --r7rs $site_dir/rx/source/irregex.scm -o $lib_dir/rx/source/irregex.go
44
44
+
45
45
+
runHook postBuild
46
46
+
'';
47
47
+
48
48
+
dontInstall = true;
49
49
+
50
50
+
meta = {
51
51
+
description = "IrRegular Expressions";
52
52
+
longDescription = ''
53
53
+
A fully portable and efficient R[4567]RS implementation of regular expressions, supporting
54
54
+
both POSIX syntax with various (irregular) PCRE extensions, as well as SCSH's SRE syntax, with
55
55
+
various aliases for commonly used patterns. DFA matching is used when possible, otherwise a
56
56
+
closure-compiled NFA approach is used. The library makes no assumptions about the encoding of
57
57
+
strings or range of characters and can thus be used in Unicode-aware Scheme implementations.
58
58
+
Matching may be performed over standard Scheme strings, or over arbitrarily chunked streams of
59
59
+
strings.
60
60
+
'';
61
61
+
homepage = "https://synthcode.com/scheme/irregex";
62
62
+
license = lib.licenses.mit;
63
63
+
maintainers = with lib.maintainers; [ knightpp ];
64
64
+
platforms = guile.meta.platforms;
65
65
+
};
66
66
+
})