Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
1.3 kB · 63 lines
Nix
at litex
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364{ lib, stdenv, buildPythonPackage, fetchFromGitHub, pythonOlder, cmake, cython, pytestCheckHook, rapidfuzz, rapidfuzz-cpp, scikit-build}:
buildPythonPackage rec { pname = "levenshtein"; version = "0.21.0"; format = "pyproject";
disabled = pythonOlder "3.6";
src = fetchFromGitHub { owner = "maxbachmann"; repo = "Levenshtein"; rev = "refs/tags/v${version}"; hash = "sha256-j28OQkJymkh6tIGYLoZLad7OUUImjZqXdqM2zU3haac="; };
nativeBuildInputs = [ cmake cython scikit-build ];
dontUseCmakeConfigure = true;
buildInputs = [ rapidfuzz-cpp ];
env.NIX_CFLAGS_COMPILE = toString (lib.optionals (stdenv.cc.isClang && stdenv.isDarwin) [ "-fno-lto" # work around https://github.com/NixOS/nixpkgs/issues/19098 ]);
propagatedBuildInputs = [ rapidfuzz ];
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "Levenshtein" ];
meta = with lib; { description = "Functions for fast computation of Levenshtein distance and string similarity"; homepage = "https://github.com/maxbachmann/Levenshtein"; changelog = "https://github.com/maxbachmann/Levenshtein/blob/${src.rev}/HISTORY.md"; license = licenses.gpl2Plus; maintainers = with maintainers; [ fab ]; };}