diff options
author | Manuel Frischknecht | 2024-01-25 13:30:28 +0000 |
---|---|---|
committer | Manuel Frischknecht | 2024-01-25 13:30:28 +0000 |
commit | b1985fcf475e9066acd12a67b10a72891ceb14f5 (patch) | |
tree | adbe3d020c55bb90ad7596384f3fe87b2d13194e /pkgs/tools/text/grip-search | |
parent | 5465c7e2d76fc1c00a996cadc4c859ee7ea856ed (diff) |
grip-search: fix build with GCC 13
`grip-search` stopped building on GCC13 due to the standard `cstdint` header not getting transitively included through other standard headers anymore. This change pulls in a patch from an open upstream PR [1] that adds the necessary includes. Since the current `substituteInPlace` patch that to the built-in version string was overriding the `patches` phase (preventing a simple declarative listing of patches to be applied), I moved it to the `postPatch` hook instead. [1]: https://github.com/sc0ty/grip/pull/6
Diffstat (limited to 'pkgs/tools/text/grip-search')
-rw-r--r-- | pkgs/tools/text/grip-search/default.nix | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/pkgs/tools/text/grip-search/default.nix b/pkgs/tools/text/grip-search/default.nix index 57f0139dbc98..dd272af06bf3 100644 --- a/pkgs/tools/text/grip-search/default.nix +++ b/pkgs/tools/text/grip-search/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, boost, pkg-config, cmake, catch2 }: +{ lib, stdenv, fetchFromGitHub, fetchpatch, boost, pkg-config, cmake, catch2 }: stdenv.mkDerivation rec { pname = "grip-search"; @@ -17,8 +17,17 @@ stdenv.mkDerivation rec { buildInputs = [ boost ]; - patchPhase = '' - substituteInPlace src/general/config.h --replace "CUSTOM-BUILD" "${version}" + patches = [ + # Can be removed after this upstream PR gets merged: https://github.com/sc0ty/grip/pull/6 + (fetchpatch { + name = "include-cstdint.patch"; + url = "https://github.com/sc0ty/grip/commit/da37b3c805306ee4ea617ce3f1487b8ee9876e50.patch"; + hash = "sha256-Xh++oDn5qn5NPgng7gfeCkO5FN9OmW+8fGhDLpAJfR8="; + }) + ]; + + postPatch = '' + substituteInPlace src/general/config.h --replace-fail "CUSTOM-BUILD" "${version}" ''; meta = with lib; { |