depot/third_party/nixpkgs/pkgs/development/libraries/rapidfuzz-cpp/default.nix
Default email b450903751 Project import generated by Copybara.
GitOrigin-RevId: 74a1793c659d09d7cf738005308b1f86c90cb59b
2022-09-09 16:08:57 +02:00

45 lines
928 B
Nix

{ lib
, stdenv
, fetchFromGitHub
, cmake
, catch2_3
}:
stdenv.mkDerivation rec {
pname = "rapidfuzz-cpp";
version = "1.3.0";
src = fetchFromGitHub {
owner = "maxbachmann";
repo = "rapidfuzz-cpp";
rev = "v${version}";
hash = "sha256-LhMubYSq5EO4Pup+mVPQpcXwur/bPz+NZ1CcyqDt6lM=";
};
patches = [
./dont-fetch-project-options.patch
];
nativeBuildInputs = [
cmake
];
cmakeFlags = lib.optionals doCheck [
"-DRAPIDFUZZ_BUILD_TESTING=ON"
];
checkInputs = [
catch2_3
];
doCheck = true;
meta = {
description = "Rapid fuzzy string matching in C++ using the Levenshtein Distance";
homepage = "https://github.com/maxbachmann/rapidfuzz-cpp";
changelog = "https://github.com/maxbachmann/rapidfuzz-cpp/blob/${src.rev}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ dotlambda ];
platforms = lib.platforms.unix;
};
}