nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 41 lines 810 B view raw
1{ lib 2, stdenv 3, fetchFromGitHub 4, cmake 5, catch2 6}: 7 8stdenv.mkDerivation rec { 9 pname = "rapidfuzz-cpp"; 10 version = "1.0.1"; 11 12 src = fetchFromGitHub { 13 owner = "maxbachmann"; 14 repo = "rapidfuzz-cpp"; 15 rev = "v${version}"; 16 hash = "sha256-331iW0nu5MlxuKNTgMkRSASnglxn+hEWBhRMnw0lY2Y="; 17 }; 18 19 nativeBuildInputs = [ 20 cmake 21 ]; 22 23 cmakeFlags = lib.optionals doCheck [ 24 "-DRAPIDFUZZ_BUILD_TESTING=ON" 25 ]; 26 27 checkInputs = [ 28 catch2 29 ]; 30 31 # uses unreleased Catch2 version 3 32 doCheck = false; 33 34 meta = { 35 description = "Rapid fuzzy string matching in C++ using the Levenshtein Distance"; 36 homepage = "https://github.com/maxbachmann/rapidfuzz-cpp"; 37 license = lib.licenses.mit; 38 maintainers = with lib.maintainers; [ dotlambda ]; 39 platforms = lib.platforms.unix; 40 }; 41}