2022-01-07 04:07:37 +00:00
|
|
|
{ lib
|
2022-06-16 17:23:12 +00:00
|
|
|
, buildGoModule
|
2022-01-07 04:07:37 +00:00
|
|
|
, fetchFromGitHub
|
2022-03-30 09:31:56 +00:00
|
|
|
, stdenv
|
|
|
|
, withSpeech ? !stdenv.isDarwin
|
2022-01-07 04:07:37 +00:00
|
|
|
, makeWrapper
|
|
|
|
, espeak-ng
|
|
|
|
}:
|
2020-12-25 13:55:36 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
buildGoModule rec {
|
2020-12-25 13:55:36 +00:00
|
|
|
pname = "mob";
|
2022-10-21 18:38:19 +00:00
|
|
|
version = "4.0.0";
|
2020-12-25 13:55:36 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "remotemobprogramming";
|
|
|
|
repo = pname;
|
2022-06-16 17:23:12 +00:00
|
|
|
rev = "v${version}";
|
2022-10-21 18:38:19 +00:00
|
|
|
sha256 = "sha256-c6Feex0FGxxOWBEHxe0GqPHv65EwMMdxIeehZUGbl0Q=";
|
2020-12-25 13:55:36 +00:00
|
|
|
};
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
vendorSha256 = null;
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2022-01-07 04:07:37 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
makeWrapper
|
|
|
|
];
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
ldflags = [ "-s" "-w" ];
|
|
|
|
|
|
|
|
doCheck = false;
|
2022-01-07 04:07:37 +00:00
|
|
|
|
|
|
|
preFixup = lib.optionalString withSpeech ''
|
|
|
|
wrapProgram $out/bin/mob \
|
|
|
|
--set MOB_VOICE_COMMAND "${lib.getBin espeak-ng}/bin/espeak"
|
|
|
|
'';
|
|
|
|
|
2020-12-25 13:55:36 +00:00
|
|
|
meta = with lib; {
|
2022-01-07 04:07:37 +00:00
|
|
|
description = "Tool for smooth git handover";
|
2020-12-25 13:55:36 +00:00
|
|
|
homepage = "https://github.com/remotemobprogramming/mob";
|
|
|
|
license = licenses.mit;
|
2022-01-07 04:07:37 +00:00
|
|
|
maintainers = with maintainers; [ ericdallo ];
|
2020-12-25 13:55:36 +00:00
|
|
|
};
|
|
|
|
}
|