diff options
author | Tobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com> | 2015-09-18 03:46:06 +0200 |
---|---|---|
committer | Tobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com> | 2015-09-18 03:46:06 +0200 |
commit | 7cfa918aac7446e0840c38141b1ed104881d2df0 (patch) | |
tree | c9e40815f859fa579f7270d75edffda54cc14ee1 /pkgs/development/tools/parsing | |
parent | 7eba250f5524ff293d65c7e6695ed354ef07e29c (diff) | |
download | nixlib-7cfa918aac7446e0840c38141b1ed104881d2df0.tar nixlib-7cfa918aac7446e0840c38141b1ed104881d2df0.tar.gz nixlib-7cfa918aac7446e0840c38141b1ed104881d2df0.tar.bz2 nixlib-7cfa918aac7446e0840c38141b1ed104881d2df0.tar.lz nixlib-7cfa918aac7446e0840c38141b1ed104881d2df0.tar.xz nixlib-7cfa918aac7446e0840c38141b1ed104881d2df0.tar.zst nixlib-7cfa918aac7446e0840c38141b1ed104881d2df0.zip |
lemon: init at 1.0
Diffstat (limited to 'pkgs/development/tools/parsing')
-rw-r--r-- | pkgs/development/tools/parsing/lemon/default.nix | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/pkgs/development/tools/parsing/lemon/default.nix b/pkgs/development/tools/parsing/lemon/default.nix new file mode 100644 index 000000000000..23d4ea911dbe --- /dev/null +++ b/pkgs/development/tools/parsing/lemon/default.nix @@ -0,0 +1,48 @@ +{ stdenv, fetchurl }: + +let + + version = "1.0"; + + srcs = { + lemon = fetchurl { + sha256 = "1grm95m2cnc61zim332g7z8nchmcy91ljf50k13lm421v0ygyyv6"; + url = "http://www.sqlite.org/src/raw/tool/lemon.c?name=039f813b520b9395740c52f9cbf36c90b5d8df03"; + name = "lemon.c"; + }; + lempar = fetchurl { + sha256 = "09nki0cwc5zrm365g6plhjxz3byhl9w117ab3yvrpds43ks1j85z"; + url = "http://www.sqlite.org/src/raw/tool/lempar.c?name=3617143ddb9b176c3605defe6a9c798793280120"; + name = "lempar.c"; + }; + }; + +in stdenv.mkDerivation { + name = "lemon-${version}"; + + phases = [ "buildPhase" "installPhase" ]; + + buildPhase = '' + sh -xc "$CC ${srcs.lemon} -o lemon" + ''; + + installPhase = '' + install -Dvm755 lemon $out/bin/lemon + install -Dvm644 ${srcs.lempar} $out/bin/lempar.c + ''; + + meta = with stdenv.lib; { + inherit version; + description = "An LALR(1) parser generator"; + longDescription = '' + The Lemon program is an LALR(1) parser generator that takes a + context-free grammar and converts it into a subroutine that will parse a + file using that grammar. Lemon is similar to the much more famous + programs "yacc" and "bison", but is not compatible with either. + ''; + homepage = http://www.hwaci.com/sw/lemon/; + license = licenses.publicDomain; + platforms = platforms.unix; + maintainers = with maintainers; [ nckx ]; + }; +} |