swift-corefoundation: init
This currently only produces a static library, but is a start :) soon we might be able to incorporate it into our stdenv, but we need to get the build system to produce a proper .framework first.
This commit is contained in:
parent
98b5e3a531
commit
1861744e7c
38
pkgs/os-specific/darwin/swift-corefoundation/default.nix
Normal file
38
pkgs/os-specific/darwin/swift-corefoundation/default.nix
Normal file
@ -0,0 +1,38 @@
|
||||
{ stdenv, fetchFromGitHub, python, ninja, libpthread, libxml2 }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "swift-corefoundation";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "apple";
|
||||
repo = "swift-corelibs-foundation";
|
||||
rev = "87d1a97d6af07fec568765c47daddff0aaa0d59c";
|
||||
sha256 = "05cmqwzqqxb489g9hq7hhj2yva12pi488iblbpnvyk1y4nx077cw";
|
||||
};
|
||||
|
||||
buildInputs = [ ninja python libpthread libxml2 ];
|
||||
|
||||
patchPhase = ''
|
||||
HACK=$PWD/hack
|
||||
mkdir -p $HACK/CoreFoundation
|
||||
cp CoreFoundation/Base.subproj/CFAsmMacros.h $HACK/CoreFoundation
|
||||
|
||||
substituteInPlace CoreFoundation/build.py \
|
||||
--replace "','" "'," \
|
||||
--replace '-I''${SYSROOT}/usr/include/libxml2' '-I${libxml2.dev}/include/libxml2' \
|
||||
--replace 'cf.ASFLAGS = " ".join([' "cf.ASFLAGS = ' '.join([ '-I$HACK', " \
|
||||
'';
|
||||
|
||||
configureFlags = "--sysroot unused";
|
||||
|
||||
buildPhase = ''
|
||||
cd CoreFoundation
|
||||
../configure --sysroot foo
|
||||
ninja
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib
|
||||
cp ../Build/CoreFoundation/libCoreFoundation.a $out/lib
|
||||
'';
|
||||
}
|
@ -10848,6 +10848,8 @@ in
|
||||
|
||||
opencflite = callPackage ../os-specific/darwin/opencflite {};
|
||||
|
||||
swift-corefoundation = callPackage ../os-specific/darwin/swift-corefoundation { inherit (apple-source-releases) libpthread; };
|
||||
|
||||
xcode = callPackage ../os-specific/darwin/xcode {};
|
||||
|
||||
osx_sdk = callPackage ../os-specific/darwin/osx-sdk {};
|
||||
|
Loading…
Reference in New Issue
Block a user