-
Notifications
You must be signed in to change notification settings - Fork 4
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
Use without devshell #8
Comments
Maybe I could figure it out when doing #6
This second task will be the hardest one. |
This would not resolve this issue, but I found it interesting. |
You can recreate files of a repository directly to your local machine by running
Maybe it works with absolute paths: |
thanks @hugosenari I have studied the sources code of devshell and devshell-files in the meantime, and here's what I've got so far. An example of how this could be used (with flakes) in this repo. You can either checkout the repo and do: nix run github:rhinofi/devshell-files-test Uses Note that I'm still using devshell.eval but this could be easily replaced as under the hood it's simply lib.evalModules. The next step would be to extract the devshell specific configuration into a separate module which could simply be omitted if one doesn't use this in the context of devshell (or maybe we could add an option. We should be able to then use the devshell free modules within devenv. Just need to figure out how to pass custom modules so that they get evaluated with everything else. Probably need to add a devenv specific modules (similar to the devshell one) to set any required devenv options. |
actually, we could simply hide them behind something like |
Would also be good to add |
let's play OO game here.
|
Sorry wrong button |
Looks like every day we have a new devshell alternative |
sound like a plan btw. my idea form above:
didn't quite work, since if we don't import devshell modules we'll get errors about non existent options, event though the value is behind So here's what I've tried: check if I do think that splitting the code into separate files would be cleaner though. Maybe the module containing
Yeah, given the proliferation of projects which start to leverage nixos module system outside nixos itself, it would do good for the ecosystem to promote a pattern of standalone module (which can be used outside of the "mother" project) + adaptors. Btw. maybe we should try to push for unification between file creation functionality from this repo and the effort at devenv? Maybe even extract relevant code to a new repo at: https://github.com/nix-community? |
I’d like to use your modules in a project which doesn’t use devshell (nor flakes). Could this be easily done? I’d like to simply be able to manually invoke a command to generate the files using given PRJ_ROOT
If any changes would be needed, I’d be happy to to contribute if you could point me in the right direction. Thanks!
The text was updated successfully, but these errors were encountered: