Merge pull request #153647 from mweinelt/mob

This commit is contained in:
Martin Weinelt 2022-01-06 03:04:25 +01:00 committed by GitHub
commit b29beb8e02
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
};
}