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
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "rapidfuzz-cpp";
|
2022-11-21 17:40:18 +00:00
|
|
|
version = "1.10.1";
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "maxbachmann";
|
|
|
|
repo = "rapidfuzz-cpp";
|
|
|
|
rev = "v${version}";
|
2022-11-21 17:40:18 +00:00
|
|
|
hash = "sha256-c9ESzsDcoUw5XAEZDHdG8jazjI5Oyqic1gaT0qGQsbI=";
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
patches = [
|
2022-06-16 17:23:12 +00:00
|
|
|
./dont-fetch-project-options.patch
|
|
|
|
];
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = lib.optionals doCheck [
|
|
|
|
"-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"
|
|
|
|
];
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
checkInputs = [
|
2022-06-16 17:23:12 +00:00
|
|
|
catch2_3
|
2022-04-27 09:35:20 +00:00
|
|
|
];
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
doCheck = true;
|
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";
|
2022-06-26 10:26:21 +00:00
|
|
|
changelog = "https://github.com/maxbachmann/rapidfuzz-cpp/blob/${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;
|
|
|
|
};
|
|
|
|
}
|