fork
Configure Feed
Select the types of activity you want to include in your feed.
lol
fork
Configure Feed
Select the types of activity you want to include in your feed.
1{ lib, stdenv, fetchFromGitHub, fetchpatch
2, perl, ncurses, zlib, sqlite, libffi
3, autoreconfHook, mcpp, bison, flex, doxygen, graphviz
4, makeWrapper
5}:
6
7
8let
9 toolsPath = lib.makeBinPath [ mcpp ];
10in
11stdenv.mkDerivation rec {
12 pname = "souffle";
13 version = "2.0.2";
14
15 src = fetchFromGitHub {
16 owner = "souffle-lang";
17 repo = "souffle";
18 rev = version;
19 sha256 = "1fa6yssgndrln8qbbw2j7j199glxp63irfrz1c2y424rq82mm2r5";
20 };
21
22 patches = [
23 # Pull pending unstream inclusion fix for ncurses-6.3:
24 # https://github.com/souffle-lang/souffle/pull/2134
25 (fetchpatch {
26 name = "ncurses-6.3.patch";
27 url = "https://github.com/souffle-lang/souffle/commit/9e4bdf86d051ef2e1b1a1be64aff7e498fd5dd20.patch";
28 sha256 = "0jw1b6qfdf49dx2qlzn1b2yzrgpnkil4w9y3as1m28w8ws7iphpa";
29 })
30 ];
31
32 nativeBuildInputs = [ autoreconfHook bison flex mcpp doxygen graphviz makeWrapper perl ];
33 buildInputs = [ ncurses zlib sqlite libffi ];
34
35 # these propagated inputs are needed for the compiled Souffle mode to work,
36 # since generated compiler code uses them. TODO: maybe write a g++ wrapper
37 # that adds these so we can keep the propagated inputs clean?
38 propagatedBuildInputs = [ ncurses zlib sqlite libffi ];
39
40 # see 565a8e73e80a1bedbb6cc037209c39d631fc393f and parent commits upstream for
41 # Wno-error fixes
42 postPatch = ''
43 substituteInPlace ./src/Makefile.am \
44 --replace '-Werror' '-Werror -Wno-error=deprecated -Wno-error=other'
45
46 substituteInPlace configure.ac \
47 --replace "m4_esyscmd([git describe --tags --always | tr -d '\n'])" "${version}"
48 '';
49
50 postInstall = ''
51 wrapProgram "$out/bin/souffle" --prefix PATH : "${toolsPath}"
52 '';
53
54 outputs = [ "out" ];
55
56 meta = with lib; {
57 description = "A translator of declarative Datalog programs into the C++ language";
58 homepage = "https://souffle-lang.github.io/";
59 platforms = platforms.unix;
60 maintainers = with maintainers; [ thoughtpolice copumpkin wchresta ];
61 license = licenses.upl;
62 };
63}