about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/keybinder3/default.nix
blob: cee48d5e9eff6592118211c058de17c659838dc6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{ lib, stdenv, fetchFromGitHub, autoconf, automake, libtool, pkg-config, gnome
, gtk-doc, gtk3, libX11, libXext, libXrender, gobject-introspection
}:

stdenv.mkDerivation rec {
  pname = "keybinder3";
  version = "0.3.2";

  src = fetchFromGitHub {
    owner = "kupferlauncher";
    repo = "keybinder";
    rev = "keybinder-3.0-v${version}";
    sha256 = "196ibn86j54fywfwwgyh89i9wygm4vh7ls19fn20vrnm6ijlzh9r";
  };

  strictDeps = true;
  nativeBuildInputs = [
    autoconf
    automake
    libtool
    pkg-config
    gnome.gnome-common
    gtk-doc
    gobject-introspection
  ];
  buildInputs = [
    gtk3 libX11 libXext libXrender
  ];

  preConfigure = ''
    # NOCONFIGURE fixes 'If you meant to cross compile, use `--host'.'
    NOCONFIGURE=1 ./autogen.sh --prefix="$out"
    substituteInPlace ./configure \
      --replace "dummy pkg-config" 'dummy ''${ac_tool_prefix}pkg-config'
  '';

  meta = with lib; {
    description = "Library for registering global key bindings";
    homepage = "https://github.com/kupferlauncher/keybinder/";
    license = licenses.mit;
    platforms = platforms.unix;
    maintainers = [ maintainers.cstrahan ];
  };
}