fix(utils): discover nix submitEnv dynamically in dev checkout
Problem: In a dev checkout, `_nix_submit_cmd` is nil (only baked in by
the nix derivation). The uv fallback fails with code 127 on NixOS because
`uv` is not a bare system binary — it's only available via the FHS-wrapped
`cp-nvim-submit` script produced by `mkSubmitEnv`.
Solution: Add `discover_nix_submit_cmd` mirroring `discover_nix_python`:
runs `nix build #submitEnv --no-link --print-out-paths`, caches the result
in `stdpath('cache')/cp-nvim/nix-submit`, and sets `_nix_submit_cmd`.
`run_scraper` calls `setup_nix_submit_env()` before spawning submit.
This commit is contained in:
parent
128ff04621
commit
690469bd99
2 changed files with 69 additions and 0 deletions
|
|
@ -44,6 +44,10 @@ local function run_scraper(platform, subcommand, args, opts)
|
|||
return { success = false, error = msg }
|
||||
end
|
||||
|
||||
if subcommand == 'submit' then
|
||||
utils.setup_nix_submit_env()
|
||||
end
|
||||
|
||||
local plugin_path = utils.get_plugin_path()
|
||||
local cmd
|
||||
if subcommand == 'submit' then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue