From 20f1be7ab7b3f83b75fe9a009549bc28dcf033c8 Mon Sep 17 00:00:00 2001 From: Angus Trau Date: Sun, 15 Aug 2021 11:28:38 +1000 Subject: [PATCH] emote: init at 2.0.0 --- pkgs/tools/inputmethods/emote/default.nix | 56 +++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 58 insertions(+) create mode 100644 pkgs/tools/inputmethods/emote/default.nix diff --git a/pkgs/tools/inputmethods/emote/default.nix b/pkgs/tools/inputmethods/emote/default.nix new file mode 100644 index 000000000000..d65831d5202e --- /dev/null +++ b/pkgs/tools/inputmethods/emote/default.nix @@ -0,0 +1,56 @@ +{ lib, fetchFromGitHub, python3Packages, wrapGAppsHook, gobject-introspection, gtk3, keybinder3, xdotool, pango, gdk-pixbuf, atk, librsvg }: + +python3Packages.buildPythonApplication rec { + pname = "emote"; + version = "2.0.0"; + + src = fetchFromGitHub { + owner = "tom-james-watson"; + repo = "Emote"; + rev = "v${version}"; + sha256 = "kYXFD6VBnuEZ0ZMsF6ZmN4V0JN83puxRILpNlllVsKQ="; + }; + + postPatch = '' + substituteInPlace setup.py --replace "pygobject==3.36.0" "pygobject" + substituteInPlace emote/config.py --replace 'os.environ.get("SNAP")' "'$out/share/emote'" + substituteInPlace snap/gui/emote.desktop --replace "Icon=\''${SNAP}/usr/share/icons/emote.svg" "Icon=emote.svg" + ''; + + nativeBuildInputs = [ + wrapGAppsHook + gobject-introspection + keybinder3 + pango + gdk-pixbuf + atk + ]; + + propagatedBuildInputs = [ + python3Packages.pygobject3 + gtk3 + xdotool + librsvg + ]; + + postInstall = '' + install -D snap/gui/emote.desktop $out/share/applications/emote.desktop + install -D snap/gui/emote.svg $out/share/pixmaps/emote.svg + install -D -t $out/share/emote/static static/{emojis.json,logo.svg,style.css} + ''; + + dontWrapGApps = true; + preFixup = '' + makeWrapperArgs+=("''${gappsWrapperArgs[@]}") + ''; + + doCheck = false; + + meta = with lib; { + description = "A modern emoji picker for Linux"; + homepage = "https://github.com/tom-james-watson/emote"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ angustrau ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f9de8b6ea03b..88c71e3d5e22 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4443,6 +4443,8 @@ with pkgs; autoreconfHook = buildPackages.autoreconfHook269; }; + emote = callPackage ../tools/inputmethods/emote { }; + engauge-digitizer = libsForQt5.callPackage ../applications/science/math/engauge-digitizer { }; epubcheck = callPackage ../tools/text/epubcheck { };