about summary refs log tree commit diff
path: root/pkgs/desktops/gnome/extensions/gnome-browser-connector/default.nix
blob: 37e4d249d234fcf874c9b5457b0b3a283bf3ad77 (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
64
65
66
67
68
{ stdenv
, lib
, fetchurl
, meson
, ninja
, python3
, gnome
, wrapGAppsNoGuiHook
, gobject-introspection
}:

let
  inherit (python3.pkgs) buildPythonApplication pygobject3;
in
buildPythonApplication rec {
  pname = "gnome-browser-connector";
  version = "42.1";

  format = "other";

  src = fetchurl {
    url = "mirror://gnome/sources/gnome-browser-connector/${lib.versions.major version}/gnome-browser-connector-${version}.tar.xz";
    sha256 = "vZcCzhwWNgbKMrjBPR87pugrJHz4eqxgYQtBHfFVYhI=";
  };

  nativeBuildInputs = [
    meson
    ninja
    wrapGAppsNoGuiHook
    gobject-introspection # for setup-hook
  ];

  buildInputs = [
    gnome.gnome-shell
  ];

  pythonPath = [
    pygobject3
  ];

  postPatch = ''
    patchShebangs contrib/merge_json.py
  '';

  dontWrapGApps = true;

  # Arguments to be passed to `makeWrapper`, only used by buildPython*
  preFixup = ''
    makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
  '';

  passthru = {
    updateScript = gnome.updateScript {
      packageName = "gnome-browser-connector";
    };
  };

  meta = with lib; {
    description = "Native host connector for the GNOME Shell browser extension";
    homepage = "https://gitlab.gnome.org/GNOME/gnome-browser-connector";
    longDescription = ''
      To use the integration, install the [browser extension](https://gitlab.gnome.org/GNOME/gnome-browser-extension), and then set `services.gnome.gnome-browser-connector.enable` to `true`.
    '';
    license = licenses.gpl3Plus;
    maintainers = teams.gnome.members;
    platforms = platforms.linux;
  };
}