2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, libX11, libXt, libXext, libXpm, imake, gccmakedep
|
2021-02-05 17:12:51 +00:00
|
|
|
, svgSupport ? false, librsvg, glib, gdk-pixbuf, pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
assert svgSupport ->
|
2021-02-05 17:12:51 +00:00
|
|
|
librsvg != null && glib != null && gdk-pixbuf != null && pkg-config != null;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "xxkb-1.11.1";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/xxkb/${name}-src.tar.gz";
|
|
|
|
sha256 = "0hl1i38z9xnbgfjkaz04vv1n8xbgfg88g5z8fyzyb2hxv2z37anf";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ imake gccmakedep ];
|
|
|
|
buildInputs = [
|
|
|
|
libX11 libXt libXext libXpm
|
2021-02-05 17:12:51 +00:00
|
|
|
] ++ lib.optionals svgSupport [ librsvg glib gdk-pixbuf pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
outputs = [ "out" "man" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
imakeFlags = lib.optionalString svgSupport "-DWITH_SVG_SUPPORT";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
"BINDIR=${placeholder "out"}/bin"
|
|
|
|
"PIXMAPDIR=${placeholder "out"}/share/xxkb"
|
|
|
|
"XAPPLOADDIR=${placeholder "out"}/etc/X11/app-defaults"
|
|
|
|
"MANDIR=${placeholder "man"}/share/man"
|
|
|
|
];
|
|
|
|
|
|
|
|
installTargets = [ "install" "install.man" ];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A keyboard layout indicator and switcher";
|
|
|
|
homepage = "http://xxkb.sourceforge.net/";
|
2021-01-15 22:18:51 +00:00
|
|
|
license = lib.licenses.artistic2;
|
|
|
|
maintainers = with lib.maintainers; [ rasendubi ];
|
|
|
|
platforms = lib.platforms.linux;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|