tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
cg3: 1.3.9 -> 1.5.1
emaryn
9 months ago
7ddea363
50dd5a53
+51
-51
1 changed file
expand all
collapse all
unified
split
pkgs
by-name
cg
cg3
package.nix
+51
-51
pkgs/by-name/cg/cg3/package.nix
···
7
7
cmake,
8
8
icu,
9
9
boost,
10
10
+
pkg-config,
11
11
+
sqlite,
12
12
+
cg3,
10
13
}:
11
14
12
12
-
let
13
13
-
cg3 = stdenv.mkDerivation rec {
14
14
-
pname = "cg3";
15
15
-
version = "1.3.9";
15
15
+
stdenv.mkDerivation (finalAttrs: {
16
16
+
pname = "cg3";
17
17
+
version = "1.5.1";
16
18
17
17
-
src = fetchFromGitHub {
18
18
-
owner = "GrammarSoft";
19
19
-
repo = "cg3";
20
20
-
rev = "v${version}";
21
21
-
sha256 = "sha256-TiEhhk90w5GibGZ4yalIf+4qLA8NoU6+GIPN6QNTz2A=";
22
22
-
};
19
19
+
src = fetchFromGitHub {
20
20
+
owner = "GrammarSoft";
21
21
+
repo = "cg3";
22
22
+
tag = "v${finalAttrs.version}";
23
23
+
hash = "sha256-R3ePghkr4m6FmiHfhPVdLRAJaipIBhGLOX0Hz1nNPv4=";
24
24
+
};
23
25
24
24
-
nativeBuildInputs = [
25
25
-
cmake
26
26
-
];
26
26
+
nativeBuildInputs = [
27
27
+
cmake
28
28
+
pkg-config
29
29
+
];
27
30
28
28
-
buildInputs = [
29
29
-
icu
30
30
-
boost
31
31
-
];
31
31
+
buildInputs = [
32
32
+
icu
33
33
+
boost
34
34
+
sqlite
35
35
+
];
32
36
33
33
-
doCheck = true;
37
37
+
doCheck = true;
34
38
35
35
-
postFixup = ''
36
36
-
substituteInPlace "$out"/lib/pkgconfig/cg3.pc \
37
37
-
--replace '=''${prefix}//' '=/'
38
38
-
'';
39
39
-
40
40
-
passthru.tests.minimal =
41
41
-
runCommand "${pname}-test"
42
42
-
{
43
43
-
buildInputs = [
44
44
-
cg3
45
45
-
dieHook
46
46
-
];
47
47
-
}
48
48
-
''
49
49
-
echo 'DELIMITERS = "."; ADD (tag) (*);' >grammar.cg3
50
50
-
printf '"<a>"\n\t"a" tag\n\n' >want.txt
51
51
-
printf '"<a>"\n\t"a"\n\n' | vislcg3 -g grammar.cg3 >got.txt
52
52
-
diff -s want.txt got.txt || die "Grammar application did not produce expected parse"
53
53
-
touch $out
54
54
-
'';
39
39
+
postFixup = ''
40
40
+
substituteInPlace "$out"/lib/pkgconfig/cg3.pc \
41
41
+
--replace-fail '=''${prefix}//' '=/'
42
42
+
'';
55
43
56
56
-
# TODO, consider optionals:
57
57
-
# - Enable tcmalloc unless darwin?
58
58
-
# - Enable python bindings?
44
44
+
passthru.tests.minimal =
45
45
+
runCommand "cg3-test"
46
46
+
{
47
47
+
buildInputs = [
48
48
+
cg3
49
49
+
dieHook
50
50
+
];
51
51
+
}
52
52
+
''
53
53
+
echo 'DELIMITERS = "."; ADD (tag) (*);' >grammar.cg3
54
54
+
printf '"<a>"\n\t"a" tag\n\n' >want.txt
55
55
+
printf '"<a>"\n\t"a"\n\n' | vislcg3 -g grammar.cg3 >got.txt
56
56
+
diff -s want.txt got.txt || die "Grammar application did not produce expected parse"
57
57
+
touch $out
58
58
+
'';
59
59
60
60
-
meta = with lib; {
61
61
-
homepage = "https://github.com/GrammarSoft/cg3";
62
62
-
description = "Constraint Grammar interpreter, compiler and applicator vislcg3";
63
63
-
maintainers = with maintainers; [ unhammer ];
64
64
-
license = licenses.gpl3Plus;
65
65
-
platforms = platforms.all;
66
66
-
};
60
60
+
# TODO, consider optionals:
61
61
+
# - Enable tcmalloc unless darwin?
62
62
+
# - Enable python bindings?
63
63
+
meta = {
64
64
+
homepage = "https://github.com/GrammarSoft/cg3";
65
65
+
description = "Constraint Grammar interpreter, compiler and applicator vislcg3";
66
66
+
maintainers = with lib.maintainers; [ unhammer ];
67
67
+
license = lib.licenses.gpl3Plus;
68
68
+
platforms = lib.platforms.all;
67
69
};
68
68
-
69
69
-
in
70
70
-
cg3
70
70
+
})