diff options
author | Markus Scherer <markus.f.scherer@gmail.com> | 2023-12-16 21:48:05 +0100 |
---|---|---|
committer | Austin Seipp <aseipp@pobox.com> | 2024-07-16 07:31:14 -0500 |
commit | 9a0a4ca9ce875e42c590b977b7a5521bda0e7003 (patch) | |
tree | 7ec69bba6dd9cc5686416ce3f893b85e5d306a10 /pkgs/development/compilers | |
parent | 7c037fc6311f584c06464f1d860b8d0e51289100 (diff) |
souffle: fix souffle-compile.py
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r-- | pkgs/development/compilers/souffle/default.nix | 13 | ||||
-rw-r--r-- | pkgs/development/compilers/souffle/includes.patch | 13 |
2 files changed, 23 insertions, 3 deletions
diff --git a/pkgs/development/compilers/souffle/default.nix b/pkgs/development/compilers/souffle/default.nix index dd6c11120e4d1..cacd63450c4b7 100644 --- a/pkgs/development/compilers/souffle/default.nix +++ b/pkgs/development/compilers/souffle/default.nix @@ -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; { diff --git a/pkgs/development/compilers/souffle/includes.patch b/pkgs/development/compilers/souffle/includes.patch new file mode 100644 index 0000000000000..3e37641a6cab5 --- /dev/null +++ b/pkgs/development/compilers/souffle/includes.patch @@ -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 "") |