diff --git a/pkgs/os-specific/darwin/libSystem/default.nix b/pkgs/os-specific/darwin/libSystem/default.nix new file mode 100644 index 000000000000..1dea8e846fdf --- /dev/null +++ b/pkgs/os-specific/darwin/libSystem/default.nix @@ -0,0 +1,13 @@ +{ stdenvNoCC }: + +# Darwin dynamically determines the `libSystem` to use based on the SDK found at `DEVELOPER_DIR`. +# By default, this will be `apple-sdk` or one of the versioned variants. +stdenvNoCC.mkDerivation { + pname = "libSystem"; + version = "B"; + + # Silence linker warnings due a missing `lib` (which is added by cc-wrapper). + buildCommand = '' + mkdir -p "$out/include" "$out/lib" + ''; +} diff --git a/pkgs/top-level/darwin-packages.nix b/pkgs/top-level/darwin-packages.nix index 30d5ef83061a..0d3cf4033efa 100644 --- a/pkgs/top-level/darwin-packages.nix +++ b/pkgs/top-level/darwin-packages.nix @@ -148,6 +148,8 @@ impure-cmds // appleSourcePackages // chooseLibs // { # Removes propagated packages from the stdenv, so those packages can be built without depending upon themselves. bootstrapStdenv = mkBootstrapStdenv pkgs.stdenv; + libSystem = callPackage ../os-specific/darwin/libSystem { }; + # TODO(@connorbaker): See https://github.com/NixOS/nixpkgs/issues/229389. cf-private = self.apple_sdk.frameworks.CoreFoundation;