1{ stdenv, fetchFromGitHub, autoconf, automake, boost, bison, flex, openjdk, doxygen, perl, graphviz }:
2
3stdenv.mkDerivation rec {
4 version = "1.0.0";
5 name = "souffle-${version}";
6
7 src = fetchFromGitHub {
8 owner = "souffle-lang";
9 repo = "souffle";
10 rev = version;
11 sha256 = "13j14227dgxcm25z9iizcav563wg2ak9338pb03aqqz8yqxbmz4n";
12 };
13
14 buildInputs = [
15 autoconf automake boost bison flex openjdk
16 # Used for docs
17 doxygen perl graphviz
18 ];
19
20 patchPhase = ''
21 substituteInPlace configure.ac \
22 --replace "m4_esyscmd([git describe --tags --abbrev=0 | tr -d '\n'])" "${version}"
23 '';
24
25 # Without this, we get an obscure error about not being able to find a library version
26 # without saying what library it's looking for. Turns out it's searching global paths
27 # for boost and failing there, so we tell it what's what here.
28 configureFlags = [ "--with-boost-libdir=${boost}/lib" ];
29
30 preConfigure = "./bootstrap";
31
32 # in 1.0.0: parser.hh:40:0: error: unterminated #ifndef
33 enableParallelBuilding = false;
34
35 # See https://github.com/souffle-lang/souffle/issues/176
36 hardeningDisable = [ "fortify" ];
37
38 meta = with stdenv.lib; {
39 description = "A translator of declarative Datalog programs into the C++ language";
40 homepage = "http://souffle-lang.github.io/";
41 platforms = platforms.unix;
42 maintainers = with maintainers; [ copumpkin ];
43 license = licenses.upl;
44 };
45}