summary refs log tree commit diff
path: root/pkgs/tools/inputmethods
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2021-08-21 14:35:37 +0200
committerGitHub <noreply@github.com>2021-08-21 14:35:37 +0200
commit6f1f387562ddb294317929d693a60cc9e6753ca2 (patch)
tree518ad1752ed88093515ca457d2e8e12916701e9c /pkgs/tools/inputmethods
parent048b38ea391e6748b39042bc3db52194d9500be3 (diff)
parent20f1be7ab7b3f83b75fe9a009549bc28dcf033c8 (diff)
downloadnixpkgs-6f1f387562ddb294317929d693a60cc9e6753ca2.tar
nixpkgs-6f1f387562ddb294317929d693a60cc9e6753ca2.tar.gz
nixpkgs-6f1f387562ddb294317929d693a60cc9e6753ca2.tar.bz2
nixpkgs-6f1f387562ddb294317929d693a60cc9e6753ca2.tar.lz
nixpkgs-6f1f387562ddb294317929d693a60cc9e6753ca2.tar.xz
nixpkgs-6f1f387562ddb294317929d693a60cc9e6753ca2.tar.zst
nixpkgs-6f1f387562ddb294317929d693a60cc9e6753ca2.zip
Merge pull request #134096 from angustrau/emote
emote: init at 2.0.0
Diffstat (limited to 'pkgs/tools/inputmethods')
-rw-r--r--pkgs/tools/inputmethods/emote/default.nix56
1 files changed, 56 insertions, 0 deletions
diff --git a/pkgs/tools/inputmethods/emote/default.nix b/pkgs/tools/inputmethods/emote/default.nix
new file mode 100644
index 00000000000..d65831d5202
--- /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;
+  };
+}