summary refs log tree commit diff
path: root/pkgs/tools/graphics
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/graphics')
-rw-r--r--pkgs/tools/graphics/graphviz/default.nix10
1 files changed, 5 insertions, 5 deletions
diff --git a/pkgs/tools/graphics/graphviz/default.nix b/pkgs/tools/graphics/graphviz/default.nix
index f9fbf1f88ea7..5635e3a69ff7 100644
--- a/pkgs/tools/graphics/graphviz/default.nix
+++ b/pkgs/tools/graphics/graphviz/default.nix
@@ -38,11 +38,11 @@ stdenv.mkDerivation rec {
     ]
     ++ stdenv.lib.optional (xorg == null) "--without-x";
 
-  prePatch = stdenv.lib.optionalString stdenv.isDarwin ''
-    substituteInPlace cmd/dot/Makefile.in --replace "-lstdc++" ""
-    substituteInPlace cmd/edgepaint/Makefile.in --replace "-lstdc++" ""
-    substituteInPlace cmd/mingle/Makefile.in --replace "-lstdc++" ""
-    substituteInPlace plugin/gdiplus/Makefile.in --replace "-lstdc++" ""
+  postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
+    for foo in cmd/dot/Makefile.in cmd/edgepaint/Makefile.in \
+                    cmd/mingle/Makefile.in plugin/gdiplus/Makefile.in; do
+      substituteInPlace "$foo" --replace "-lstdc++" "-lc++"
+    done
   '';
 
   preBuild = ''