about summary refs log tree commit diff
path: root/nixpkgs/pkgs/desktops/pantheon/desktop/gnome-bluetooth-contract/default.nix
blob: 19051439209878f75337133363eac7d126c76b8d (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
{ lib
, stdenv
, fetchFromGitHub
, unstableGitUpdater
, substituteAll
, gnome-bluetooth
}:

stdenv.mkDerivation rec {
  pname = "gnome-bluetooth-contract";
  version = "unstable-2021-02-22";

  src = fetchFromGitHub {
    owner = "elementary";
    repo = pname;
    rev = "8dcd4d03dc7a7d487980fd8bc95af985dc4fff5c";
    sha256 = "sha256-9eX6j/cvN/CoqrHrh9mZEsUJ8viDWIGxIva1xFwIK7c=";
  };

  patches = [
    (substituteAll {
      src = ./exec-path.patch;
      gnome_bluetooth = gnome-bluetooth;
    })
  ];

  dontConfigure = true;

  dontBuild = true;

  installPhase = ''
    runHook preInstall

    mkdir -p $out/share/contractor
    cp *.contract $out/share/contractor/

    runHook postInstall
  '';

  passthru = {
    updateScript = unstableGitUpdater {
      url = "https://github.com/elementary/gnome-bluetooth-contract.git";
    };
  };

  meta = with lib; {
    description = "Contractor extension for GNOME Bluetooth";
    homepage = "https://github.com/elementary/gnome-bluetooth-contract";
    license = licenses.gpl3Plus;
    maintainers = teams.pantheon.members;
    platforms = platforms.linux;
    # sendto device selection is removed in gnome-bluetooth 42
    # https://github.com/elementary/gnome-bluetooth-contract/issues/1
    broken = true;
  };
}