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

feat: added nix flake #10934

Merged
merged 12 commits into from
Feb 19, 2025
Merged

feat: added nix flake #10934

merged 12 commits into from
Feb 19, 2025

Conversation

JeancarloBarrios
Copy link
Contributor

@JeancarloBarrios JeancarloBarrios commented Feb 4, 2025

Adding a Nix flake for a deterministic development environment.

This currently provides only a development shell. To use it, ensure you have Nix installed with experimental features enabled and the nix command available. Then, run nix develop to enter a shell with all OS dependencies needed for development.

Future improvements may include automating build steps as well.

closes: #XXXX
refs: #XXXX

Description

Security Considerations

Scaling Considerations

Documentation Considerations

Testing Considerations

Upgrade Considerations

@JeancarloBarrios JeancarloBarrios changed the title Jeancarlo barrios/adding flake feat: added nix flake Feb 4, 2025
Copy link

cloudflare-workers-and-pages bot commented Feb 4, 2025

Deploying agoric-sdk with  Cloudflare Pages  Cloudflare Pages

Latest commit: a33cd79
Status: ✅  Deploy successful!
Preview URL: https://4a02b0cb.agoric-sdk.pages.dev
Branch Preview URL: https://jeancarlobarrios-adding-flak.agoric-sdk.pages.dev

View logs

@cor
Copy link

cor commented Feb 11, 2025

What's the state of this? Was about to write my own flake when I saw this

@JeancarloBarrios
Copy link
Contributor Author

JeancarloBarrios commented Feb 11, 2025

What's the state of this? Was about to write my own flake when I saw this

Im working on this as we speak, we can have a quick call if you want. I could actually use a couple pointers on this.

@cor
Copy link

cor commented Feb 11, 2025

What's the state of this? Was about to write my own flake when I saw this

Im working on this as we speak, we can have a quick call if you want. I could actually use a couple pointers on this.

that'd be nice! https://30.meet.cor.systems

@@ -0,0 +1,36 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this flake depend on configuration from your system wide flake? Because when I try to build it I get the following error.

nix build
error: flake 'git+file:///Users/touseefliaqat/code/agoric-sdk' does not provide attribute 'packages.aarch64-darwin.default' or 'defaultPackage.aarch64-darwin'

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let me check

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Mmm it should not

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes it should not, how did you installed nix? make sure flakes are enable to

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh oh, actually here you only need to run nix develop not nix build, I have only define a devshell I have not define a build shell yet

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't remember how i installed nix.
how to check if it has flakes enabled?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

in your nix config file generally: ~/.config/nix/nix.conf
ensure this configuration is set: experimental-features = nix-command flakes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@toliaqat lmk if it worked for you, remember to just run nix develop

@JeancarloBarrios JeancarloBarrios marked this pull request as ready for review February 15, 2025 21:57
@JeancarloBarrios JeancarloBarrios requested a review from a team as a code owner February 15, 2025 21:57
Copy link
Member

@michaelfig michaelfig left a comment

Choose a reason for hiding this comment

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

Approved, based on whether @toliaqat removes his request for changes.

Copy link
Member

Choose a reason for hiding this comment

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

I'm glad there's CI for this feature! That should prevent accidental breakage.

@JeancarloBarrios
Copy link
Contributor Author

What's the state of this? Was about to write my own flake when I saw this

Lmk if this flake is good enough for your use case

@JeancarloBarrios
Copy link
Contributor Author

What's the state of this? Was about to write my own flake when I saw this

lmk if this flake is good enough to start and it works for you

Copy link
Member

@dckc dckc left a comment

Choose a reason for hiding this comment

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

I'm not quite winning

Copy link
Member

@dckc dckc left a comment

Choose a reason for hiding this comment

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

we need distutils

Copy link
Member

@dckc dckc left a comment

Choose a reason for hiding this comment

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

yay!

@michaelfig michaelfig dismissed toliaqat’s stale review February 19, 2025 17:56

The PR was reviewed, tested for viability, and approved by @dckc. Since @toliaqat is on vacation, I'm dismissing this review so that we can merge it.

@toliaqat, please contact @JeancarloBarrios if you have further questions.

@JeancarloBarrios JeancarloBarrios added automerge:rebase Automatically rebase updates, then merge and removed automerge:rebase Automatically rebase updates, then merge labels Feb 19, 2025
@JeancarloBarrios JeancarloBarrios force-pushed the JeancarloBarrios/adding-flake branch from 49f56c7 to a33cd79 Compare February 19, 2025 21:36
@mergify mergify bot merged commit 5d2b5c1 into master Feb 19, 2025
84 checks passed
@mergify mergify bot deleted the JeancarloBarrios/adding-flake branch February 19, 2025 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge:rebase Automatically rebase updates, then merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants