diff --git a/pkgs/development/libraries/rapidfuzz-cpp/default.nix b/pkgs/development/libraries/rapidfuzz-cpp/default.nix index 9cde99b69f06..3050d64a4fd9 100644 --- a/pkgs/development/libraries/rapidfuzz-cpp/default.nix +++ b/pkgs/development/libraries/rapidfuzz-cpp/default.nix @@ -5,14 +5,14 @@ , catch2_3 }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "rapidfuzz-cpp"; version = "1.10.4"; src = fetchFromGitHub { owner = "maxbachmann"; repo = "rapidfuzz-cpp"; - rev = "v${version}"; + rev = "v${finalAttrs.version}"; hash = "sha256-I7MdeLs+J5a57ypgUJIW0/pSFPzK4nZA4ZrVRdKX7J4="; }; @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { cmake ]; - cmakeFlags = lib.optionals doCheck [ + cmakeFlags = lib.optionals finalAttrs.finalPackage.doCheck [ "-DRAPIDFUZZ_BUILD_TESTING=ON" ]; @@ -33,14 +33,12 @@ stdenv.mkDerivation rec { catch2_3 ]; - doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; - 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"; + changelog = "https://github.com/maxbachmann/rapidfuzz-cpp/blob/${finalAttrs.src.rev}/CHANGELOG.md"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ dotlambda ]; platforms = lib.platforms.unix; }; -} +})