Skip to content

fix(nix): remove duplicate spirv-headers function arg (#81) - #117

Merged
TheTom merged 1 commit into
feature/turboquant-kv-cachefrom
fix/issue-81-nix-spirv-dupe
May 1, 2026
Merged

fix(nix): remove duplicate spirv-headers function arg (#81)#117
TheTom merged 1 commit into
feature/turboquant-kv-cachefrom
fix/issue-81-nix-spirv-dupe

Conversation

@TheTom

@TheTom TheTom commented May 1, 2026

Copy link
Copy Markdown
Owner

Fixes #81 — re-reported on current HEAD by @alanscodelog (comment).

.devops/nix/package.nix had spirv-headers declared twice in the function pattern arglist (line 19 and line 22), causing every nix evaluation to fail at parse time:

error: duplicate formal function argument 'spirv-headers'
       at .devops/nix/package.nix:22:3:
           21|   shaderc,
           22|   spirv-headers,
             |   ^
           23|   useBlas ?

Two prior fix attempts both added the same line — this PR drops the duplicate.

Verification

Tested with nixos/nix:latest Docker container:

  • Pre-fix: nix-instantiate --parse errors with the exact message above (verified by injecting the duplicate back into a copy of the fixed file).
  • Post-fix: nix-instantiate --parse .devops/nix/package.nix exits 0 and emits the parsed AST. Single spirv-headers declaration remains, consumed by vulkanBuildInputs and nativeBuildInputs.
docker run --rm -v "\$PWD:/src" -w /src nixos/nix:latest \
    nix-instantiate --parse .devops/nix/package.nix
# exit 0

Closes

Two well-meaning fixes both added `spirv-headers` to the package.nix
function pattern arglist (line 19 and line 22 on current HEAD), causing
a hard parse-time failure on any nix evaluation:

  error: duplicate formal function argument 'spirv-headers'
         at .devops/nix/package.nix:22:3:
             21|   shaderc,
             22|   spirv-headers,
               |   ^
             23|   useBlas ?

Drops the second occurrence. The remaining single declaration is what
the rest of the file actually references (line 19 binds the input;
`vulkanBuildInputs` and `nativeBuildInputs` consume it once each).

Reported by @cguentherTUChemnitz in #81 (originally), then re-confirmed
by @alanscodelog on the current tip after two prior fix attempts both
landed the same line.

Verified: fixed file parses clean via nix-instantiate; injecting the
duplicate back reproduces the exact error message above.

Closes #81.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@TheTom
TheTom merged commit 4f33166 into feature/turboquant-kv-cache May 1, 2026
1 check passed
@TheTom
TheTom deleted the fix/issue-81-nix-spirv-dupe branch May 1, 2026 16:12
crusaderky pushed a commit to crusaderky/llama.cpp that referenced this pull request Aug 9, 2026
)

The v0.4.0 router hardening (bdee25a) dropped status.args and
status.preset from get_router_models, diverging from upstream and
breaking clients like pi-llama-cpp that parse launch args (e.g.
--ctx-size) of unloaded models.

Restore upstream parity; sanitization stays stronger than upstream via
remove_sensitive_options() in unset_reserved_args() and is_sensitive
skips in to_args()/to_ini(). Update docs that claimed argv/presets are
never returned, and add a router unit test asserting both fields.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compile bug: nix vulkan build is broken

1 participant