mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-23 05:37:27 +03:00
commit
5a4d916a63
85
pkgs/by-name/em/emote/package.nix
Normal file
85
pkgs/by-name/em/emote/package.nix
Normal 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;
|
||||
};
|
||||
}
|
@ -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;
|
||||
};
|
||||
}
|
@ -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 { };
|
||||
|
Loading…
Reference in New Issue
Block a user