From 5de4d19392a990f0960835edc560bfbbd59a3d49 Mon Sep 17 00:00:00 2001 From: Dan Peebles Date: Wed, 11 Oct 2017 01:17:15 -0400 Subject: [PATCH] xcbuild: 0.1.1 -> 0.1.2-pre Also, add some static library stuff to the platform spec --- pkgs/development/tools/xcbuild/default.nix | 12 +++---- pkgs/development/tools/xcbuild/platform.nix | 36 +++++++++++++++++++ .../tools/xcbuild/return-false.patch | 13 ------- 3 files changed, 42 insertions(+), 19 deletions(-) delete mode 100644 pkgs/development/tools/xcbuild/return-false.patch diff --git a/pkgs/development/tools/xcbuild/default.nix b/pkgs/development/tools/xcbuild/default.nix index d38c85a5d838..b7b14128048b 100644 --- a/pkgs/development/tools/xcbuild/default.nix +++ b/pkgs/development/tools/xcbuild/default.nix @@ -16,13 +16,16 @@ let }; in stdenv.mkDerivation rec { name = "xcbuild-${version}"; - version = "0.1.1"; + + # Once a version is released that includes https://github.com/facebook/xcbuild/commit/183c087a6484ceaae860c6f7300caf50aea0d710, + # we can stop doing this -pre thing. + version = "0.1.2-pre"; src = fetchFromGitHub { owner = "facebook"; repo = "xcbuild"; - rev = version; - sha256 = "0i98c6lii8r3bgs5gj7div12pxyzjvm4qqzmmzgr7dyhj00qa8r5"; + rev = "32b9fbeb69bfa2682bd0351ec2f14548aaedd554"; + sha256 = "1xxwg2849jizxv0g1hy0b1m3i7iivp9bmc4f5pi76swsn423d41m"; }; prePatch = '' @@ -31,9 +34,6 @@ in stdenv.mkDerivation rec { cp -r --no-preserve=all ${linenoise} ThirdParty/linenoise ''; - # See https://github.com/facebook/xcbuild/issues/238 and remove once that's in - patches = [ ./return-false.patch ]; - # Avoid a glibc >= 2.25 deprecation warning that gets fatal via -Werror. postPatch = stdenv.lib.optionalString (!stdenv.isDarwin) '' sed 1i'#include ' \ diff --git a/pkgs/development/tools/xcbuild/platform.nix b/pkgs/development/tools/xcbuild/platform.nix index df1e38fb4deb..2705d703b716 100644 --- a/pkgs/development/tools/xcbuild/platform.nix +++ b/pkgs/development/tools/xcbuild/platform.nix @@ -101,6 +101,22 @@ let Name = "$(EXECUTABLE_NAME)"; }; } + { + Identifier = "com.apple.package-type.static-library"; + Type = "PackageType"; + Name = "Mach-O Static Library"; + DefaultBuildSettings = { + EXECUTABLE_PREFIX = "lib"; + EXECUTABLE_SUFFIX = ".a"; + EXECUTABLE_NAME = "$(EXECUTABLE_PREFIX)$(PRODUCT_NAME)$(EXECUTABLE_VARIANT_SUFFIX)$(EXECUTABLE_SUFFIX)"; + EXECUTABLE_PATH = "$(EXECUTABLE_NAME)"; + }; + ProductReference = { + FileType = "archive.ar"; + Name = "$(EXECUTABLE_NAME)"; + IsLaunchable = "NO"; + }; + } { Identifier = "com.apple.package-type.wrapper"; Type = "PackageType"; @@ -173,6 +189,26 @@ let Name = "Dynamic Library"; PackageTypes = [ "com.apple.package-type.mach-o-dylib" ]; } + { + Identifier = "com.apple.product-type.library.static"; + Type = "ProductType"; + Name = "Static Library"; + PackageTypes = [ "com.apple.package-type.static-library" ]; + DefaultBuildProperties = { + FULL_PRODUCT_NAME = "$(EXECUTABLE_NAME)"; + MACH_O_TYPE = "staticlib"; + REZ_EXECUTABLE = "YES"; + EXECUTABLE_PREFIX = "lib"; + EXECUTABLE_SUFFIX = ".$(EXECUTABLE_EXTENSION)"; + EXECUTABLE_EXTENSION = "a"; + FRAMEWORK_FLAG_PREFIX = "-framework"; + LIBRARY_FLAG_PREFIX = "-l"; + LIBRARY_FLAG_NOSPACE = "YES"; + STRIP_STYLE = "debugging"; + SEPARATE_STRIP = "YES"; + CLANG_ENABLE_MODULE_DEBUGGING = "NO"; + }; + } { Type = "ProductType"; Identifier = "com.apple.product-type.bundle"; diff --git a/pkgs/development/tools/xcbuild/return-false.patch b/pkgs/development/tools/xcbuild/return-false.patch deleted file mode 100644 index 8ec81b5e97ca..000000000000 --- a/pkgs/development/tools/xcbuild/return-false.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/Libraries/dependency/Tools/dependency-info-tool.cpp b/Libraries/dependency/Tools/dependency-info-tool.cpp -index 006f53c7..d469f068 100644 ---- a/Libraries/dependency/Tools/dependency-info-tool.cpp -+++ b/Libraries/dependency/Tools/dependency-info-tool.cpp -@@ -271,7 +271,7 @@ main(int argc, char **argv) - */ - std::vector makefileContents = std::vector(contents.begin(), contents.end()); - if (!filesystem.write(makefileContents, *options.output())) { -- return false; -+ return -1; - } - - return 0;