{,python3Packages.}numkong: init at 7.7.0

This commit is contained in:
Sandro Jäckel
2026-06-09 18:53:44 +02:00
parent ab5f04b886
commit dd1e8697e4
3 changed files with 92 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
{
lib,
cmake,
fetchFromGitHub,
stdenv,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "numkong";
version = "7.7.0";
outputs = [
"out"
"lib"
"dev"
];
__structuredAttrs = true;
strictDeps = true;
src = fetchFromGitHub {
owner = "ashvardanian";
repo = "NumKong";
tag = "v${finalAttrs.version}";
hash = "sha256-JZafqqq3jDX+iim2DvyuavuvZ0wrPLIU+hcrOiT1L84=";
};
nativeBuildInputs = [ cmake ];
meta = {
description = "Portable mixed-precision math, linear-algebra, & retrieval library with 2000+ SIMD kernels for x86, Arm, RISC-V, LoongArch, Power, & WebAssembly";
homepage = "https://github.com/ashvardanian/NumKong/";
changelog = "https://github.com/ashvardanian/NumKong/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ SuperSandro2000 ];
};
})
@@ -0,0 +1,53 @@
{
lib,
buildPythonPackage,
llvmPackages,
ml-dtypes,
numpy,
pkgs,
pytest-repeat,
pytest-xdist,
pytestCheckHook,
scipy,
setuptools,
stdenv,
}:
buildPythonPackage {
inherit (pkgs.numkong) pname version src;
pyproject = true;
build-system = [
setuptools
];
buildInputs = lib.optional stdenv.hostPlatform.isDarwin llvmPackages.openmp;
pythonImportsCheck = [ "numkong" ];
nativeCheckInputs = [
numpy
scipy
ml-dtypes
pytest-repeat
pytest-xdist
pytestCheckHook
# there are more tests for big libraries, but we avoid them to not explode the closure size
];
disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [
# slight floating point error
"test/test_similarities.py::test_cdist_float_accuracy"
"test/test_similarities.py::test_cdist_jaccard"
];
meta = {
inherit (pkgs.numkong.meta)
description
homepage
changelog
license
maintainers
;
};
}
+2
View File
@@ -11458,6 +11458,8 @@ self: super: with self; {
numexpr = callPackage ../development/python-modules/numexpr { };
numkong = callPackage ../development/python-modules/numkong { };
numpy = numpy_2;
numpy-financial = callPackage ../development/python-modules/numpy-financial { };