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
Merged
Merged
w3m and ranger fixes #11222
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
Forget about X11 in fb module. | ||
This breaks w3mimgdisplay under X11, but removes X11 dependency it in pure fb. | ||
diff --git a/w3mimg/fb/fb_imlib2.c b/w3mimg/fb/fb_imlib2.c | ||
index ea36637..d3d7bc3 100644 | ||
--- a/w3mimg/fb/fb_imlib2.c | ||
+++ b/w3mimg/fb/fb_imlib2.c | ||
@@ -3,7 +3,7 @@ | ||
fb_imlib2.c 0.3 Copyright (C) 2002, hito | ||
**************************************************************************/ | ||
|
||
-#include <X11/Xlib.h> | ||
+#define X_DISPLAY_MISSING | ||
#include <Imlib2.h> | ||
#include "fb.h" | ||
#include "fb_img.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I'm pretty sure that
graphicsSupport
should implyx11Support
, so I don't think we should add this option (unless I'm mistaken).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.
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.
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.
Ah, OK. I thought
imlib
was used only for rendering, but if it serves another text-only purpose, then I agree with your rationale.Yeah, that is an interesting point. I could see using
w3mPure
where needed, then one could overridew3m
to enable whatever they want, and then that would get picked up in reverse dependencies. Sounds good.Sounds good.
Thanks for this PR 🍺
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.
Okay then, rebuilding the thing right now (will take a while with
gcc
update).I decided to do this:
w3m = callPackage ../applications/networking/browsers/w3m { };
Should always be the version with the most features
w3m-full = w3m;
Version without X11
w3m-nox = w3m.override {
x11Support = false;
};
Version for batch text processing, not a good browser
w3m-batch = w3m.override {
graphicsSupport = false;
x11Support = false;
mouseSupport = false;
};
Does this look good to you?
Thank you, too!
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 looks good to me.
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.
w3m-batch
is not darwin friendly sincew3m
refuses to evaluate because ofgpm
by havingmouseSupport
set to true by defaulthmm I'm not too familiar with nixpkgs, but I'm currently using
callPackage
instead ofoverride
and I guess the same would be required forw3m-nox
.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.
Does the following help?
diff --git a/pkgs/applications/networking/browsers/w3m/default.nix b/pkgs/applications/networking/browsers/w3m/default.nix
index e71a733..bea74f6 100644
--- a/pkgs/applications/networking/browsers/w3m/default.nix
+++ b/pkgs/applications/networking/browsers/w3m/default.nix
@@ -3,7 +3,7 @@
, sslSupport ? true, openssl ? null
, graphicsSupport ? true, imlib2 ? null
, x11Support ? graphicsSupport, libX11 ? null
-, mouseSupport ? true, gpm-ncurses ? null
+, mouseSupport ? !stdenv.isDarwin, gpm-ncurses ? null
}:
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.
nice! that works for me