about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/networking/browsers/surf/default.nix
blob: 6573821d059844281dda5b228a29d39fd8de0098 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
{ lib, stdenv, fetchgit
, pkg-config, wrapGAppsHook
, glib, gcr, glib-networking, gsettings-desktop-schemas, gtk, libsoup, webkitgtk
, xorg, dmenu, findutils, gnused, coreutils, gst_all_1
, patches ? null
}:

stdenv.mkDerivation rec {
  pname = "surf";
  version = "2.1";

  # tarball is missing file common.h
  src = fetchgit {
    url = "git://git.suckless.org/surf";
    rev = version;
    sha256 = "1v926hiayddylq79n8l7dy51bm0dsa9n18nx9bkhg666cx973x4z";
  };

  nativeBuildInputs = [ pkg-config wrapGAppsHook ];
  buildInputs = [
    glib
    gcr
    glib-networking
    gsettings-desktop-schemas
    gtk
    libsoup
    webkitgtk
  ] ++ (with gst_all_1; [
    # Audio & video support for webkitgtk WebView
    gstreamer
    gst-plugins-base
    gst-plugins-good
    gst-plugins-bad
  ]);

  inherit patches;

  makeFlags = [ "PREFIX=$(out)" ];

  # Add run-time dependencies to PATH. Append them to PATH so the user can
  # override the dependencies with their own PATH.
  preFixup = let
    depsPath = lib.makeBinPath [ xorg.xprop dmenu findutils gnused coreutils ];
  in ''
    gappsWrapperArgs+=(
      --suffix PATH : ${depsPath}
    )
  '';

  meta = with lib; {
    description = "A simple web browser based on WebKitGTK";
    longDescription = ''
      surf is a simple web browser based on WebKitGTK. 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 = "https://surf.suckless.org";
    license = licenses.mit;
    platforms = webkitgtk.meta.platforms;
    maintainers = with maintainers; [ joachifm ];
  };
}