forked from mirrors/nixpkgs
a842f0e905
- add ncurses: configure links against ncurses and fails otherwise configure: error: Could not link test program to Python. https://travis-ci.org/NixOS/nixpkgs/builds/48759067 The given hint (Maybe the main Python library has been installed in some non-standard library path) is misleading. The config.log reveals that the failure is due to missing ncurses link option - with-boost-libdir is need to find Boost::IOStreams/regex/etc. - expat/cgal are detected in /usr/lib when not specified explicitly - boost > boost159 is needed to have -lboost_python3 (and -lboost_python) - set pythonModule = Python; => inorder to be used in python.buildEnv { extraLibs = [..]; } tested on MacOSX and in a linux Docker container with: > nix-shell -I nixpkgs=. -p python2.pkgs.graph-tool > nix-shell -I nixpkgs=. -p python3.pkgs.graph-tool
56 lines
1.3 KiB
Nix
56 lines
1.3 KiB
Nix
{ stdenv, fetchurl, python, cairomm, sparsehash, pycairo, autoreconfHook,
|
|
pkgconfig, boost, expat, scipy, numpy, cgal, gmp, mpfr, lndir,
|
|
gobjectIntrospection, pygobject3, gtk3, matplotlib, ncurses }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
version = "2.26";
|
|
name = "${python.libPrefix}-graph-tool-${version}";
|
|
|
|
pythonModule = python;
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "Python module for manipulation and statistical analysis of graphs";
|
|
homepage = http://graph-tool.skewed.de/;
|
|
license = licenses.gpl3;
|
|
platforms = platforms.all;
|
|
maintainers = [ stdenv.lib.maintainers.joelmo ];
|
|
};
|
|
|
|
src = fetchurl {
|
|
url = "https://downloads.skewed.de/graph-tool/graph-tool-${version}.tar.bz2";
|
|
sha256 = "0w7pd2h8ayr88kjl82c8fdshnk6f3xslc77gy7ma09zkbvf76qnz";
|
|
};
|
|
|
|
configureFlags = [
|
|
"--with-python-module-path=$(out)/${python.sitePackages}"
|
|
"--with-boost-libdir=${boost}/lib"
|
|
"--with-expat=${expat}"
|
|
"--with-cgal=${cgal}"
|
|
"--enable-openmp"
|
|
];
|
|
|
|
nativeBuildInputs = [ autoreconfHook pkgconfig ];
|
|
buildInputs = [ ncurses ];
|
|
|
|
propagatedBuildInputs = [
|
|
boost
|
|
cgal
|
|
expat
|
|
gmp
|
|
mpfr
|
|
python
|
|
scipy
|
|
# optional
|
|
sparsehash
|
|
# drawing
|
|
cairomm
|
|
gobjectIntrospection
|
|
gtk3
|
|
pycairo
|
|
matplotlib
|
|
pygobject3
|
|
];
|
|
|
|
enableParallelBuilding = false;
|
|
}
|