2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub
|
2020-06-18 07:06:33 +00:00
|
|
|
, cmake, perl, pkgconfig
|
|
|
|
, openssl, curl, libusb1, protobufc
|
2020-04-24 23:36:52 +00:00
|
|
|
, enableUnsafe ? false }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "ttwatch";
|
2020-06-18 07:06:33 +00:00
|
|
|
version = "2020-02-05";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ryanbinns";
|
|
|
|
repo = "ttwatch";
|
2020-06-18 07:06:33 +00:00
|
|
|
rev = "bfdf1372515574e1fb3871dc1039f8d8a5dbdada";
|
|
|
|
sha256 = "07nd4dbkchxy8js1h1f6pzn63pls2afww97wyiiw6zid43mpqyg4";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-06-18 07:06:33 +00:00
|
|
|
nativeBuildInputs = [ cmake perl pkgconfig ];
|
|
|
|
buildInputs = [ openssl curl libusb1 protobufc ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
cmakeFlags = lib.optional 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;
|
|
|
|
};
|
|
|
|
}
|