about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/misc/ttwatch/default.nix
blob: 8788608876ea1d169c2dd2dbfdb03d313543bc51 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{ stdenv, fetchFromGitHub
, cmake, perl, pkgconfig
, openssl, curl, libusb1, protobufc
, enableUnsafe ? false }:

stdenv.mkDerivation {
  pname = "ttwatch";
  version = "2020-02-05";

  src = fetchFromGitHub {
    owner = "ryanbinns";
    repo = "ttwatch";
    rev = "bfdf1372515574e1fb3871dc1039f8d8a5dbdada";
    sha256 = "07nd4dbkchxy8js1h1f6pzn63pls2afww97wyiiw6zid43mpqyg4";
  };

  nativeBuildInputs = [ cmake perl pkgconfig ];
  buildInputs = [ openssl curl libusb1 protobufc ];

  cmakeFlags = stdenv.lib.optional enableUnsafe [ "-Dunsafe=on" ];

  preFixup = ''
    chmod +x $out/bin/ttbin2mysports
  '';

  meta = with stdenv.lib; {
    homepage = "https://github.com/ryanbinns/ttwatch";
    description = "Linux TomTom GPS Watch Utilities";
    maintainers = with maintainers; [ dotlambda ];
    license = licenses.mit;
    platforms = with platforms; linux;
  };
}