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

Add a simple nix dev shell #1542

Merged
merged 1 commit into from Jan 8, 2024
Merged

Add a simple nix dev shell #1542

merged 1 commit into from Jan 8, 2024

Conversation

srid
Copy link
Contributor

@srid srid commented Oct 12, 2023

[Feel free to reject this PR if you do not wish to have Nix support upstream]

This PR adds a simple flake.nix providing a development shell for people that use the Nix package manager. It provides the benefit of having everything setup automatically for Dioxus development -- all I have to do is open VSCode in the dev shell.

The flake provides only dev shell, and not the full Nix packages, because that will require a Cargo.lock. I originally wanted to write this flake to create the dioxus-cli package, but figured the dev shell would be useful to others.

@srid
Copy link
Contributor Author

srid commented Oct 12, 2023

Note: if you choose to merge this, I'm willing to be the maintainer of this flake, and can even add a CI action for it.

@jkelleyrtp
Copy link
Member

jkelleyrtp commented Oct 13, 2023

Is it all possible to move the flake/lock into a "dot" directory to keep the main folder less cluttered?

We like to add support for various shells/systems but they do end up cluttering the top level so I'm trying to keep things somewhat tidy.

@srid
Copy link
Contributor Author

srid commented Oct 13, 2023

It is technically possible -- and I can make that change if you absolutely want -- but this practice is almost never practiced in any projects that use Nix. Having a top-level flake.nix (which is equivalent to having a top-level Cargo.toml for Rust workspaces) also signals to potential contributors that this project is Nix-friendly.

@ealmloff ealmloff added the enhancement New feature or request label Oct 14, 2023
@jkelleyrtp jkelleyrtp merged commit 16bb078 into DioxusLabs:master Jan 8, 2024
2 checks passed
@jkelleyrtp
Copy link
Member

Thanks @srid ! Sorry this sat here for so long.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants