summary refs log tree commit diff
path: root/pkgs/applications/misc/xxkb/default.nix
blob: d6514e58517e36d82c138203beed444ca63a5774 (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
{ lib
, stdenv
, fetchurl
, libX11
, libXt
, libXext
, libXpm
, imake
, gccmakedep
, svgSupport ? false
, librsvg
, glib
, gdk-pixbuf
, pkg-config
}:

stdenv.mkDerivation rec {
  pname = "xxkb";
  version = "1.11.1";

  src = fetchurl {
    url = "mirror://sourceforge/xxkb/xxkb-${version}-src.tar.gz";
    sha256 = "0hl1i38z9xnbgfjkaz04vv1n8xbgfg88g5z8fyzyb2hxv2z37anf";
  };

  nativeBuildInputs = [ imake gccmakedep ];

  buildInputs = [
    libX11
    libXt
    libXext
    libXpm
  ] ++ lib.optionals svgSupport [ librsvg glib gdk-pixbuf pkg-config ];

  outputs = [ "out" "man" ];

  imakeFlags = lib.optionalString svgSupport "-DWITH_SVG_SUPPORT";

  makeFlags = [
    "BINDIR=${placeholder "out"}/bin"
    "CONFDIR=${placeholder "out"}/etc/X11"
    "PIXMAPDIR=${placeholder "out"}/share/xxkb"
    "LIBDIR=${placeholder "out"}/lib/X11"
    "XAPPLOADDIR=${placeholder "out"}/etc/X11/app-defaults"
    "MANDIR=${placeholder "man"}/share/man"
  ];

  installTargets = [ "install" "install.man" ];

  meta = with lib; {
    description = "A keyboard layout indicator and switcher";
    homepage = "http://xxkb.sourceforge.net/";
    license = licenses.artistic2;
    maintainers = with maintainers; [ rasendubi ];
    platforms = platforms.linux;
  };
}