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.

86 lines
1.9 KiB
Nix
Raw Normal View History

2024-06-19 16:28:56 +00:00
{
lib,
fetchFromGitHub,
python3Packages,
2024-06-19 17:01:14 +00:00
meson,
ninja,
pkg-config,
2024-06-19 16:28:56 +00:00
wrapGAppsHook3,
gobject-introspection,
keybinder3,
xdotool,
2024-06-19 17:01:14 +00:00
wl-clipboard,
2024-06-19 16:28:56 +00:00
}:
2021-08-15 01:28:38 +00:00
python3Packages.buildPythonApplication rec {
pname = "emote";
2024-06-19 17:01:14 +00:00
version = "4.1.0";
pyproject = false; # Built with meson
2021-08-15 01:28:38 +00:00
src = fetchFromGitHub {
owner = "tom-james-watson";
repo = "Emote";
rev = "v${version}";
2024-06-19 17:01:14 +00:00
hash = "sha256-c5EY1Cc3oD8EG1oTChbl10jJlNeAETQbAFGoA9Lw5PY=";
2021-08-15 01:28:38 +00:00
};
postPatch = ''
2024-06-19 17:01:14 +00:00
substituteInPlace emote/picker.py \
--replace-fail 'os.environ.get("SNAP_VERSION", "dev build")' "'$version'"
substituteInPlace emote/config.py \
--replace-fail 'is_flatpak = os.environ.get("FLATPAK") is not None' 'is_flatpak = False' \
--replace-fail 'os.environ.get("SNAP")' "'$out/share/emote'"
2021-08-15 01:28:38 +00:00
'';
nativeBuildInputs = [
2024-06-19 17:01:14 +00:00
meson
ninja
pkg-config
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
];
2024-06-19 17:01:14 +00:00
dependencies = 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
2024-06-19 17:01:14 +00:00
pygobject3.out # don't propagate dev output
2023-06-20 22:43:02 +00:00
setproctitle
2021-08-15 01:28:38 +00:00
];
postInstall = ''
2024-06-19 17:01:14 +00:00
rm $out/share/emote/emote/{emote.in,meson.build}
rm $out/share/emote/static/{meson.build,com.tomjwatson.Emote.desktop,prepare-launch}
2021-08-15 01:28:38 +00:00
'';
dontWrapGApps = true;
preFixup = ''
makeWrapperArgs+=(
"''${gappsWrapperArgs[@]}"
2024-06-19 17:01:14 +00:00
--prefix PATH : ${
lib.makeBinPath [
xdotool
wl-clipboard
]
}
)
2021-08-15 01:28:38 +00:00
'';
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;
2024-06-19 16:28:56 +00:00
maintainers = with maintainers; [
emilytrau
SuperSandro2000
2024-06-19 17:01:31 +00:00
aleksana
2024-06-19 16:28:56 +00:00
];
2021-08-15 01:28:38 +00:00
platforms = platforms.linux;
};
}