Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchurl, 5}: 6 7stdenv.mkDerivation rec { 8 pname = "peg"; 9 version = "0.1.20"; 10 11 src = fetchurl { 12 url = "${meta.homepage}/${pname}-${version}.tar.gz"; 13 sha256 = "sha256-uLcXvJOll2ijXWUlZ5pODOlOa/ZvkrrPKXnGR0VytFo="; 14 }; 15 16 postPatch = '' 17 substituteInPlace Makefile \ 18 --replace-fail "strip" '$(STRIP)' 19 ''; 20 21 preBuild = "makeFlagsArray+=( PREFIX=$out )"; 22 23 meta = with lib; { 24 homepage = "http://piumarta.com/software/peg/"; 25 description = "Tools for generating recursive-descent parsers: programs that perform pattern matching on text"; 26 platforms = platforms.all; 27 license = licenses.mit; 28 }; 29}