Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
2.0 kB · 92 lines
Nix
at flake-libs
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293{ lib, stdenv, buildPythonPackage, fetchFromGitHub,
# build-system cmake, ninja, pathspec, scikit-build-core,
# dependencies eigen,
# tests pytestCheckHook, numpy, scipy, torch, tensorflow-bin, jax, jaxlib,
nanobind,}:buildPythonPackage rec { pname = "nanobind"; version = "2.7.0"; pyproject = true;
src = fetchFromGitHub { owner = "wjakob"; repo = "nanobind"; tag = "v${version}"; fetchSubmodules = true; hash = "sha256-ex5svqDp9XJtiNCxu0249ORL6LbG679U6PvKQaWANmE="; };
build-system = [ cmake ninja pathspec scikit-build-core ];
dependencies = [ eigen ];
dontUseCmakeBuildDir = true;
# nanobind check requires heavy dependencies such as tensorflow # which are less than ideal to be imported in children packages that # use it as build-system parameter. doCheck = false;
preCheck = '' # build tests make -j $NIX_BUILD_CORES '';
nativeCheckInputs = [ pytestCheckHook numpy scipy torch ] ++ lib.optionals (lib.meta.availableOn stdenv.hostPlatform tensorflow-bin) [ tensorflow-bin jax jaxlib ];
passthru.tests = { pytest = nanobind.overridePythonAttrs { doCheck = true; }; };
meta = { homepage = "https://github.com/wjakob/nanobind"; changelog = "https://github.com/wjakob/nanobind/blob/${src.tag}/docs/changelog.rst"; description = "Tiny and efficient C++/Python bindings"; longDescription = '' nanobind is a small binding library that exposes C++ types in Python and vice versa. It is reminiscent of Boost.Python and pybind11 and uses near-identical syntax. In contrast to these existing tools, nanobind is more efficient: bindings compile in a shorter amount of time, produce smaller binaries, and have better runtime performance. ''; license = lib.licenses.bsd3; maintainers = with lib.maintainers; [ parras ]; };}