about summary refs log tree commit diff
path: root/pkgs/applications/misc/golden-cheetah-bin
diff options
context:
space:
mode:
authorFlorian Brandes <florian.brandes@posteo.de>2022-12-21 10:26:46 +0100
committerFlorian Brandes <florian.brandes@posteo.de>2023-02-01 15:59:12 +0100
commit1aab9c281faeffaa25b5c8f60bbb57836f3c1ff9 (patch)
tree6db9abfb369af5e11e40b70513aa12ae668fbf3e /pkgs/applications/misc/golden-cheetah-bin
parent826704674f48928e9787ba5bea0366c75b974a7c (diff)
golden-cheetah: add AppImage derivation
Upstream bakes their API tokens for external services
(like Strava) in its source. When users want to connect
golden-cheetah to the external services, they fail and there
is no option to add own API keys during runtime.

So either the user modifies the derivation to add their own API
keys during build, or we add the pre-build AppImage to NixOS.
This has the developers API keys built-in, so the connection to
external services work as expected.

Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
Co-authored-by: Adam Stephens <2071575+adamcstephens@users.noreply.github.com>
Diffstat (limited to 'pkgs/applications/misc/golden-cheetah-bin')
-rw-r--r--pkgs/applications/misc/golden-cheetah-bin/default.nix35
1 files changed, 35 insertions, 0 deletions
diff --git a/pkgs/applications/misc/golden-cheetah-bin/default.nix b/pkgs/applications/misc/golden-cheetah-bin/default.nix
new file mode 100644
index 0000000000000..bfd5d5b86e94c
--- /dev/null
+++ b/pkgs/applications/misc/golden-cheetah-bin/default.nix
@@ -0,0 +1,35 @@
+{ appimageTools, lib, fetchurl, stdenv }:
+let
+
+  pname = "golden-cheetah";
+  version = "3.6-RC3";
+
+  src = fetchurl {
+    url = "https://github.com/GoldenCheetah/GoldenCheetah/releases/download/v${version}/GoldenCheetah_v3.6-DEV_x64.AppImage";
+    hash = "sha256-Bp1IFql96tHc5ssg9nhTrFQqNtaM+5iYJguPGkguvns=";
+  };
+
+  appimageContents = appimageTools.extract { inherit pname src version; };
+in
+appimageTools.wrapType2 {
+  inherit pname src version;
+
+  extraPkgs = pkgs: with pkgs; [ R zlib libusb-compat-0_1 ];
+
+  extraInstallCommands = ''
+    mv $out/bin/${pname}-${version} $out/bin/GoldenCheetah
+    mkdir -p $out/share/applications
+    mkdir -p $out/share/pixmaps
+    cp ${appimageContents}/GoldenCheetah.desktop $out/share/applications/
+    cp ${appimageContents}/gc.png $out/share/pixmaps/
+  '';
+
+  meta = with lib; {
+    description = "Performance software for cyclists, runners and triathletes. This version includes the API Tokens for e.g. Strava";
+    platforms = platforms.linux;
+    broken = !stdenv.isx86_64;
+    maintainers = with maintainers; [ gador ];
+    license = licenses.gpl2Plus;
+    sourceProvenance = with sourceTypes; [ binaryNativeCode ];
+  };
+}