1{ lib, stdenv
2, fetchFromGitHub
3, nix-update-script
4, meson
5, ninja
6, vala
7, pkg-config
8, wrapGAppsHook
9, appstream
10, desktop-file-utils
11, python3
12, libgee
13, glib
14, gtk3
15, sqlite
16, at-spi2-atk
17, at-spi2-core
18, dbus
19, ibus
20, json-glib
21, pantheon
22, xorg
23}:
24
25stdenv.mkDerivation rec {
26 pname = "snippetpixie";
27 version = "1.5.3";
28
29 src = fetchFromGitHub {
30 owner = "bytepixie";
31 repo = pname;
32 rev = version;
33 sha256 = "0gs3d9hdywg4vcfbp4qfcagfjqalfgw9xpvywg4pw1cm3rzbdqmz";
34 };
35
36 nativeBuildInputs = [
37 meson
38 ninja
39 vala
40 pkg-config
41 wrapGAppsHook
42 appstream
43 desktop-file-utils
44 python3
45 ];
46
47 buildInputs = [
48 libgee
49 glib
50 gtk3
51 sqlite
52 at-spi2-atk
53 at-spi2-core
54 dbus
55 ibus
56 json-glib
57 xorg.libXtst
58 pantheon.granite
59 pantheon.elementary-gtk-theme
60 pantheon.elementary-icon-theme
61 ];
62
63 doCheck = true;
64
65 postPatch = ''
66 chmod +x meson/post_install.py
67 patchShebangs meson/post_install.py
68 '';
69
70 passthru = {
71 updateScript = nix-update-script {
72 attrPath = pname;
73 };
74 };
75
76 meta = with lib; {
77 description = "Your little expandable text snippet helper";
78 longDescription = ''
79 Your little expandable text snippet helper.
80
81 Save your often used text snippets and then expand them whenever you type their abbreviation.
82
83 For example:- "spr`" expands to "Snippet Pixie rules!"
84
85 For non-accessible applications such as browsers and Electron apps, there's a shortcut (default is Ctrl+`) for opening a search window that pastes the selected snippet.
86 '';
87 homepage = "https://www.snippetpixie.com";
88 license = licenses.gpl2Plus;
89 maintainers = with maintainers; [ ianmjones ] ++ teams.pantheon.members;
90 platforms = platforms.linux;
91 mainProgram = "com.github.bytepixie.snippetpixie";
92 };
93}