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 rec { 9 pname = "jarowinkler-cpp"; 10 version = "1.0.2"; 11 12 src = fetchFromGitHub { 13 owner = "maxbachmann"; 14 repo = "jarowinkler-cpp"; 15 rev = "v${version}"; 16 hash = "sha256-GuwDSCYTfSwqTnzZSft3ufVSKL7255lVvbJhBxKxjJw="; 17 }; 18 19 nativeBuildInputs = [ 20 cmake 21 ]; 22 23 cmakeFlags = lib.optionals doCheck [ 24 "-DJARO_WINKLER_BUILD_TESTING=ON" 25 ]; 26 27 nativeCheckInputs = [ 28 catch2_3 29 ]; 30 31 doCheck = true; 32 33 meta = { 34 description = "Fast Jaro and Jaro-Winkler distance"; 35 homepage = "https://github.com/maxbachmann/jarowinkler-cpp"; 36 changelog = "https://github.com/maxbachmann/jarowinkler-cpp/blob/${src.rev}/CHANGELOG.md"; 37 license = lib.licenses.mit; 38 maintainers = with lib.maintainers; [ dotlambda ]; 39 platforms = lib.platforms.unix; 40 }; 41}