-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cargo-watch: fix darwin build #213072
cargo-watch: fix darwin build #213072
Conversation
Since version 8.2.0, cargo-watch pulls in mac-notification-sys version (through notify-rust) that requires Cocoa.
This is also a nice chance to remove the toplevel inherit, see: #204303 |
I don't really understand what the correct fix is for that. There seems to be several proposals in that thread. |
The easy way is to completely remove the inherit, then use |
I don't think we're actually doing that for Darwin frameworks as of right now, see #204924 (comment). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we're going to have to mark this as broken on x86_64-darwin until the 11.0 bootstrap SDK lands.
With the following diff, Rust still brings in 10.13 SDK references:
diff --git a/pkgs/development/tools/rust/cargo-watch/default.nix b/pkgs/development/tools/rust/cargo-watch/default.nix
index c06420d2530..1c82c703c19 100644
--- a/pkgs/development/tools/rust/cargo-watch/default.nix
+++ b/pkgs/development/tools/rust/cargo-watch/default.nix
@@ -15,6 +15,10 @@ rustPlatform.buildRustPackage rec {
buildInputs = lib.optionals stdenv.isDarwin [ Cocoa CoreServices Foundation libiconv ];
+ preBuild = ''
+ export HOME="$TMPDIR"
+ '';
+
# `test with_cargo` tries to call cargo-watch as a cargo subcommand
# (calling cargo-watch with command `cargo watch`)
preCheck = ''
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 8bbf92d6c26..ac702044b9a 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -15724,8 +15724,8 @@ with pkgs;
cargo-wasi = callPackage ../development/tools/rust/cargo-wasi {
inherit (darwin.apple_sdk.frameworks) Security;
};
- cargo-watch = callPackage ../development/tools/rust/cargo-watch {
- inherit (darwin.apple_sdk.frameworks) Cocoa CoreServices Foundation;
+ cargo-watch = darwin.apple_sdk_11_0.callPackage ../development/tools/rust/cargo-watch {
+ inherit (darwin.apple_sdk_11_0.frameworks) Cocoa CoreServices Foundation;
};
cargo-wipe = callPackage ../development/tools/rust/cargo-wipe { };
cargo-workspaces = callPackage ../development/tools/rust/cargo-workspaces {
Since version 8.2.0, cargo-watch pulls in mac-notification-sys version (through notify-rust) that requires Cocoa.
I also made two minor changes:
watchexec
.r-ryantm
now updates this, there won't be as many opportunities to changesha256
tohash
manually, so I went ahead and did that here even though the hash hasn't changed.Regressed in #208410. Fixes #212987.
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes