Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at gcc-offload 93 lines 1.9 kB view raw
1{ 2 buildPythonPackage, 3 lib, 4 fetchurl, 5 stdenv, 6 7 boost185, 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 # graph-tool doesn't build against boost181 on Darwin 29 boost = boost185.override { 30 enablePython = true; 31 inherit python; 32 }; 33in 34buildPythonPackage rec { 35 pname = "graph-tool"; 36 version = "2.80"; 37 format = "other"; 38 39 src = fetchurl { 40 url = "https://downloads.skewed.de/graph-tool/graph-tool-${version}.tar.bz2"; 41 hash = "sha256-wacOB12+co+tJdw/WpqVl4gKbW/2hDW5HSHwtE742+Y="; 42 }; 43 44 postPatch = '' 45 # remove error messages about tput during build process without adding ncurses 46 substituteInPlace configure \ 47 --replace-fail 'tput setaf $1' : \ 48 --replace-fail 'tput sgr0' : 49 ''; 50 51 configureFlags = [ 52 "--with-python-module-path=$(out)/${python.sitePackages}" 53 "--with-boost-libdir=${boost}/lib" 54 "--with-cgal=${cgal}" 55 ]; 56 57 enableParallelBuilding = true; 58 59 build-system = [ pkg-config ]; 60 61 # https://graph-tool.skewed.de/installation.html#manual-compilation 62 dependencies = [ 63 boost 64 cairomm 65 cgal 66 expat 67 gmp 68 gobject-introspection 69 gtk3 70 matplotlib 71 mpfr 72 numpy 73 pycairo 74 pygobject3 75 scipy 76 sparsehash 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}