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

84 lines
2.2 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, fetchpatch, makeWrapper, wrapGAppsHook
2019-08-03 06:54:18 +02:00
# Buildtime dependencies.
, check, pkg-config, xxd
2019-08-03 06:54:18 +02:00
# Runtime dependencies.
, curl, expat, libXcursor, libXrandr, libidn, libjpeg, libpng, libwebp, libxml2
, openssl, perl, perlPackages
# uilib-specific dependencies
, gtk2 # GTK 2
2020-09-28 08:50:11 +02:00
, gtk3 # GTK 3
2019-08-03 06:54:18 +02:00
, SDL # Framebuffer
# Configuration
2020-09-28 08:50:11 +02:00
, uilib
2019-08-03 06:54:18 +02:00
# Netsurf-specific dependencies
, libcss, libdom, libhubbub, libnsbmp, libnsfb, libnsgif
, libnslog, libnspsl, libnsutils, libparserutils, libsvgtiny, libutf8proc
, libwapcaplet, nsgenbind
2016-06-22 07:38:36 +02:00
}:
2019-08-03 06:54:18 +02:00
let
2021-01-15 14:21:58 +01:00
inherit (lib) optional optionals;
2019-08-03 06:54:18 +02:00
in
2016-06-22 07:38:36 +02:00
stdenv.mkDerivation rec {
pname = "netsurf";
2020-09-28 08:50:11 +02:00
version = "3.10";
2016-06-22 07:38:36 +02:00
src = fetchurl {
2020-09-28 08:50:11 +02:00
url = "http://download.netsurf-browser.org/netsurf/releases/source/${pname}-${version}-src.tar.gz";
sha256 = "sha256-NkhEKeGTYUaFwv8kb1W9Cm3d8xoBi+5F4NH3wohRmV4=";
2016-06-22 07:38:36 +02:00
};
2019-07-25 02:12:39 +02:00
nativeBuildInputs = [
2019-08-03 06:54:18 +02:00
makeWrapper
perl
perlPackages.HTMLParser
pkg-config
2019-07-25 02:12:39 +02:00
xxd
2019-08-03 06:54:18 +02:00
]
2020-09-28 08:50:11 +02:00
++ optional (uilib == "gtk2" || uilib == "gtk3") wrapGAppsHook
2019-08-03 06:54:18 +02:00
;
2019-07-25 02:12:39 +02:00
2020-09-28 08:50:11 +02:00
buildInputs = [
2019-08-03 06:54:18 +02: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 07:38:36 +02:00
libutf8proc
2019-08-03 06:54:18 +02:00
]
++ optionals (uilib == "framebuffer") [ expat SDL ]
2020-09-28 08:50:11 +02:00
++ optional (uilib == "gtk2") gtk2
++ optional (uilib == "gtk3") gtk3
2019-08-03 06:54:18 +02:00
;
2016-06-22 07:38:36 +02:00
preConfigure = ''
cat <<EOF > Makefile.conf
2019-08-03 06:54:18 +02:00
override NETSURF_GTK_RES_PATH := $out/share/
2016-06-22 07:38:36 +02:00
override NETSURF_USE_GRESOURCE := YES
EOF
'';
makeFlags = [
2019-08-03 06:54:18 +02:00
"PREFIX=${placeholder "out"}"
2016-06-29 23:10:35 +02:00
"TARGET=${uilib}"
2016-06-22 07:38:36 +02:00
];
meta = with lib; {
2020-09-28 08:50:11 +02: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 07:38:36 +02:00
platforms = platforms.linux;
};
}