mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-06-07 22:03:37 +00:00
Diff: https://github.com/facebookresearch/faiss/compare/v1.14.1...v1.14.2 Changelog: https://github.com/facebookresearch/faiss/blob/v1.14.2/CHANGELOG.md
55 lines
965 B
Nix
55 lines
965 B
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
callPackage,
|
|
faiss-build,
|
|
numpy,
|
|
packaging,
|
|
setuptools,
|
|
pip,
|
|
}:
|
|
|
|
buildPythonPackage {
|
|
inherit (faiss-build) pname version;
|
|
pyproject = true;
|
|
__structuredAttrs = true;
|
|
|
|
src = "${lib.getOutput "dist" faiss-build}";
|
|
|
|
postPatch = ''
|
|
mkdir dist
|
|
mv *.whl dist/
|
|
'';
|
|
|
|
build-system = [
|
|
setuptools
|
|
pip
|
|
];
|
|
|
|
dependencies = [
|
|
numpy
|
|
packaging
|
|
];
|
|
|
|
# E.g. cuda libraries; needed because reference scanning
|
|
# can't see inside the wheels
|
|
inherit (faiss-build) buildInputs;
|
|
|
|
dontBuild = true;
|
|
|
|
pythonImportsCheck = [ "faiss" ];
|
|
|
|
passthru = {
|
|
inherit (faiss-build) cudaSupport cudaPackages pythonSupport;
|
|
|
|
tests = {
|
|
pytest = callPackage ./pytest.nix { inherit faiss-build; };
|
|
};
|
|
};
|
|
|
|
meta = lib.pipe (faiss-build.meta or { }) [
|
|
(lib.flip removeAttrs [ "mainProgram" ])
|
|
(m: m // { description = "Bindings for faiss, the similarity search library"; })
|
|
];
|
|
}
|