From 3de0119f45065dc78470c1f06a0ea09dadbdcbfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phan=20Kochen?= Date: Sat, 15 May 2021 14:13:11 +0200 Subject: [PATCH] foma: fix darwin build --- pkgs/tools/misc/foma/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/foma/default.nix b/pkgs/tools/misc/foma/default.nix index 2bde606adbe..e75aaca50f6 100644 --- a/pkgs/tools/misc/foma/default.nix +++ b/pkgs/tools/misc/foma/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, zlib, flex, bison, readline }: +{ lib, stdenv, fetchFromGitHub, zlib, flex, bison, readline, darwin }: stdenv.mkDerivation rec { pname = "foma"; @@ -13,9 +13,14 @@ stdenv.mkDerivation rec { sourceRoot = "source/foma"; - nativeBuildInputs = [ flex bison ]; + nativeBuildInputs = [ flex bison ] + ++ lib.optional stdenv.isDarwin darwin.cctools; buildInputs = [ zlib readline ]; + makeFlags = [ + "CC=${stdenv.cc.targetPrefix}cc" + ]; + patchPhase = '' substituteInPlace Makefile \ --replace '-ltermcap' ' ' \