Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 708164fe94e0
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 49a9bd626d40
Choose a head ref
  • 2 commits
  • 3 files changed
  • 2 contributors

Commits on Dec 4, 2018

  1. Copy the full SHA
    21de751 View commit details
  2. Merge pull request #51501 from timokau/pygraphviz-path

    python.pkgs.pygraphviz: add graphviz path
    Mic92 authored Dec 4, 2018

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    49a9bd6 View commit details
14 changes: 12 additions & 2 deletions pkgs/development/python-modules/pygraphviz/default.nix
Original file line number Diff line number Diff line change
@@ -13,8 +13,18 @@ buildPythonPackage rec {
buildInputs = [ doctest-ignore-unicode mock nose ];
propagatedBuildInputs = [ graphviz pkgconfig ];

# the tests are currently failing:
# check status of pygraphviz/pygraphviz#129
patches = [
# pygraphviz depends on graphviz being in PATH. This patch always prepends
# graphviz to PATH.
./graphviz-path.patch
];
postPatch = ''
substituteInPlace pygraphviz/agraph.py --subst-var-by graphvizPath '${graphviz}/bin'
'';

# The tests are currently failing because of a bug in graphviz 2.40.1.
# Upstream does not want to skip the relevant tests:
# https://github.com/pygraphviz/pygraphviz/pull/129
doCheck = false;

meta = with stdenv.lib; {
13 changes: 13 additions & 0 deletions pkgs/development/python-modules/pygraphviz/graphviz-path.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/pygraphviz/agraph.py b/pygraphviz/agraph.py
index 8f72024..2d8358e 100644
--- a/pygraphviz/agraph.py
+++ b/pygraphviz/agraph.py
@@ -1557,7 +1557,7 @@ class AGraph(object):
import os
import glob

- paths = os.environ["PATH"]
+ paths = '@graphvizPath@:' + os.environ["PATH"]
if os.name == "nt":
exe = ".exe"
else:
4 changes: 3 additions & 1 deletion pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
@@ -3033,7 +3033,9 @@ in {

graphviz = callPackage ../development/python-modules/graphviz { };

pygraphviz = callPackage ../development/python-modules/pygraphviz { };
pygraphviz = callPackage ../development/python-modules/pygraphviz {
graphviz = pkgs.graphviz; # not the python package
};

pymc3 = callPackage ../development/python-modules/pymc3 { };