Commit e1f44d60 authored by Boey Maun Suang's avatar Boey Maun Suang
Browse files

linuxkit: Fix building on Darwin

Nixpkgs on Darwin can currently build against either the macOS 10.12 or
the 11 SDK, but some vendored code in linuxkit expects at least the
macOS 12 SDK at build time, even though useful parts of that vendored
code still run on macOS 11, and the rest of linuxkit still runs on
10.12.  This commit enables building against the macOS 11 SDK.
parent 2b54954f
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
{ lib, stdenv, buildGoModule, fetchFromGitHub, git, Virtualization, testers, linuxkit }:
{ lib, stdenv, buildGoModule, fetchFromGitHub, git, Cocoa, Virtualization, testers, linuxkit }:

buildGoModule rec {
  pname = "linuxkit";
@@ -15,7 +15,9 @@ buildGoModule rec {

  modRoot = "./src/cmd/linuxkit";

  buildInputs = lib.optionals stdenv.isDarwin [ Virtualization ];
  patches = [ ./support-apple-11-sdk.patch ];

  buildInputs = lib.optionals stdenv.isDarwin [ Cocoa Virtualization ];

  ldflags = [
    "-s"
+811 −0

File added.

Preview size limit exceeded, changes collapsed.

+1 −1
Original line number Diff line number Diff line
@@ -18096,7 +18096,7 @@ with pkgs;
  libwhich = callPackage ../development/tools/misc/libwhich { };
  linuxkit = callPackage ../development/tools/misc/linuxkit {
    inherit (darwin.apple_sdk_11_0.frameworks) Virtualization;
    inherit (darwin.apple_sdk_11_0.frameworks) Cocoa Virtualization;
  };
  listenbrainz-mpd = callPackage ../applications/audio/listenbrainz-mpd  {