about summary refs log tree commit diff
path: root/pkgs/applications/misc/ape
diff options
context:
space:
mode:
authorYurii Rashkovskii <yrashk@gmail.com>2018-03-14 13:10:59 +0700
committerYurii Rashkovskii <yrashk@gmail.com>2018-05-17 21:47:43 -0700
commit63f2c2f73f4436e5a334814c3bd0b4c88c29750e (patch)
tree4204b4e1fdee272ed1a72e2854766e7afbc139d7 /pkgs/applications/misc/ape
parent50bbc56b0bd87715bc17230365fe5eb441bfac68 (diff)
downloadnixlib-63f2c2f73f4436e5a334814c3bd0b4c88c29750e.tar
nixlib-63f2c2f73f4436e5a334814c3bd0b4c88c29750e.tar.gz
nixlib-63f2c2f73f4436e5a334814c3bd0b4c88c29750e.tar.bz2
nixlib-63f2c2f73f4436e5a334814c3bd0b4c88c29750e.tar.lz
nixlib-63f2c2f73f4436e5a334814c3bd0b4c88c29750e.tar.xz
nixlib-63f2c2f73f4436e5a334814c3bd0b4c88c29750e.tar.zst
nixlib-63f2c2f73f4436e5a334814c3bd0b4c88c29750e.zip
ape: init at 6.7-131003
Diffstat (limited to 'pkgs/applications/misc/ape')
-rw-r--r--pkgs/applications/misc/ape/apeclex.nix8
-rw-r--r--pkgs/applications/misc/ape/clex.nix25
-rw-r--r--pkgs/applications/misc/ape/default.nix45
3 files changed, 78 insertions, 0 deletions
diff --git a/pkgs/applications/misc/ape/apeclex.nix b/pkgs/applications/misc/ape/apeclex.nix
new file mode 100644
index 000000000000..710ddfec9942
--- /dev/null
+++ b/pkgs/applications/misc/ape/apeclex.nix
@@ -0,0 +1,8 @@
+{ stdenv, attemptoClex, callPackage }:
+
+callPackage ./. {
+  pname = "ape-clex";
+  lexicon = "${attemptoClex}/clex_lexicon.pl";
+  description = "Parser for Attempto Controlled English (ACE) with a large lexicon (~100,000 entries)";
+  license = with stdenv.lib; [ licenses.lgpl3 licenses.gpl3 ];
+}
diff --git a/pkgs/applications/misc/ape/clex.nix b/pkgs/applications/misc/ape/clex.nix
new file mode 100644
index 000000000000..37d140e19ba3
--- /dev/null
+++ b/pkgs/applications/misc/ape/clex.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  name = "attempto-clex-${version}";
+  version = "5133afe";
+
+  src = fetchFromGitHub {
+     owner = "Attempto";
+     repo = "Clex";
+     rev = version;
+     sha256 = "0p9s64g1jic213bwm6347jqckszgnni9szrrz31qjgaf32kf7nkp";
+  };
+
+  installPhase = ''
+    mkdir -p $out
+    cp clex_lexicon.pl $out
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Large lexicon for APE (~100,000 entries)";
+    license = licenses.gpl3;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ yrashk ];
+  };
+}
diff --git a/pkgs/applications/misc/ape/default.nix b/pkgs/applications/misc/ape/default.nix
new file mode 100644
index 000000000000..e78ba2df9993
--- /dev/null
+++ b/pkgs/applications/misc/ape/default.nix
@@ -0,0 +1,45 @@
+{ stdenv, swiProlog, makeWrapper,
+  fetchFromGitHub,
+  lexicon ? "lexicon/clex_lexicon.pl",
+  pname ? "ape",
+  description ? "Parser for Attempto Controlled English (ACE)",
+  license ? with stdenv.lib; licenses.lgpl3
+  }:
+
+stdenv.mkDerivation rec {
+  name = "${pname}-${version}";
+  version = "6.7-131003";
+
+  buildInputs = [ swiProlog makeWrapper ];
+
+  src = fetchFromGitHub {
+     owner = "Attempto";
+     repo = "APE";
+     rev = version;
+     sha256 = "0cw47qjg4896kw3vps6rfs02asvscsqvcfdiwgfmqb3hvykb1sdx";
+  };
+
+  patchPhase = ''
+    # We move the file first to avoid "same file" error in the default case
+    cp ${lexicon} new_lexicon.pl
+    rm lexicon/clex_lexicon.pl
+    cp new_lexicon.pl lexicon/clex_lexicon.pl
+  '';
+
+  buildPhase = ''
+    make build
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp ape.exe $out
+    makeWrapper $out/ape.exe $out/bin/ape --add-flags ace
+  '';
+
+  meta = with stdenv.lib; {
+    description = description;
+    license = license;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ yrashk ];
+  };
+}