8 python = python3.withPackages(ps: with ps; [
13 stdenv.mkDerivation (finalAttrs: {
17 src = fetchFromGitHub {
20 rev = "refs/tags/v${finalAttrs.version}";
21 hash = "sha256-1KkAX42j/I06KO4wCnDsDifN1JiENqYKR5NNHBjyuVA=";
24 # this is a header-only library, so we don't need to build it
25 # we need `cmake` only to run tests
31 # we only want to run buildPhase when we run tests
32 dontBuild = !finalAttrs.finalPackage.doCheck;
37 install -Dm644 $src/hnswlib/*.h -t $out/include/hnswlib
46 ${python.interpreter} update_gen_data.py
59 description = "Header-only C++/python library for fast approximate nearest neighbors";
60 homepage = "https://github.com/nmslib/hnswlib";
61 changelog = "https://github.com/nmslib/hnswlib/releases/tag/${lib.removePrefix "refs/tags/" finalAttrs.src.rev}";
62 license = licenses.asl20;
63 maintainers = with maintainers; [ natsukium ];
64 platforms = platforms.unix;