2022-04-27 09:35:20 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
2022-06-16 17:23:12 +00:00
|
|
|
, catch2_3
|
2022-04-27 09:35:20 +00:00
|
|
|
}:
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2022-04-27 09:35:20 +00:00
|
|
|
pname = "rapidfuzz-cpp";
|
2023-08-10 07:59:29 +00:00
|
|
|
version = "2.0.0";
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "maxbachmann";
|
|
|
|
repo = "rapidfuzz-cpp";
|
2023-04-12 12:48:02 +00:00
|
|
|
rev = "v${finalAttrs.version}";
|
2023-08-10 07:59:29 +00:00
|
|
|
hash = "sha256-gLiITRCxX3nkzrlvU1/ZPxEo2v7q79/MwrnURUjrY28=";
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
];
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
cmakeFlags = lib.optionals finalAttrs.finalPackage.doCheck [
|
2022-04-27 09:35:20 +00:00
|
|
|
"-DRAPIDFUZZ_BUILD_TESTING=ON"
|
|
|
|
];
|
|
|
|
|
2022-11-02 22:02:43 +00:00
|
|
|
CXXFLAGS = lib.optionals stdenv.cc.isClang [
|
|
|
|
# error: no member named 'fill' in namespace 'std'
|
|
|
|
"-include algorithm"
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-06-16 17:23:12 +00:00
|
|
|
catch2_3
|
2022-04-27 09:35:20 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Rapid fuzzy string matching in C++ using the Levenshtein Distance";
|
|
|
|
homepage = "https://github.com/maxbachmann/rapidfuzz-cpp";
|
2023-04-12 12:48:02 +00:00
|
|
|
changelog = "https://github.com/maxbachmann/rapidfuzz-cpp/blob/${finalAttrs.src.rev}/CHANGELOG.md";
|
2022-04-27 09:35:20 +00:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ dotlambda ];
|
|
|
|
platforms = lib.platforms.unix;
|
|
|
|
};
|
2023-04-12 12:48:02 +00:00
|
|
|
})
|