biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / applications / misc / gxkb / default.nix
blobf64982ed717f7dd261fd0127af111234802663bb
1 { lib, stdenv, fetchFromGitHub, fetchurl, git, autoreconfHook, pkg-config, gtk3, libwnck, libxklavier
2 , appindicatorSupport ? true, libayatana-appindicator
3 }:
5 stdenv.mkDerivation rec {
6   pname = "gxkb";
7   version = "0.9.5";
9   src = fetchFromGitHub {
10     owner = "zen-tools";
11     repo = "gxkb";
12     rev = "v${version}";
13     sha256 = "sha256-oBIBIkj4p6HlF0PRQtI/K5dhLs7pbPxN7Cgr/YZaI1s=";
14   };
16   nativeBuildInputs = [ pkg-config autoreconfHook ];
17   buildInputs = [ gtk3 libwnck libxklavier ] ++ lib.optional appindicatorSupport libayatana-appindicator;
19   configureFlags = lib.optional appindicatorSupport "--enable-appindicator=yes";
20   outputs = [ "out" "man" ];
22   # This patch restore data which was wiped by upstream without any technical reasons
23   # https://github.com/omgbebebe/gxkb/commit/727ec8b595a91dbb540e6087750f43b85d0dfbc0
24   # NOTE: the `patch` hook cannot be used here due to lack of support for git binary patches
25   p1 = fetchurl {
26        url = "https://github.com/omgbebebe/gxkb/commit/727ec8b595a91dbb540e6087750f43b85d0dfbc0.patch";
27        hash = "sha256-x7x3MHHrOnPivvlzOFqgFAA5BDB2LOXMlalPYbwM/1Q=";
28   };
30   postPatch = ''
31     ${git}/bin/git apply ${p1}
32   '';
34   meta = with lib; {
35     description = "X11 keyboard indicator and switcher";
36     homepage = "https://zen-tools.github.io/gxkb/";
37     license = licenses.gpl2Plus;
38     maintainers = [ maintainers.omgbebebe ];
39     platforms = platforms.linux;
40     mainProgram = "gxkb";
41   };