18 src = fetchFromGitHub {
19 owner = "openambitproject";
22 sha256 = "1074kvkamwnlkwdajsw1799wddcfkjh2ay6l842r0s4cvrxrai85";
26 # Pull upstream patch for -fno-common toolchain support:
27 # https://github.com/openambitproject/openambit/pull/244
29 name = "fno-common.patch";
30 url = "https://github.com/openambitproject/openambit/commit/b6d97eab417977b6dbe355e0b071d0a56cc3df6b.patch";
31 sha256 = "1p0dg902mlcfjvs01dxl9wv2b50ayp4330p38d14q87mn0c2xl5d";
35 nativeBuildInputs = [ cmake qttools ];
36 buildInputs = [ libusb1 python3 qtbase udev zlib ];
38 cmakeFlags = [ "-DCMAKE_INSTALL_UDEVRULESDIR=${placeholder "out"}/lib/udev/rules.d" ];
40 doInstallCheck = true;
41 installCheckPhase = ''
42 $out/bin/openambit --version
46 install -m755 -D $src/tools/openambit2gpx.py $out/bin/openambit2gpx
48 mv -v $out/lib/udev/rules.d/libambit.rules \
49 $out/lib/udev/rules.d/20-libambit.rules
53 description = "Helps fetch data from Suunto Ambit GPS watches";
54 homepage = "https://github.com/openambitproject/openambit/";
55 license = licenses.gpl3Plus;
56 maintainers = with maintainers; [ rycee ];
57 platforms = platforms.linux;