nixpkgs/pkgs/by-name/go/golden-cheetah-bin/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

39 lines
1.3 KiB
Nix

{ appimageTools, lib, fetchurl, nix-update-script, stdenv }:
let
pname = "golden-cheetah";
version = "3.6";
src = fetchurl {
url = "https://github.com/GoldenCheetah/GoldenCheetah/releases/download/v${version}/GoldenCheetah_v${version}_x64.AppImage";
hash = "sha256-PMRUDQSQxbECbF9SPOo03t4Xxj1OtYJAPXEMyyy6EVY=";
};
appimageContents = appimageTools.extract { inherit pname src version; };
in
appimageTools.wrapType2 {
inherit pname src version;
extraPkgs = pkgs: [ pkgs.R pkgs.zlib pkgs.libusb-compat-0_1 ];
extraInstallCommands = ''
mv $out/bin/${pname} $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/
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "Performance software for cyclists, runners and triathletes. This version includes the API Tokens for e.g. Strava";
platforms = lib.platforms.linux;
broken = !stdenv.hostPlatform.isx86_64;
maintainers = with lib.maintainers; [ gador adamcstephens ];
license = lib.licenses.gpl2Plus;
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
knownVulnerabilities = [ "Vendors libwebp vulnerable to CVE-2023-4863" ];
};
}