-
-
Notifications
You must be signed in to change notification settings - Fork 15k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
bat-extras: init at 20200408 #85982
bat-extras: init at 20200408 #85982
Conversation
I can't build. I tested with nix-review and manually.
|
Interesting. Now I’m glad I took the time to make sure the library tests ran.
What platform are you testing on?
|
x86_64 |
NixOS, Linux, or macOS?
|
Oh sorry, NixOS. |
I've fixed the library tests. batman is still failing, which I'll investigate tomorrow. |
|
||
# Patch shebangs now because our tests rely on them | ||
postPatch = '' | ||
patchShebangs --host bin/${name} |
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.
Oops this is actually wrong, I should be passing --build
and then allowing the normal fixup patch after all, I think. I’m not actually sure how check phases are supposed to work in cross-compile situations, but if we are cross-compiling we need to test with the build environment and then switch to the host.
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.
That is, assuming patchShebangs won’t just ignore any shebangs already pointing to the nix store. Guess I’ll find out tomorrow.
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.
Looks like patchShebangs
won't patch anything already pointing into the nix store. I guess I'm not sure the right solution here. I'll just leave it as it is for now since this means the installed output will be patched for the host. Alternatively we could install, then run check using the uninstalled bits, which will allow us to patch the install separately, but I think that's getting a bit complicated when I don't even know if check phases run when cross-compiling.
|
Result of 4 packages built:- bat-extras.batgrep - bat-extras.batman - bat-extras.batwatch - bat-extras.prettybat |
I tested running the commands. Sorry for the delay. batman works but it prints the whole man page (it's like it's not using less). prettybat seems fine using all the formatter.
|
Which is to say, if you set All of this is upstream functionality, not a consequence of this package. The behavior differs from #85836 in that that PR blindly overwrite |
I filed the upstream issue as eth-p/bat-extras#24 |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
Before you merge it, would there be an issue if I changed the version format to A couple of other changes to note in that upcoming release:
|
AFAIK the actual format of the version string is fairly irrelevant as far as Nix is concerned. When |
Motivation for this change
Some wrappers tools for
bat
. Not by the same dev but they are linked on https://github.com/sharkdp/bat.This is a rewrite of #85836 that fixes all the issues I identified. I kind of got nerd-sniped here. This version exposes each script as a separate attribute nested under
bat-extras
. This way you can install e.g. justbatgrep
without pulling inprettybat
and all its dependencies.Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)