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
w3m and ranger fixes #11222
w3m and ranger fixes #11222
Conversation
cc @edolstra |
graphicsSupport = false; | ||
x11Support = false; | ||
mouseSupport = false; |
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.
@oxij awesome work.
i have only once comment just to keep things consistent with other derivations. usually we separate a package into and Full ... example (python and pythonFull). i think here we should do the same and have
w3m be what currently is w3m-pure and create new w3mFull which would bring all the graphicSupport, x11Support, mouseSupport.
basically all i would like is to things be more or less consistent. @oxij you should wait with any changes until somebody else comments and confirms this.
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.
Yep, it is more consistent, consistent is good, I can do that. But even
then I'd still like to have an explicitly minimal version in case
someone else will fiddle with defaults in the future. w3m-pure
is for
derivations that use w3m in batch mode for text rendering, not browsing,
and I'd like that information to be explicit in nixpkgs. Which means
there would be three w3m
's: w3m
, w3mFull
, w3mMinimal
(current
w3m-pure
) and
- I have no idea what should be the difference between
w3m
and
w3mFull
if the default derivation should be what "most users will want
by default". - ranger will have to use
w3mFull
or specifically crafted version (4th
w3m
!) with image support.
So, should I rename w3m-pure
to w3mMinimal
and define w3mFull = w3m
?
(Btw, I still think that using nixpkgs.config options (constantly
rejected in nixpkgs) is a good thing as it simplifies things a lot, e.g.
it can simplify these four w3m
s into two and one assert in ranger
,
but whatever.)
I picked the ranger commit, as that one certainly doesn't need to go through staging. And it looks fine, thanks. |
meta = with stdenv.lib; { | ||
postInstall = optionalString x11Support '' | ||
rpath=`patchelf --print-rpath $out/libexec/w3m/w3mimgdisplay` | ||
patchelf --set-rpath "$rpath:${libX11}/lib:${libX11}/lib64" $out/libexec/w3m/w3mimgdisplay |
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.
You can avoid this by using:
LIBS = lib.optionalString graphicsSupport "-lX11";
The autoconf stuff will pick up that environment variable.
I think my PR (#11236) subsumes much of this, with the exception of touching the names in all-packages. Regarding the names, I'd suggest having I would suggest pulling in my PR, and then layering on these changes. How does that sound? |
…ersions, use batch version where appropriate
Okay, I think I fixed everything except @nbp's comments (I don't see
this security thing being merged yet and I don't want to run in front of
the train here), actually checked this to work without X11 (which added
another patch :( ) and fixed nixos to use `w3m-nox` as it should.
|
Just wondering, what is holding this?
|
Great, I was just about to work out proper img-previewing in ranger; thanks! PS: I fixed the default image previewing as well. |
Would it make sense to backport to 15.09 as well?
IMHO, yes.
|
I find it interesting that we were looking into this at roughly the same time :) |
Rebase of #10995 onto staging