nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 cmake,
6 perl,
7 pkg-config,
8 openssl,
9 curl,
10 libusb1,
11 protobufc,
12 enableUnsafe ? false,
13}:
14
15stdenv.mkDerivation {
16 pname = "ttwatch";
17 version = "2020-06-24";
18
19 src = fetchFromGitHub {
20 owner = "ryanbinns";
21 repo = "ttwatch";
22 rev = "260aff5869fd577d788d86b546399353d9ff72c1";
23 sha256 = "0yd2hs9d03gfvwm1vywpg2qga6x5c74zrj665wf9aa8gmn96hv8r";
24 };
25
26 nativeBuildInputs = [
27 cmake
28 perl
29 pkg-config
30 ];
31 buildInputs = [
32 openssl
33 curl
34 libusb1
35 protobufc
36 ];
37
38 cmakeFlags = lib.optionals enableUnsafe [ "-Dunsafe=on" ];
39
40 preFixup = ''
41 chmod +x $out/bin/ttbin2mysports
42 '';
43
44 meta = with lib; {
45 homepage = "https://github.com/ryanbinns/ttwatch";
46 description = "Linux TomTom GPS Watch Utilities";
47 maintainers = with maintainers; [ dotlambda ];
48 license = licenses.mit;
49 platforms = with platforms; linux;
50 };
51}