fix(nix flake): ensure nix flake builds successfully - #10399
Merged
Conversation
there are inference_defaults.json already in the repo so we can use those, they are regularly updated with github actions, and we avoid hash mismatch errors in the flake this way Signed-off-by: Souheab <souheab@protonmail.com>
Signed-off-by: Souheab <souheab@protonmail.com>
Signed-off-by: Souheab <souheab@protonmail.com>
Signed-off-by: Souheab <souheab@protonmail.com>
… npmDepsHash Signed-off-by: Souheab <souheab@protonmail.com>
Souheab
force-pushed
the
fix/nix-flake-not-building
branch
from
June 19, 2026 05:03
7c91c9d to
d8f968c
Compare
Owner
|
I don't use nix, @richiejp probably can help reviewing here |
Collaborator
|
Awesome stuff, I only use the dev env so far. So yeah we need a ci job to update the vendor hash otherwise it'll bitrot very quickly |
richiejp
approved these changes
Jun 19, 2026
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.
Description
This PR fixes the issue of nix flake not building, and additionally also fixes a NixOS specific bug where in the backends folder when running scripts like run.sh (which is present in the cuda12-llama-cpp backend)
Notes for Reviewers
There were many reasons the flake was not building.
First inference_defaults.json was being fetched from unsloth by the flake and this caused a hash mismatch. I noticed that inference_defaults.json was already present in the repository and was regularly updated via github actions so I thought it was unecessary to fetch it via the flake and instead the inference_defaults.json that already exists in the repo can be used.
There was a hash mismatch for the Go vendorHash so I updated that with the correct hash.
The Go makefile required "core/http/react-ui/dist" to exist so I added a nix derivation for the react UI.
After this it was able to build successfully but some backends such as the "cuda12-llama-cpp" backend weren't working and there was an error running run.sh in this backend as they used the "#!/bin/bash" shebang and /bin/bash isn't present on NixOS due to it not following the Filesystem Hierarchy Standard (FHS). I fixed this by adding an FHS environment wrapper with bash, grep and coreutils to ensure that the script is able to run correctly.
To avoid hash mismatches in the future, I think it might be a good idea to have GitHub actions automatically update the vendorHash for the flake whenever go.mod or go.sum is updated
Signed commits