From 4ef47f32d7a16b62682460e4330ac2863ef05712 Mon Sep 17 00:00:00 2001 From: Vincenzo Mantova Date: Sun, 16 May 2021 11:41:49 +0100 Subject: [PATCH] eukleides: use $CC instead of hardcoded gcc --- pkgs/applications/science/math/eukleides/default.nix | 5 ++++- pkgs/applications/science/math/eukleides/use-CC.patch | 11 +++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 pkgs/applications/science/math/eukleides/use-CC.patch diff --git a/pkgs/applications/science/math/eukleides/default.nix b/pkgs/applications/science/math/eukleides/default.nix index fe498fdbd8a1..b5a9fc3fa86d 100644 --- a/pkgs/applications/science/math/eukleides/default.nix +++ b/pkgs/applications/science/math/eukleides/default.nix @@ -9,6 +9,9 @@ lib.fix (eukleides: stdenv.mkDerivation rec { sha256 = "0s8cyh75hdj89v6kpm3z24i48yzpkr8qf0cwxbs9ijxj1i38ki0q"; }; + # use $CC instead of hardcoded gcc + patches = [ ./use-CC.patch ]; + nativeBuildInputs = [ bison flex texinfo makeWrapper ]; buildInputs = [ readline texLive ]; @@ -59,7 +62,7 @@ lib.fix (eukleides: stdenv.mkDerivation rec { circles and conics. ''; - platforms = lib.platforms.linux; + platforms = lib.platforms.unix; maintainers = [ lib.maintainers.peti ]; }; }) diff --git a/pkgs/applications/science/math/eukleides/use-CC.patch b/pkgs/applications/science/math/eukleides/use-CC.patch new file mode 100644 index 000000000000..08bd71ec9dc5 --- /dev/null +++ b/pkgs/applications/science/math/eukleides/use-CC.patch @@ -0,0 +1,11 @@ +--- a/build/Makefile ++++ b/build/Makefile +@@ -11,7 +11,7 @@ LEX = flex + LFLAGS = -8 + YACC = bison + YFLAGS = -d +-CC = gcc ++CC ?= gcc + IFLAGS = -I$(COMMON_DIR) -I$(MAIN_DIR) -I$(BUILD_DIR) + ifneq ($(strip $(LOCALES)),) + MOFLAGS = -DMO_DIR=\"$(MO_DIR)\"