mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-12 03:56:17 +03:00
Merge pull request #16608 from vrthra/netsurf-framebuffer
netsurf: enable sixel display
This commit is contained in:
commit
44a3eebdf9
@ -1,6 +1,7 @@
|
|||||||
{ stdenv, fetchurl, pkgconfig, libpng, openssl, curl, gtk2, check
|
{ stdenv, fetchurl, pkgconfig, libpng, openssl, curl, gtk2, check, SDL
|
||||||
, libxml2, libidn, perl, nettools, perlPackages
|
, libxml2, libidn, perl, nettools, perlPackages
|
||||||
, libXcursor, libXrandr, makeWrapper
|
, libXcursor, libXrandr, makeWrapper
|
||||||
|
, uilib ? "framebuffer"
|
||||||
, buildsystem
|
, buildsystem
|
||||||
, nsgenbind
|
, nsgenbind
|
||||||
, libnsfb
|
, libnsfb
|
||||||
@ -20,11 +21,7 @@ stdenv.mkDerivation rec {
|
|||||||
name = "netsurf-${version}";
|
name = "netsurf-${version}";
|
||||||
version = "3.5";
|
version = "3.5";
|
||||||
|
|
||||||
# UIS incldue Framebuffer, and gtk, but
|
# UI libs incldue Framebuffer, and gtk
|
||||||
# Framebuffer is buggy. To enable, make sure
|
|
||||||
# to also build netsurf-libnsfb with ui=framebuffer
|
|
||||||
# and switch the ui here to framebuffer
|
|
||||||
ui = "gtk";
|
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://download.netsurf-browser.org/netsurf/releases/source/netsurf-${version}-src.tar.gz";
|
url = "http://download.netsurf-browser.org/netsurf/releases/source/netsurf-${version}-src.tar.gz";
|
||||||
@ -32,7 +29,7 @@ stdenv.mkDerivation rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ pkgconfig libpng openssl curl gtk2 check libxml2 libidn perl
|
buildInputs = [ pkgconfig libpng openssl curl gtk2 check libxml2 libidn perl
|
||||||
nettools perlPackages.HTMLParser libXcursor libXrandr makeWrapper
|
nettools perlPackages.HTMLParser libXcursor libXrandr makeWrapper SDL
|
||||||
buildsystem
|
buildsystem
|
||||||
nsgenbind
|
nsgenbind
|
||||||
libnsfb
|
libnsfb
|
||||||
@ -49,7 +46,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
cat <<EOF > Makefile.conf
|
cat <<EOF > Makefile.conf
|
||||||
override NETSURF_GTK_RESOURCES := $out/share/Netsurf/${ui}/res
|
override NETSURF_GTK_RESOURCES := $out/share/Netsurf/${uilib}/res
|
||||||
override NETSURF_USE_GRESOURCE := YES
|
override NETSURF_USE_GRESOURCE := YES
|
||||||
EOF
|
EOF
|
||||||
'';
|
'';
|
||||||
@ -57,15 +54,15 @@ stdenv.mkDerivation rec {
|
|||||||
makeFlags = [
|
makeFlags = [
|
||||||
"PREFIX=$(out)"
|
"PREFIX=$(out)"
|
||||||
"NSSHARED=${buildsystem}/share/netsurf-buildsystem"
|
"NSSHARED=${buildsystem}/share/netsurf-buildsystem"
|
||||||
"TARGET=${ui}"
|
"TARGET=${uilib}"
|
||||||
];
|
];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin $out/share/Netsurf/${ui}
|
mkdir -p $out/bin $out/share/Netsurf/${uilib}
|
||||||
cmd=$(case "${ui}" in framebuffer) echo nsfb;; gtk) echo nsgtk;; esac)
|
cmd=$(case "${uilib}" in framebuffer) echo nsfb;; gtk) echo nsgtk;; esac)
|
||||||
cp $cmd $out/bin/netsurf
|
cp $cmd $out/bin/netsurf
|
||||||
wrapProgram $out/bin/netsurf --set NETSURFRES $out/share/Netsurf/${ui}/res
|
wrapProgram $out/bin/netsurf --set NETSURFRES $out/share/Netsurf/${uilib}/res
|
||||||
tar -hcf - ${ui}/res | (cd $out/share/Netsurf/ && tar -xvpf -)
|
tar -hcf - ${uilib}/res | (cd $out/share/Netsurf/ && tar -xvpf -)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchurl, pkgconfig, ui? "gtk"
|
{ stdenv, fetchurl, pkgconfig, uilib? "framebuffer", SDL
|
||||||
, buildsystem
|
, buildsystem
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@ -13,12 +13,12 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "176f8why9gzbaca9nnxjqasl02qzc6g507z5w3dzkcjifnkz4mzl";
|
sha256 = "176f8why9gzbaca9nnxjqasl02qzc6g507z5w3dzkcjifnkz4mzl";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ pkgconfig buildsystem ];
|
buildInputs = [ pkgconfig buildsystem SDL ];
|
||||||
|
|
||||||
makeFlags = [
|
makeFlags = [
|
||||||
"PREFIX=$(out)"
|
"PREFIX=$(out)"
|
||||||
"NSSHARED=${buildsystem}/share/netsurf-buildsystem"
|
"NSSHARED=${buildsystem}/share/netsurf-buildsystem"
|
||||||
"TARGET=${ui}"
|
"TARGET=${uilib}"
|
||||||
];
|
];
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
@ -2219,6 +2219,14 @@ in
|
|||||||
netdata = callPackage ../tools/system/netdata { };
|
netdata = callPackage ../tools/system/netdata { };
|
||||||
|
|
||||||
netsurf = recurseIntoAttrs (let callPackage = newScope pkgs.netsurf; in rec {
|
netsurf = recurseIntoAttrs (let callPackage = newScope pkgs.netsurf; in rec {
|
||||||
|
# ui could be gtk, sixel or framebuffer. Note that console display (sixel)
|
||||||
|
# requires a terminal that supports `sixel` capabilities such as mlterm
|
||||||
|
# or xterm -ti 340
|
||||||
|
ui = "sixel";
|
||||||
|
|
||||||
|
uilib = if ui == "gtk" then "gtk" else "framebuffer";
|
||||||
|
|
||||||
|
SDL = if ui == "gtk" then null else if ui == "sixel" then SDL_sixel else SDL;
|
||||||
|
|
||||||
buildsystem = callPackage ../applications/misc/netsurf/buildsystem { };
|
buildsystem = callPackage ../applications/misc/netsurf/buildsystem { };
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user