@@ -0,0 +1,41 @@
1+{ stdenv, fetchFromGitHub, autoconf, automake, boost, bison, flex, openjdk, doxygen, perl, graphviz }:
2+
3+stdenv.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+ enableParallelBuilding = true;
33+
34+ meta = with stdenv.lib; {
35+ description = "A translator of declarative Datalog programs into the C++ language";
36+ homepage = "http://souffle-lang.github.io/";
37+ platforms = platforms.unix;
38+ maintainers = with maintainers; [ copumpkin ];
39+ license = licenses.upl;
40+ };
41+}