From a842f0e90577d2e715e5a55e3079698946b3f2b9 Mon Sep 17 00:00:00 2001 From: Alain Lehmann Date: Sun, 11 Feb 2018 14:15:28 +0100 Subject: [PATCH] graph-tool: 2.16 -> 2.26 - 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 --- .../development/python-modules/graph-tool/2.x.x.nix | 13 +++++++++---- pkgs/top-level/python-packages.nix | 4 +--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/graph-tool/2.x.x.nix b/pkgs/development/python-modules/graph-tool/2.x.x.nix index 99fe4b73cb98..b3ed1a8b6ec8 100644 --- a/pkgs/development/python-modules/graph-tool/2.x.x.nix +++ b/pkgs/development/python-modules/graph-tool/2.x.x.nix @@ -1,11 +1,13 @@ { stdenv, fetchurl, python, cairomm, sparsehash, pycairo, autoreconfHook, pkgconfig, boost, expat, scipy, numpy, cgal, gmp, mpfr, lndir, -gobjectIntrospection, pygobject3, gtk3, matplotlib }: +gobjectIntrospection, pygobject3, gtk3, matplotlib, ncurses }: stdenv.mkDerivation rec { - version = "2.16"; + 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/; @@ -16,16 +18,19 @@ stdenv.mkDerivation rec { src = fetchurl { url = "https://downloads.skewed.de/graph-tool/graph-tool-${version}.tar.bz2"; - sha256 = "03b1pmh2gvsgyq491gvskx8fwgqy9k942faymdnhwpbbbfhx911p"; + 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 = [ ]; + buildInputs = [ ncurses ]; propagatedBuildInputs = [ boost diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 515759d3e470..64a12ea69dd3 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7970,9 +7970,7 @@ in { }; }; - # py3k disabled, see https://travis-ci.org/NixOS/nixpkgs/builds/48759067 - graph-tool = if isPy3k then throw "graph-tool in Nix doesn't support py3k yet" - else callPackage ../development/python-modules/graph-tool/2.x.x.nix { boost = pkgs.boost159; }; + graph-tool = callPackage ../development/python-modules/graph-tool/2.x.x.nix { }; grappelli_safe = buildPythonPackage rec { version = "0.3.13";