Skip to content
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

Convert to flake #265

Merged
merged 3 commits into from
Sep 15, 2022
Merged

Convert to flake #265

merged 3 commits into from
Sep 15, 2022

Conversation

avdv
Copy link
Member

@avdv avdv commented Sep 14, 2022

  • add compatibility layer for nix-shell users
  • update nixpkgs to nixos-22.05
  • use flake.lock instead of nixpkgs.json

@avdv avdv mentioned this pull request Sep 14, 2022
@tshaynik
Copy link
Contributor

tshaynik commented Sep 14, 2022

At the moment there are two separate flake.nix files, one in the project root and then a placeholder in core that would need to get synchronized to the same rev (presumeably these should always use the same nixpkgs commit?). So at the moment, to bump nixpkgs, you would have to run nix flake update in both the project root and in core to keep them in sync. Could it be useful to delete the core/flake.nix and make core/flake.lock a hard link? Then nix flake update in the project root would update core as well.

@avdv
Copy link
Member Author

avdv commented Sep 15, 2022

Yes, good point! I'll see if that works...

@avdv avdv merged commit 0c49af7 into master Sep 15, 2022
@avdv avdv deleted the convert-to-flake branch September 15, 2022 13:17
Copy link
Contributor

@tshaynik tshaynik left a comment

Choose a reason for hiding this comment

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

This looks good to me! (I'm still very new to Tweag and to Bazel, so somebody else should probably look it over as well)
Things I like about your approach:

  • using nix-compat to not breaking the traditional workflow
  • ability to use a single invocation of nix flake tool to manage pinning nixpkgs
  • actual use of this ruleset within Bazel does not depend on any experimental flake features

@avdv
Copy link
Member Author

avdv commented Sep 15, 2022

This looks good to me! (I'm still very new to Tweag and to Bazel, so somebody else should probably look it over as well)

Thank you for the review! Another pair of eyes would have been good, but I accidentally already pushed this onto master... If somebody has any objections to this, let's just fix it in another PR.

Things I like about your approach:

* using nix-compat to not breaking the traditional workflow

* ability to use a single invocation of `nix flake` tool to manage pinning nixpkgs

* actual use of this ruleset within Bazel does not depend on any experimental flake features

👍 we might switch to nix flake usage in the future, when flakes are no longer considered experimental.

Copy link
Member

@aherrmann aherrmann left a comment

Choose a reason for hiding this comment

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

I can only echo @tshaynik's comments, looks good, thank you!

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