nixpkgs/pkgs/tools/inputmethods/emote/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

61 lines
1.7 KiB
Nix
Raw Normal View History

2021-08-15 01:28:38 +00:00
{ lib, fetchFromGitHub, python3Packages, wrapGAppsHook, gobject-introspection, gtk3, keybinder3, xdotool, pango, gdk-pixbuf, atk, librsvg }:
python3Packages.buildPythonApplication rec {
pname = "emote";
2022-07-10 00:21:06 +00:00
version = "3.1.0";
2021-08-15 01:28:38 +00:00
src = fetchFromGitHub {
owner = "tom-james-watson";
repo = "Emote";
rev = "v${version}";
2022-07-10 00:21:06 +00:00
sha256 = "sha256-brGU5LzE9A1F5AVNIuyd8vFKEh58ijRB5qVEID/KJfY=";
2021-08-15 01:28:38 +00:00
};
postPatch = ''
2021-11-08 10:12:01 +00:00
substituteInPlace setup.py \
--replace "pygobject==3.36.0" "pygobject" \
--replace "manimpango==0.3.0" "manimpango"
2021-08-15 01:28:38 +00:00
substituteInPlace emote/config.py --replace 'os.environ.get("SNAP")' "'$out/share/emote'"
2021-11-08 10:12:01 +00:00
substituteInPlace emote/picker.py --replace 'os.environ.get("SNAP_VERSION", "dev build")' "'$version'"
2021-08-15 01:28:38 +00:00
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 = [
2021-11-08 10:12:01 +00:00
python3Packages.manimpango
2021-08-15 01:28:38 +00:00
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
2021-11-08 10:12:01 +00:00
install -D -t $out/share/emote/static static/{NotoColorEmoji.ttf,emojis.csv,logo.svg,style.css}
2021-08-15 01:28:38 +00:00
'';
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;
2022-02-11 04:45:03 +00:00
maintainers = with maintainers; [ emilytrau ];
2021-08-15 01:28:38 +00:00
platforms = platforms.linux;
};
}