git.iko.soy/typeable/nixpkgs
on master help sign in
ape: init at 6.7-131003
commit63f2c2f73f4436e5a334814c3bd0b4c88c29750e authorYurii Rashkovskii <yrashk@gmail.com> dateWed 14 Mar 2018, 13:10 (9 years ago) parent50bbc56
4 files changed+82
pkgs/applications/misc/ape/apeclex.nix+8 pkgs/applications/misc/ape/clex.nix+25 pkgs/applications/misc/ape/default.nix+45 pkgs/top-level/all-packages.nix+4
pkgs/applications/misc/ape/apeclex.nixnew file+8
@@ -0,0 +1,8 @@
1+{ stdenv, attemptoClex, callPackage }:
2+
3+callPackage ./. {
4+ pname = "ape-clex";
5+ lexicon = "${attemptoClex}/clex_lexicon.pl";
6+ description = "Parser for Attempto Controlled English (ACE) with a large lexicon (~100,000 entries)";
7+ license = with stdenv.lib; [ licenses.lgpl3 licenses.gpl3 ];
8+}
pkgs/applications/misc/ape/clex.nixnew file+25
@@ -0,0 +1,25 @@
1+{ stdenv, fetchFromGitHub }:
2+
3+stdenv.mkDerivation rec {
4+ name = "attempto-clex-${version}";
5+ version = "5133afe";
6+
7+ src = fetchFromGitHub {
8+ owner = "Attempto";
9+ repo = "Clex";
10+ rev = version;
11+ sha256 = "0p9s64g1jic213bwm6347jqckszgnni9szrrz31qjgaf32kf7nkp";
12+ };
13+
14+ installPhase = ''
15+ mkdir -p $out
16+ cp clex_lexicon.pl $out
17+ '';
18+
19+ meta = with stdenv.lib; {
20+ description = "Large lexicon for APE (~100,000 entries)";
21+ license = licenses.gpl3;
22+ platforms = platforms.unix;
23+ maintainers = with maintainers; [ yrashk ];
24+ };
25+}
pkgs/applications/misc/ape/default.nixnew file+45
@@ -0,0 +1,45 @@
1+{ stdenv, swiProlog, makeWrapper,
2+ fetchFromGitHub,
3+ lexicon ? "lexicon/clex_lexicon.pl",
4+ pname ? "ape",
5+ description ? "Parser for Attempto Controlled English (ACE)",
6+ license ? with stdenv.lib; licenses.lgpl3
7+ }:
8+
9+stdenv.mkDerivation rec {
10+ name = "${pname}-${version}";
11+ version = "6.7-131003";
12+
13+ buildInputs = [ swiProlog makeWrapper ];
14+
15+ src = fetchFromGitHub {
16+ owner = "Attempto";
17+ repo = "APE";
18+ rev = version;
19+ sha256 = "0cw47qjg4896kw3vps6rfs02asvscsqvcfdiwgfmqb3hvykb1sdx";
20+ };
21+
22+ patchPhase = ''
23+ # We move the file first to avoid "same file" error in the default case
24+ cp ${lexicon} new_lexicon.pl
25+ rm lexicon/clex_lexicon.pl
26+ cp new_lexicon.pl lexicon/clex_lexicon.pl
27+ '';
28+
29+ buildPhase = ''
30+ make build
31+ '';
32+
33+ installPhase = ''
34+ mkdir -p $out/bin
35+ cp ape.exe $out
36+ makeWrapper $out/ape.exe $out/bin/ape --add-flags ace
37+ '';
38+
39+ meta = with stdenv.lib; {
40+ description = description;
41+ license = license;
42+ platforms = platforms.unix;
43+ maintainers = with maintainers; [ yrashk ];
44+ };
45+}
pkgs/top-level/all-packages.nix+4
@@ -21457,6 +21457,10 @@ with pkgs;
2145721457
2145821458 teseq = callPackage ../applications/misc/teseq { };
2145921459
21460+ ape = callPackage ../applications/misc/ape { };
21461+ attemptoClex = callPackage ../applications/misc/ape/clex.nix { };
21462+ apeClex = callPackage ../applications/misc/ape/apeclex.nix { };
21463+
2146021464 # Unix tools
2146121465 unixtools = recurseIntoAttrs (callPackages ./unix-tools.nix { });
2146221466 inherit (unixtools) hexdump ps logger eject umount