nixpkgs/pkgs/applications/networking/browsers/surf/default.nix

43 lines
1.4 KiB
Nix
Raw Normal View History

{stdenv, fetchurl, makeWrapper, gtk2, webkit, pkgconfig, glib, glib_networking, libsoup, gsettings_desktop_schemas, patches ? null}:
stdenv.mkDerivation rec {
name = "surf-${version}";
2016-01-03 12:34:45 +00:00
version="0.7";
src = fetchurl {
url = "http://dl.suckless.org/surf/surf-${version}.tar.gz";
2016-01-03 12:34:45 +00:00
sha256 = "0jj93izd8fizxfa6ln9w1h9bwki81sz5dhskh5x1rl34zd38aq4m";
};
buildInputs = [ gtk2 makeWrapper webkit gsettings_desktop_schemas pkgconfig glib libsoup ];
# 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
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)" ];
preFixup = ''
wrapProgram "$out/bin/surf" \
--prefix GIO_EXTRA_MODULES : ${glib_networking.out}/lib/gio/modules \
--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
2013-03-01 18:31:00 +00:00
'';
meta = {
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 = stdenv.lib.licenses.mit;
platforms = stdenv.lib.platforms.linux;
};
}