2013-03-14 16:01:53 +01:00
|
|
|
{stdenv, fetchurl, makeWrapper, gtk, webkit, pkgconfig, glib, glib_networking, libsoup, gsettings_desktop_schemas, patches ? null}:
|
2011-08-11 18:33:41 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "surf-${version}";
|
2013-02-25 21:07:44 +01:00
|
|
|
version="0.6";
|
2011-08-11 18:33:41 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://dl.suckless.org/surf/surf-${version}.tar.gz";
|
2013-03-01 19:53:42 +01:00
|
|
|
sha256 = "01b8hq8z2wd7ssym5bypx2b15mrs1lhgkrcgxf700kswxvxcrhgx";
|
2011-08-11 18:33:41 +02:00
|
|
|
};
|
|
|
|
|
2014-04-05 15:51:42 +02:00
|
|
|
buildInputs = [ gtk makeWrapper webkit gsettings_desktop_schemas pkgconfig glib libsoup ];
|
2011-08-11 18:33:41 +02:00
|
|
|
|
|
|
|
# Allow users set their own list of patches
|
|
|
|
inherit patches;
|
|
|
|
|
|
|
|
buildPhase = " make ";
|
|
|
|
|
|
|
|
# `-lX11' to make sure libX11's store path is in the RPATH
|
|
|
|
NIX_LDFLAGS = "-lX11";
|
|
|
|
preConfigure = [ ''sed -i "s@PREFIX = /usr/local@PREFIX = $out@g" config.mk'' ];
|
2013-03-14 16:01:53 +01:00
|
|
|
installPhase = ''
|
2013-03-01 19:31:00 +01:00
|
|
|
make PREFIX=/ DESTDIR=$out install
|
2014-04-05 15:51:42 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
preFixup = ''
|
2013-03-14 16:01:53 +01:00
|
|
|
wrapProgram "$out/bin/surf" \
|
|
|
|
--prefix GIO_EXTRA_MODULES : ${glib_networking}/lib/gio/modules \
|
2014-04-05 15:51:42 +02:00
|
|
|
--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
|
2013-03-01 19:31:00 +01:00
|
|
|
'';
|
2011-08-11 18:33:41 +02:00
|
|
|
|
2013-03-14 16:01:53 +01:00
|
|
|
meta = {
|
2013-10-06 11:49:53 +02:00
|
|
|
description = "Simple web browser";
|
|
|
|
longDescription = ''
|
|
|
|
Surf is a simple web browser based on WebKit/GTK+. It is able to display
|
|
|
|
websites and follow links. It supports the XEmbed protocol which makes it
|
|
|
|
possible to embed it in another application. Furthermore, one can point
|
|
|
|
surf to another URI by setting its XProperties.
|
|
|
|
'';
|
|
|
|
homepage = http://surf.suckless.org;
|
|
|
|
license = "MIT";
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2011-08-11 18:33:41 +02:00
|
|
|
};
|
|
|
|
}
|