diff --git a/pkgs/by-name/mp/mpsolve/package.nix b/pkgs/by-name/mp/mpsolve/package.nix index 26df426393cc..441b33a32478 100644 --- a/pkgs/by-name/mp/mpsolve/package.nix +++ b/pkgs/by-name/mp/mpsolve/package.nix @@ -2,6 +2,7 @@ lib, stdenv, fetchFromGitHub, + fetchpatch, autoreconfHook, bison, flex, @@ -23,6 +24,14 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-BGXvNxWUbto0yMIpEIxZ9wOYv9w0ev4OgVcniNYIKoU="; }; + patches = [ + (fetchpatch { + name = "include-cmath-in-c++-before-defining-isnan-macro.patch"; + url = "https://github.com/robol/MPSolve/commit/260432c9d1002261f60159d0520af7862d4471ed.patch"; + hash = "sha256-ODWpp966S1SsSN8hf7yuYgJR44GgbLwSxui280WWGmM="; + }) + ]; + nativeBuildInputs = [ autoreconfHook bison @@ -45,6 +54,5 @@ stdenv.mkDerivation (finalAttrs: { license = lib.licenses.gpl3Plus; maintainers = with lib.maintainers; [ kilianar ]; mainProgram = "mpsolve"; - platforms = lib.platforms.linux; }; })