[M5+] add resolver::nixpkgs_probe (nix eval wrapper)
This commit is contained in:
11
CHANGELOG.md
11
CHANGELOG.md
@@ -78,6 +78,17 @@ All notable changes to cargoxx will be documented in this file.
|
||||
and `[build]` honoring `warnings_as_errors` and `sanitizers`. Source
|
||||
paths emitted relative to `build/` (i.e. prefixed with `../`).
|
||||
Output is deterministic. `tests/codegen_cmake.cpp` covers 11 cases.
|
||||
- `cargoxx.resolver::nixpkgs_probe(attr)` — runs
|
||||
`nix eval nixpkgs#<attr> --json --apply 'p: { version, path }'` via
|
||||
`exec::run` and returns a `NixpkgsInfo { attr, version, out_path }`.
|
||||
Distinguishes missing attributes (`ResolutionUnknownPackage`) from
|
||||
evaluator/network errors (`ResolutionNetworkError`). The `path` field
|
||||
name avoids nix's `outPath`-driven derivation coercion in `--json`
|
||||
mode (which would otherwise serialize the result as a bare path
|
||||
string instead of a JSON object). Pure parser
|
||||
`parse_nix_eval_json(attr, text)` exposed for unit tests; live tests
|
||||
in `tests/nixpkgs_probe_live.cpp` are gated behind
|
||||
`CARGOXX_NETWORK_TESTS=1` (verified locally against `hello`).
|
||||
- `cargoxx add <pkg>[@<version>] [--components a,b]` edits `Cargoxx.toml`,
|
||||
validates the new dep against the curated linkdb (so unknown packages
|
||||
and missing components fail before any disk write), and rejects
|
||||
|
||||
Reference in New Issue
Block a user