Merge pull request #321075 from Aleksanaa/emote

emote: 4.0.1 -> 4.1.0
This commit is contained in:
Masum Reza 2024-06-25 11:08:02 +05:30 committed by GitHub
commit 5a4d916a63
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 85 additions and 64 deletions

View File

@ -0,0 +1,85 @@
{
lib,
fetchFromGitHub,
python3Packages,
meson,
ninja,
pkg-config,
wrapGAppsHook3,
gobject-introspection,
keybinder3,
xdotool,
wl-clipboard,
}:
python3Packages.buildPythonApplication rec {
pname = "emote";
version = "4.1.0";
pyproject = false; # Built with meson
src = fetchFromGitHub {
owner = "tom-james-watson";
repo = "Emote";
rev = "v${version}";
hash = "sha256-c5EY1Cc3oD8EG1oTChbl10jJlNeAETQbAFGoA9Lw5PY=";
};
postPatch = ''
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'"
'';
nativeBuildInputs = [
meson
ninja
pkg-config
wrapGAppsHook3
gobject-introspection
];
buildInputs = [
# used by gobject-introspection's setup-hook and only detected at runtime
keybinder3
];
dependencies = with python3Packages; [
dbus-python.out # don't propagate dev output
manimpango
pygobject3.out # don't propagate dev output
setproctitle
];
postInstall = ''
rm $out/share/emote/emote/{emote.in,meson.build}
rm $out/share/emote/static/{meson.build,com.tomjwatson.Emote.desktop,prepare-launch}
'';
dontWrapGApps = true;
preFixup = ''
makeWrapperArgs+=(
"''${gappsWrapperArgs[@]}"
--prefix PATH : ${
lib.makeBinPath [
xdotool
wl-clipboard
]
}
)
'';
meta = with lib; {
description = "Modern emoji picker for Linux";
mainProgram = "emote";
homepage = "https://github.com/tom-james-watson/emote";
license = licenses.gpl3Plus;
maintainers = with maintainers; [
emilytrau
SuperSandro2000
aleksana
];
platforms = platforms.linux;
};
}

View File

@ -1,62 +0,0 @@
{ lib, fetchFromGitHub, python3Packages, wrapGAppsHook3, gobject-introspection, keybinder3, xdotool }:
python3Packages.buildPythonApplication rec {
pname = "emote";
version = "4.0.1";
src = fetchFromGitHub {
owner = "tom-james-watson";
repo = "Emote";
rev = "v${version}";
sha256 = "sha256-+GpL4Rp0ECsxXGP9dWZbVNkH7H2GF1brDTLsB+TQY5A=";
};
postPatch = ''
sed -i setup.py -e '/==.*/d'
substituteInPlace emote/config.py --replace 'os.environ.get("SNAP")' "'$out/share/emote'"
substituteInPlace emote/picker.py --replace 'os.environ.get("SNAP_VERSION", "dev build")' "'$version'"
substituteInPlace snap/gui/emote.desktop --replace "Icon=\''${SNAP}/usr/share/icons/emote.svg" "Icon=emote.svg"
'';
nativeBuildInputs = [
wrapGAppsHook3
gobject-introspection
];
buildInputs = [
# used by gobject-introspection's setup-hook and only detected at runtime
keybinder3
];
propagatedBuildInputs = with python3Packages; [
dbus-python.out # don't propagate dev output
manimpango
pygobject3.out # not listed in setup.py, don't propagate dev output
setproctitle
];
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.csv,logo.svg,style.css}
'';
dontWrapGApps = true;
preFixup = ''
makeWrapperArgs+=(
"''${gappsWrapperArgs[@]}"
--prefix PATH : ${lib.makeBinPath [ xdotool ]}
)
'';
doCheck = false;
meta = with lib; {
description = "Modern emoji picker for Linux";
mainProgram = "emote";
homepage = "https://github.com/tom-james-watson/emote";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ emilytrau SuperSandro2000 ];
platforms = platforms.linux;
};
}

View File

@ -7468,8 +7468,6 @@ with pkgs;
autoreconfHook = buildPackages.autoreconfHook269;
};
emote = callPackage ../tools/inputmethods/emote { };
engauge-digitizer = libsForQt5.callPackage ../applications/science/math/engauge-digitizer { };
epub2txt2 = callPackage ../tools/text/epub2txt2 { };