emacsPackages.lsp-bridge: 0-unstable-2025-01-11 -> 0-unstable-2025-01-22 (#376531)
[NixPkgs.git] / pkgs / development / python-modules / graph-tool / default.nix
bloba11145e365949d4cbd4742b645e0bc30495bc314
2   buildPythonPackage,
3   lib,
4   fetchurl,
5   stdenv,
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,
27 let
28   boost' = boost.override {
29     enablePython = true;
30     inherit python;
31   };
33 buildPythonPackage rec {
34   pname = "graph-tool";
35   version = "2.85";
36   format = "other";
38   src = fetchurl {
39     url = "https://downloads.skewed.de/graph-tool/graph-tool-${version}.tar.bz2";
40     hash = "sha256-GX0JUz5G7gtLemwlY1prQvCxIxpuyclo+1LN68j2H9o=";
41   };
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   '';
50   configureFlags = [
51     "--with-python-module-path=$(out)/${python.sitePackages}"
52     "--with-boost-libdir=${boost'}/lib"
53     "--with-cgal=${cgal}"
54   ];
56   enableParallelBuilding = true;
58   build-system = [ pkg-config ];
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   ] ++ lib.optionals stdenv.cc.isClang [ llvmPackages.openmp ];
78   pythonImportsCheck = [ "graph_tool" ];
80   passthru.updateScript = gitUpdater {
81     url = "https://git.skewed.de/count0/graph-tool";
82     rev-prefix = "release-";
83   };
85   meta = {
86     description = "Python module for manipulation and statistical analysis of graphs";
87     homepage = "https://graph-tool.skewed.de";
88     changelog = "https://git.skewed.de/count0/graph-tool/commits/release-${version}";
89     license = lib.licenses.lgpl3Plus;
90     maintainers = [ lib.maintainers.mjoerg ];
91   };