From 5ffda0d0ad1505cb7d1ed3b7b8e456fc4d5694f5 Mon Sep 17 00:00:00 2001 From: Artturin Date: Fri, 23 Jul 2021 06:04:17 +0300 Subject: [PATCH] autokey: 0.94.1 -> 0.95.10 --- pkgs/applications/office/autokey/default.nix | 53 ++++++++++++++------ 1 file changed, 39 insertions(+), 14 deletions(-) diff --git a/pkgs/applications/office/autokey/default.nix b/pkgs/applications/office/autokey/default.nix index 441a9a98e97..4aef68ba0d0 100644 --- a/pkgs/applications/office/autokey/default.nix +++ b/pkgs/applications/office/autokey/default.nix @@ -1,32 +1,57 @@ -{ lib, python3Packages, fetchFromGitHub, wrapGAppsHook, gobject-introspection -, gtksourceview3, libappindicator-gtk3, libnotify }: +{ lib +, python3Packages +, fetchFromGitHub +, wrapGAppsHook +, gobject-introspection +, gtksourceview3 +, libappindicator-gtk3 +, libnotify +}: python3Packages.buildPythonApplication rec { - name = "autokey-${version}"; - version = "0.94.1"; + pname = "autokey"; + version = "0.95.10"; src = fetchFromGitHub { owner = "autokey"; repo = "autokey"; rev = "v${version}"; - sha256 = "1syxyciyxzs0khbfs9wjgj03q967p948kipw27j1031q0b5z3jxr"; + sha256 = "0f0cqfnb49wwdy7zl2f2ypcnd5pc8r8n7z7ssxkq20d4xfxlgamr"; }; - # Arch requires a similar work around—see - # https://aur.archlinux.org/packages/autokey-py3/?comments=all - patches = [ ./remove-requires-dbus-python.patch ]; - # Tests appear to be broken with import errors within the project structure doCheck = false; - # Note: no dependencies included for Qt GUI because Qt ui is poorly - # maintained—see https://github.com/autokey/autokey/issues/51 + nativeBuildInputs = [ wrapGAppsHook ]; - buildInputs = [ wrapGAppsHook gobject-introspection gtksourceview3 - libappindicator-gtk3 libnotify ]; + buildInputs = [ + gobject-introspection + gtksourceview3 + libappindicator-gtk3 + libnotify + ]; propagatedBuildInputs = with python3Packages; [ - dbus-python pyinotify xlib pygobject3 ]; + dbus-python + pyinotify + xlib + pygobject3 + ]; + + dontWrapGapps = true; + + pythonPath = with python3Packages; requiredPythonModules [ dbus-python xlib pygobject3 ]; + + postInstall = '' + rm $out/bin/autokey-qt + buildPythonPath "$out $pythonPath" + makeWrapperArgs+=( + "''${gappsWrapperArgs[@]}" + # for autokey-shell ModuleNotFoundError: No module named 'autokey' + --prefix "PYTHONPATH" ":" "$out/lib/${python3Packages.python.libPrefix}/site-packages" + --prefix "PYTHONPATH" ":" "$program_PYTHONPATH" + ) + ''; meta = { homepage = "https://github.com/autokey/autokey";