Merge pull request #228146 from wegank/darwin-darling-headers-pre

darwin.darling: drop

authored by Weijia Wang and committed by GitHub 2eb3e4c7 c2129ff4

+30 -57
+26 -2
pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix
··· 1 - { lib, stdenv, buildPackages 1 + { lib, stdenv, buildPackages, fetchzip 2 2 , appleDerivation', xnu, Libc, Libm, libdispatch, Libinfo 3 3 , dyld, Csu, architecture, libclosure, CarbonHeaders, ncurses, CommonCrypto 4 4 , copyfile, removefile, libresolvHeaders, libresolv, Libnotify, libplatform, libpthread 5 - , mDNSResponder, launchd, libutilHeaders, hfsHeaders, darling, darwin-stubs 5 + , mDNSResponder, launchd, libutilHeaders, hfsHeaders, darwin-stubs 6 6 , headersOnly ? false 7 7 , withLibresolv ? !headersOnly 8 8 }: 9 9 10 + let 11 + darling.src = fetchzip { 12 + url = "https://github.com/darlinghq/darling/archive/d2cc5fa748003aaa70ad4180fff0a9a85dc65e9b.tar.gz"; 13 + sha256 = "11b51fw47nl505h63bgx5kqiyhf3glhp1q6jkpb6nqfislnzzkrf"; 14 + postFetch = '' 15 + # The archive contains both `src/opendirectory` and `src/OpenDirectory`, 16 + # pre-create the directory to choose the canonical case on 17 + # case-insensitive filesystems. 18 + mkdir -p $out/src/OpenDirectory 19 + 20 + cd $out 21 + tar -xzf $downloadedFile --strip-components=1 22 + rm -r $out/src/libm 23 + 24 + # If `src/opendirectory` and `src/OpenDirectory` refer to different 25 + # things, then combine them into `src/OpenDirectory` to match the result 26 + # on case-insensitive filesystems. 27 + if [ "$(stat -c %i src/opendirectory)" != "$(stat -c %i src/OpenDirectory)" ]; then 28 + mv src/opendirectory/* src/OpenDirectory/ 29 + rmdir src/opendirectory 30 + fi 31 + ''; 32 + }; 33 + in 10 34 appleDerivation' stdenv { 11 35 dontBuild = true; 12 36 dontFixup = true;
+4 -2
pkgs/os-specific/darwin/apple-source-releases/dtrace/default.nix
··· 1 1 { appleDerivation, xcbuildHook, CoreSymbolication, apple_sdk 2 - , xnu, bison, flex, darling, stdenv, fixDarwinDylibNames }: 2 + , xnu, bison, flex, stdenv, fixDarwinDylibNames }: 3 3 4 4 appleDerivation { 5 5 nativeBuildInputs = [ xcbuildHook flex bison fixDarwinDylibNames ]; 6 - buildInputs = [ CoreSymbolication apple_sdk.frameworks.CoreSymbolication darling xnu ]; 6 + buildInputs = [ CoreSymbolication apple_sdk.frameworks.CoreSymbolication xnu ]; 7 7 # -fcommon: workaround build failure on -fno-common toolchains: 8 8 # duplicate symbol '_kCSRegionMachHeaderName' in: libproc.o dt_module_apple.o 9 9 env.NIX_CFLAGS_COMPILE = "-DCTF_OLD_VERSIONS -DPRIVATE -DYYDEBUG=1 -I${xnu}/Library/Frameworks/System.framework/Headers -Wno-error=implicit-function-declaration -fcommon"; ··· 21 21 --replace /usr/bin/ld ${stdenv.cc.bintools.bintools}/bin/ld \ 22 22 --replace /usr/lib/dtrace/dt_cpp.h $out/include/dt_cpp.h \ 23 23 --replace /usr/lib/dtrace $out/lib/dtrace 24 + substituteInPlace libproc/libproc.c \ 25 + --replace "#include <sandbox/rootless.h>" "" 24 26 ''; 25 27 26 28 # hack to handle xcbuild's broken lex handling
-51
pkgs/os-specific/darwin/darling/default.nix
··· 1 - {stdenv, lib, fetchzip}: 2 - 3 - stdenv.mkDerivation rec { 4 - pname = "darling"; 5 - name = pname; 6 - 7 - src = fetchzip { 8 - url = "https://github.com/darlinghq/darling/archive/d2cc5fa748003aaa70ad4180fff0a9a85dc65e9b.tar.gz"; 9 - sha256 = "11b51fw47nl505h63bgx5kqiyhf3glhp1q6jkpb6nqfislnzzkrf"; 10 - postFetch = '' 11 - # The archive contains both `src/opendirectory` and `src/OpenDirectory`, 12 - # pre-create the directory to choose the canonical case on 13 - # case-insensitive filesystems. 14 - mkdir -p $out/src/OpenDirectory 15 - 16 - cd $out 17 - tar -xzf $downloadedFile --strip-components=1 18 - rm -r $out/src/libm 19 - 20 - # If `src/opendirectory` and `src/OpenDirectory` refer to different 21 - # things, then combine them into `src/OpenDirectory` to match the result 22 - # on case-insensitive filesystems. 23 - if [ "$(stat -c %i src/opendirectory)" != "$(stat -c %i src/OpenDirectory)" ]; then 24 - mv src/opendirectory/* src/OpenDirectory/ 25 - rmdir src/opendirectory 26 - fi 27 - ''; 28 - }; 29 - 30 - # only packaging sandbox for now 31 - buildPhase = '' 32 - cc -c src/sandbox/sandbox.c -o src/sandbox/sandbox.o 33 - cc -dynamiclib -flat_namespace src/sandbox/sandbox.o -o libsystem_sandbox.dylib 34 - ''; 35 - 36 - installPhase = '' 37 - mkdir -p $out/lib 38 - cp -rL src/sandbox/include/ $out/ 39 - cp libsystem_sandbox.dylib $out/lib/ 40 - 41 - mkdir -p $out/include 42 - cp src/libaks/include/* $out/include 43 - ''; 44 - 45 - meta = with lib; { 46 - maintainers = with maintainers; [ matthewbauer ]; 47 - license = licenses.gpl3; 48 - description = "Darwin/macOS emulation layer for Linux"; 49 - platforms = platforms.darwin; 50 - }; 51 - }
-2
pkgs/top-level/darwin-packages.nix
··· 216 216 # As the name says, this is broken, but I don't want to lose it since it's a direction we want to go in 217 217 # libdispatch-broken = callPackage ../os-specific/darwin/swift-corelibs/libdispatch.nix { }; 218 218 219 - darling = callPackage ../os-specific/darwin/darling/default.nix { }; 220 - 221 219 libtapi = callPackage ../os-specific/darwin/libtapi {}; 222 220 223 221 ios-deploy = callPackage ../os-specific/darwin/ios-deploy {};