3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/misc/xxkb/default.nix
Sergei Trofimovich 1333bd9ac0 xxkb: explicitly set LIBDIR and CONFDIR
In preparation to fix long-standing `imake` bug #135337 we need
to set `LIBDIR` and `CONFDIR` away from incorrectly embedded
`xorg-cf-files`. Before #135337 the package worked by chance.

Issue: https://github.com/NixOS/nixpkgs/issues/135337
2021-09-06 07:46:12 +01:00

44 lines
1.3 KiB
Nix

{ lib, stdenv, fetchurl, libX11, libXt, libXext, libXpm, imake, gccmakedep
, svgSupport ? false, librsvg, glib, gdk-pixbuf, pkg-config
}:
assert svgSupport ->
librsvg != null && glib != null && gdk-pixbuf != null && pkg-config != null;
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
] ++ 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 = {
description = "A keyboard layout indicator and switcher";
homepage = "http://xxkb.sourceforge.net/";
license = lib.licenses.artistic2;
maintainers = with lib.maintainers; [ rasendubi ];
platforms = lib.platforms.linux;
};
}