diff --git a/pkgs/by-name/gr/graphviz/package.nix b/pkgs/by-name/gr/graphviz/package.nix index f5686e0274d3..0ee2c6b0f129 100644 --- a/pkgs/by-name/gr/graphviz/package.nix +++ b/pkgs/by-name/gr/graphviz/package.nix @@ -22,6 +22,7 @@ libxrender, python3, withXorg ? true, + withQuartz ? false, # for passthru.tests exiv2, @@ -75,7 +76,8 @@ stdenv.mkDerivation (finalAttrs: { "--with-ltdl-lib=${libtool.lib}/lib" "--with-ltdl-include=${libtool}/include" (lib.withFeature withXorg "x") - ]; + ] + ++ optional withQuartz "--with-quartz"; enableParallelBuilding = true; strictDeps = true; diff --git a/pkgs/development/python-modules/pygraphviz/default.nix b/pkgs/development/python-modules/pygraphviz/default.nix index c6b365bf23f1..e32c63e89ef4 100644 --- a/pkgs/development/python-modules/pygraphviz/default.nix +++ b/pkgs/development/python-modules/pygraphviz/default.nix @@ -3,6 +3,7 @@ buildPythonPackage, fetchFromGitHub, replaceVars, + stdenv, graphviz, coreutils, pkg-config, @@ -11,6 +12,10 @@ pytest, }: +let + # TODO: remove once #540793 makes it to master + graphviz' = graphviz.override { withQuartz = stdenv.hostPlatform.isDarwin; }; +in buildPythonPackage (finalAttrs: { pname = "pygraphviz"; version = "2.0"; @@ -27,7 +32,7 @@ buildPythonPackage (finalAttrs: { # pygraphviz depends on graphviz executables and wc being in PATH (replaceVars ./path.patch { path = lib.makeBinPath [ - graphviz + graphviz' coreutils ]; }) @@ -38,19 +43,19 @@ buildPythonPackage (finalAttrs: { --replace-fail ', "swig>4.1.0"' "" ''; - env.GRAPHVIZ_PREFIX = graphviz; + env.GRAPHVIZ_PREFIX = graphviz'; build-system = [ setuptools ]; nativeBuildInputs = [ - graphviz # for dot + graphviz' # for dot pkg-config swig ]; - buildInputs = [ graphviz ]; + buildInputs = [ graphviz' ]; nativeCheckInputs = [ pytest ];