flake-update-20260201
1{
2 stdenv,
3 lib,
4 fetchFromGitHub,
5 tzdata,
6}:
7
8stdenv.mkDerivation (finalAttrs: {
9 pname = "batzconverter";
10 version = "2.8.0";
11
12 src = fetchFromGitHub {
13 owner = "chmouel";
14 repo = "batzconverter";
15 rev = finalAttrs.version;
16 hash = "sha256-9tN0fr1FcAxBRDpV5l7N6iAQ+1WOb6gEbpcmahfta5o=";
17 };
18
19 installPhase = ''
20 runHook preInstall
21
22 mkdir -p $out/bin
23 # Some other hard-coded paths to fix:
24 sed -i 's#/usr/share/zoneinfo/#${tzdata}/share/zoneinfo/#g' \
25 batz.sh
26 cp batz.sh $out/bin/batz
27 chmod +x $out/bin/batz
28
29 runHook postInstall
30 '';
31
32 meta = {
33 description = "Convert Strava .fit or .tcx file to BATZ format";
34 homepage = "https://github.com/chmouel/batzconverter";
35 license = lib.licenses.asl20;
36 platforms = lib.platforms.unix;
37 mainProgram = "batz";
38 };
39})