3
0
Fork 0
forked from mirrors/nixpkgs

graphite2: pull in libgcc if not using gcc for compilation

graphite2 needs to link against libgcc. If stdenv.cc.isGNU this always
works, but for clang based stdenvs, the build would fail. We can pull in
the standalone libgcc derivation in those cases.
This commit is contained in:
sternenseemann 2021-05-17 23:43:27 +02:00
parent 30cf79fa62
commit 1961e56797

View file

@ -5,6 +5,7 @@
, freetype
, cmake
, static ? stdenv.hostPlatform.isStatic
, libgcc
}:
stdenv.mkDerivation rec {
@ -18,7 +19,8 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = [ pkg-config cmake ];
buildInputs = [ freetype ];
buildInputs = [ freetype ]
++ lib.optionals (!stdenv.cc.isGNU) [ libgcc ];
patches = lib.optionals stdenv.isDarwin [ ./macosx.patch ];