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-11-16 04:20:00 +00:00
|
|
|
version = "2.1.1";
|
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-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-OeGn3ks+vSHt4Kdzy6kqhpFOtjoHrbPZB1BrV6Ggzz4=";
|
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
|
|
|
})
|