From fa917a6f8c3629e356cdc2304afe6c2d4b1cb310 Mon Sep 17 00:00:00 2001 From: Jiajie Chen Date: Tue, 19 Jul 2022 14:38:44 +0800 Subject: [PATCH] cvc3: unbreak on aarch64-darwin Disable stackprotector on aarch64-darwin. --- pkgs/applications/science/logic/cvc3/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/applications/science/logic/cvc3/default.nix b/pkgs/applications/science/logic/cvc3/default.nix index 63efe0a2d05b..a7c49501672e 100644 --- a/pkgs/applications/science/logic/cvc3/default.nix +++ b/pkgs/applications/science/logic/cvc3/default.nix @@ -13,6 +13,13 @@ stdenv.mkDerivation rec { patches = [ ./cvc3-2.4.1-gccv6-fix.patch ]; + # fails to configure on darwin due to gmp not found + configureFlags = [ "LIBS=-L${gmp}/lib" "CXXFLAGS=-I${gmp.dev}/include" ]; + + # disable stackprotector on aarch64-darwin for now + # https://github.com/NixOS/nixpkgs/issues/127608 + hardeningDisable = lib.optionals (stdenv.isAarch64 && stdenv.isDarwin) [ "stackprotector" ]; + postPatch = '' sed -e "s@ /bin/bash@bash@g" -i Makefile.std find . -exec sed -e "s@/usr/bin/perl@${perl}/bin/perl@g" -i '{}' ';'