Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
2.3 kB · 106 lines
Nix
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107{ lib, buildPythonPackage, fetchFromGitHub, nix-update-script, python,
# nativeBuildInputs cmake, doxygen, nanobind,
# propagatedBuildInputs suitesparse, eigen, jrl-cmakemodules,
# dependencies numpy,
# checkInputs pytest, scipy,}:
buildPythonPackage rec { pname = "nanoeigenpy"; version = "0.3.0"; pyproject = false; # Built with cmake
src = fetchFromGitHub { owner = "Simple-Robotics"; repo = "nanoeigenpy"; tag = "v${version}"; hash = "sha256-asDe1mrTsAxVl0gAo7zlWqQRfWYBiSLqQk1d8bEBsn4="; };
# Fix: # > PermissionError: [Errno 13] Permission denied: # > '/nix/store/…-python3-3.12.9/lib/python3.12/site-packages/nanoeigenpy.pyi' postPatch = '' substituteInPlace CMakeLists.txt --replace-fail \ "$""{Python_SITELIB}" \ "${python.sitePackages}" '';
outputs = [ "dev" "doc" "out" ];
cmakeFlags = [ (lib.cmakeBool "INSTALL_DOCUMENTATION" true) (lib.cmakeBool "BUILD_TESTING" true) (lib.cmakeBool "BUILD_WITH_CHOLMOD_SUPPORT" true) # Accelerate support in eigen requires # https://gitlab.com/libeigen/eigen/-/merge_requests/856 # which is not in the current eigen v3.4.0-unstable-2022-05-19 # (lib.cmakeBool "BUILD_WITH_ACCELERATE_SUPPORT" stdenv.hostPlatform.isDarwin) ];
strictDeps = true;
nativeBuildInputs = [ cmake doxygen nanobind ];
propagatedBuildInputs = [ suitesparse eigen jrl-cmakemodules ];
dependencies = [ numpy ];
checkInputs = [ pytest scipy ];
# Ensure the unit tests are built preInstallCheck = "make test";
pythonImportsCheck = [ "nanoeigenpy" ];
passthru.updateScript = nix-update-script { };
postFixup = '' substituteInPlace $dev/lib/cmake/nanoeigenpy/nanoeigenpyConfig.cmake \ --replace-fail $out $dev '';
meta = { description = "Support library for bindings between Eigen in C++ and Python, based on nanobind"; homepage = "https://github.com/Simple-Robotics/nanoeigenpy"; changelog = "https://github.com/Simple-Robotics/nanoeigenpy/releases/tag/${src.tag}"; license = lib.licenses.bsd3; maintainers = with lib.maintainers; [ nim65s ]; platforms = lib.platforms.unix ++ lib.platforms.windows; };}