2024-05-15 15:35:15 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchurl, git, autoreconfHook, pkg-config, gtk3, libwnck, libxklavier
|
2022-10-21 18:38:19 +00:00
|
|
|
, appindicatorSupport ? true, libayatana-appindicator
|
2021-03-09 03:18:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "gxkb";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "0.9.5";
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "zen-tools";
|
|
|
|
repo = "gxkb";
|
|
|
|
rev = "v${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
sha256 = "sha256-oBIBIkj4p6HlF0PRQtI/K5dhLs7pbPxN7Cgr/YZaI1s=";
|
2021-03-09 03:18:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config autoreconfHook ];
|
2022-10-21 18:38:19 +00:00
|
|
|
buildInputs = [ gtk3 libwnck libxklavier ] ++ lib.optional appindicatorSupport libayatana-appindicator;
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
configureFlags = lib.optional appindicatorSupport "--enable-appindicator=yes";
|
|
|
|
outputs = [ "out" "man" ];
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
# This patch restore data which was wiped by upstream without any technical reasons
|
|
|
|
# https://github.com/omgbebebe/gxkb/commit/727ec8b595a91dbb540e6087750f43b85d0dfbc0
|
|
|
|
# NOTE: the `patch` hook cannot be used here due to lack of support for git binary patches
|
|
|
|
p1 = fetchurl {
|
|
|
|
url = "https://github.com/omgbebebe/gxkb/commit/727ec8b595a91dbb540e6087750f43b85d0dfbc0.patch";
|
|
|
|
hash = "sha256-x7x3MHHrOnPivvlzOFqgFAA5BDB2LOXMlalPYbwM/1Q=";
|
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
${git}/bin/git apply ${p1}
|
|
|
|
'';
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "X11 keyboard indicator and switcher";
|
|
|
|
homepage = "https://zen-tools.github.io/gxkb/";
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = [ maintainers.omgbebebe ];
|
|
|
|
platforms = platforms.linux;
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "gxkb";
|
2021-03-09 03:18:52 +00:00
|
|
|
};
|
|
|
|
}
|