-
-
Notifications
You must be signed in to change notification settings - Fork 20
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 support for building Bashcov with the Nix package manager #78
Conversation
ddf02cf
to
2a19c7a
Compare
@tomeon Thank you for your hard work on this. I have very limited experience with Nix but happy to test this PR whenever you need it. |
24a2fe9
to
35a61bd
Compare
5cac52b
to
287c888
Compare
@infertux --
Thank you! Sounds like you are the ideal audience for the new Highlighting some other changes: I updated the |
@tomeon Just FYI I haven't forgotten you but I've been traveling and don't have access to my workstation to try out this Nix stuff properly. I'm looking at the diff and wondering why do we need to have a separate |
This is possible, but requires tracking
This is a limitation, or at least a stricture, of Nix flakes. I figured that the path of least resistance would be to introduce a Nix-specific lockfile, rather than remove |
NixOS doesn't have /bin/bash. Replace it by `/usr/bin/env bash`.
On most OS, shebangs can only specify a single parameter.
including a definition of the `bashcov` derivation and a `numtide/devshell`-based development shell.
by not requiring Git for listing the files that should be included in the gem. Instead assume that the entire build sandbox source directory should be included, minus the files in test/, spec/, and features/.
via the following: 1. cd.sh: replace use of HOME with OLDPWD, 2. delete.sh: Use `$BASH` rather than `/usr/bin/env bash` as the interpreter for `tmp.sh`, and 3. Use `-execdir` rather than `-exec` when executing scripts with `find`.
in order to support systems that do not provide /bin/bash.
if it /bin/bash does not exist.
as this is available in the Nix sandbox while /usr/bin/env (Aruba's default, used with `/usr/bin/env bash`) is not.
so that `nix flake check` builds and tests `bashcov`.
that includes information on running Bashcov with Nix
which updates `Gemfile.nix.lock` and `gemset.nix` if, and only if, doing so fixes errors running `nix build`.
that opens a PR with changes to `Gemfile.nix.lock` and `gemset.nix` if any were made by `update-deps-conservative`.
as such failures may be due to an out-of-date `Gemfile.nix.lock` and/or `gemset.nix`.
for (among other things) native extension compilation prerequisites.
No that's fine, your approach makes more sense to me too. Thank you for the awesome work @tomeon and the nice documentation in particular. I've given it a try and I'm happy to merge it finally. I apologize for the delay as life got in the way... thank you for your patience :) |
Relates to #72 .
This branch introduces support for building Bashcov with Nix. My hope is that some of this code can be downstreamed to Nixpkgs to satisfy NixOS/nixpkgs#242854. In the meantime, the changes in this PR permit Nix users to incorporate Bashcov into their Nix environments / NixOS configurations by using either Nix flakes or legacy Nix code-fetching methods.
Additionally, this PR introduces a Nix-based development environment that can be entered by executing
nix develop
from within the repository. This development environment includes Ruby 3.2, plusbundix
for helping to maintain thegemset.nix
file that acts as a gem specification for consumption by the NixbundlerEnv
Bundler environment builder.I plan to add support for executing Nix builds and tests within the GitHub actions workflow introduced in #76.
TODO
gemset.nix
, ...).gemset.nix
is up-to-date).Needs feedback
CONTRIBUTING.md
, or perhaps a separate doc -- say,HACKING.md
).