summary refs log tree commit diff
path: root/pkgs/tools/misc/ttwatch/default.nix
blob: d7e1171064c6dac549f52c2dbaa592c28d23dd9b (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
{ stdenv, fetchFromGitHub, cmake, perl, openssl, curl, libusb1
, enableUnsafe ? false }:

stdenv.mkDerivation rec {
  name = "ttwatch-${version}";
  version = "2018-02-01";

  src = fetchFromGitHub {
    owner = "ryanbinns";
    repo = "ttwatch";
    rev = "b5c54647ed9b640584e53c4c15ee12d210790021";
    sha256 = "136sskz9hnbwp49gxp983mswzgpl8yfc25ni79csbsnwp0k4lb94";
  };

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

  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;
  };
}