From 254d6e5cbf5d366df46d4651706f9ff59427a57d Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Mon, 6 Jan 2020 18:14:49 +0100 Subject: [PATCH] nifskope: fix aarch64 build https://hydra.nixos.org/build/109694386 --- pkgs/tools/graphics/nifskope/default.nix | 2 +- .../graphics/nifskope/no-sse-on-arm.patch | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 pkgs/tools/graphics/nifskope/no-sse-on-arm.patch diff --git a/pkgs/tools/graphics/nifskope/default.nix b/pkgs/tools/graphics/nifskope/default.nix index 90716d04a75a..65ccfecedd68 100644 --- a/pkgs/tools/graphics/nifskope/default.nix +++ b/pkgs/tools/graphics/nifskope/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation { url = "https://github.com/niftools/nifskope/commit/30954e7f01f3d779a2a1fd37d363e8a6ad560bd3.patch"; sha256 = "0d6xjj2mjjhdd7w1aig5f75jksjni16jyj0lxsz51pys6xqb6fpj"; }) - ]; + ] ++ (stdenv.lib.optional stdenv.isAarch64 ./no-sse-on-arm.patch); buildInputs = [ qtbase qttools libGLU.dev ]; nativeBuildInputs = [ qmake wrapQtAppsHook ]; diff --git a/pkgs/tools/graphics/nifskope/no-sse-on-arm.patch b/pkgs/tools/graphics/nifskope/no-sse-on-arm.patch new file mode 100644 index 000000000000..452fb1a76d5d --- /dev/null +++ b/pkgs/tools/graphics/nifskope/no-sse-on-arm.patch @@ -0,0 +1,19 @@ +diff --git a/NifSkope.pro b/NifSkope.pro +index cc29fc5..b17bb6e 100644 +--- a/NifSkope.pro ++++ b/NifSkope.pro +@@ -428,13 +428,10 @@ win32 { + # Optimization flags + QMAKE_CXXFLAGS_DEBUG -= -O0 -g + QMAKE_CXXFLAGS_DEBUG *= -Og -g3 +- QMAKE_CXXFLAGS_RELEASE *= -O3 -mfpmath=sse ++ QMAKE_CXXFLAGS_RELEASE *= -O3 + + # C++11 Support + QMAKE_CXXFLAGS_RELEASE *= -std=c++14 +- +- # Extension flags +- QMAKE_CXXFLAGS_RELEASE *= -msse2 -msse + } + + win32 {