at 23.11-beta 1.4 kB view raw
1{ lib 2, fetchFromGitHub 3, buildPythonPackage 4, cmake 5, boost 6, eigen 7, gmp 8, cgal_5 # see https://github.com/NixOS/nixpkgs/pull/94875 about cgal 9, mpfr 10, tbb 11, numpy 12, cython 13, pybind11 14, matplotlib 15, scipy 16, pytest 17, enableTBB ? false 18}: 19 20buildPythonPackage rec { 21 pname = "gudhi"; 22 version = "3.8.0"; 23 24 src = fetchFromGitHub { 25 owner = "GUDHI"; 26 repo = "gudhi-devel"; 27 rev = "tags/gudhi-release-${version}"; 28 fetchSubmodules = true; 29 sha256 = "sha256-f2ajy4muG9vuf4JarGWZmdk/LF9OYd2KLSaGyY6BQrY="; 30 }; 31 32 patches = [ ./remove_explicit_PYTHONPATH.patch ]; 33 34 nativeBuildInputs = [ cmake numpy cython pybind11 matplotlib ]; 35 buildInputs = [ boost eigen gmp cgal_5 mpfr ] 36 ++ lib.optionals enableTBB [ tbb ]; 37 propagatedBuildInputs = [ numpy scipy ]; 38 nativeCheckInputs = [ pytest ]; 39 40 cmakeFlags = [ 41 "-DWITH_GUDHI_PYTHON=ON" 42 "-DPython_ADDITIONAL_VERSIONS=3" 43 ]; 44 45 preBuild = '' 46 cd src/python 47 ''; 48 49 checkPhase = '' 50 rm -r gudhi 51 ${cmake}/bin/ctest --output-on-failure 52 ''; 53 54 pythonImportsCheck = [ "gudhi" "gudhi.hera" "gudhi.point_cloud" "gudhi.clustering" ]; 55 56 meta = { 57 description = "Library for Computational Topology and Topological Data Analysis (TDA)"; 58 homepage = "https://gudhi.inria.fr/python/latest/"; 59 downloadPage = "https://github.com/GUDHI/gudhi-devel"; 60 license = with lib.licenses; [ mit gpl3 ]; 61 maintainers = with lib.maintainers; [ yl3dy ]; 62 }; 63}