nixpkgs/pkgs/by-name/gr/grip-search/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

41 lines
1.1 KiB
Nix

{ lib, stdenv, fetchFromGitHub, fetchpatch, boost, pkg-config, cmake, catch2 }:
stdenv.mkDerivation rec {
pname = "grip-search";
version = "0.8";
src = fetchFromGitHub {
owner = "sc0ty";
repo = "grip";
rev = "v${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" "${version}"
'';
meta = with lib; {
description = "Fast, indexed regexp search over large file trees";
homepage = "https://github.com/sc0ty/grip";
license = licenses.gpl3;
platforms = platforms.all;
maintainers = with maintainers; [ tex ];
};
}