nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 51 lines 1.4 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5}: 6 7let 8 9 srcs = { 10 lemon = fetchurl { 11 hash = "sha256-TXVOEtRpOhLCyi4C3RMt0lHmMp/y2K5YdL8ND6WPrOY="; 12 url = "https://www.sqlite.org/src/raw/3fdc16b23f1ea0c91c049b518fc3f75c71843dbfe2b447fcb3cd92d9e4f219f8?at=lemon.c"; 13 name = "lemon.c"; 14 }; 15 lempar = fetchurl { 16 hash = "sha256-TYKrUJHtpoljeRWZq4Y1rYLlu7LeM/HuUhe3LJZZkVo="; 17 url = "https://www.sqlite.org/src/raw/b57e1780bf8098dd4a9a5bba537f994276ea825a420f6165153e5894dc2dfb07?at=lempar.c"; 18 name = "lempar.c"; 19 }; 20 }; 21 22in 23stdenv.mkDerivation { 24 pname = "lemon"; 25 version = "1.0-unstable"; 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 = { 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 = lib.licenses.publicDomain; 49 platforms = lib.platforms.unix; 50 }; 51}