mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-29 18:33:00 +00:00
souffle: fix souffle-compile.py
This commit is contained in:
parent
7c037fc631
commit
9a0a4ca9ce
@ -1,12 +1,12 @@
|
||||
{ lib, stdenv, fetchFromGitHub
|
||||
, bash-completion, perl, ncurses, zlib, sqlite, libffi
|
||||
, mcpp, cmake, bison, flex, doxygen, graphviz
|
||||
, makeWrapper
|
||||
, makeWrapper, python3
|
||||
}:
|
||||
|
||||
|
||||
let
|
||||
toolsPath = lib.makeBinPath [ mcpp ];
|
||||
toolsPath = lib.makeBinPath [ mcpp python3 ];
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "souffle";
|
||||
@ -21,12 +21,13 @@ stdenv.mkDerivation rec {
|
||||
|
||||
patches = [
|
||||
./threads.patch
|
||||
./includes.patch
|
||||
];
|
||||
|
||||
hardeningDisable = lib.optionals stdenv.isDarwin [ "strictoverflow" ];
|
||||
|
||||
nativeBuildInputs = [ bison cmake flex mcpp doxygen graphviz makeWrapper perl ];
|
||||
buildInputs = [ bash-completion ncurses zlib sqlite libffi ];
|
||||
buildInputs = [ bash-completion ncurses zlib sqlite libffi python3 ];
|
||||
# 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?
|
||||
@ -42,6 +43,12 @@ stdenv.mkDerivation rec {
|
||||
wrapProgram "$out/bin/souffle" --prefix PATH : "${toolsPath}"
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
substituteInPlace "$out/bin/souffle-compile.py" \
|
||||
--replace "-IPLACEHOLDER_FOR_INCLUDES_THAT_ARE_SET_BY_NIXPKGS" \
|
||||
"-I${ncurses.dev}/include -I${zlib.dev}/include -I${sqlite.dev}/include -I${libffi.dev}/include -I$out/include"
|
||||
'';
|
||||
|
||||
outputs = [ "out" ];
|
||||
|
||||
meta = with lib; {
|
||||
|
13
pkgs/development/compilers/souffle/includes.patch
Normal file
13
pkgs/development/compilers/souffle/includes.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index 946a1f8..bc60339 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -428,7 +428,7 @@ set(SOUFFLE_COMPILED_RELEASE_CXX_FLAGS ${CMAKE_CXX_FLAGS_RELEASE})
|
||||
set(SOUFFLE_COMPILED_DEBUG_CXX_FLAGS ${CMAKE_CXX_FLAGS_DEBUG})
|
||||
get_target_property(SOUFFLE_COMPILED_DEFS compiled COMPILE_DEFINITIONS)
|
||||
get_target_property(SOUFFLE_COMPILED_OPTS compiled COMPILE_OPTIONS)
|
||||
-get_target_property(SOUFFLE_COMPILED_INCS compiled INCLUDE_DIRECTORIES)
|
||||
+set(SOUFFLE_COMPILED_INCS PLACEHOLDER_FOR_INCLUDES_THAT_ARE_SET_BY_NIXPKGS)
|
||||
|
||||
set(SOUFFLE_COMPILED_LIBS "")
|
||||
set(SOUFFLE_COMPILED_RPATHS "")
|
Loading…
Reference in New Issue
Block a user