Files
nixpkgs/pkgs/by-name/gr/grip-search/package.nix
Philip Taron 0b3c014369 grip-search: fix build with boost 1.89
Boost 1.89 removed the boost_system stub library. Remove the `system`
component from all find_package calls.
2026-04-06 14:08:07 -07:00

65 lines
1.5 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
boost,
pkg-config,
cmake,
catch2,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "grip-search";
version = "0.8";
src = fetchFromGitHub {
owner = "sc0ty";
repo = "grip";
rev = "v${finalAttrs.version}";
sha256 = "0bkqarylgzhis6fpj48qbifcd6a26cgnq8784hgnm707rq9kb0rx";
};
nativeBuildInputs = [
pkg-config
cmake
catch2
];
doCheck = true;
buildInputs = [ boost ];
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" "${finalAttrs.version}"
substituteInPlace CMakeLists.txt \
--replace-fail "cmake_minimum_required (VERSION 3.1)" "cmake_minimum_required(VERSION 3.10)"
# boost 1.89 removed the boost_system stub library
substituteInPlace \
src/general/CMakeLists.txt \
src/test/CMakeLists.txt \
src/gripgen/CMakeLists.txt \
src/grip/CMakeLists.txt \
--replace-fail ' system' ""
'';
meta = {
description = "Fast, indexed regexp search over large file trees";
homepage = "https://github.com/sc0ty/grip";
license = lib.licenses.gpl3;
platforms = lib.platforms.all;
maintainers = [ ];
};
})