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
lesspipe: add missing dependency on 'file' #43985
Conversation
|
Thank you for help. Using "--pure" with nix-shell also uncovered dependency on tput from ncurses, which I added. I still need help though: while it works now, lesspipe.sh tries to print helpful error message referencing to itself and ends up printing something like:
It should instead refer to the unwrapped version of itself. What is the typical way to handle it? One way I can see right now is to do patching of the lesspipe.sh itself to replace references to 'file' with references to '${file}/bin/file' instead of the wrapProgram step. That seems somewhat fragile. Is there any other canonical way? |
Since it seems to be only used there https://github.com/wofr06/lesspipe/blob/lesspipe/lesspipe.sh#L50, This is more robust on updates then just using sed. |
I'm happy with the result now, thank you. |
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.
Because this is a shell script, I think it will be much easier to maintain if you just do wrapProgram
in postInstall with those paths.
What are the procedures for getting a change into current release branch by the way? I'd like to try it for this change just to see how that works. |
# branch of from the release branch
$ git checkout release-18.03
# create a new local branch based on that
$ git checkout -b less-pipe-backport
# cherry pick the commits that were merged in nixpkgs master
$ git cherry-pick -x <commits-from-master...>
# upload to your own nixpkgs fork
$ git push origin less-pipe-backport and then open a pull request for your |
Ah ok, no special procedures then. Thanks again. |
Motivation for this change
lesspipe uses 'file' internally and doesn't work if your system does not have 'file' pulled in by some other means
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)