2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub
|
2021-01-17 03:51:22 +00:00
|
|
|
, cmake, perl, pkg-config
|
2020-06-14 12:39:40 +01:00
|
|
|
, openssl, curl, libusb1, protobufc
|
2018-02-01 09:27:50 +00:00
|
|
|
, enableUnsafe ? false }:
|
2017-09-21 15:02:38 +01:00
|
|
|
|
2019-08-13 22:52:01 +01:00
|
|
|
stdenv.mkDerivation {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "ttwatch";
|
2021-02-09 19:34:45 +00:00
|
|
|
version = "2020-06-24";
|
2017-09-21 15:02:38 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ryanbinns";
|
|
|
|
repo = "ttwatch";
|
2021-02-09 19:34:45 +00:00
|
|
|
rev = "260aff5869fd577d788d86b546399353d9ff72c1";
|
|
|
|
sha256 = "0yd2hs9d03gfvwm1vywpg2qga6x5c74zrj665wf9aa8gmn96hv8r";
|
2017-09-21 15:02:38 +01:00
|
|
|
};
|
|
|
|
|
2021-01-17 03:51:22 +00:00
|
|
|
nativeBuildInputs = [ cmake perl pkg-config ];
|
2020-06-14 12:39:40 +01:00
|
|
|
buildInputs = [ openssl curl libusb1 protobufc ];
|
2017-09-21 15:02:38 +01:00
|
|
|
|
2021-01-15 09:19:50 +00:00
|
|
|
cmakeFlags = lib.optional enableUnsafe [ "-Dunsafe=on" ];
|
2018-02-01 09:27:50 +00:00
|
|
|
|
2017-09-21 15:02:38 +01:00
|
|
|
preFixup = ''
|
|
|
|
chmod +x $out/bin/ttbin2mysports
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/ryanbinns/ttwatch";
|
2017-09-21 15:02:38 +01:00
|
|
|
description = "Linux TomTom GPS Watch Utilities";
|
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = with platforms; linux;
|
|
|
|
};
|
|
|
|
}
|