nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 fetchFromGitHub,
4 python3,
5 gtk3,
6 wrapGAppsHook3,
7 glibcLocales,
8 gobject-introspection,
9 gettext,
10 pango,
11 gdk-pixbuf,
12 librsvg,
13 atk,
14 libnotify,
15 libappindicator-gtk3,
16 gst_all_1,
17 makeWrapper,
18 picotts,
19 sox,
20}:
21
22python3.pkgs.buildPythonApplication rec {
23 pname = "gSpeech";
24 version = "0.11.0";
25 format = "setuptools";
26
27 src = fetchFromGitHub {
28 owner = "mothsart";
29 repo = "gSpeech";
30 rev = version;
31 sha256 = "0z11yxvgi8m2xjmmf56zla91jpmf0a4imwi9qqz6bp51pw4sk8gp";
32 };
33
34 nativeBuildInputs = [
35 wrapGAppsHook3
36 gobject-introspection
37 pango
38 gdk-pixbuf
39 atk
40 gettext
41 libnotify
42 libappindicator-gtk3
43 gst_all_1.gstreamer
44 gst_all_1.gst-plugins-base
45 gst_all_1.gst-plugins-good
46 makeWrapper
47 ];
48
49 buildInputs = [
50 glibcLocales
51 gtk3
52 python3
53 ];
54
55 propagatedBuildInputs = with python3.pkgs; [
56 pygobject3
57 librsvg
58 ];
59
60 postInstall = ''
61 install -Dm444 gspeech.desktop -t $out/share/applications
62 install -Dm444 icons/*.svg -t $out/share/icons/hicolor/scalable/apps
63 '';
64
65 postFixup = ''
66 wrapProgram $out/bin/gspeech --prefix PATH : ${
67 lib.makeBinPath [
68 picotts
69 sox
70 ]
71 }
72 wrapProgram $out/bin/gspeech-cli --prefix PATH : ${
73 lib.makeBinPath [
74 picotts
75 sox
76 ]
77 }
78 '';
79
80 strictDeps = false;
81
82 meta = with lib; {
83 description = "Minimal GUI for the Text To Speech 'Svox Pico'. Read clipboard or selected text in different languages and manage it : pause, stop, replay";
84 homepage = "https://github.com/mothsART/gSpeech";
85 maintainers = with maintainers; [ mothsart ];
86 license = licenses.gpl3;
87 platforms = platforms.unix;
88 };
89}