diff options
author | Martin Weinelt <hexa@darmstadt.ccc.de> | 2022-01-05 23:24:20 +0100 |
---|---|---|
committer | Martin Weinelt <hexa@darmstadt.ccc.de> | 2022-01-05 23:24:20 +0100 |
commit | 4540a9dcd2fa6791678aef87d916777d5ab62ca0 (patch) | |
tree | 2ac921cafb7509b43020608b688b7605b5173b0c /pkgs/applications/misc/mob | |
parent | b94d6a297c4b4a062fb1c8ddf761b1ffe8d398e8 (diff) |
mob: add optional speech support
This ports espeak-ng speech integration from the upstream repositories nix package.
Diffstat (limited to 'pkgs/applications/misc/mob')
-rw-r--r-- | pkgs/applications/misc/mob/default.nix | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/pkgs/applications/misc/mob/default.nix b/pkgs/applications/misc/mob/default.nix index eaa20b5e7e26c..c92eeaa72a7e4 100644 --- a/pkgs/applications/misc/mob/default.nix +++ b/pkgs/applications/misc/mob/default.nix @@ -1,9 +1,15 @@ -{ lib, buildGoPackage, fetchFromGitHub}: +{ lib +, buildGoPackage +, fetchFromGitHub + +, withSpeech ? true +, makeWrapper +, espeak-ng +}: buildGoPackage rec { pname = "mob"; version = "2.1.0"; - goPackagePath = "github.com/remotemobprogramming/mob"; src = fetchFromGitHub { rev = "v${version}"; @@ -12,11 +18,22 @@ buildGoPackage rec { sha256 = "sha256-K8ID8cetzCaMc/PVRNMyIhrshtEUiD6U/jI4e0TcOO4="; }; + nativeBuildInputs = [ + makeWrapper + ]; + + goPackagePath = "github.com/remotemobprogramming/mob"; + + preFixup = lib.optionalString withSpeech '' + wrapProgram $out/bin/mob \ + --set MOB_VOICE_COMMAND "${lib.getBin espeak-ng}/bin/espeak" + ''; + meta = with lib; { - description = "Tool for swift git handover"; + description = "Tool for smooth git handover"; homepage = "https://github.com/remotemobprogramming/mob"; license = licenses.mit; - maintainers = [ maintainers.ericdallo ]; + maintainers = with maintainers; [ ericdallo ]; platforms = platforms.linux ++ platforms.darwin; }; } |