about summary refs log tree commit diff
path: root/pkgs/development/compilers
diff options
context:
space:
mode:
authorAustin Seipp <aseipp@pobox.com>2019-03-12 00:44:08 -0500
committerAustin Seipp <aseipp@pobox.com>2019-03-12 00:45:38 -0500
commit4f74e3abcff3120b141420f264866bbbc12a2b45 (patch)
tree8b36593654ef526ba6b1286e599d07e265932ce4 /pkgs/development/compilers
parentca3b67355c92db12dedef72dbeb18ba0ec91267b (diff)
downloadnixlib-4f74e3abcff3120b141420f264866bbbc12a2b45.tar
nixlib-4f74e3abcff3120b141420f264866bbbc12a2b45.tar.gz
nixlib-4f74e3abcff3120b141420f264866bbbc12a2b45.tar.bz2
nixlib-4f74e3abcff3120b141420f264866bbbc12a2b45.tar.lz
nixlib-4f74e3abcff3120b141420f264866bbbc12a2b45.tar.xz
nixlib-4f74e3abcff3120b141420f264866bbbc12a2b45.tar.zst
nixlib-4f74e3abcff3120b141420f264866bbbc12a2b45.zip
souffle: 1.2.0 -> 1.5.1, co-maintain
Souffle has seen some significant upgrades in the past few years and now
has trimmed and replaced several of its more expensive dependencies,
such as boost, openjdk, etc.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r--pkgs/development/compilers/souffle/default.nix43
1 files changed, 28 insertions, 15 deletions
diff --git a/pkgs/development/compilers/souffle/default.nix b/pkgs/development/compilers/souffle/default.nix
index 0523e099e497..87eac5418625 100644
--- a/pkgs/development/compilers/souffle/default.nix
+++ b/pkgs/development/compilers/souffle/default.nix
@@ -1,40 +1,53 @@
 { stdenv, fetchFromGitHub
-, boost, bison, flex, openjdk, doxygen
-, perl, graphviz, ncurses, zlib, sqlite
-, autoreconfHook }:
+, perl, ncurses, zlib, sqlite, libffi
+, autoreconfHook, mcpp, bison, flex, doxygen, graphviz
+, makeWrapper
+}:
 
+
+let
+  toolsPath = stdenv.lib.makeBinPath [ mcpp ];
+in
 stdenv.mkDerivation rec {
-  version = "1.2.0";
   name    = "souffle-${version}";
+  version = "1.5.1";
 
   src = fetchFromGitHub {
     owner  = "souffle-lang";
     repo   = "souffle";
     rev    = version;
-    sha256 = "1g8yvm40h102mab8lacpl1cwgqsw1js0s1yn4l84l9fjdvlh2ygd";
+    sha256 = "06sa250z3v8hs91p6cqdzlwwaq96j6zmfrrld1fzd1b620aa5iys";
   };
 
-  nativeBuildInputs = [ autoreconfHook bison flex ];
+  nativeBuildInputs = [ autoreconfHook bison flex mcpp doxygen graphviz makeWrapper perl ];
+  buildInputs = [ ncurses zlib sqlite libffi ];
 
-  buildInputs = [
-    boost openjdk ncurses zlib sqlite doxygen perl graphviz
-  ];
+  # these propagated inputs are needed for the compiled Souffle mode to work,
+  # since generated compiler code uses them. TODO: maybe write a g++ wrapper
+  # that adds these so we can keep the propagated inputs clean?
+  propagatedBuildInputs = [ ncurses zlib sqlite libffi ];
 
+  # see 565a8e73e80a1bedbb6cc037209c39d631fc393f and parent commits upstream for
+  # Wno-error fixes
   patchPhase = ''
+    substituteInPlace ./src/Makefile.am \
+      --replace '-Werror' '-Werror -Wno-error=deprecated -Wno-error=other'
+
     substituteInPlace configure.ac \
-      --replace "m4_esyscmd([git describe --tags --abbrev=0 --always | tr -d '\n'])" "${version}"
+      --replace "m4_esyscmd([git describe --tags --always | tr -d '\n'])" "${version}"
+  '';
+
+  postInstall = ''
+    wrapProgram "$out/bin/souffle" --prefix PATH : "${toolsPath}"
   '';
 
-  # Without this, we get an obscure error about not being able to find a library version
-  # without saying what library it's looking for. Turns out it's searching global paths
-  # for boost and failing there, so we tell it what's what here.
-  configureFlags = [ "--with-boost-libdir=${boost}/lib" ];
+  outputs = [ "out" ];
 
   meta = with stdenv.lib; {
     description = "A translator of declarative Datalog programs into the C++ language";
     homepage    = "http://souffle-lang.github.io/";
     platforms   = platforms.unix;
-    maintainers = with maintainers; [ copumpkin wchresta ];
+    maintainers = with maintainers; [ thoughtpolice copumpkin wchresta ];
     license     = licenses.upl;
   };
 }