-
Notifications
You must be signed in to change notification settings - Fork 10
Update haskell.nix and use nixpkgs-2511 #220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
hamishmack
wants to merge
20
commits into
main
Choose a base branch
from
hkm/haskell-nix-update
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
Re-enable the build job for aarch64-darwin platform.
Re-enable the aarch64-linux build job in GitHub Actions.
Collaborator
|
This superceeds #222 |
Switch from nixpkgs-2505 to nixpkgs-2511, updating haskell.nix and all related inputs to their latest versions.
The JS backend builds fail due to a hash mismatch in the head.hackage.ghc.haskell.org fixed-output derivation in haskell.nix: specified: sha256-5gKLigkUTkkABGG8B9zNq8NKRIHv97K9No4kTLK/GyQ= got: sha256-AO/vHIMSIBwjbp5GY561SmnPr5qTTyBt9ruy8D3lKZI= This filters out all *-js-* shells from hydraJobs while keeping them available in devShells for local development. TODO: Remove this filter once upstream haskell.nix fixes the hash.
Both JS and Windows cross-compilation builds use head.hackage which has a stale hash in the current haskell.nix. Filter both from hydraJobs until upstream fixes the issue.
Update the head.hackage repository hash in tool-map.nix to the current value. This fixes the JS and Windows cross-compilation builds that were failing due to hash mismatch. Remove the temporary filter that excluded JS/Windows builds from hydraJobs since the root cause is now fixed.
The -env jobs previously used recursive-nix to run `nix print-dev-env` inside a derivation, but this fails on remote builders with: "recursive-nix is not supported yet by external derivation builders" This commit replaces that approach with Import From Derivation (IFD): - Read the mkShell output directly at evaluation time via builtins.readFile - Filter out the self-referencing $out variable to break circular deps - Embed the environment content directly in the wrapper script The mkShell output already contains "declare -x VAR=value" lines which is exactly what's needed. This approach: - Avoids the recursive-nix requirement entirely - Still includes all runtime dependencies (GHC, cabal, tools, etc.) - Works on remote builders without special configuration
The previous IFD approach forced cross-platform builds during evaluation, which could cause issues when Hydra evaluates on x86_64-linux but needs to evaluate aarch64-darwin shells. This new approach reads the mkShell output at build time using cat, avoiding both: - IFD which forces builds during evaluation - recursive-nix which is not supported on remote builders The shell is now a normal build dependency, and its output (containing "declare -x VAR=value" lines) is read at build time to construct the wrapper script.
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.
Updates to nixpkgs-2511 and latest haskell.nix.
Changes: