2022-03-23 06:30:06 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub
|
|
|
|
, bash-completion, perl, ncurses, zlib, sqlite, libffi
|
|
|
|
, mcpp, cmake, bison, flex, doxygen, graphviz
|
2019-03-12 06:44:08 +01:00
|
|
|
, makeWrapper
|
|
|
|
}:
|
2016-09-06 23:44:41 +02:00
|
|
|
|
2019-03-12 06:44:08 +01:00
|
|
|
|
|
|
|
let
|
2021-01-22 12:25:31 +01:00
|
|
|
toolsPath = lib.makeBinPath [ mcpp ];
|
2019-03-12 06:44:08 +01:00
|
|
|
in
|
2016-09-06 23:44:41 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "souffle";
|
2022-07-30 09:59:54 +02:00
|
|
|
version = "2.3";
|
2016-09-06 23:44:41 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "souffle-lang";
|
|
|
|
repo = "souffle";
|
|
|
|
rev = version;
|
2022-07-30 09:59:54 +02:00
|
|
|
sha256 = "sha256-wdTBSmyA2I+gaSV577NNKA2oY2fdVTGmvV7h15NY1tU=";
|
2016-09-06 23:44:41 +02:00
|
|
|
};
|
|
|
|
|
2022-03-23 06:30:06 +01:00
|
|
|
nativeBuildInputs = [ bison cmake flex mcpp doxygen graphviz makeWrapper perl ];
|
|
|
|
buildInputs = [ bash-completion ncurses zlib sqlite libffi ];
|
2019-03-12 06:44:08 +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 23:44:41 +02:00
|
|
|
|
2022-03-23 06:30:06 +01:00
|
|
|
cmakeFlags = [ "-DSOUFFLE_GIT=OFF" ];
|
2019-03-12 06:44:08 +01:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram "$out/bin/souffle" --prefix PATH : "${toolsPath}"
|
2016-09-06 23:44:41 +02:00
|
|
|
'';
|
|
|
|
|
2019-03-12 06:44:08 +01:00
|
|
|
outputs = [ "out" ];
|
2016-09-06 23:44:41 +02:00
|
|
|
|
2021-01-22 12:25:31 +01:00
|
|
|
meta = with lib; {
|
2022-05-28 15:30:35 +02:00
|
|
|
broken = stdenv.isDarwin;
|
2016-09-06 23:44:41 +02:00
|
|
|
description = "A translator of declarative Datalog programs into the C++ language";
|
2020-01-22 11:26:22 +01:00
|
|
|
homepage = "https://souffle-lang.github.io/";
|
2016-09-06 23:44:41 +02:00
|
|
|
platforms = platforms.unix;
|
2019-03-12 06:44:08 +01:00
|
|
|
maintainers = with maintainers; [ thoughtpolice copumpkin wchresta ];
|
2016-09-06 23:44:41 +02:00
|
|
|
license = licenses.upl;
|
|
|
|
};
|
|
|
|
}
|