-
Notifications
You must be signed in to change notification settings - Fork 3
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
Document Nixpkgs "installation method" #11
base: main
Are you sure you want to change the base?
Conversation
Neat! I'll merge this as soon as that PR is accepted. Thanks! |
please ping this pr again then that one is merged, I probably won't be tracking it closely. |
Hey, I got this comment there I don't particularly agree with, but I'm also not one to argue over such things. Would you have an idea how you'd have this named under the Nixkpgs namespace? quodlibetor-git-fixup, perhaps? Note that the executable name is not in question—that will remain git-fixup. |
ehh I've considered renaming this to I can create a new project after the break that has that name, or you can feel free to propose it as an alternative name. The big difference between this and the |
Used a synonym list and a Google search to come up with these:
My favorite is git-re |
Need help deciding? |
thanks for the synonym list! I had a flu over the holidays and am still recovering, I'd hoped to get things cleaned up this last weekend but obviously didn't. I'll see how this week goes, I'm excited that you're interested and will try and get it out but I've got a lot of life right now. |
I wish you a graceful recovery, Brandon. I changed my mind. My favorite is your git-instafix. It's amusing and catchy. |
How are you, Brandon? |
I've updated the project to git-instafix and pointed out similar projects. Thanks for your patience! |
Thank you, @quodlibetor . I've updated the nixpkgs PR. |
Note: the nixpkgs package would be more elegant if the path git binary were configurable, maybe consider adding this option in the future if you have time. (But you state that you intend to remove all dependencies on the git binary anyway, so this issue might just resolve itself.) |
yeah currently the only dependency is for |
Do you mean with a config file? Right now it should just pull it from PATH. |
With a compile time config. (I am sure there is some way to do this with cargo...) On NixOS programs can't rely on anything being in PATH, all dependencies have to be declared explicitly. If you look at NixOS/nixpkgs#275402, right now an extra wrapper has to be defined just to provide a PATH value with the git binary. |
Yeah that's easy enough to do, and there's a few ways. Do you have an example of something in any language being built in a way that follows nix best practices? |
I looked around a bit, it seems that compile time env variables are the most common way to do this. Examples here and here. You can use the |
perfect, thanks. |
There was only one remaining use of the external git dependency in git-instafix, and it was just to print diffs. Replacing that with our home-grown git diff code is currently a slightly worse experience (it doesn't respect user's git diff config) but it is good enough, and it sets this up for a long term of having significantly more control. This also resolves a slight annoyance in the nix package (from [this comment](#11 (comment)))
Version 0.2.1 (just released) switched the last piece from an external git command to libgit2, it no longer has any dependency on the git binary. |
W00t |
Updated the PR. |
README.md
Outdated
@@ -55,6 +55,8 @@ You can also install from this repo with `cargo`: | |||
|
|||
cargo install --git https://github.com/quodlibetor/git-fixup | |||
|
|||
Or use Nixpkgs. It's [in there](https://search.nixos.org/packages?channel=unstable&query=git-fixup). |
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.
Could you include the command people would run? Something like this:
Or use [Nixpkgs](https://search.nixos.org/packages?channel=unstable&query=git-fixup):
<the exact thing users would type>
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.
In Nix a package can be obtained in several different ways. I feel it's appropriate to not provide any examples in contexts such as this.
Sorry about the delay on this, I don't understand nix enough to know how I want to document it. I was trying to teach it but I'll just ask you. My big concerns/questions:
|
Sure. Look, Nix is a lot to learn. And there are different ways of using it. Therefore, there are no good answers:
Depends on how it is used.
I'm not familiar with devbox. nixpkgs offers a flake. That flake includes git-instafix.
Have nix with flakes enabled (install it via the DetSys installer) and run:
Learn more about nix at https://nix.dev . Feel free to message me for help, as well. |
Oh when I said this:
I meant how does nixpkgs itself get the git-instafix update. Looking at this PR it looks like it's automated someway? NixOS/nixpkgs#322675 ? Is there anything I need do to make sure that it continues to work correctly? I mostly want to make sure that if something has a documented install method I know how to check if it's up to day and what went wrong if it's not up to date. |
You're right. That is automated. But I don't know how it works. Probably looks at git tags in your repo. |
It's not yet in there...
But I hope it will be soon.
And thanks for this useful app!