about summary refs log tree commit diff
path: root/pkgs/development/libraries/libxklavier/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/libxklavier/default.nix')
-rw-r--r--pkgs/development/libraries/libxklavier/default.nix13
1 files changed, 10 insertions, 3 deletions
diff --git a/pkgs/development/libraries/libxklavier/default.nix b/pkgs/development/libraries/libxklavier/default.nix
index cdce45e11fe4..3fa295279f0c 100644
--- a/pkgs/development/libraries/libxklavier/default.nix
+++ b/pkgs/development/libraries/libxklavier/default.nix
@@ -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;
   };
 }