Repository navigation
Conversation
There was a problem hiding this comment.
Why such a verbose syntax? E.g. this would be nicer:
nix-path = { this = ./test-nix-path.nix; nix = nixDir; }
There was a problem hiding this comment.
Well, the path must be a list because the order matters.
There was a problem hiding this comment.
Hm forgot about that. Still unfortunate that it comes with such a high price ;)
There was a problem hiding this comment.
Order matters, plus there are the prefix-less entries.
|
A while back I implemented a |
|
Together with NixOS/nixpkgs#2563 and my forthcoming solution to NixOS/nixops#78 this will let us have our modules specify almost all of the stateless bits of our deployments (the only bits out of that control are the nix and nixops versions used) without having to put constraints on future work in nixops, nixpkgs, or our own modules (i.e. we can freely use nix path) and while letting us easily test with our local nix-path in development. Is there another solution that is as good? If not, what aspects of this solution are problematic enough to warrant choosing a worse one? |
|
@shlevy Could you perhaps write up a small piece of documentation about the different ways of managing nix-paths, especially using this? |
|
@rbvermaa done |
|
Superceded by 62a6eeb |
Try pinning the macOS version in github action base image
Git fetcher: Restore progress indication
…OS#259, fixes ledger Independent whole-branch audit (22 agents -> dedup -> per-finding adversarial verify): 70 findings, 63 confirmed, 7 refuted. Catalog corrections (counts/claims re-derived against master): - NixOS#65: recorded grep was malformed (anchored `builtins\."` returns 2, not 79); restored the unanchored form, noted the 87-name-anchored alternative is a different set (F014). - NixOS#18: B3's grep returns 24 lines / 23 hand-written, not 17; added the six omitted names (F016). - NixOS#169/NixOS#217/N33: friend count is 11 Expr* lines / 10 distinct, not "10 / 9" (F013). - NixOS#103/N6 + verified/05: RewritingSink no longer "tracks match positions"; matches is dead and HashModuloSink::finish's loop is inert since 3ebe134 (F019). - NixOS#138: eval.cc read-site is copyPathToStore, not the nonexistent "addToStore" (F006). - NixOS#218 + STATUS: placeholder inventory undercounted (6 -> 7-8); the wire-marker is the BuildResult compat StringMap, not a DrvOutput serialisation; nix-store.cc misfiled as a "legitimate constant" (F007-F011). - README U7b/U7c + N1: migratable cache count and per-site exclusion reasons (F017/F018). - verified/19: nix_get_external is a functional bug, not a "quirk"; nix_store_path_hash missing-preamble outlier (F003/F052). - verified/17: tree glyphs live in libutil util.hh, not "libcmd headers" (F035). - NixOS#11-legacy NixOS#222/NixOS#231 + FOLLOWUPS: --max-freed mechanism and the --priority getArg mis-recommendation (F001/F002). New candidates NixOS#241-NixOS#259 filed into their topical sections (per the catalog's group-by-symptom principle): 03 (NixOS#244), 07 (NixOS#246), 08 (NixOS#243), 10 (NixOS#253,NixOS#255), 12 (NixOS#241,NixOS#242,NixOS#259), 13 (NixOS#248,NixOS#249,NixOS#251), 16 (NixOS#245,NixOS#247), 17 (NixOS#254,NixOS#256), 20 (NixOS#250,NixOS#252), 23 (NixOS#257,NixOS#258). NixOS#122: re-verified the stackOverflowHandler symbol-mangle caveat is correct as written (F062). The audit is recorded as a STATUS.md "Recently completed" event (it subsumes the per-finding report; no standalone report file is kept). The corresponding code fixes are uncommitted on the cleanup worktrees. Also converted the macOS /Users/cbaker2 paths in HANDOFF.md/STATUS.md to the Linux /home/cbaker2 paths used on this machine. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This adds a
builtins.importWithSettingsprimop that allows specifying settings (as an attrset) for the import. The only currently recognized setting isnix-path, which is a list of attrsets with an optionalprefixattr and a requiredvalueattr. It also adds a__curSettingssymbol to access the settings associated with the current parse.In order to propagate the settings properly,
importwas changed from a primop to syntax sugar. This will break usage ofbuiltins.import, so we can add a dummy primop that fails to propagate the settings (perhaps with a warning printed) if this is a problem (but I doubt anyone actually uses this).