btrbk: add mainProgram
[NixPkgs.git] / pkgs / by-name / au / autokey / package.nix
blob91700299400a24107c980432cdfba3d17b459c3a
1 { lib
2 , python3Packages
3 , fetchFromGitHub
4 , wrapGAppsHook3
5 , gobject-introspection
6 , gtksourceview3
7 , libappindicator-gtk3
8 , libnotify
9 , zenity
10 , wmctrl
13 python3Packages.buildPythonApplication rec {
14   pname = "autokey";
15   version = "0.96.0";
17   src = fetchFromGitHub {
18     owner = "autokey";
19     repo = "autokey";
20     rev = "v${version}";
21     hash = "sha256-d1WJLqkdC7QgzuYdnxYhajD3DtCpgceWCAxGrk0KKew=";
22   };
24   # Tests appear to be broken with import errors within the project structure
25   doCheck = false;
27   nativeBuildInputs = [ wrapGAppsHook3 gobject-introspection ];
29   buildInputs = [
30     gtksourceview3
31     libappindicator-gtk3
32     libnotify
33   ];
35   propagatedBuildInputs = with python3Packages; [
36     dbus-python
37     pyinotify
38     xlib
39     pygobject3
40     packaging
41   ];
43   runtimeDeps = [
44     zenity
45     wmctrl
46   ];
48   dontWrapGApps = true;
50   preFixup = ''
51     makeWrapperArgs+=(''${gappsWrapperArgs[@]} --prefix PATH : ${ lib.makeBinPath runtimeDeps })
52   '';
54   postInstall = ''
55     # remove Qt version which we currently do not support
56     rm $out/bin/autokey-qt $out/share/applications/autokey-qt.desktop
57   '';
59   meta = {
60     homepage = "https://github.com/autokey/autokey";
61     description = "Desktop automation utility for Linux and X11";
62     license = with lib.licenses; [ gpl3 ];
63     maintainers = with lib.maintainers; [ pneumaticat ];
64     platforms = lib.platforms.linux;
65   };