3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/compilers/souffle/default.nix

54 lines
1.6 KiB
Nix
Raw Normal View History

2018-05-07 06:16:50 +01:00
{ stdenv, fetchFromGitHub
, perl, ncurses, zlib, sqlite, libffi
, autoreconfHook, mcpp, bison, flex, doxygen, graphviz
, makeWrapper
}:
2016-09-06 22:44:41 +01:00
let
toolsPath = stdenv.lib.makeBinPath [ mcpp ];
in
2016-09-06 22:44:41 +01:00
stdenv.mkDerivation rec {
pname = "souffle";
version = "1.6.1";
2016-09-06 22:44:41 +01:00
src = fetchFromGitHub {
owner = "souffle-lang";
repo = "souffle";
rev = version;
sha256 = "004c5iicjnlzn1yz1k7a28s4xdqx00016rr870drdq2z30mxfgz8";
2016-09-06 22:44:41 +01:00
};
nativeBuildInputs = [ autoreconfHook bison flex mcpp doxygen graphviz makeWrapper perl ];
buildInputs = [ ncurses zlib sqlite libffi ];
2018-05-07 06:16:50 +01:00
# 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 ];
2016-09-06 22:44:41 +01:00
# see 565a8e73e80a1bedbb6cc037209c39d631fc393f and parent commits upstream for
# Wno-error fixes
2016-09-06 22:44:41 +01:00
patchPhase = ''
substituteInPlace ./src/Makefile.am \
--replace '-Werror' '-Werror -Wno-error=deprecated -Wno-error=other'
2016-09-06 22:44:41 +01:00
substituteInPlace configure.ac \
--replace "m4_esyscmd([git describe --tags --always | tr -d '\n'])" "${version}"
'';
postInstall = ''
wrapProgram "$out/bin/souffle" --prefix PATH : "${toolsPath}"
2016-09-06 22:44:41 +01:00
'';
outputs = [ "out" ];
2016-09-06 22:44:41 +01:00
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; [ thoughtpolice copumpkin wchresta ];
2016-09-06 22:44:41 +01:00
license = licenses.upl;
};
}