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

Feature/nix - Add NixOS support #119

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

use-the-fork
Copy link

I love this project but needed it to run on my NixOS systems. So, I made it NixOS-compatible!

I also added setup instructions to the readme and contributing guides.

@steve8708
Copy link
Contributor

thanks @use-the-fork ! my only concern here is this is a lot of new code to maintain that i won't know how to maintain

just so i undertand - why is a dedicated nix package needed (aka why can you not use nodejs with NixOS)?

right now we only publish to npm which keeps things releatively simple and consistent, so need to make sure if we're going to add more targets and maintain those that it makes sense to do so

@use-the-fork
Copy link
Author

@steve8708 So there is nothing "new" for you to maintain. NixOS is 100% declarative, meaning everything is compartmentalized, and there isn't a "global" Node.js package. Nix will build everything individually and in its own container. What I added will read the package-lock.json file and convert that into NixOS inputs (i.e., the NixOS equivalent). It will then use the exact inputs required to build the package and install it in its own space on my system.

That way, there are never any conflicts between packages, and if I ever want to remove something, it's 100% cleaned up with no remnants.

So this PR doesn't actually change anything for you. You can keep publishing to npm. All my addition does is allow someone using NixOS to add the package to their system.

@steve8708
Copy link
Contributor

totally hear you on that, but every line of code added to this repo is new code that maintainers of this repo need to be able to maintain (answer issues about, debug, fix, etc)

for instance, that lock.json, does it need to stay in sync with our package-lock.json? or the other files, is there 0 chance they will ever need to change or ever have a bug? if I or any other maintainer aren't familiar with nix, I can't confidently say we can support this code in the repo

is there any way to make a nix package that does not require source changes to this repo?

@use-the-fork
Copy link
Author

totally hear you on that, but every line of code added to this repo is new code that maintainers of this repo need to be able to maintain (answer issues about, debug, fix, etc)

for instance, that lock.json, does it need to stay in sync with our package-lock.json? or the other files, is there 0 chance they will ever need to change or ever have a bug? if I or any other maintainer aren't familiar with nix, I can't confidently say we can support this code in the repo

is there any way to make a nix package that does not require source changes to this repo?

So there is a GitHub action that would do that. But you have a good point. I'll just keep my branch up-to-date.

Would you be okay with me removing that part but keeping just the parts that set up the dev environment? That wouldn't change at all unless you upgrade Node.js, and then it's just a number change.

I like this package and would like to contribute.

@steve8708
Copy link
Contributor

Would you be okay with me removing that part but keeping just the parts that set up the dev environment?

what parts would that be?

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.

2 participants