about summary refs log tree commit diff
path: root/pkgs/applications/search
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2024-02-25 19:23:56 +0000
committerSergei Trofimovich <slyich@gmail.com>2024-02-25 19:23:56 +0000
commit29a30806ca78e6fcffa52c9453e7e5907d247b63 (patch)
treeab749e3fd4c77bc255545fa5f557c8bfa6e2f633 /pkgs/applications/search
parentad87500e1bc8fe24bef694a66974a1416152ae16 (diff)
re-isearch: fix `gcc-13` build
Without the change the build fails in `master` as
https://hydra.nixos.org/build/250983051:

    ../src/mmap.cxx:29:19: error: 'SIZE_MAX' was not declared in this scope
       29 | # define MMAP_MAX SIZE_MAX/4L
          |                   ^~~~~~~~
Diffstat (limited to 'pkgs/applications/search')
-rw-r--r--pkgs/applications/search/re-isearch/default.nix7
1 files changed, 6 insertions, 1 deletions
diff --git a/pkgs/applications/search/re-isearch/default.nix b/pkgs/applications/search/re-isearch/default.nix
index 85f2186efade4..45dbedcd466d3 100644
--- a/pkgs/applications/search/re-isearch/default.nix
+++ b/pkgs/applications/search/re-isearch/default.nix
@@ -11,6 +11,11 @@ stdenv.mkDerivation rec {
     sha256 = "sha256-D0PDqlWzIOHqdS2MlNzR2T5cyhiLcFlf30v6eFokoRQ=";
   };
 
+  postPatch = ''
+    # Fix gcc-13 build due to missing <cstdint> include.
+    sed -e '1i #include <cstdint>' -i src/mmap.cxx
+  '';
+
   buildinputs = [
     db
     file # libmagic
@@ -25,7 +30,7 @@ stdenv.mkDerivation rec {
   preBuild = ''
     cd build
     makeFlagsArray+=(
-      EXTRA_INC="-I${db.dev}/include -I${file}/include"
+      EXTRA_INC="-I${db.dev}/include -I${lib.getDev file}/include"
       LD_PATH="-L../lib -L${db.out}/lib -L${file}/lib -L${libnsl}/lib"
     )
   '';