about summary refs log tree commit diff
path: root/pkgs/applications/science/math
diff options
context:
space:
mode:
authorannalee <150648636+a-n-n-a-l-e-e@users.noreply.github.com>2023-11-21 20:01:32 +0000
committerannalee <150648636+a-n-n-a-l-e-e@users.noreply.github.com>2023-11-22 03:28:26 +0000
commit540ea20215f48e308cd08ef4e705d2fa08ada11e (patch)
tree31c07e77ddae37ebd2f3f227ba604eb2a7e72abe /pkgs/applications/science/math
parenteb746540a970e1fd1c45c92c75dbc87ffb77f3a1 (diff)
downloadnixlib-540ea20215f48e308cd08ef4e705d2fa08ada11e.tar
nixlib-540ea20215f48e308cd08ef4e705d2fa08ada11e.tar.gz
nixlib-540ea20215f48e308cd08ef4e705d2fa08ada11e.tar.bz2
nixlib-540ea20215f48e308cd08ef4e705d2fa08ada11e.tar.lz
nixlib-540ea20215f48e308cd08ef4e705d2fa08ada11e.tar.xz
nixlib-540ea20215f48e308cd08ef4e705d2fa08ada11e.tar.zst
nixlib-540ea20215f48e308cd08ef4e705d2fa08ada11e.zip
lp_solve: ignore implicit int warnings, add x64 darwin ldflags
the configuration code generates small c programs with a main function
sans return type specifer. this causes clang builds to fail. add
'-Wno-error=implicit-int' to fix the build.

add -headerpad_max_install_names to env.NIX_LDFLAGS for x64 darwin
Diffstat (limited to 'pkgs/applications/science/math')
-rw-r--r--pkgs/applications/science/math/lp_solve/default.nix6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkgs/applications/science/math/lp_solve/default.nix b/pkgs/applications/science/math/lp_solve/default.nix
index 6a1bc86abced..ee54def6eb97 100644
--- a/pkgs/applications/science/math/lp_solve/default.nix
+++ b/pkgs/applications/science/math/lp_solve/default.nix
@@ -22,6 +22,12 @@ stdenv.mkDerivation rec {
     autoSignDarwinBinariesHook
   ];
 
+  env = {
+    NIX_CFLAGS_COMPILE = "-Wno-error=implicit-int";
+  } // lib.optionalAttrs (stdenv.isDarwin && stdenv.isx86_64) {
+    NIX_LDFLAGS = "-headerpad_max_install_names";
+  };
+
   dontConfigure = true;
 
   buildPhase =