Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
1.7 kB · 83 lines
Nix
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384{ lib, buildPythonPackage, fetchFromGitHub,
# nativeBuildInputs cmake, pybind11,
# buildInputs abseil-cpp,
# build-system setuptools,
# dependencies absl-py, attrs, numpy, wrapt,}:buildPythonPackage rec { pname = "dm-tree"; version = "0.1.9"; pyproject = true;
src = fetchFromGitHub { owner = "deepmind"; repo = "tree"; tag = version; hash = "sha256-cHuaqA89r90TCPVHNP7B1cfK+WxqmfTXndJ/dRdmM24="; }; # Allows to forward cmake args through the conventional `cmakeFlags` postPatch = '' substituteInPlace setup.py \ --replace-fail \ "cmake_args = [" \ 'cmake_args = [ *os.environ.get("cmakeFlags", "").split(),' substituteInPlace tree/CMakeLists.txt \ --replace-fail \ "CMAKE_CXX_STANDARD 14" \ "CMAKE_CXX_STANDARD 17" ''; cmakeFlags = [ (lib.cmakeBool "USE_SYSTEM_ABSEIL" true) (lib.cmakeBool "USE_SYSTEM_PYBIND11" true) ]; dontUseCmakeConfigure = true;
nativeBuildInputs = [ cmake pybind11 ];
buildInputs = [ abseil-cpp pybind11 ];
build-system = [ setuptools ];
# It is unclear whether those are runtime dependencies or simply test dependencies # https://github.com/google-deepmind/tree/issues/127 dependencies = [ absl-py attrs numpy wrapt ];
pythonImportsCheck = [ "tree" ];
meta = { description = "Tree is a library for working with nested data structures"; homepage = "https://github.com/deepmind/tree"; changelog = "https://github.com/google-deepmind/tree/releases/tag/${version}"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [ samuela ndl ]; };}