fix: remove legacy darwin.apple_sdk reference in flake.nix#164
fix: remove legacy darwin.apple_sdk reference in flake.nix#164nklmilojevic wants to merge 2 commits intogoogleworkspace:mainfrom
Conversation
`darwin.apple_sdk` has been removed from nixpkgs-unstable as a legacy compatibility stub. The Security framework is now provided by the default Apple SDK included in stdenv, so the explicit dependency is no longer needed. Also updates `stdenv.isLinux`/`stdenv.isDarwin` to the non-deprecated `stdenv.hostPlatform.isLinux`/`stdenv.hostPlatform.isDarwin`.
🦋 Changeset detectedLatest commit: 97c9132 The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request updates the Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request correctly updates the flake.nix file by removing a legacy darwin.apple_sdk dependency and replacing deprecated platform checks (stdenv.isLinux/stdenv.isDarwin) with their stdenv.hostPlatform.* counterparts. The changes align with recent updates in nixpkgs-unstable. I've added one minor suggestion to improve code style by avoiding the with statement, following Nix community best practices.
| darwinDeps = with pkgs; [ | ||
| libiconv | ||
| darwin.apple_sdk.frameworks.Security | ||
| ]; |
There was a problem hiding this comment.
While this works, it's a good practice in Nix to avoid using with as it can sometimes make it harder to track where attributes are coming from. Since darwinDeps now only contains one package, you can define it more directly.
darwinDeps = [ pkgs.libiconv ];
References
- In Nix, it is generally discouraged to use the
withkeyword as it can obscure the origin of variables, making the code harder to read and maintain. It's better to explicitly qualify attributes (e.g.,pkgs.libiconv).
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #164 +/- ##
=======================================
Coverage 55.19% 55.19%
=======================================
Files 38 38
Lines 13166 13166
=======================================
Hits 7267 7267
Misses 5899 5899 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Appreciate this, I ran into the same issue. One additional suggestion: consider switching the flake's nixpkgs input from |
Description
darwin.apple_sdkhas been removed from nixpkgs-unstable as a legacy compatibility stub. The Security framework is now provided by the default Apple SDK included in stdenv, so the explicit dependency is no longer needed.Also updates
stdenv.isLinux/stdenv.isDarwinto the non-deprecatedstdenv.hostPlatform.isLinux/stdenv.hostPlatform.isDarwin.Checklist:
AGENTS.mdguidelines (no generatedgoogle-*crates).cargo fmt --allto format the code perfectly.cargo clippy -- -D warningsand resolved all warnings.pnpx changeset) to document my changes.^
N/A — this change only modifies flake.nix, no Rust/TS code was changed.