diff --git a/pkgs/development/libraries/rapidfuzz-cpp/default.nix b/pkgs/development/libraries/rapidfuzz-cpp/default.nix new file mode 100644 index 000000000000..2e1ad8080fa4 --- /dev/null +++ b/pkgs/development/libraries/rapidfuzz-cpp/default.nix @@ -0,0 +1,41 @@ +{ lib +, stdenv +, fetchFromGitHub +, cmake +, catch2 +}: + +stdenv.mkDerivation rec { + pname = "rapidfuzz-cpp"; + version = "1.0.1"; + + src = fetchFromGitHub { + owner = "maxbachmann"; + repo = "rapidfuzz-cpp"; + rev = "v${version}"; + hash = "sha256-331iW0nu5MlxuKNTgMkRSASnglxn+hEWBhRMnw0lY2Y="; + }; + + nativeBuildInputs = [ + cmake + ]; + + cmakeFlags = lib.optionals doCheck [ + "-DRAPIDFUZZ_BUILD_TESTING=ON" + ]; + + checkInputs = [ + catch2 + ]; + + # uses unreleased Catch2 version 3 + doCheck = false; + + meta = { + description = "Rapid fuzzy string matching in C++ using the Levenshtein Distance"; + homepage = "https://github.com/maxbachmann/rapidfuzz-cpp"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ dotlambda ]; + platforms = lib.platforms.unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ab6b2a15ca24..a6b96320dab5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20210,6 +20210,8 @@ with pkgs; rapidcheck = callPackage ../development/libraries/rapidcheck {}; + rapidfuzz-cpp = callPackage ../development/libraries/rapidfuzz-cpp { }; + rapidjson = callPackage ../development/libraries/rapidjson {}; rapidxml = callPackage ../development/libraries/rapidxml {};