diff options
author | Tobias Mayer <tobim@fastmail.fm> | 2022-09-23 08:45:54 +0200 |
---|---|---|
committer | Tobias Mayer <tobim@fastmail.fm> | 2023-02-04 14:35:40 +0100 |
commit | 83f225ecbf5a7d8b82fb29da8b64533e82889633 (patch) | |
tree | 13b10237babd780b5a3d213101e7f8d01bccdd14 /pkgs/development/tools/parsing | |
parent | c6f0c2198a6e7dc655bf59a97eff6daae5c2b6bf (diff) | |
download | nixpkgs-83f225ecbf5a7d8b82fb29da8b64533e82889633.tar nixpkgs-83f225ecbf5a7d8b82fb29da8b64533e82889633.tar.gz nixpkgs-83f225ecbf5a7d8b82fb29da8b64533e82889633.tar.bz2 nixpkgs-83f225ecbf5a7d8b82fb29da8b64533e82889633.tar.lz nixpkgs-83f225ecbf5a7d8b82fb29da8b64533e82889633.tar.xz nixpkgs-83f225ecbf5a7d8b82fb29da8b64533e82889633.tar.zst nixpkgs-83f225ecbf5a7d8b82fb29da8b64533e82889633.zip |
spicy-parser-generator: init at 1.5.3
Diffstat (limited to 'pkgs/development/tools/parsing')
-rw-r--r-- | pkgs/development/tools/parsing/spicy/default.nix | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/pkgs/development/tools/parsing/spicy/default.nix b/pkgs/development/tools/parsing/spicy/default.nix new file mode 100644 index 00000000000..f379a1ed051 --- /dev/null +++ b/pkgs/development/tools/parsing/spicy/default.nix @@ -0,0 +1,67 @@ +{ lib +, stdenv +, fetchFromGitHub +, cmake +, makeWrapper +, python3 +, bison +, flex +, zlib +}: + +stdenv.mkDerivation rec { + pname = "spicy"; + version = "1.5.3"; + + strictDeps = true; + + src = fetchFromGitHub { + owner = "zeek"; + repo = "spicy"; + rev = "v${version}"; + hash = "sha256-eCF914QEBBqg3LfM3N22c7W0TMOhuHqLxncpAG+8FjU="; + fetchSubmodules = true; + }; + + nativeBuildInputs = [ + cmake + makeWrapper + python3 + ]; + + buildInputs = [ + bison + flex + zlib + ]; + + postPatch = '' + patchShebangs scripts tests/scripts + ''; + + cmakeFlags = [ + "-DHILTI_DEV_PRECOMPILE_HEADERS=OFF" + ]; + + preFixup = '' + for b in $out/bin/* + do wrapProgram "$b" --prefix PATH : "${lib.makeBinPath [ bison flex ]}" + done + ''; + + meta = with lib; { + homepage = "https://github.com/zeek/spicy"; + description = "A C++ parser generator for dissecting protocols & files"; + longDescription = '' + Spicy is a parser generator that makes it easy to create robust C++ + parsers for network protocols, file formats, and more. Spicy is a bit + like a "yacc for protocols", but it's much more than that: It's an + all-in-one system enabling developers to write attributed grammars that + describe both syntax and semantics of an input format using a single, + unified language. Think of Spicy as a domain-specific scripting language + for all your parsing needs. + ''; + license = licenses.bsd3; + maintainers = with maintainers; [ tobim ]; + }; +} |