iamb: cleaning (#365160)
[NixPkgs.git] / pkgs / by-name / em / emote / package.nix
blob1854bc1b1bcc3d7f5ef61103f88c480d3b23e285
2   lib,
3   fetchFromGitHub,
4   python3Packages,
5   meson,
6   ninja,
7   pkg-config,
8   wrapGAppsHook3,
9   gobject-introspection,
10   keybinder3,
11   xdotool,
12   wl-clipboard,
15 python3Packages.buildPythonApplication rec {
16   pname = "emote";
17   version = "4.1.0";
18   pyproject = false; # Built with meson
20   src = fetchFromGitHub {
21     owner = "tom-james-watson";
22     repo = "Emote";
23     rev = "v${version}";
24     hash = "sha256-c5EY1Cc3oD8EG1oTChbl10jJlNeAETQbAFGoA9Lw5PY=";
25   };
27   postPatch = ''
28     substituteInPlace emote/picker.py \
29       --replace-fail 'os.environ.get("SNAP_VERSION", "dev build")' "'$version'"
30     substituteInPlace emote/config.py \
31       --replace-fail 'is_flatpak = os.environ.get("FLATPAK") is not None' 'is_flatpak = False' \
32       --replace-fail 'os.environ.get("SNAP")' "'$out/share/emote'"
33   '';
35   nativeBuildInputs = [
36     meson
37     ninja
38     pkg-config
39     wrapGAppsHook3
40     gobject-introspection
41   ];
43   buildInputs = [
44     # used by gobject-introspection's setup-hook and only detected at runtime
45     keybinder3
46   ];
48   dependencies = with python3Packages; [
49     dbus-python.out # don't propagate dev output
50     manimpango
51     pygobject3.out # don't propagate dev output
52     setproctitle
53   ];
55   postInstall = ''
56     rm $out/share/emote/emote/{emote.in,meson.build}
57     rm $out/share/emote/static/{meson.build,com.tomjwatson.Emote.desktop,prepare-launch}
58   '';
60   dontWrapGApps = true;
61   preFixup = ''
62     makeWrapperArgs+=(
63       "''${gappsWrapperArgs[@]}"
64       --prefix PATH : ${
65         lib.makeBinPath [
66           xdotool
67           wl-clipboard
68         ]
69       }
70     )
71   '';
73   meta = with lib; {
74     description = "Modern emoji picker for Linux";
75     mainProgram = "emote";
76     homepage = "https://github.com/tom-james-watson/emote";
77     license = licenses.gpl3Plus;
78     maintainers = with maintainers; [
79       emilytrau
80       SuperSandro2000
81       aleksana
82     ];
83     platforms = platforms.linux;
84   };