2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub
|
2021-02-05 17:12:51 +00:00
|
|
|
, cmake, perl, pkg-config
|
2020-06-18 07:06:33 +00:00
|
|
|
, openssl, curl, libusb1, protobufc
|
2020-04-24 23:36:52 +00:00
|
|
|
, enableUnsafe ? false }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "ttwatch";
|
2021-02-13 14:23:35 +00:00
|
|
|
version = "2020-06-24";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ryanbinns";
|
|
|
|
repo = "ttwatch";
|
2021-02-13 14:23:35 +00:00
|
|
|
rev = "260aff5869fd577d788d86b546399353d9ff72c1";
|
|
|
|
sha256 = "0yd2hs9d03gfvwm1vywpg2qga6x5c74zrj665wf9aa8gmn96hv8r";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ cmake perl pkg-config ];
|
2020-06-18 07:06:33 +00:00
|
|
|
buildInputs = [ openssl curl libusb1 protobufc ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
cmakeFlags = lib.optionals enableUnsafe [ "-Dunsafe=on" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
chmod +x $out/bin/ttbin2mysports
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/ryanbinns/ttwatch";
|
|
|
|
description = "Linux TomTom GPS Watch Utilities";
|
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = with platforms; linux;
|
|
|
|
};
|
|
|
|
}
|