diff --git a/pkgs/applications/misc/netsurf/browser/default.nix b/pkgs/applications/misc/netsurf/browser/default.nix index 1b800f654340..0bb86fdca955 100644 --- a/pkgs/applications/misc/netsurf/browser/default.nix +++ b/pkgs/applications/misc/netsurf/browser/default.nix @@ -1,71 +1,85 @@ -{ stdenv, fetchurl, pkgconfig, libpng, openssl, curl, gtk2, check, SDL -, libxml2, libidn, perl, nettools, perlPackages -, libXcursor, libXrandr, makeWrapper +{ 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 + , uilib ? "framebuffer" -, buildsystem -, nsgenbind -, libnsfb -, libwapcaplet -, libparserutils -, libcss -, libhubbub -, libdom -, libnsbmp -, libnsgif -, libnsutils -, libutf8proc + +# Netsurf-specific dependencies + +, libcss, libdom, libhubbub, libnsbmp, libnsfb, libnsgif +, libnslog, libnspsl, libnsutils, libparserutils, libsvgtiny, libutf8proc +, libwapcaplet, nsgenbind }: +let + inherit (stdenv.lib) optional optionals; +in stdenv.mkDerivation rec { name = "netsurf-${version}"; - version = "3.5"; - - # UI libs incldue Framebuffer, and gtk + version = "3.9"; src = fetchurl { url = "http://download.netsurf-browser.org/netsurf/releases/source/netsurf-${version}-src.tar.gz"; - sha256 = "1k0x8mzgavfy7q9kywl6kzsc084g1xlymcnsxi5v6jp279nsdwwq"; + sha256 = "1hzcm2s2wh5sapgr000lg63hcdbj6hyajxl43xa1x80kc5piqbyp"; }; - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ libpng openssl curl gtk2 check libxml2 libidn perl - nettools perlPackages.HTMLParser libXcursor libXrandr makeWrapper SDL - buildsystem - nsgenbind - libnsfb - libwapcaplet - libparserutils - libcss - libhubbub - libdom - libnsbmp - libnsgif - libnsutils + 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"; + }) + ]; + + nativeBuildInputs = [ + makeWrapper + perl + perlPackages.HTMLParser + pkgconfig + xxd + ] + ++ optional (uilib == "gtk") wrapGAppsHook + ; + + 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 libutf8proc - ]; + ] + ++ optionals (uilib == "framebuffer") [ expat SDL ] + ++ optional (uilib == "gtk") gtk2 + ; preConfigure = '' cat < Makefile.conf - override NETSURF_GTK_RESOURCES := $out/share/Netsurf/${uilib}/res + override NETSURF_GTK_RES_PATH := $out/share/ override NETSURF_USE_GRESOURCE := YES EOF ''; makeFlags = [ - "PREFIX=$(out)" - "NSSHARED=${buildsystem}/share/netsurf-buildsystem" + "PREFIX=${placeholder "out"}" "TARGET=${uilib}" ]; - installPhase = '' - mkdir -p $out/bin $out/share/Netsurf/${uilib} - cmd=$(case "${uilib}" in framebuffer) echo nsfb;; gtk) echo nsgtk;; esac) - cp $cmd $out/bin/netsurf - wrapProgram $out/bin/netsurf --set NETSURFRES $out/share/Netsurf/${uilib}/res - tar -hcf - ${uilib}/res | (cd $out/share/Netsurf/ && tar -xvpf -) - ''; - meta = with stdenv.lib; { homepage = http://www.netsurf-browser.org/; description = "Free opensource web browser"; diff --git a/pkgs/applications/misc/netsurf/libcss/default.nix b/pkgs/applications/misc/netsurf/libcss/default.nix index e97452249bcf..55538925abd7 100644 --- a/pkgs/applications/misc/netsurf/libcss/default.nix +++ b/pkgs/applications/misc/netsurf/libcss/default.nix @@ -8,11 +8,11 @@ stdenv.mkDerivation rec { name = "netsurf-${libname}-${version}"; libname = "libcss"; - version = "0.6.0"; + version = "0.9.0"; src = fetchurl { url = "http://download.netsurf-browser.org/libs/releases/${libname}-${version}-src.tar.gz"; - sha256 = "0qp4p1q1dwgdra4pkrzd081zjzisxkgwx650ijx323j8bj725daf"; + sha256 = "1vw9j3d2mr4wbvs8fyqmgslkbxknvac10456775hflxxcivbm3xr"; }; nativeBuildInputs = [ pkgconfig ]; diff --git a/pkgs/applications/misc/netsurf/libdom/default.nix b/pkgs/applications/misc/netsurf/libdom/default.nix index 50a6dadadb5c..de92219e7f97 100644 --- a/pkgs/applications/misc/netsurf/libdom/default.nix +++ b/pkgs/applications/misc/netsurf/libdom/default.nix @@ -9,11 +9,11 @@ stdenv.mkDerivation rec { name = "netsurf-${libname}-${version}"; libname = "libdom"; - version = "0.3.0"; + version = "0.4.0"; src = fetchurl { url = "http://download.netsurf-browser.org/libs/releases/${libname}-${version}-src.tar.gz"; - sha256 = "1kk6qbqagx5ypiy9kf0059iqdzyz8fqaw336vzhb5gnrzjw3wv4a"; + sha256 = "1ixkqsl3f7dl1kajksm0c231w1v5xy8z6hm3v67hgm9nh4qcvfcy"; }; nativeBuildInputs = [ pkgconfig ]; diff --git a/pkgs/applications/misc/netsurf/libhubbub/default.nix b/pkgs/applications/misc/netsurf/libhubbub/default.nix index 715196871512..03ee66fc5987 100644 --- a/pkgs/applications/misc/netsurf/libhubbub/default.nix +++ b/pkgs/applications/misc/netsurf/libhubbub/default.nix @@ -7,11 +7,11 @@ stdenv.mkDerivation rec { name = "netsurf-${libname}-${version}"; libname = "libhubbub"; - version = "0.3.3"; + version = "0.3.6"; src = fetchurl { url = "http://download.netsurf-browser.org/libs/releases/${libname}-${version}-src.tar.gz"; - sha256 = "101781iw32p47386fxqr01nrkywi12w17ajh02k2vlga4z8zyv86"; + sha256 = "1x3v7xvagx85v9h3pypzc86rcxs4mij87mmcqkp8pq50q6awfmnp"; }; nativeBuildInputs = [ pkgconfig ]; diff --git a/pkgs/applications/misc/netsurf/libnsbmp/default.nix b/pkgs/applications/misc/netsurf/libnsbmp/default.nix index 7e99f8f5b86a..b0fb18c89b1a 100644 --- a/pkgs/applications/misc/netsurf/libnsbmp/default.nix +++ b/pkgs/applications/misc/netsurf/libnsbmp/default.nix @@ -6,11 +6,11 @@ stdenv.mkDerivation rec { name = "netsurf-${libname}-${version}"; libname = "libnsbmp"; - version = "0.1.3"; + version = "0.1.5"; src = fetchurl { url = "http://download.netsurf-browser.org/libs/releases/${libname}-${version}-src.tar.gz"; - sha256 = "0gmvzw1whh7553d6s98vr4ri2whjwrgggcq1z5b160gwjw20mzyy"; + sha256 = "0lib2m07d1i0k80m4blkwnj0g7rha4jbm5vrgd0wwbkyfa0hvk35"; }; nativeBuildInputs = [ pkgconfig ]; diff --git a/pkgs/applications/misc/netsurf/libnsfb/default.nix b/pkgs/applications/misc/netsurf/libnsfb/default.nix index 24235f43a114..29b0a7867db2 100644 --- a/pkgs/applications/misc/netsurf/libnsfb/default.nix +++ b/pkgs/applications/misc/netsurf/libnsfb/default.nix @@ -6,11 +6,11 @@ stdenv.mkDerivation rec { name = "netsurf-${libname}-${version}"; libname = "libnsfb"; - version = "0.1.4"; + version = "0.2.1"; src = fetchurl { url = "http://download.netsurf-browser.org/libs/releases/${libname}-${version}-src.tar.gz"; - sha256 = "176f8why9gzbaca9nnxjqasl02qzc6g507z5w3dzkcjifnkz4mzl"; + sha256 = "09qag9lgn5ahanbcyf2rvfmsz15vazfwnl8xpn8f1iczd44b0bv0"; }; nativeBuildInputs = [ pkgconfig ]; diff --git a/pkgs/applications/misc/netsurf/libnsgif/default.nix b/pkgs/applications/misc/netsurf/libnsgif/default.nix index 836bfd5f3e0a..4de882243fe2 100644 --- a/pkgs/applications/misc/netsurf/libnsgif/default.nix +++ b/pkgs/applications/misc/netsurf/libnsgif/default.nix @@ -6,11 +6,11 @@ stdenv.mkDerivation rec { name = "netsurf-${libname}-${version}"; libname = "libnsgif"; - version = "0.1.3"; + version = "0.2.1"; src = fetchurl { url = "http://download.netsurf-browser.org/libs/releases/${libname}-${version}-src.tar.gz"; - sha256 = "1a4z45gh0fw4iybf34fig725av25h31ffk0azi0snzh4130cklnk"; + sha256 = "0jwshypgmx16xlsbx3d8njk8a5khazlplca5mxd3rdbhrlsabbly"; }; nativeBuildInputs = [ pkgconfig ]; diff --git a/pkgs/applications/misc/netsurf/libnslog/default.nix b/pkgs/applications/misc/netsurf/libnslog/default.nix new file mode 100644 index 000000000000..497630c9aa65 --- /dev/null +++ b/pkgs/applications/misc/netsurf/libnslog/default.nix @@ -0,0 +1,33 @@ +{ stdenv, fetchurl, pkgconfig, bison, flex +, buildsystem +}: + +stdenv.mkDerivation rec { + + name = "netsurf-${libname}-${version}"; + libname = "libnslog"; + version = "0.1.2"; + + src = fetchurl { + url = "http://download.netsurf-browser.org/libs/releases/${libname}-${version}-src.tar.gz"; + sha256 = "1ggs6xvxp8fbg5w8pifalipm458ygr9ab6j2yvj8fnnmxwvdh4jd"; + }; + + nativeBuildInputs = [ pkgconfig bison flex ]; + buildInputs = [ + buildsystem + ]; + + makeFlags = [ + "PREFIX=$(out)" + "NSSHARED=${buildsystem}/share/netsurf-buildsystem" + ]; + + meta = with stdenv.lib; { + homepage = http://www.netsurf-browser.org/; + description = "NetSurf Parametric Logging Library"; + license = licenses.mit; + maintainers = [ maintainers.samueldr ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/applications/misc/netsurf/libnspsl/default.nix b/pkgs/applications/misc/netsurf/libnspsl/default.nix new file mode 100644 index 000000000000..f0abbdc049a9 --- /dev/null +++ b/pkgs/applications/misc/netsurf/libnspsl/default.nix @@ -0,0 +1,33 @@ +{ stdenv, fetchurl, pkgconfig +, buildsystem +}: + +stdenv.mkDerivation rec { + + name = "netsurf-${libname}-${version}"; + libname = "libnspsl"; + version = "0.1.5"; + + src = fetchurl { + url = "http://download.netsurf-browser.org/libs/releases/${libname}-${version}-src.tar.gz"; + sha256 = "0siq8zjfxv75i9fw6q5hkaijpdm1w3zskd5qk6vsvz8cqan4vifd"; + }; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ + buildsystem + ]; + + makeFlags = [ + "PREFIX=$(out)" + "NSSHARED=${buildsystem}/share/netsurf-buildsystem" + ]; + + meta = with stdenv.lib; { + homepage = http://www.netsurf-browser.org/; + description = "NetSurf Public Suffix List - Handling library"; + license = licenses.mit; + maintainers = [ maintainers.samueldr ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/applications/misc/netsurf/libnsutils/default.nix b/pkgs/applications/misc/netsurf/libnsutils/default.nix index 1e8dbe271370..3eaa882cb73d 100644 --- a/pkgs/applications/misc/netsurf/libnsutils/default.nix +++ b/pkgs/applications/misc/netsurf/libnsutils/default.nix @@ -6,11 +6,11 @@ stdenv.mkDerivation rec { name = "netsurf-${libname}-${version}"; libname = "libnsutils"; - version = "0.0.2"; + version = "0.0.5"; src = fetchurl { url = "http://download.netsurf-browser.org/libs/releases/${libname}-${version}-src.tar.gz"; - sha256 = "03p4xmd08yhj70nyj7acjccmmshs59lv4n4zsqpsn5lgkwa23lzy"; + sha256 = "09w1rixps1iiq6wirjwxmd6h87llvjzvw565rahjb3rlyhcplfqf"; }; nativeBuildInputs = [ pkgconfig ]; diff --git a/pkgs/applications/misc/netsurf/libparserutils/default.nix b/pkgs/applications/misc/netsurf/libparserutils/default.nix index ed9433b9f570..ea9d7c9ea855 100644 --- a/pkgs/applications/misc/netsurf/libparserutils/default.nix +++ b/pkgs/applications/misc/netsurf/libparserutils/default.nix @@ -6,11 +6,11 @@ stdenv.mkDerivation rec { name = "netsurf-${libname}-${version}"; libname = "libparserutils"; - version = "0.2.3"; + version = "0.2.4"; src = fetchurl { url = "http://download.netsurf-browser.org/libs/releases/${libname}-${version}-src.tar.gz"; - sha256 = "01gzlsabgl6x0icd8758d9jqs8rrf9574bdkjainn04w3fs3znf5"; + sha256 = "1n2794y2l0c8nv8z2pxwfnbn882987ifmxjv60zdxkhcndhswarj"; }; buildInputs = [ buildsystem perl ]; diff --git a/pkgs/applications/misc/netsurf/libsvgtiny/default.nix b/pkgs/applications/misc/netsurf/libsvgtiny/default.nix new file mode 100644 index 000000000000..9a4f922c2b6e --- /dev/null +++ b/pkgs/applications/misc/netsurf/libsvgtiny/default.nix @@ -0,0 +1,41 @@ +{ stdenv, fetchurl, pkgconfig, gperf +, buildsystem +, libdom +, libhubbub +, libparserutils +, libwapcaplet +}: + +stdenv.mkDerivation rec { + + name = "netsurf-${libname}-${version}"; + libname = "libsvgtiny"; + version = "0.1.7"; + + src = fetchurl { + url = "http://download.netsurf-browser.org/libs/releases/${libname}-${version}-src.tar.gz"; + sha256 = "10bpkmvfpydj74im3r6kqm9vnvgib6afy0alx71q5n0w5yawy39c"; + }; + + nativeBuildInputs = [ pkgconfig gperf ]; + buildInputs = [ + buildsystem + libdom + libhubbub + libparserutils + libwapcaplet + ]; + + makeFlags = [ + "PREFIX=$(out)" + "NSSHARED=${buildsystem}/share/netsurf-buildsystem" + ]; + + meta = with stdenv.lib; { + homepage = http://www.netsurf-browser.org/; + description = "NetSurf SVG decoder"; + license = licenses.mit; + maintainers = [ maintainers.samueldr ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/applications/misc/netsurf/libutf8proc/default.nix b/pkgs/applications/misc/netsurf/libutf8proc/default.nix index a905f3a12a8f..2144ccd33037 100644 --- a/pkgs/applications/misc/netsurf/libutf8proc/default.nix +++ b/pkgs/applications/misc/netsurf/libutf8proc/default.nix @@ -6,11 +6,11 @@ stdenv.mkDerivation rec { name = "netsurf-${libname}-${version}"; libname = "libutf8proc"; - version = "1.3.1"; + version = "2.4.0-1"; src = fetchurl { url = "http://download.netsurf-browser.org/libs/releases/${libname}-${version}-src.tar.gz"; - sha256 = "0xf659y3c6ikjnip47r30wv796a34d71p6qhc4xjs64iqszm1sbq"; + sha256 = "0wn409laqaqlqnz2d77419b5rya99vvc696vj187biy1i5livaq1"; }; nativeBuildInputs = [ pkgconfig ]; diff --git a/pkgs/applications/misc/netsurf/libwapcaplet/default.nix b/pkgs/applications/misc/netsurf/libwapcaplet/default.nix index 509cbeb4503f..a234af740f3c 100644 --- a/pkgs/applications/misc/netsurf/libwapcaplet/default.nix +++ b/pkgs/applications/misc/netsurf/libwapcaplet/default.nix @@ -6,11 +6,11 @@ stdenv.mkDerivation rec { name = "netsurf-${libname}-${version}"; libname = "libwapcaplet"; - version = "0.3.0"; + version = "0.4.2"; src = fetchurl { url = "http://download.netsurf-browser.org/libs/releases/${libname}-${version}-src.tar.gz"; - sha256 = "0cs1dd2afjgc3wf5gqg434hv6jdabrp9qvlpl4dp53nhkyfywna3"; + sha256 = "1fjwzbn7j8bi1b9bvwxsy3i2cr6byq2s2d29866801pjnf528g86"; }; buildInputs = [ buildsystem ]; diff --git a/pkgs/applications/misc/netsurf/nsgenbind/default.nix b/pkgs/applications/misc/netsurf/nsgenbind/default.nix index 971e16848ae7..f343a886283b 100644 --- a/pkgs/applications/misc/netsurf/nsgenbind/default.nix +++ b/pkgs/applications/misc/netsurf/nsgenbind/default.nix @@ -6,11 +6,11 @@ stdenv.mkDerivation rec { name = "netsurf-nsgenbind-${version}"; - version = "0.3"; + version = "0.7"; src = fetchurl { url = "http://download.netsurf-browser.org/libs/releases/nsgenbind-${version}-src.tar.gz"; - sha256 = "16xsazly7gxwywmlkf2xix9b924sj3skhgdak7218l0nc62a08gg"; + sha256 = "0rplmky4afsjwiwh7grkmcdmzg86zksa55j93dvq92f91yljwqqq"; }; buildInputs = [ buildsystem flex bison ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8b6179a7ba60..77563721c587 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4285,6 +4285,8 @@ in libparserutils = callPackage ../applications/misc/netsurf/libparserutils { }; + libnslog = callPackage ../applications/misc/netsurf/libnslog { }; + libcss = callPackage ../applications/misc/netsurf/libcss { }; libhubbub = callPackage ../applications/misc/netsurf/libhubbub { }; @@ -4299,6 +4301,10 @@ in libnsutils = callPackage ../applications/misc/netsurf/libnsutils { }; + libsvgtiny = callPackage ../applications/misc/netsurf/libsvgtiny { }; + + libnspsl = callPackage ../applications/misc/netsurf/libnspsl { }; + libutf8proc = callPackage ../applications/misc/netsurf/libutf8proc { }; browser = callPackage ../applications/misc/netsurf/browser { };