summary refs log tree commit diff
path: root/pkgs/development/tools/elkhound
diff options
context:
space:
mode:
authorPeter Hoeg <peter@hoeg.com>2021-06-30 11:56:33 +0800
committerPeter Hoeg <peter@hoeg.com>2021-07-01 08:23:16 +0800
commit7046ee9476e2408f1e83746c8d4d1e2660f5914b (patch)
tree6c852302b940323ef423514f29596a301685cfd2 /pkgs/development/tools/elkhound
parent3a8d7958a610cd3fec3a6f424480f91a1b259185 (diff)
downloadnixpkgs-7046ee9476e2408f1e83746c8d4d1e2660f5914b.tar
nixpkgs-7046ee9476e2408f1e83746c8d4d1e2660f5914b.tar.gz
nixpkgs-7046ee9476e2408f1e83746c8d4d1e2660f5914b.tar.bz2
nixpkgs-7046ee9476e2408f1e83746c8d4d1e2660f5914b.tar.lz
nixpkgs-7046ee9476e2408f1e83746c8d4d1e2660f5914b.tar.xz
nixpkgs-7046ee9476e2408f1e83746c8d4d1e2660f5914b.tar.zst
nixpkgs-7046ee9476e2408f1e83746c8d4d1e2660f5914b.zip
elkhound: init at unstable-2020-04-13
Diffstat (limited to 'pkgs/development/tools/elkhound')
-rw-r--r--pkgs/development/tools/elkhound/default.nix50
1 files changed, 50 insertions, 0 deletions
diff --git a/pkgs/development/tools/elkhound/default.nix b/pkgs/development/tools/elkhound/default.nix
new file mode 100644
index 00000000000..5c29b10a613
--- /dev/null
+++ b/pkgs/development/tools/elkhound/default.nix
@@ -0,0 +1,50 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, bison
+, cmake
+, flex
+, perl
+}:
+
+stdenv.mkDerivation rec {
+  pname = "elkhound";
+  version = "unstable-2020-04-13";
+
+  src = fetchFromGitHub {
+    owner = "WeiDUorg";
+    repo = pname;
+    rev = "a7eb4bb2151c00cc080613a770d37560f62a285c";
+    sha256 = "sha256-Y96OFpBNrD3vrKoEZ4KdJuI1Q4RmYANsu7H3ZzfaA6g=";
+  };
+
+  postPatch = ''
+    patchShebangs scripts
+  '';
+
+  sourceRoot = "source/src";
+
+  nativeBuildInputs = [ bison cmake flex perl ];
+
+  installPhase = ''
+    runHook preInstall
+
+    install -Dm555 -t $out/bin ast/astgen elkhound/elkhound
+    for d in ast elkhound smbase; do
+      install -Dm444 -t $out/lib $d/*.a
+      install -Dm444 -t $out/include/$d $src/src/$d/*.h
+    done
+    install -Dm444 -t $out/share/doc/${pname} $src/src/elkhound/*.txt
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "A parser generator which emits GLR parsers, either in OCaml or C++";
+    homepage = "https://scottmcpeak.com/elkhound/";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ peterhoeg ];
+    # possibly works on Darwin
+    platforms = platforms.linux;
+  };
+}