-
Notifications
You must be signed in to change notification settings - Fork 11
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
flake init #59
flake init #59
Conversation
We recently started a repository to store various integrations: https://github.com/nushell/integrations. If possible, flake.nix would be better stored there to avoid spreading too many files around unrelated to the project. That being said, I think it's still too early to distribute nupm. We even released any version of it yet. |
Thanks for your feedback!
I don't think so. That would need a much larger I also don't agree that the files are 'unrelated to the project', they are very specific to Just to be clear. I've made sure this is as non-invasive as possible. The use of this flake is 100% optional and should have no effect on anything outside of the nix-ecosystem. I'm also happy to maintain these files and be pinged for any problems/questions/help.
This isn't actually distributing anything, it's just packackaging I would also like to point out that |
I mean, yes, it's related to the project, but we could quickly get our repository cluttered with all the different package manager files that would ultimately be our responsibility to maintain. @MangoIV made an external flake for Nushell here: https://git.sr.ht/~mangoiv/nu-shell.nix, so I guess it's possible to have a flake outside the project. Couldn't the flake pull from https://github.com/nushell/nupm instead of requiring local files? The advantage of https://github.com/nushell/integrations is that we can add some CI checks to test the packaging, and it is meant to be community-maintained, to avoid having the core team to maintain package manager and distro files in our core repositories. The flake.nix in nufmt came before we had https://github.com/nushell/integrations, it should probably be moved there as well. |
we can have |
You can absolutely package this outside of the source repo (this is how
I'm not sure I understand this comment as it seems very speculative. I never implied all package formats should be included in this repo. I would also like to point out that I volunteered to maintain these files.
To be fair, this pr existed before that repository as well. Seeing as the |
To make it less cumbersome, we started the nushell/integrations repo, so at least related package manager files could be in one place under the nushell org. Feel free to put it there.
Once we accept something to our codebase, it is ultimately the core team's responsibility to maintain it (or remove it if we can't maintain it). People come and go, so if you were in a situation unable to maintain it in the future it would fall on us. But it's great to see people wanting to help out and maintain stuff, I'd be happy to put the flake nushell/integrations.
Yeah, somehow I didn't notice it earlier. |
Such a flake would be quite a bit more complex as it would eventually hold derivations for many nushell projects and I'm not comfortable maintaining something like that, although I would love to use/contribute to it should someone take the initiative. I can solve all these problems within my own projects so it isn't a big deal to me, I was just trying to upstream a solution. Thanks again! |
Description
I know the nushell maintainers aren't super familiar with nix and while I am
completely unqualified to explain nix to anyone, I can at least provide a tl;dr
about flakes and what the files do.
flake.nix
flake.nix
is a (purish) function that describes how to build and packageapplications. The
inputs
to this function are typically buildtime/runtimedependencies (
rustc
,cargo
,nushell
, etc.), and developer tooling(
clippy
,rust-analyzer
, etc.).The function
outputs
can contain multiple things including runnableapplications, developer environments, nix modules, etc.
flake.lock
flake.lock
version-pins theinputs
to the function. This means you get extremelyconsistent reproducibility to the build function
outputs
. This is one of themain reasons people love flakes so much.
result/
nix build
will symlink the built derivation to theresult
directory.This should be included as an entry into
.gitignore
.I also left a some comments in
flake.nix
to help explain a few things.