3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #66276 from eraserhd/pr/master/xcbuild-libcompression

xcbuild: fix darwin build
This commit is contained in:
Matthew Bauer 2019-08-07 17:24:25 -04:00 committed by GitHub
commit 4589c892c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -36,10 +36,15 @@ in stdenv.mkDerivation rec {
cp -r --no-preserve=all ${linenoise} ThirdParty/linenoise
'';
# Avoid a glibc >= 2.25 deprecation warning that gets fatal via -Werror.
postPatch = stdenv.lib.optionalString (!stdenv.isDarwin) ''
# Avoid a glibc >= 2.25 deprecation warning that gets fatal via -Werror.
sed 1i'#include <sys/sysmacros.h>' \
-i Libraries/xcassets/Headers/xcassets/Slot/SystemVersion.h
'' + stdenv.lib.optionalString stdenv.isDarwin ''
# Apple Open Sourced LZFSE, but not libcompression, and it isn't
# part of an impure framework we can add
sed '/#define HAVE_LIBCOMPRESSION 1/d' \
-i Libraries/libcar/Sources/Rendition.cpp
'';
enableParallelBuilding = true;