diff --git a/pkgs/by-name/wa/watchexec/package.nix b/pkgs/by-name/wa/watchexec/package.nix index e43e6c7ccf1c..d3553f90056f 100644 --- a/pkgs/by-name/wa/watchexec/package.nix +++ b/pkgs/by-name/wa/watchexec/package.nix @@ -22,7 +22,12 @@ rustPlatform.buildRustPackage (finalAttrs: { nativeBuildInputs = [ installShellFiles ]; - NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-framework AppKit"; + env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { + NIX_LDFLAGS = toString [ + "-framework" + "AppKit" + ]; + }; checkFlags = [ "--skip=help"