1 { lib, stdenv, fetchFromGitHub
2 , perl, ncurses, zlib, sqlite, libffi
3 , autoreconfHook, mcpp, bison, flex, doxygen, graphviz
9 toolsPath = lib.makeBinPath [ mcpp ];
11 stdenv.mkDerivation rec {
15 src = fetchFromGitHub {
16 owner = "souffle-lang";
19 sha256 = "1fa6yssgndrln8qbbw2j7j199glxp63irfrz1c2y424rq82mm2r5";
22 nativeBuildInputs = [ autoreconfHook bison flex mcpp doxygen graphviz makeWrapper perl ];
23 buildInputs = [ ncurses zlib sqlite libffi ];
25 # these propagated inputs are needed for the compiled Souffle mode to work,
26 # since generated compiler code uses them. TODO: maybe write a g++ wrapper
27 # that adds these so we can keep the propagated inputs clean?
28 propagatedBuildInputs = [ ncurses zlib sqlite libffi ];
30 # see 565a8e73e80a1bedbb6cc037209c39d631fc393f and parent commits upstream for
33 substituteInPlace ./src/Makefile.am \
34 --replace '-Werror' '-Werror -Wno-error=deprecated -Wno-error=other'
36 substituteInPlace configure.ac \
37 --replace "m4_esyscmd([git describe --tags --always | tr -d '\n'])" "${version}"
41 wrapProgram "$out/bin/souffle" --prefix PATH : "${toolsPath}"
47 description = "A translator of declarative Datalog programs into the C++ language";
48 homepage = "https://souffle-lang.github.io/";
49 platforms = platforms.unix;
50 maintainers = with maintainers; [ thoughtpolice copumpkin wchresta ];
51 license = licenses.upl;