2022-04-23 23:24:06 +02:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
2022-06-12 22:51:20 +02:00
|
|
|
, catch2_3
|
2022-04-23 23:24:06 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "jarowinkler-cpp";
|
2022-06-25 22:13:13 +02:00
|
|
|
version = "1.0.2";
|
2022-04-23 23:24:06 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "maxbachmann";
|
|
|
|
repo = "jarowinkler-cpp";
|
|
|
|
rev = "v${version}";
|
2022-06-25 22:13:13 +02:00
|
|
|
hash = "sha256-GuwDSCYTfSwqTnzZSft3ufVSKL7255lVvbJhBxKxjJw=";
|
2022-04-23 23:24:06 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = lib.optionals doCheck [
|
2022-06-12 22:51:20 +02:00
|
|
|
"-DJARO_WINKLER_BUILD_TESTING=ON"
|
2022-04-23 23:24:06 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
2022-06-12 22:51:20 +02:00
|
|
|
catch2_3
|
2022-04-23 23:24:06 +02:00
|
|
|
];
|
|
|
|
|
2022-06-12 22:51:20 +02:00
|
|
|
doCheck = true;
|
2022-04-23 23:24:06 +02:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Fast Jaro and Jaro-Winkler distance";
|
|
|
|
homepage = "https://github.com/maxbachmann/jarowinkler-cpp";
|
2022-06-25 22:13:13 +02:00
|
|
|
changelog = "https://github.com/maxbachmann/jarowinkler-cpp/blob/${src.rev}/CHANGELOG.md";
|
2022-04-23 23:24:06 +02:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ dotlambda ];
|
|
|
|
platforms = lib.platforms.unix;
|
|
|
|
};
|
|
|
|
}
|