python312Packages.icontract: relax deps (#380554)
[NixPkgs.git] / pkgs / by-name / sp / spicy-parser-generator / package.nix
blob41a2d44929e1022a36389b43eff018caefbadfc0
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   cmake,
6   makeWrapper,
7   python3,
8   bison,
9   flex,
10   zlib,
13 stdenv.mkDerivation rec {
14   pname = "spicy";
15   version = "1.12.0";
17   strictDeps = true;
19   src = fetchFromGitHub {
20     owner = "zeek";
21     repo = "spicy";
22     rev = "v${version}";
23     hash = "sha256-MLwBklSNLqx3LgNSFvo5p/MPyt/IlYGwvTbN1PJlims=";
24     fetchSubmodules = true;
25   };
27   nativeBuildInputs = [
28     bison
29     cmake
30     flex
31     makeWrapper
32     python3
33   ];
35   buildInputs = [
36     flex
37     zlib
38   ];
40   postPatch = ''
41     patchShebangs scripts tests/scripts
42   '';
44   cmakeFlags = [
45     "-DHILTI_DEV_PRECOMPILE_HEADERS=OFF"
46   ];
48   preFixup = ''
49     for b in $out/bin/*
50       do wrapProgram "$b" --prefix PATH : "${
51         lib.makeBinPath [
52           bison
53           flex
54         ]
55       }"
56     done
57   '';
59   meta = with lib; {
60     homepage = "https://github.com/zeek/spicy";
61     description = "C++ parser generator for dissecting protocols & files";
62     longDescription = ''
63       Spicy is a parser generator that makes it easy to create robust C++
64       parsers for network protocols, file formats, and more. Spicy is a bit
65       like a "yacc for protocols", but it's much more than that: It's an
66       all-in-one system enabling developers to write attributed grammars that
67       describe both syntax and semantics of an input format using a single,
68       unified language. Think of Spicy as a domain-specific scripting language
69       for all your parsing needs.
70     '';
71     license = licenses.bsd3;
72     maintainers = with maintainers; [ tobim ];
73     platforms = platforms.unix;
74   };