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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

56 lines
1.7 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, fetchpatch
, bash-completion, perl, ncurses, zlib, sqlite, libffi
, mcpp, cmake, bison, flex, doxygen, graphviz
, makeWrapper
}:
2016-09-06 22:44:41 +01:00
let
toolsPath = lib.makeBinPath [ mcpp ];
in
2016-09-06 22:44:41 +01:00
stdenv.mkDerivation rec {
pname = "souffle";
2022-07-30 08:59:54 +01:00
version = "2.3";
2016-09-06 22:44:41 +01:00
src = fetchFromGitHub {
owner = "souffle-lang";
repo = "souffle";
rev = version;
2022-07-30 08:59:54 +01:00
sha256 = "sha256-wdTBSmyA2I+gaSV577NNKA2oY2fdVTGmvV7h15NY1tU=";
2016-09-06 22:44:41 +01:00
};
patches = [
./threads.patch
(fetchpatch {
name = "missing-override.patch";
url = "https://github.com/souffle-lang/souffle/commit/da2d778f0cca94f206686546fa56b9ffc738ad75.patch";
sha256 = "Oefm3vRRwOyom94oGSOK2w9m23gkbJ++9gcWrdLlkyk=";
})
];
hardeningDisable = lib.optionals stdenv.isDarwin [ "strictoverflow" ];
nativeBuildInputs = [ bison cmake flex mcpp doxygen graphviz makeWrapper perl ];
buildInputs = [ bash-completion ncurses zlib sqlite libffi ];
# 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
cmakeFlags = [ "-DSOUFFLE_GIT=OFF" ];
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 lib; {
2016-09-06 22:44:41 +01:00
description = "A translator of declarative Datalog programs into the C++ language";
homepage = "https://souffle-lang.github.io/";
2016-09-06 22:44:41 +01:00
platforms = platforms.unix;
maintainers = with maintainers; [ thoughtpolice copumpkin wchresta ];
2016-09-06 22:44:41 +01:00
license = licenses.upl;
};
}