summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/development/ocaml-modules/gd4o/default.nix6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkgs/development/ocaml-modules/gd4o/default.nix b/pkgs/development/ocaml-modules/gd4o/default.nix
index 9923edc2e8d..cd206964856 100644
--- a/pkgs/development/ocaml-modules/gd4o/default.nix
+++ b/pkgs/development/ocaml-modules/gd4o/default.nix
@@ -12,9 +12,9 @@ stdenv.mkDerivation rec {
   buildInputs = [ ocaml findlib libjpeg libpng ];
   propagatedBuildInputs = [ gd zlib freetype ];
 
-  prePatch = ''
-    substituteInPlace Makefile --replace gcc cc
-  '';
+  makeFlags = [
+    "CC=${stdenv.cc.targetPrefix}cc"
+  ];
 
   preInstall = ''
     mkdir -p $OCAMLFIND_DESTDIR/stublibs