about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libxkbcommon
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libxkbcommon')
-rw-r--r--nixpkgs/pkgs/development/libraries/libxkbcommon/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/libxkbcommon/libxkbcommon_7.nix32
2 files changed, 64 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libxkbcommon/default.nix b/nixpkgs/pkgs/development/libraries/libxkbcommon/default.nix
new file mode 100644
index 000000000000..6ed331a8a6b9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libxkbcommon/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchurl, fetchpatch, meson, ninja, pkgconfig, yacc, xkeyboard_config, libxcb, libX11, doxygen }:
+
+stdenv.mkDerivation rec {
+  pname = "libxkbcommon";
+  version = "0.10.0";
+
+  src = fetchurl {
+    url = "https://xkbcommon.org/download/${pname}-${version}.tar.xz";
+    sha256 = "1wmnl0hngn6vrqrya4r8hvimlkr4jag39yjprls4gyrqvh667hsp";
+  };
+
+  outputs = [ "out" "dev" "doc" ];
+
+  nativeBuildInputs = [ meson ninja pkgconfig yacc doxygen ];
+  buildInputs = [ xkeyboard_config libxcb ];
+
+  mesonFlags = [
+    "-Denable-wayland=false"
+    "-Dxkb-config-root=${xkeyboard_config}/etc/X11/xkb"
+    "-Dx-locale-root=${libX11.out}/share/X11/locale"
+  ];
+
+  doCheck = false; # fails, needs unicode locale
+
+  meta = with stdenv.lib; {
+    description = "A library to handle keyboard descriptions";
+    homepage = "https://xkbcommon.org";
+    license = licenses.mit;
+    maintainers = with maintainers; [ ttuegel ];
+    platforms = with platforms; unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libxkbcommon/libxkbcommon_7.nix b/nixpkgs/pkgs/development/libraries/libxkbcommon/libxkbcommon_7.nix
new file mode 100644
index 000000000000..a73fb7cb870e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libxkbcommon/libxkbcommon_7.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchurl, pkgconfig, yacc, flex, xkeyboard_config, libxcb, libX11 }:
+
+stdenv.mkDerivation rec {
+  name = "libxkbcommon-0.7.2";
+
+  src = fetchurl {
+    url = "http://xkbcommon.org/download/${name}.tar.xz";
+    sha256 = "1n5rv5n210kjnkyrvbh04gfwaa7zrmzy1393p8nyqfw66lkxr918";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ yacc flex xkeyboard_config libxcb ];
+
+  configureFlags = [
+    "--with-xkb-config-root=${xkeyboard_config}/etc/X11/xkb"
+    "--with-x-locale-root=${libX11.out}/share/X11/locale"
+  ];
+
+  preBuild = stdenv.lib.optionalString stdenv.isDarwin ''
+    sed -i 's/,--version-script=.*$//' Makefile
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A library to handle keyboard descriptions";
+    homepage = "https://xkbcommon.org";
+    license = licenses.mit;
+    maintainers = with maintainers; [ ttuegel ];
+    platforms = with platforms; unix;
+  };
+}