at master 1.9 kB view raw
1{ 2 buildPythonPackage, 3 lib, 4 fetchurl, 5 stdenv, 6 7 boost, 8 cairomm, 9 cgal, 10 expat, 11 gmp, 12 gobject-introspection, 13 gtk3, 14 llvmPackages, 15 matplotlib, 16 mpfr, 17 numpy, 18 pkg-config, 19 pycairo, 20 pygobject3, 21 python, 22 scipy, 23 sparsehash, 24 gitUpdater, 25}: 26 27let 28 boost' = boost.override { 29 enablePython = true; 30 inherit python; 31 }; 32in 33buildPythonPackage rec { 34 pname = "graph-tool"; 35 version = "2.98"; 36 format = "other"; 37 38 src = fetchurl { 39 url = "https://downloads.skewed.de/graph-tool/graph-tool-${version}.tar.bz2"; 40 hash = "sha256-7vGUi5N/XwQ3Se7nX+DG1+jwNlUdlF6dVeN4cLBsxSc="; 41 }; 42 43 postPatch = '' 44 # remove error messages about tput during build process without adding ncurses 45 substituteInPlace configure \ 46 --replace-fail 'tput setaf $1' : \ 47 --replace-fail 'tput sgr0' : 48 ''; 49 50 configureFlags = [ 51 "--with-python-module-path=$(out)/${python.sitePackages}" 52 "--with-boost-libdir=${boost'}/lib" 53 "--with-cgal=${cgal}" 54 ]; 55 56 enableParallelBuilding = true; 57 58 build-system = [ pkg-config ]; 59 60 # https://graph-tool.skewed.de/installation.html#manual-compilation 61 dependencies = [ 62 boost' 63 cairomm 64 cgal 65 expat 66 gmp 67 gobject-introspection 68 gtk3 69 matplotlib 70 mpfr 71 numpy 72 pycairo 73 pygobject3 74 scipy 75 sparsehash 76 ] 77 ++ lib.optionals stdenv.cc.isClang [ llvmPackages.openmp ]; 78 79 pythonImportsCheck = [ "graph_tool" ]; 80 81 passthru.updateScript = gitUpdater { 82 url = "https://git.skewed.de/count0/graph-tool"; 83 rev-prefix = "release-"; 84 }; 85 86 meta = { 87 description = "Python module for manipulation and statistical analysis of graphs"; 88 homepage = "https://graph-tool.skewed.de"; 89 changelog = "https://git.skewed.de/count0/graph-tool/commits/release-${version}"; 90 license = lib.licenses.lgpl3Plus; 91 maintainers = [ lib.maintainers.mjoerg ]; 92 }; 93}