3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/misc/netsurf/browser/default.nix

91 lines
2.2 KiB
Nix
Raw Normal View History

2019-08-03 05:54:18 +01: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
, SDL # Framebuffer
# Configuration
2016-06-29 22:10:35 +01:00
, uilib ? "framebuffer"
2019-08-03 05:54:18 +01:00
# Netsurf-specific dependencies
, libcss, libdom, libhubbub, libnsbmp, libnsfb, libnsgif
, libnslog, libnspsl, libnsutils, libparserutils, libsvgtiny, libutf8proc
, libwapcaplet, nsgenbind
2016-06-22 06:38:36 +01:00
}:
2019-08-03 05:54:18 +01:00
let
inherit (stdenv.lib) optional optionals;
in
2016-06-22 06:38:36 +01:00
stdenv.mkDerivation rec {
pname = "netsurf";
2019-07-25 01:12:39 +01:00
version = "3.9";
2016-06-22 06:38:36 +01:00
src = fetchurl {
url = "http://download.netsurf-browser.org/netsurf/releases/source/netsurf-${version}-src.tar.gz";
2019-07-25 01:12:39 +01:00
sha256 = "1hzcm2s2wh5sapgr000lg63hcdbj6hyajxl43xa1x80kc5piqbyp";
2016-06-22 06:38:36 +01:00
};
patches = [
# GTK: prefer using curl's intrinsic defaults for CURLOPT_CA*
(fetchpatch {
name = "0001-GTK-prefer-using-curl-s-intrinsic-defaults-for-CURLO.patch";
url = "http://source.netsurf-browser.org/netsurf.git/patch/?id=87177d8aa109206d131e0d80a2080ce55dab01c7";
sha256 = "08bc60pc5k5qpckqv21zgmgszj3rpwskfc84shs8vg92vkimv2ai";
})
];
2019-07-25 01:12:39 +01:00
nativeBuildInputs = [
2019-08-03 05:54:18 +01:00
makeWrapper
perl
perlPackages.HTMLParser
2019-07-25 01:12:39 +01:00
pkgconfig
xxd
2019-08-03 05:54:18 +01:00
]
++ optional (uilib == "gtk") wrapGAppsHook
;
2019-07-25 01:12:39 +01:00
2019-08-03 05:54:18 +01:00
buildInputs = [
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 06:38:36 +01:00
libutf8proc
2019-08-03 05:54:18 +01:00
]
++ optionals (uilib == "framebuffer") [ expat SDL ]
++ optional (uilib == "gtk") gtk2
;
2016-06-22 06:38:36 +01:00
preConfigure = ''
cat <<EOF > Makefile.conf
2019-08-03 05:54:18 +01:00
override NETSURF_GTK_RES_PATH := $out/share/
2016-06-22 06:38:36 +01:00
override NETSURF_USE_GRESOURCE := YES
EOF
'';
makeFlags = [
2019-08-03 05:54:18 +01:00
"PREFIX=${placeholder "out"}"
2016-06-29 22:10:35 +01:00
"TARGET=${uilib}"
2016-06-22 06:38:36 +01:00
];
meta = with stdenv.lib; {
homepage = http://www.netsurf-browser.org/;
2016-06-22 06:38:36 +01:00
description = "Free opensource web browser";
license = licenses.gpl2;
maintainers = [ maintainers.vrthra ];
platforms = platforms.linux;
};
}