From 72f8df946578a531de480bd353cba8260049a2c2 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Sun, 8 Apr 2018 00:29:08 -0500 Subject: [PATCH] swift-corelibs: init moves swift-corelibs-corefoundation to own dir also adds libdispatch --- .../corefoundation.nix} | 0 pkgs/os-specific/darwin/swift-corelibs/default.nix | 8 ++++++++ .../darwin/swift-corelibs/libdispatch.nix | 12 ++++++++++++ pkgs/top-level/darwin-packages.nix | 4 ++-- 4 files changed, 22 insertions(+), 2 deletions(-) rename pkgs/os-specific/darwin/{swift-corefoundation/default.nix => swift-corelibs/corefoundation.nix} (100%) create mode 100644 pkgs/os-specific/darwin/swift-corelibs/default.nix create mode 100644 pkgs/os-specific/darwin/swift-corelibs/libdispatch.nix diff --git a/pkgs/os-specific/darwin/swift-corefoundation/default.nix b/pkgs/os-specific/darwin/swift-corelibs/corefoundation.nix similarity index 100% rename from pkgs/os-specific/darwin/swift-corefoundation/default.nix rename to pkgs/os-specific/darwin/swift-corelibs/corefoundation.nix diff --git a/pkgs/os-specific/darwin/swift-corelibs/default.nix b/pkgs/os-specific/darwin/swift-corelibs/default.nix new file mode 100644 index 00000000000..fdc97304528 --- /dev/null +++ b/pkgs/os-specific/darwin/swift-corelibs/default.nix @@ -0,0 +1,8 @@ +{callPackage, stdenv, darwin, xcbuild}: + +rec { + corefoundation = callPackage ./corefoundation.nix {}; + libdispatch = callPackage ./libdispatch.nix { + inherit (darwin) apple_sdk_sierra xnu; + }; +} diff --git a/pkgs/os-specific/darwin/swift-corelibs/libdispatch.nix b/pkgs/os-specific/darwin/swift-corelibs/libdispatch.nix new file mode 100644 index 00000000000..bd143b6071b --- /dev/null +++ b/pkgs/os-specific/darwin/swift-corelibs/libdispatch.nix @@ -0,0 +1,12 @@ +{ stdenv, fetchFromGitHub, cmake, apple_sdk_sierra, xnu-new }: + +stdenv.mkDerivation rec { + name = "swift-corelibs-libdispatch"; + src = fetchFromGitHub { + owner = "apple"; + repo = name; + rev = "f83b5a498bad8e9ff8916183cf6e8ccf677c346b"; + sha256 = "1czkyyc9llq2mnqfp19mzcfsxzas0y8zrk0gr5hg60acna6jkz2l"; + }; + buildInputs = [ cmake apple_sdk_sierra.sdk xnu-new ]; +} diff --git a/pkgs/top-level/darwin-packages.nix b/pkgs/top-level/darwin-packages.nix index 1f8039010d7..f1854bf60ea 100644 --- a/pkgs/top-level/darwin-packages.nix +++ b/pkgs/top-level/darwin-packages.nix @@ -57,12 +57,12 @@ in stubs = callPackages ../os-specific/darwin/stubs { }; - swift-corefoundation = callPackage ../os-specific/darwin/swift-corefoundation { }; - trash = callPackage ../os-specific/darwin/trash { inherit (darwin.apple_sdk) frameworks; }; usr-include = callPackage ../os-specific/darwin/usr-include { }; xcode = callPackage ../os-specific/darwin/xcode { }; + swift-corelibs = callPackages ../os-specific/darwin/swift-corelibs { }; + })