diff options
author | Benjamin Hipple <bhipple@protonmail.com> | 2021-05-15 12:37:11 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-15 12:37:11 -0400 |
commit | 229aec307b51554c6191ed880f7ed32e0116db64 (patch) | |
tree | 0a75bea671f1f67f06ee0f1f1703e18b11f76dc2 | |
parent | cf18c8fa0a9645d72d70eb1338fe9fc077f2431c (diff) | |
parent | 3de0119f45065dc78470c1f06a0ea09dadbdcbfa (diff) |
Merge pull request #123100 from stephank/fix-foma-darwin
foma: fix darwin build
-rw-r--r-- | pkgs/tools/misc/foma/default.nix | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/pkgs/tools/misc/foma/default.nix b/pkgs/tools/misc/foma/default.nix index 2bde606adbe6a..e75aaca50f6e2 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' ' ' \ |