Skip to content

Commit

Permalink
xcbuild: 0.1.1 -> 0.1.2-pre
Browse files Browse the repository at this point in the history
Also, add some static library stuff to the platform spec

(cherry picked from commit 5de4d19)
  • Loading branch information
copumpkin authored and LnL7 committed Jan 18, 2018
1 parent 3d02b91 commit 18d0a3b
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 19 deletions.
12 changes: 6 additions & 6 deletions pkgs/development/tools/xcbuild/default.nix
Expand Up @@ -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 = ''
Expand All @@ -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 <sys/sysmacros.h>' \
Expand Down
36 changes: 36 additions & 0 deletions pkgs/development/tools/xcbuild/platform.nix
Expand Up @@ -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";
Expand Down Expand Up @@ -189,6 +205,26 @@ let
CODE_SIGNING_REQUIRED = "NO";
};
}
{
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";
Expand Down
13 changes: 0 additions & 13 deletions pkgs/development/tools/xcbuild/return-false.patch

This file was deleted.

0 comments on commit 18d0a3b

Please sign in to comment.