Skip to content

chore: Replace haskell.nix with stacklock2nix #251

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

Merged
merged 39 commits into from
Apr 1, 2025
Merged

Conversation

sestrella
Copy link
Member

@sestrella sestrella commented Mar 25, 2025

This PR aims to simplify the current Nix setup for building the project by replacing haskell.nix with stacklock2nix, which has a simple interface and generates Nix derivations using the existing stack.yaml.lock. Additionally, it configures 'devenv' to provide Nix contributors with a development environment shell that includes all of the tooling needed to build and test the project.

Q&A

@fm7-1, @CristhianMotoche, @DavidMazarro I'm just trying to provide some background for the thought process behind some of the changes included in this PR; I'd be happy to discuss this with you if you have any concerns.

Why did the stack resolver get upgraded?

GHC 8.10.4 does not have great support for Apple Silicon, but given that Hapistrano is intended to be used as a tool rather than a library, upgrading the compiler to a more recent version should not be a major issue.

@sestrella sestrella changed the title PoC: Replace haskell.nix with stacklock2nix chore: Replace haskell.nix with stacklock2nix Mar 27, 2025
@sestrella sestrella marked this pull request as ready for review March 27, 2025 16:19
This reverts commit 179ebdd.
@sestrella sestrella changed the title chore: Replace haskell.nix with stacklock2nix chore: Replace haskell.nix with stacklock2nix Mar 27, 2025
Comment on lines +75 to +76
- name: Setup Cachix
uses: cachix/cachix-action@v16
Copy link
Contributor

Choose a reason for hiding this comment

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

💯

Copy link
Member

@DavidMazarro DavidMazarro left a comment

Choose a reason for hiding this comment

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

Great work Sebas! So much simpler :) I left a couple of comments

{
default =
pkgs.lib.warnIf (builtins.any (x: x == system) unstestedSystems)
"'${system}' is not tested as part of the CI workflow; please report any issues you encounter while dealing with it."
Copy link
Member Author

Choose a reason for hiding this comment

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

@DavidMazarro I added a warning message for aarch64-linux and x86_64-darwin because we are not currently building against them on the CI.

@@ -52,13 +52,13 @@ library
, System.Hapistrano.Commands.Internal
, System.Hapistrano.Maintenance
build-depends: aeson >= 2.0 && < 3.0
, ansi-terminal >= 0.9 && < 0.12
, ansi-terminal >= 0.9 && < 2.0
Copy link
Member Author

Choose a reason for hiding this comment

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

I am keeping the original lower bound for all the dependencies where I bumped the upper bound to avoid introducing some breaking changes.

Copy link
Member

@DavidMazarro DavidMazarro left a comment

Choose a reason for hiding this comment

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

LGTM!

@sestrella sestrella merged commit e803e4b into main Apr 1, 2025
5 checks passed
@sestrella sestrella deleted the setup_stacklock2nix branch April 1, 2025 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants