From 80112a6f2a01cc0fe5dc7c45b291fb7ff3864800 Mon Sep 17 00:00:00 2001 From: Jason Felice Date: Wed, 7 Aug 2019 11:22:18 -0400 Subject: [PATCH] xcbuild: fix darwin build Bumping the MacOS target version to 10.12 signalled xcbuild that libcompression is available on Darwin, but libcompression is not OSS (even though an LZFSE reference implementation is), and it is not part of a framework for us to make impure, so this patch disables it. --- pkgs/development/tools/xcbuild/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/development/tools/xcbuild/default.nix b/pkgs/development/tools/xcbuild/default.nix index 29325fad724..61dd7209fc4 100644 --- a/pkgs/development/tools/xcbuild/default.nix +++ b/pkgs/development/tools/xcbuild/default.nix @@ -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 ' \ -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;