Merge pull request #123100 from stephank/fix-foma-darwin

foma: fix darwin build
This commit is contained in:
Benjamin Hipple 2021-05-15 12:37:11 -04:00 committed by GitHub
commit 229aec307b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, zlib, flex, bison, readline }: { lib, stdenv, fetchFromGitHub, zlib, flex, bison, readline, darwin }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "foma"; pname = "foma";
@ -13,9 +13,14 @@ stdenv.mkDerivation rec {
sourceRoot = "source/foma"; sourceRoot = "source/foma";
nativeBuildInputs = [ flex bison ]; nativeBuildInputs = [ flex bison ]
++ lib.optional stdenv.isDarwin darwin.cctools;
buildInputs = [ zlib readline ]; buildInputs = [ zlib readline ];
makeFlags = [
"CC=${stdenv.cc.targetPrefix}cc"
];
patchPhase = '' patchPhase = ''
substituteInPlace Makefile \ substituteInPlace Makefile \
--replace '-ltermcap' ' ' \ --replace '-ltermcap' ' ' \