Repository navigation
fix(standards): allow google-chrome in the flake's package set, for darwin - #87
Merged
Merged
Conversation
…arwin The darwin pdfkiln wrapper runs nixpkgs' google-chrome, which is unfree. The flake's nixpkgs allowed no unfree package, so packages.aarch64-darwin.pdfkiln refused to evaluate without NIXPKGS_ALLOW_UNFREE=1. The flake's perSystem package set now allows exactly one unfree package, google-chrome, through config.allowUnfreePredicate. allowUnfree stays unset, so nothing else is allowed. It is set as _module.args.pkgs, which is how flake-parts supplies perSystem's pkgs. checks/pdfkiln.nix gets a darwin branch that asserts PDFKILN_CHROMIUM names google-chrome-stable and skips the render, which stays Linux-only. The Linux check's derivation is unchanged. Verified: the darwin package and check evaluate with NIXPKGS_ALLOW_UNFREE unset, and the darwin installPhase sets PDFKILN_CHROMIUM to google-chrome-stable with no chromium path. The Linux package and check drvPaths match main, and the Linux check builds. nix flake check --no-build (x86_64-linux), nix fmt, statix, deadnix and prek pass. Darwin is not built or run. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AAw4Sw2knFZL7NYgFroq1Y
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Allow exactly one unfree package,
google-chrome, in this flake's package set. This letspackages.aarch64-darwin.pdfkilnevaluate withoutNIXPKGS_ALLOW_UNFREE=1. The darwin pdfkiln wrapper runs nixpkgs'google-chrome-stable.Why
On
main(ae29cfe, after #85), the darwin package refuses to evaluate:The perSystem package set allowed no unfree package. #85 merged at branch head
fb9710f, before this fix.Changes
flake.nix: animportsmodule sets perSystem's_module.args.pkgstoimport nixpkgs { inherit system; config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "google-chrome" ]; }. The locked flake-parts has no nixpkgs config option. Its nixpkgs module only supplies a defaultpkgs, which this replaces.allowUnfreeis not set. Packages, checks, devShells and the formatter are unchanged.checks/pdfkiln.nix: the Linux script is unchanged, and its derivation is the same as onmain. A darwin branch greps the wrapper forPDFKILN_CHROMIUMand for thegoogle-chrome-stablepath, and skips the render.Validation
Every command ran in the worktree on the pushed commit
375a40c.env -u NIXPKGS_ALLOW_UNFREE nix eval --raw .#packages.aarch64-darwin.pdfkiln.drvPath: pass (/nix/store/1pqr42jhim78r72ys1kqsmldv7q0z3zn-pdfkiln-1.3.0.drv).nix eval --raw .#packages.aarch64-darwin.pdfkiln.installPhase: eachmakeWrappersets--set PDFKILN_CHROMIUM /nix/store/…-google-chrome-157.0.8103.51/bin/google-chrome-stable, and no chromium path appears. The three wrappers come from oneforloop.env -u NIXPKGS_ALLOW_UNFREE nix eval --raw .#checks.aarch64-darwin.pdfkiln.drvPath: pass (/nix/store/la0dayv2z9dniyr08nhcn9i7h616h26l-python-devops-nix-pdfkiln-check.drv).nix eval --raw .#packages.x86_64-linux.pdfkiln.drvPathand.#checks.x86_64-linux.pdfkiln.drvPath: identical tomain(0cqbg3iycwj3k1zjkf174blqz5cgzww5-pdfkiln-1.3.0.drvandh69zw1jyqjym3v1azqwqypj066qw59mj-python-devops-nix-pdfkiln-check.drv).nix build .#checks.x86_64-linux.pdfkiln -L --no-link: pass. The check log shows the Chromium render.nix flake check --no-build --system x86_64-linux: pass.nix fmt, thengit diff --exit-code: no change. A secondnix fmtis also a no-op.prek run --all-files: all hooks pass.statix checkonflake.nixandchecks/pdfkiln.nix, anddeadnix --failon both: pass.Not verified
docs/library.md(thepackages.<system>.pdfkilnrow) still says the darwin output does not evaluate yet. That file is outside this change's scope and needs a follow-up.🤖 Generated with Claude Code