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

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

62 lines
1.7 KiB
Nix
Raw Normal View History

2023-06-21 01:43:02 +03:00
{ lib, fetchFromGitHub, python3Packages, wrapGAppsHook, gobject-introspection, keybinder3, xdotool }:
2021-08-15 04:28:38 +03:00
python3Packages.buildPythonApplication rec {
pname = "emote";
2023-06-21 01:43:02 +03:00
version = "4.0.1";
2021-08-15 04:28:38 +03:00
src = fetchFromGitHub {
owner = "tom-james-watson";
repo = "Emote";
rev = "v${version}";
2023-06-21 01:43:02 +03:00
sha256 = "sha256-+GpL4Rp0ECsxXGP9dWZbVNkH7H2GF1brDTLsB+TQY5A=";
2021-08-15 04:28:38 +03:00
};
postPatch = ''
2023-06-21 01:43:02 +03:00
sed -i setup.py -e '/==.*/d'
2021-08-15 04:28:38 +03:00
substituteInPlace emote/config.py --replace 'os.environ.get("SNAP")' "'$out/share/emote'"
2021-11-08 13:12:01 +03:00
substituteInPlace emote/picker.py --replace 'os.environ.get("SNAP_VERSION", "dev build")' "'$version'"
2021-08-15 04:28:38 +03:00
substituteInPlace snap/gui/emote.desktop --replace "Icon=\''${SNAP}/usr/share/icons/emote.svg" "Icon=emote.svg"
'';
nativeBuildInputs = [
wrapGAppsHook
gobject-introspection
];
buildInputs = [
2023-06-21 01:43:02 +03:00
# used by gobject-introspection's setup-hook and only detected at runtime
2021-08-15 04:28:38 +03:00
keybinder3
];
2023-06-21 01:43:02 +03:00
propagatedBuildInputs = with python3Packages; [
dbus-python
manimpango
pygobject3 # not listed in setup.py
setproctitle
2021-08-15 04:28:38 +03:00
];
postInstall = ''
install -D snap/gui/emote.desktop $out/share/applications/emote.desktop
install -D snap/gui/emote.svg $out/share/pixmaps/emote.svg
2023-06-21 01:43:02 +03:00
install -D -t $out/share/emote/static static/{emojis.csv,logo.svg,style.css}
2021-08-15 04:28:38 +03:00
'';
dontWrapGApps = true;
preFixup = ''
makeWrapperArgs+=(
"''${gappsWrapperArgs[@]}"
--prefix PATH : ${lib.makeBinPath [ xdotool ]}
)
2021-08-15 04:28:38 +03:00
'';
doCheck = false;
meta = with lib; {
description = "Modern emoji picker for Linux";
2021-08-15 04:28:38 +03:00
homepage = "https://github.com/tom-james-watson/emote";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ emilytrau SuperSandro2000 ];
2021-08-15 04:28:38 +03:00
platforms = platforms.linux;
};
}