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
gitAndTools.overcommit: init at 0.46.0 #54263
Conversation
f4a1513
to
95f95bf
Compare
To use overcommit, it will copy some files (namely Does anyone have an idea? |
95f95bf
to
e9efc35
Compare
The problem is that ruby needs to be installed along with overcommit to get this working. How can I tell nix to do so? |
e9efc35
to
25c9f97
Compare
pkgs/applications/version-management/git-and-tools/overcommit/.bundle/config
Outdated
Show resolved
Hide resolved
pkgs/applications/version-management/git-and-tools/overcommit/default.nix
Outdated
Show resolved
Hide resolved
25c9f97
to
3c0ce76
Compare
The way to fix this is to make the overcommit hook a wrapper that sets the RubyGems environment variables, and then loads the real hook. Now, doing this is easier said than done, and it’s taken me a whole evening to figure out how to, because I don’t think we’ve ever had a situation like this before, but I have it working now. Do you mind if I just push a commit to your branch? |
Oh great, yes feel free to push your changes! |
3c0ce76
to
28211f6
Compare
15492e2
to
b77626b
Compare
b77626b
to
2a38c00
Compare
It does not work for me..
verify_signatures: false
PreCommit:
Mdl:
enabled: true
Furthermore, if I understand your changes correctly, the hooks aren't wrapped:
|
Patches overcommit to use the bundlerApp's GEM_HOME and GEM_PATH. This means nothing has to be installed globally to use overcommit. A side effect of this is that, if overcommit is installed globally, hooks will continue to use the version of overcommit that generated them, and will have to be regenerated to use a different version of overcommit. This seems reasonable to me.
2a38c00
to
2a98fac
Compare
@alyssais Are you still interested in giving your input? Otherwise I will close this PR because I am unable to fix this. |
@alyssais Are you still interested in giving your input? Otherwise I will close this PR because I am unable to fix this.
I am, yes, but I have a lot going on at the moment, so will likely be at
least a couple of weeks before I can get to it.
|
As I'm not able to fix this, I'm closing this PR. If anyone wants to reopen and fix it, feel free to do so. |
Motivation for this change
Init overcommit at 0.46.0.
Added
vendor
in.gitignore
because this directory gets generated while buildinggemset.nix
.Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)