1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-18 10:56:53 +00:00
nixpkgs/pkgs/applications/misc/netsurf/browser/default.nix

84 lines
1.9 KiB
Nix
Raw Normal View History

2016-06-29 22:10:35 +01:00
{ stdenv, fetchurl, pkgconfig, libpng, openssl, curl, gtk2, check, SDL
2019-07-25 01:12:39 +01:00
, libxml2, libidn, perl, nettools, perlPackages, xxd
2016-06-22 06:38:36 +01:00
, libXcursor, libXrandr, makeWrapper
2016-06-29 22:10:35 +01:00
, uilib ? "framebuffer"
2016-06-22 06:38:36 +01:00
, buildsystem
, nsgenbind
, libnsfb
, libwapcaplet
, libparserutils
, libcss
, libhubbub
, libdom
, libnsbmp
, libnsgif
, libnsutils
, libutf8proc
2019-07-25 01:12:39 +01:00
, wrapGAppsHook
2016-06-22 06:38:36 +01:00
}:
stdenv.mkDerivation rec {
name = "netsurf-${version}";
2019-07-25 01:12:39 +01:00
version = "3.9";
2016-06-22 06:38:36 +01:00
2016-06-29 22:10:35 +01:00
# UI libs incldue Framebuffer, and gtk
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
};
2019-07-25 01:12:39 +01:00
nativeBuildInputs = [
pkgconfig
xxd
] ++ stdenv.lib.optionals (uilib == "gtk") [
wrapGAppsHook
];
buildInputs = [ libpng openssl curl gtk2 check libxml2 libidn perl
2016-06-29 22:10:35 +01:00
nettools perlPackages.HTMLParser libXcursor libXrandr makeWrapper SDL
2016-06-22 06:38:36 +01:00
buildsystem
nsgenbind
libnsfb
libwapcaplet
libparserutils
libcss
libhubbub
libdom
libnsbmp
libnsgif
libnsutils
libutf8proc
];
preConfigure = ''
cat <<EOF > Makefile.conf
2016-06-29 22:10:35 +01:00
override NETSURF_GTK_RESOURCES := $out/share/Netsurf/${uilib}/res
2016-06-22 06:38:36 +01:00
override NETSURF_USE_GRESOURCE := YES
EOF
'';
makeFlags = [
"PREFIX=$(out)"
"NSSHARED=${buildsystem}/share/netsurf-buildsystem"
2016-06-29 22:10:35 +01:00
"TARGET=${uilib}"
2016-06-22 06:38:36 +01:00
];
installPhase = ''
2016-06-29 22:10:35 +01:00
mkdir -p $out/bin $out/share/Netsurf/${uilib}
cmd=$(case "${uilib}" in framebuffer) echo nsfb;; gtk) echo nsgtk;; esac)
2016-06-22 06:38:36 +01:00
cp $cmd $out/bin/netsurf
2016-06-29 22:10:35 +01:00
wrapProgram $out/bin/netsurf --set NETSURFRES $out/share/Netsurf/${uilib}/res
2019-07-25 01:12:39 +01:00
tar -hcf - frontends/${uilib}/res | (cd $out/share/Netsurf/ && tar -xvpf -)
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;
};
}