-
-
Notifications
You must be signed in to change notification settings - Fork 61
Add flake.nix file for Nix/NixOS users #196
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
base: master
Are you sure you want to change the base?
Conversation
This flake defines a development shell for developing argbash. It ensures that all dependencies used to build this project are pinned to a specific version (via a lock file). In this case, make, m4, and autoconf, and sphinx. This guarantees deterministic build behavior; builds always use the same exact dependencies until the lock file is updated. Any updates to the dependencies on a system level will not be able to break our build if an API or a behavior of such a dependency has changed. The nixpkgs repository already has a build script for argbash here: https://github.com/NixOS/nixpkgs/tree/master/pkgs/by-name/ar/argbash But that is just for building the tool so it can be used. A devshell can be defined and used from there, but this patch allows it to be updated when new dependencies come in, allowing us to keep the flake in sync with development of this tool.
The question is whether this is the right place for it. I am now in favor of having distributions as single source of truth of Argbash packaging. |
@matejak this is not for packaging itself, it's just for developers so they can get the correct dependencies to build and test argbash. The git hashes The hashes are updated once we decide to update our dependencies. It is desired to keep dependencies fixed, such that updates of dependencies (which would be done in a separate nixpkgs commit) don't suddenly break the build. In addition, this allows us to deterministically update our dependencies by running Typically, an update would be run every couple of months, if any of the dependencies had been updated in the nixpkgs branch. I've seen other projects have the same flake file for years. It's just practical to be able to run |
Would it be possible to connect this to some sort of CI? That would provide some indication that the file is OK, and neutralize my reservations towards introducing distribution-specific content into the project. |
Would be possible, if the CI has the |
Don't be shy, look at https://github.com/matejak/argbash/blob/master/.github/workflows/run-tests.yml and feel free to propose anything that is needed - new step, new test... |
This flake defines a development shell for developing argbash. It ensures that all dependencies used to build this project are pinned to a specific version (via a lock file). In this case, make, m4, and autoconf, and sphinx.
This guarantees deterministic build behavior; builds always use the same exact dependencies until the lock file is updated. Any updates to the dependencies on a system level will not be able to break our build if an API or a behavior of such a dependency has changed.
The nixpkgs repository already has a build script for argbash here:
https://github.com/NixOS/nixpkgs/tree/master/pkgs/by-name/ar/argbash
But that is just for building the tool so it can be used. A devshell can be defined and used from there, but this patch allows it to be updated when new dependencies come in, allowing us to keep the flake in sync with development of this tool.