about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/levmar
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/levmar')
-rw-r--r--nixpkgs/pkgs/development/libraries/levmar/default.nix5
1 files changed, 3 insertions, 2 deletions
diff --git a/nixpkgs/pkgs/development/libraries/levmar/default.nix b/nixpkgs/pkgs/development/libraries/levmar/default.nix
index c5d6877a8446..ed945d9e5a08 100644
--- a/nixpkgs/pkgs/development/libraries/levmar/default.nix
+++ b/nixpkgs/pkgs/development/libraries/levmar/default.nix
@@ -9,8 +9,9 @@ stdenv.mkDerivation rec {
   };
 
   patchPhase = ''
-    sed -i 's/define HAVE_LAPACK/undef HAVE_LAPACK/' levmar.h
+    substituteInPlace levmar.h --replace "define HAVE_LAPACK" "undef HAVE_LAPACK"
     sed -i 's/LAPACKLIBS=.*/LAPACKLIBS=/' Makefile
+    substituteInPlace Makefile --replace "gcc" "${stdenv.cc.targetPrefix}cc"
   '';
 
   installPhase = ''
@@ -23,6 +24,6 @@ stdenv.mkDerivation rec {
     description = "ANSI C implementations of Levenberg-Marquardt, usable also from C++";
     homepage = "https://www.ics.forth.gr/~lourakis/levmar/";
     license = lib.licenses.gpl2Plus;
-    platforms = lib.platforms.linux;
+    platforms = lib.platforms.all;
   };
 }