2016-09-11 22:24:51 +01:00
|
|
|
{stdenv, fetchurl, makeWrapper, gtk2, webkit, pkgconfig, glib, glib_networking, libsoup, gsettings_desktop_schemas, patches ? null}:
|
2011-08-11 17:33:41 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "surf-${version}";
|
2016-01-03 12:34:45 +00:00
|
|
|
version="0.7";
|
2011-08-11 17:33:41 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://dl.suckless.org/surf/surf-${version}.tar.gz";
|
2016-01-03 12:34:45 +00:00
|
|
|
sha256 = "0jj93izd8fizxfa6ln9w1h9bwki81sz5dhskh5x1rl34zd38aq4m";
|
2011-08-11 17:33:41 +01:00
|
|
|
};
|
|
|
|
|
2016-09-11 22:24:51 +01:00
|
|
|
buildInputs = [ gtk2 makeWrapper webkit gsettings_desktop_schemas pkgconfig glib libsoup ];
|
2011-08-11 17:33:41 +01:00
|
|
|
|
|
|
|
# Allow users set their own list of patches
|
|
|
|
inherit patches;
|
|
|
|
|
|
|
|
buildPhase = " make ";
|
|
|
|
|
2016-01-03 12:34:45 +00:00
|
|
|
# `-lX11' to make sure libX11's store path is in the RPATH
|
2011-08-11 17:33:41 +01:00
|
|
|
NIX_LDFLAGS = "-lX11";
|
2016-01-03 12:34:45 +00:00
|
|
|
preConfigure = ''sed -i "s@PREFIX = /usr/local@PREFIX = $out@g" config.mk'';
|
|
|
|
installFlags = [ "PREFIX=/" "DESTDIR=$(out)" ];
|
2014-04-05 14:51:42 +01:00
|
|
|
|
|
|
|
preFixup = ''
|
2013-03-14 15:01:53 +00:00
|
|
|
wrapProgram "$out/bin/surf" \
|
2015-10-11 15:06:34 +01:00
|
|
|
--prefix GIO_EXTRA_MODULES : ${glib_networking.out}/lib/gio/modules \
|
2014-04-05 14:51:42 +01:00
|
|
|
--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
|
2013-03-01 18:31:00 +00:00
|
|
|
'';
|
2011-08-11 17:33:41 +01:00
|
|
|
|
2013-03-14 15:01:53 +00:00
|
|
|
meta = {
|
2013-10-06 10:49:53 +01: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;
|
2014-06-19 05:19:00 +01:00
|
|
|
license = stdenv.lib.licenses.mit;
|
2013-10-06 10:49:53 +01:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2011-08-11 17:33:41 +01:00
|
|
|
};
|
|
|
|
}
|