Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at litex 50 lines 1.5 kB view raw
1{ lib, stdenv, fetchFromGitHub, fetchpatch 2, bash-completion, perl, ncurses, zlib, sqlite, libffi 3, mcpp, cmake, 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.4"; 14 15 src = fetchFromGitHub { 16 owner = "souffle-lang"; 17 repo = "souffle"; 18 rev = version; 19 sha256 = "sha256-5g2Ikbfm5nQrsgGntZZ/VbjqSDOj0AP/mnH1nW2b4co="; 20 }; 21 22 patches = [ 23 ./threads.patch 24 ]; 25 26 hardeningDisable = lib.optionals stdenv.isDarwin [ "strictoverflow" ]; 27 28 nativeBuildInputs = [ bison cmake flex mcpp doxygen graphviz makeWrapper perl ]; 29 buildInputs = [ bash-completion ncurses zlib sqlite libffi ]; 30 # these propagated inputs are needed for the compiled Souffle mode to work, 31 # since generated compiler code uses them. TODO: maybe write a g++ wrapper 32 # that adds these so we can keep the propagated inputs clean? 33 propagatedBuildInputs = [ ncurses zlib sqlite libffi ]; 34 35 cmakeFlags = [ "-DSOUFFLE_GIT=OFF" ]; 36 37 postInstall = '' 38 wrapProgram "$out/bin/souffle" --prefix PATH : "${toolsPath}" 39 ''; 40 41 outputs = [ "out" ]; 42 43 meta = with lib; { 44 description = "A translator of declarative Datalog programs into the C++ language"; 45 homepage = "https://souffle-lang.github.io/"; 46 platforms = platforms.unix; 47 maintainers = with maintainers; [ thoughtpolice copumpkin wchresta ]; 48 license = licenses.upl; 49 }; 50}