2021-04-05 15:23:46 +00:00
|
|
|
{ lib, stdenv, fetchurl, pkg-config, bison, flex, xkeyboard_config, libxcb, libX11 }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2022-01-13 20:06:32 +00:00
|
|
|
pname = "libxkbcommon";
|
|
|
|
version = "0.7.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2022-01-13 20:06:32 +00:00
|
|
|
url = "http://xkbcommon.org/download/libxkbcommon-${version}.tar.xz";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "1n5rv5n210kjnkyrvbh04gfwaa7zrmzy1393p8nyqfw66lkxr918";
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2021-04-05 15:23:46 +00:00
|
|
|
buildInputs = [ bison flex xkeyboard_config libxcb ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--with-xkb-config-root=${xkeyboard_config}/etc/X11/xkb"
|
|
|
|
"--with-x-locale-root=${libX11.out}/share/X11/locale"
|
|
|
|
];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
preBuild = lib.optionalString stdenv.isDarwin ''
|
2020-04-24 23:36:52 +00:00
|
|
|
sed -i 's/,--version-script=.*$//' Makefile
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A library to handle keyboard descriptions";
|
|
|
|
homepage = "https://xkbcommon.org";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ ttuegel ];
|
2022-05-18 14:49:53 +00:00
|
|
|
mainProgram = "xkbcli";
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = with platforms; unix;
|
|
|
|
};
|
|
|
|
}
|