Skip to content

Fix nixpkgs hash for standalone build - #25

Open
andersaamodt wants to merge 1 commit into
mainfrom
codex/restore-nixos-standalone-binary-e0kewn
Open

andersaamodt wants to merge 1 commit into
mainfrom
codex/restore-nixos-standalone-binary-e0kewn

Conversation

@andersaamodt

Copy link
Copy Markdown
Owner

Summary

  • update the standalone Nix derivation to use the current nixos-24.05 channel hash so nix-build can fetch the pinned inputs successfully

Testing

  • cargo test --locked

https://chatgpt.com/codex/tasks/task_e_68dbab15e71c8320a748455d60820d9b

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Comment on lines +25 to +29
- name: Build NixOS standalone binary
run: |
nix-build nix/standalone.nix --out-link result-nixos
mkdir -p artifacts
cp -L result-nixos/bin/stonr artifacts/stonr-nixos-amd64

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] Bundle full Nix closure for uploaded binary

The workflow step copies only result-nixos/bin/stonr into the artifact. Binaries produced by nix-build embed RPATHs to libraries in /nix/store/<hash>-…; when the artifact is downloaded on another machine (even another NixOS host) those store paths will not exist unless the entire closure is copied as well. The uploaded file will therefore fail to start with missing dynamic loader or library errors. Consider exporting the whole derivation output (e.g. nix-store --export $(nix-store -qR result-nixos)) or using nix bundle/nix copy so the artifact contains its dependencies.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant