Unverified Commit a6f2bdff authored by Nick Cao's avatar Nick Cao Committed by GitHub
Browse files

Merge pull request #269826 from NixOS/backport-269720-to-release-23.11

[Backport release-23.11] cargo-watch: fix build on darwin
parents ddbbb20f 07af2a32
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -3,9 +3,7 @@
, rustPlatform
, fetchFromGitHub
, Cocoa
, CoreServices
, Foundation
, libiconv
}:

rustPlatform.buildRustPackage rec {
@@ -21,7 +19,9 @@ rustPlatform.buildRustPackage rec {

  cargoHash = "sha256-0D+aM/zap5UDQ+k9c/p+ZfN1OUjDzFRArvcmqEOcBbM=";

  buildInputs = lib.optionals stdenv.isDarwin [ Cocoa CoreServices Foundation libiconv ];
  buildInputs = lib.optionals stdenv.isDarwin [ Foundation Cocoa ];

  NIX_LDFLAGS = lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ "-framework" "AppKit" ];

  # `test with_cargo` tries to call cargo-watch as a cargo subcommand
  # (calling cargo-watch with command `cargo watch`)
+2 −2
Original line number Diff line number Diff line
@@ -17151,8 +17151,8 @@ with pkgs;
  cargo-wasi = callPackage ../development/tools/rust/cargo-wasi {
    inherit (darwin.apple_sdk.frameworks) Security;
  };
  cargo-watch = darwin.apple_sdk_11_0.callPackage ../development/tools/rust/cargo-watch {
    inherit (darwin.apple_sdk_11_0.frameworks) Cocoa CoreServices Foundation;
  cargo-watch = callPackage ../development/tools/rust/cargo-watch {
    inherit (darwin.apple_sdk.frameworks) Foundation Cocoa;
  };
  cargo-wipe = callPackage ../development/tools/rust/cargo-wipe { };
  cargo-workspaces = callPackage ../development/tools/rust/cargo-workspaces { };