libxklavier: add darwin support

This commit is contained in:
Weijia Wang 2022-12-18 22:08:15 +01:00 committed by Rick van Schijndel
parent 4053a8dab1
commit 0f4a3ff83f

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchgit, autoreconfHook, pkg-config, gtk-doc, xkeyboard_config, libxml2, xorg, docbook_xsl
{ lib, stdenv, fetchgit, fetchpatch, autoreconfHook, pkg-config, gtk-doc, xkeyboard_config, libxml2, xorg, docbook_xsl
, glib, isocodes, gobject-introspection
, withDoc ? (stdenv.buildPlatform == stdenv.hostPlatform)
}:
@ -13,7 +13,14 @@ stdenv.mkDerivation rec {
sha256 = "1w1x5mrgly2ldiw3q2r6y620zgd89gk7n90ja46775lhaswxzv7a";
};
patches = [ ./honor-XKB_CONFIG_ROOT.patch ];
patches = [
./honor-XKB_CONFIG_ROOT.patch
] ++ lib.optionals stdenv.isDarwin [
(fetchpatch {
url = "https://gitlab.freedesktop.org/archived-projects/libxklavier/-/commit/1387c21a788ec1ea203c8392ea1460fc29d83f70.patch";
sha256 = "sha256-fyWu7sVfDv/ozjhLSLCVsv+iNFawWgJqHUsQHHSkQn4=";
})
];
outputs = [ "out" "dev" ] ++ lib.optionals withDoc [ "devdoc" ];
@ -38,6 +45,6 @@ stdenv.mkDerivation rec {
description = "Library providing high-level API for X Keyboard Extension known as XKB";
homepage = "http://freedesktop.org/wiki/Software/LibXklavier";
license = licenses.lgpl2Plus;
platforms = platforms.linux;
platforms = platforms.unix;
};
}