···11-{stdenv, lib, fetchzip}:
22-33-stdenv.mkDerivation rec {
44- pname = "darling";
55- name = pname;
66-77- src = fetchzip {
88- url = "https://github.com/darlinghq/darling/archive/d2cc5fa748003aaa70ad4180fff0a9a85dc65e9b.tar.gz";
99- sha256 = "11b51fw47nl505h63bgx5kqiyhf3glhp1q6jkpb6nqfislnzzkrf";
1010- postFetch = ''
1111- # The archive contains both `src/opendirectory` and `src/OpenDirectory`,
1212- # pre-create the directory to choose the canonical case on
1313- # case-insensitive filesystems.
1414- mkdir -p $out/src/OpenDirectory
1515-1616- cd $out
1717- tar -xzf $downloadedFile --strip-components=1
1818- rm -r $out/src/libm
1919-2020- # If `src/opendirectory` and `src/OpenDirectory` refer to different
2121- # things, then combine them into `src/OpenDirectory` to match the result
2222- # on case-insensitive filesystems.
2323- if [ "$(stat -c %i src/opendirectory)" != "$(stat -c %i src/OpenDirectory)" ]; then
2424- mv src/opendirectory/* src/OpenDirectory/
2525- rmdir src/opendirectory
2626- fi
2727- '';
2828- };
2929-3030- # only packaging sandbox for now
3131- buildPhase = ''
3232- cc -c src/sandbox/sandbox.c -o src/sandbox/sandbox.o
3333- cc -dynamiclib -flat_namespace src/sandbox/sandbox.o -o libsystem_sandbox.dylib
3434- '';
3535-3636- installPhase = ''
3737- mkdir -p $out/lib
3838- cp -rL src/sandbox/include/ $out/
3939- cp libsystem_sandbox.dylib $out/lib/
4040-4141- mkdir -p $out/include
4242- cp src/libaks/include/* $out/include
4343- '';
4444-4545- meta = with lib; {
4646- maintainers = with maintainers; [ matthewbauer ];
4747- license = licenses.gpl3;
4848- description = "Darwin/macOS emulation layer for Linux";
4949- platforms = platforms.darwin;
5050- };
5151-}
-2
pkgs/top-level/darwin-packages.nix
···216216 # 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
217217 # libdispatch-broken = callPackage ../os-specific/darwin/swift-corelibs/libdispatch.nix { };
218218219219- darling = callPackage ../os-specific/darwin/darling/default.nix { };
220220-221219 libtapi = callPackage ../os-specific/darwin/libtapi {};
222220223221 ios-deploy = callPackage ../os-specific/darwin/ios-deploy {};