Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 51 lines 1.3 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5}: 6 7let 8 9 srcs = { 10 lemon = fetchurl { 11 sha256 = "1c5pk2hz7j9hix5mpc38rwnm8dnlr2jqswf4lan6v78ccbyqzkjx"; 12 url = "http://www.sqlite.org/src/raw/tool/lemon.c?name=680980c7935bfa1edec20c804c9e5ba4b1dd96f5"; 13 name = "lemon.c"; 14 }; 15 lempar = fetchurl { 16 sha256 = "1ba13a6yh9j2cs1aw2fh4dxqvgf399gxq1gpp4sh8q0f2w6qiw3i"; 17 url = "http://www.sqlite.org/src/raw/tool/lempar.c?name=01ca97f87610d1dac6d8cd96ab109ab1130e76dc"; 18 name = "lempar.c"; 19 }; 20 }; 21 22in 23stdenv.mkDerivation { 24 pname = "lemon"; 25 version = "1.69"; 26 27 dontUnpack = true; 28 29 buildPhase = '' 30 sh -xc "$CC ${srcs.lemon} -o lemon" 31 ''; 32 33 installPhase = '' 34 install -Dvm755 lemon $out/bin/lemon 35 install -Dvm644 ${srcs.lempar} $out/bin/lempar.c 36 ''; 37 38 meta = with lib; { 39 description = "LALR(1) parser generator"; 40 mainProgram = "lemon"; 41 longDescription = '' 42 The Lemon program is an LALR(1) parser generator that takes a 43 context-free grammar and converts it into a subroutine that will parse a 44 file using that grammar. Lemon is similar to the much more famous 45 programs "yacc" and "bison", but is not compatible with either. 46 ''; 47 homepage = "http://www.hwaci.com/sw/lemon/"; 48 license = licenses.publicDomain; 49 platforms = platforms.unix; 50 }; 51}