nixpkgs/pkgs/applications/networking/browsers/netsurf/browser.nix

84 lines
2.2 KiB
Nix
Raw Normal View History

2019-08-03 04:54:18 +00:00
{ stdenv, fetchurl, fetchpatch, makeWrapper, wrapGAppsHook
# Buildtime dependencies.
, check, pkgconfig, xxd
# Runtime dependencies.
, curl, expat, libXcursor, libXrandr, libidn, libjpeg, libpng, libwebp, libxml2
, openssl, perl, perlPackages
# uilib-specific dependencies
, gtk2 # GTK 2
2020-09-28 06:50:11 +00:00
, gtk3 # GTK 3
2019-08-03 04:54:18 +00:00
, SDL # Framebuffer
# Configuration
2020-09-28 06:50:11 +00:00
, uilib
2019-08-03 04:54:18 +00:00
# Netsurf-specific dependencies
, libcss, libdom, libhubbub, libnsbmp, libnsfb, libnsgif
, libnslog, libnspsl, libnsutils, libparserutils, libsvgtiny, libutf8proc
, libwapcaplet, nsgenbind
2016-06-22 05:38:36 +00:00
}:
2019-08-03 04:54:18 +00:00
let
inherit (stdenv.lib) optional optionals;
in
2016-06-22 05:38:36 +00:00
stdenv.mkDerivation rec {
pname = "netsurf";
2020-09-28 06:50:11 +00:00
version = "3.10";
2016-06-22 05:38:36 +00:00
src = fetchurl {
2020-09-28 06:50:11 +00:00
url = "http://download.netsurf-browser.org/netsurf/releases/source/${pname}-${version}-src.tar.gz";
sha256 = "sha256-NkhEKeGTYUaFwv8kb1W9Cm3d8xoBi+5F4NH3wohRmV4=";
2016-06-22 05:38:36 +00:00
};
2019-07-25 00:12:39 +00:00
nativeBuildInputs = [
2019-08-03 04:54:18 +00:00
makeWrapper
perl
perlPackages.HTMLParser
2019-07-25 00:12:39 +00:00
pkgconfig
xxd
2019-08-03 04:54:18 +00:00
]
2020-09-28 06:50:11 +00:00
++ optional (uilib == "gtk2" || uilib == "gtk3") wrapGAppsHook
2019-08-03 04:54:18 +00:00
;
2019-07-25 00:12:39 +00:00
2020-09-28 06:50:11 +00:00
buildInputs = [
2019-08-03 04:54:18 +00:00
check curl libXcursor libXrandr libidn libjpeg libpng libwebp libxml2 openssl
# Netsurf-specific libraries
nsgenbind libnsfb libwapcaplet libparserutils libnslog libcss
libhubbub libdom libnsbmp libnsgif libsvgtiny libnsutils libnspsl
2016-06-22 05:38:36 +00:00
libutf8proc
2019-08-03 04:54:18 +00:00
]
++ optionals (uilib == "framebuffer") [ expat SDL ]
2020-09-28 06:50:11 +00:00
++ optional (uilib == "gtk2") gtk2
++ optional (uilib == "gtk3") gtk3
2019-08-03 04:54:18 +00:00
;
2016-06-22 05:38:36 +00:00
preConfigure = ''
cat <<EOF > Makefile.conf
2019-08-03 04:54:18 +00:00
override NETSURF_GTK_RES_PATH := $out/share/
2016-06-22 05:38:36 +00:00
override NETSURF_USE_GRESOURCE := YES
EOF
'';
makeFlags = [
2019-08-03 04:54:18 +00:00
"PREFIX=${placeholder "out"}"
2016-06-29 21:10:35 +00:00
"TARGET=${uilib}"
2016-06-22 05:38:36 +00:00
];
meta = with stdenv.lib; {
2020-09-28 06:50:11 +00:00
homepage = "https://www.netsurf-browser.org/";
description = "A free, open source, small web browser";
longDescription = ''
NetSurf is a free, open source web browser. It is written in C and
released under the GNU Public Licence version 2. NetSurf has its own
layout and rendering engine entirely written from scratch. It is small and
capable of handling many of the web standards in use today.
'';
license = licenses.gpl2Only;
maintainers = [ maintainers.vrthra maintainers.AndersonTorres ];
2016-06-22 05:38:36 +00:00
platforms = platforms.linux;
};
}