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 shell.nix or prefarably a flake.nix #4973

Open
Dlurak opened this issue Nov 3, 2024 · 3 comments
Open

Add a shell.nix or prefarably a flake.nix #4973

Dlurak opened this issue Nov 3, 2024 · 3 comments
Labels
enhancement New feature or request need more info Further information is requested PR is more than welcomed Extra attention is needed

Comments

@Dlurak
Copy link

Dlurak commented Nov 3, 2024

User Story

As a NixOS user interested in contributing I want to add a flake.nix file to make it easier to start working on this project

Rationale

  • A fully reproducible and declarative development environment are useful
  • Nix users would only need to run nix develop to be dropped in a shell with all relevant dev tools, like nodejs...
  • Everything can be installed globally or a very long nix-shell -p command can be used

Impact

This simplifies the initial setup for nix users. It doesn't matter at all to the end user but it does make it easier to start working on this project for nix users.

@HarelM
Copy link
Collaborator

HarelM commented Nov 4, 2024

I'm not familiar enough with this OS, and I think it's too nitch to be added to this project.
Having said that, I think the following PR can solve most of what you want:

Currently it is not done correctly and there are a lot of issues there, but they can be solved easily for someone who know docker well.
It also can be used for codespaces base image and allow to define what is actually needed in order to develop maplibre.

If this is something that you think can solve your issue it would be great if you could open a PR to add this ability.

@HarelM HarelM added enhancement New feature or request PR is more than welcomed Extra attention is needed need more info Further information is requested labels Nov 4, 2024
@Dlurak
Copy link
Author

Dlurak commented Nov 4, 2024

Thank you for your response and for considering ways to support isolated development environments!

I understand that Nix may feel niche compared to Docker. However, a flake.nix could actually complement a Docker-based setup and bring value without affecting non-Nix users:

  1. While Nix is deeply integrated with NixOS it also runs on other Linux distributions and even macOS, making it a versatile chose across a bunch of different enviroments.
  2. A flake.nix file is simpler and more natural for development work than Docker containers. Additionally it's lightweight especially compared to Docker containers.
  3. Adding a flake.nix file would require minimal maintenance and wouldn't interfere with the proposed Docker based setup or the normal not isolated, not reproducible, not declarative setup. Similar to the .editorconfig, it would simply be an optional tool for those who find it useful.

If you're open to it, I'd be happy to submit a PR that introduces a minimal flake.nix file.

@HarelM
Copy link
Collaborator

HarelM commented Nov 7, 2024

If you can create a docker image based on nix to facilitate both use cases, I think it would beneficial. Otherwise, you could probably create a nix for yourself as I don't see us maintaining this file...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request need more info Further information is requested PR is more than welcomed Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants