summary refs log tree commit diff
path: root/pkgs/development/libraries/libayatana-indicator/default.nix
blob: c3c271c17194b0c81f4b58f4d72907f824c5a066 (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
{ stdenv, fetchFromGitHub, lib
, pkg-config, autoreconfHook
, gtkVersion ? "3"
, gtk2
, gtk3
, ayatana-ido
}:

stdenv.mkDerivation rec {
  pname = "libayatana-indicator-gtk${gtkVersion}";
  version = "0.8.2";

  src = fetchFromGitHub {
    owner = "AyatanaIndicators";
    repo = "libayatana-indicator";
    rev = version;
    sha256 = "1wlqm3pj12vgz587a72widbg0vcmm1klsd2lh3mpzfy20m3vjxhj";
  };

  nativeBuildInputs = [ pkg-config autoreconfHook ];

  buildInputs = [ ayatana-ido ]
    ++ lib.lists.optionals (gtkVersion == "2") [ gtk2 ]
    ++ lib.lists.optionals (gtkVersion == "3") [ gtk3 ];

  configureFlags = [ "--with-gtk=${gtkVersion}" ];

  meta = with lib; {
    description = "Ayatana Indicators Shared Library";
    homepage = "https://github.com/AyatanaIndicators/libayatana-indicator";
    changelog = "https://github.com/AyatanaIndicators/libayatana-indicator/blob/${version}/ChangeLog";
    license = licenses.gpl3Plus;
    maintainers = [ maintainers.nickhu ];
    platforms = platforms.linux;
  };
}