cargo-watch: move NIX_LDFLAGS into env for structuredAttrs

This commit is contained in:
Stefan Frijters
2026-02-01 22:26:23 +01:00
parent 28f82689a1
commit eac03580b6
+6 -4
View File
@@ -18,10 +18,12 @@ rustPlatform.buildRustPackage rec {
cargoHash = "sha256-4AVZ747d6lOjxHN+co0A7APVB5Xj6g5p/Al5fLbgPnc=";
NIX_LDFLAGS = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [
"-framework"
"AppKit"
];
env = lib.optionalAttrs (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) {
NIX_LDFLAGS = toString [
"-framework"
"AppKit"
];
};
# `test with_cargo` tries to call cargo-watch as a cargo subcommand
# (calling cargo-watch with command `cargo watch`)