Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, stdenv 3, fetchFromGitHub 4, cmake 5, catch2_3 6}: 7 8stdenv.mkDerivation (finalAttrs: { 9 pname = "rapidfuzz-cpp"; 10 version = "1.11.3"; 11 12 src = fetchFromGitHub { 13 owner = "maxbachmann"; 14 repo = "rapidfuzz-cpp"; 15 rev = "v${finalAttrs.version}"; 16 hash = "sha256-Qqdw5dy+JUBSDpbWEh3Ap3+3h+CcNdfBL+rloRzWGEQ="; 17 }; 18 19 nativeBuildInputs = [ 20 cmake 21 ]; 22 23 cmakeFlags = lib.optionals finalAttrs.finalPackage.doCheck [ 24 "-DRAPIDFUZZ_BUILD_TESTING=ON" 25 ]; 26 27 CXXFLAGS = lib.optionals stdenv.cc.isClang [ 28 # error: no member named 'fill' in namespace 'std' 29 "-include algorithm" 30 ]; 31 32 nativeCheckInputs = [ 33 catch2_3 34 ]; 35 36 meta = { 37 description = "Rapid fuzzy string matching in C++ using the Levenshtein Distance"; 38 homepage = "https://github.com/maxbachmann/rapidfuzz-cpp"; 39 changelog = "https://github.com/maxbachmann/rapidfuzz-cpp/blob/${finalAttrs.src.rev}/CHANGELOG.md"; 40 license = lib.licenses.mit; 41 maintainers = with lib.maintainers; [ dotlambda ]; 42 platforms = lib.platforms.unix; 43 }; 44})