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

+12 -3
+12 -3
pkgs/tools/text/grip-search/default.nix
··· 1 - { lib, stdenv, fetchFromGitHub, boost, pkg-config, cmake, catch2 }: 2 3 stdenv.mkDerivation rec { 4 pname = "grip-search"; ··· 17 18 buildInputs = [ boost ]; 19 20 - patchPhase = '' 21 - substituteInPlace src/general/config.h --replace "CUSTOM-BUILD" "${version}" 22 ''; 23 24 meta = with lib; {
··· 1 + { lib, stdenv, fetchFromGitHub, fetchpatch, boost, pkg-config, cmake, catch2 }: 2 3 stdenv.mkDerivation rec { 4 pname = "grip-search"; ··· 17 18 buildInputs = [ boost ]; 19 20 + patches = [ 21 + # Can be removed after this upstream PR gets merged: https://github.com/sc0ty/grip/pull/6 22 + (fetchpatch { 23 + name = "include-cstdint.patch"; 24 + url = "https://github.com/sc0ty/grip/commit/da37b3c805306ee4ea617ce3f1487b8ee9876e50.patch"; 25 + hash = "sha256-Xh++oDn5qn5NPgng7gfeCkO5FN9OmW+8fGhDLpAJfR8="; 26 + }) 27 + ]; 28 + 29 + postPatch = '' 30 + substituteInPlace src/general/config.h --replace-fail "CUSTOM-BUILD" "${version}" 31 ''; 32 33 meta = with lib; {