mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-11 20:25:32 +03:00

Diff: https://github.com/ashvardanian/stringzilla/compare/refs/tags/v3.12.4...refs/tags/v3.12.5 Changelog: https://github.com/ashvardanian/StringZilla/releases/tag/v3.12.5
51 lines
1.2 KiB
Nix
51 lines
1.2 KiB
Nix
{
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
lib,
|
|
numpy,
|
|
pytest-repeat,
|
|
pytestCheckHook,
|
|
setuptools,
|
|
stdenv,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "stringzilla";
|
|
version = "3.12.5";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ashvardanian";
|
|
repo = "stringzilla";
|
|
tag = "v${version}";
|
|
hash = "sha256-Hp66R4+gic0WstRVnutMBx8g+DMzLEnxPzt3sgvWGG4=";
|
|
};
|
|
|
|
postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
|
# error: unsupported option '-mfloat-abi=' for target 'aarch64-apple-darwin'
|
|
substituteInPlace setup.py \
|
|
--replace-fail '"-mfloat-abi=hard",' ""
|
|
'';
|
|
|
|
build-system = [
|
|
setuptools
|
|
];
|
|
|
|
pythonImportsCheck = [ "stringzilla" ];
|
|
|
|
nativeCheckInputs = [
|
|
numpy
|
|
pytest-repeat
|
|
pytestCheckHook
|
|
];
|
|
|
|
pytestFlagsArray = [ "scripts/test.py" ];
|
|
|
|
meta = {
|
|
changelog = "https://github.com/ashvardanian/StringZilla/releases/tag/${src.tag}";
|
|
description = "SIMD-accelerated string search, sort, hashes, fingerprints, & edit distances";
|
|
homepage = "https://github.com/ashvardanian/stringzilla";
|
|
license = lib.licenses.asl20;
|
|
maintainers = with lib.maintainers; [ dotlambda ];
|
|
};
|
|
}
|