1 import ./make-test-python.nix ({ pkgs, lib, ... }:
4 # Well, we _can_ cross-compile from Linux :)
5 hello = pkgs.runCommand "hello" {
6 sdk = "${pkgs.darling.sdk}/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk";
7 nativeBuildInputs = with pkgs.llvmPackages_14; [ clang-unwrapped lld ];
8 src = pkgs.writeText "hello.c" ''
11 printf("Hello, Darling!\n");
17 -target x86_64-apple-darwin \
20 -mmacosx-version-min=10.15 \
22 -isystem $sdk/usr/include \
23 -L $sdk/usr/lib -lSystem \
30 meta.maintainers = with lib.maintainers; [ zhaofengli ];
33 programs.darling.enable = true;
39 # Darling holds stdout until the server is shutdown
40 machine.succeed("darling ${hello} >hello.out")
41 machine.succeed("grep Hello hello.out")
42 machine.succeed("darling shutdown")