-
-
Notifications
You must be signed in to change notification settings - Fork 131
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
Use writeShellApplication for packaging #22
Conversation
I have a fork/branch for with some more improvements (& that utilizes of flake.parts), is that something you are interested in me PR'ing over? |
bors merge |
Yes. Looks useful: https://github.com/Kranzes/nixos-remote/commit/b400913411bf42a49479abd50c583935f704a0cb |
But maybe keep the packages with importable with |
Oh I get what you mean, but also I'm not sure that "some people don't use flakes" argument holds much considering basically all of this project depends on flakes. From the shell script (nixos-remote), disko and more. |
I created the PR: #23 |
nixos-remote can be still used without flakes. All parameter have fallbacks for store paths. It's mainly checks where also import flakes. |
With this change the packaging will be made with
writeShellApplication
which allows adding runtime inputs (deps) to the script by setting the $PATH variable at the top of the file. It also has a check phase which tests the shell file againstshellcheck
like we did before manually. It also sets the safety bash options.you can read more about
writeShellApplication
here -> https://github.com/NixOS/nixpkgs/blob/d3a307c813cbd209fe1e13ac9246b3fa3ea93c12/pkgs/build-support/trivial-builders.nix#L282