nixpkgs/pkgs/by-name/em/emote/package.nix

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

63 lines
1.8 KiB
Nix
Raw Normal View History

{ lib, fetchFromGitHub, python3Packages, wrapGAppsHook3, gobject-introspection, keybinder3, xdotool }:
2021-08-15 01:28:38 +00:00
python3Packages.buildPythonApplication rec {
pname = "emote";
2023-06-20 22:43:02 +00:00
version = "4.0.1";
2021-08-15 01:28:38 +00:00
src = fetchFromGitHub {
owner = "tom-james-watson";
repo = "Emote";
rev = "v${version}";
2023-06-20 22:43:02 +00:00
sha256 = "sha256-+GpL4Rp0ECsxXGP9dWZbVNkH7H2GF1brDTLsB+TQY5A=";
2021-08-15 01:28:38 +00:00
};
postPatch = ''
2023-06-20 22:43:02 +00:00
sed -i setup.py -e '/==.*/d'
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 = [
wrapGAppsHook3
2021-08-15 01:28:38 +00:00
gobject-introspection
];
buildInputs = [
2023-06-20 22:43:02 +00:00
# used by gobject-introspection's setup-hook and only detected at runtime
2021-08-15 01:28:38 +00:00
keybinder3
];
2023-06-20 22:43:02 +00:00
propagatedBuildInputs = with python3Packages; [
2023-09-01 11:28:11 +00:00
dbus-python.out # don't propagate dev output
2023-06-20 22:43:02 +00:00
manimpango
2023-09-01 11:28:11 +00:00
pygobject3.out # not listed in setup.py, don't propagate dev output
2023-06-20 22:43:02 +00:00
setproctitle
2021-08-15 01:28:38 +00: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-20 22:43:02 +00:00
install -D -t $out/share/emote/static static/{emojis.csv,logo.svg,style.css}
2021-08-15 01:28:38 +00:00
'';
dontWrapGApps = true;
preFixup = ''
makeWrapperArgs+=(
"''${gappsWrapperArgs[@]}"
--prefix PATH : ${lib.makeBinPath [ xdotool ]}
)
2021-08-15 01:28:38 +00:00
'';
doCheck = false;
meta = with lib; {
description = "Modern emoji picker for Linux";
mainProgram = "emote";
2021-08-15 01:28:38 +00:00
homepage = "https://github.com/tom-james-watson/emote";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ emilytrau SuperSandro2000 ];
2021-08-15 01:28:38 +00:00
platforms = platforms.linux;
};
}