-
-
Notifications
You must be signed in to change notification settings - Fork 15.5k
hss: init at 1.0.1 #25936
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
hss: init at 1.0.1 #25936
Conversation
inherit ruby; | ||
gemfile = ./Gemfile; | ||
lockfile = ./Gemfile.lock; | ||
gemset = ./gemset.nix; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just use gemdir = ./.;
instead of the three lines above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough, this seems simpler and works just the same. Thanks for the feedback :)
Would it not also useful to replace https://github.com/akerl/hss/blob/master/bin/hss#L21 with a reference to the real |
Yeah, now that I think about it that path should absolutely be replaced. I was a bit tired when I put this together, so I missed that. What would be the best way to replace that line? I thought about using sed on the output in postInstall, but the path is very long and includes version numbers for ruby. It seems ill advised to do that. What phase would patching that make sense at? I looked around nixpkgs, but didn't find any examples of packages using bundlerEnv doing this kind of replacement. |
use |
I tried a couple of things, but it looks like bundlerEnv doesn't support most of the normal phases and overrides. The only extra commands you can run are postBuild, at which point the files are already in place behind the ruby versions. So any code I place in a postInstall/postPatch doesn't get executed at all. Replacing ssh here doesn't seem to be as easy I first thought. I can see a few examples in nixpkgs where bundlerEnv is tied into a stdenv.mkderivation, so I think I might refer to them to see what they did. |
Motivation for this change
Adds hss, a simple SSH helper written in ruby to allow shorthand for a fleet of hosts.
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)