comet-gog_heroic: init at 0.2.0; comet-gog: refactor

This commit is contained in:
TomaSajt
2025-08-15 21:52:20 +02:00
committed by Aidan Gauland
parent 8622b0537c
commit bdf36222ea
2 changed files with 31 additions and 10 deletions

View File

@@ -1,37 +1,56 @@
{
comet-gog_kind ? "latest",
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
protobuf,
buildPackages,
}:
rustPlatform.buildRustPackage rec {
let
versionInfoTable = {
"latest" = {
version = "0.3.1";
srcHash = "sha256-asg2xp9A5abmsF+CgOa+ScK2sQwSNFQXD5Qnm76Iyhg=";
cargoHash = "sha256-K0lQuk2PBwnVlkRpYNo4Z7to/Lx2fY6RIlkgmMjvEtc=";
};
# version pin that is compatible with heroic
"heroic" = {
version = "0.2.0";
srcHash = "sha256-LAEt2i/SRABrz+y2CTMudrugifLgHNxkMSdC8PXYF0E=";
cargoHash = "sha256-SvDE+QqaSK0+4XgB3bdmqOtwxBDTlf7yckTR8XjmMXc=";
};
};
versionInfo = versionInfoTable.${comet-gog_kind};
in
rustPlatform.buildRustPackage (finalAttrs: {
pname = "comet-gog";
version = "0.3.1";
inherit (versionInfo) version cargoHash;
src = fetchFromGitHub {
owner = "imLinguin";
repo = "comet";
tag = "v${version}";
hash = "sha256-asg2xp9A5abmsF+CgOa+ScK2sQwSNFQXD5Qnm76Iyhg=";
tag = "v${finalAttrs.version}";
hash = versionInfo.srcHash;
fetchSubmodules = true;
};
cargoHash = "sha256-K0lQuk2PBwnVlkRpYNo4Z7to/Lx2fY6RIlkgmMjvEtc=";
# error: linker `aarch64-linux-gnu-gcc` not found
postPatch = ''
rm .cargo/config.toml
'';
env.PROTOC = lib.getExe' protobuf "protoc";
# TECHNICALLY, we could remove this, but then we'd be using the vendored precompiled protoc binary...
env.PROTOC = lib.getExe' buildPackages.protobuf "protoc";
meta = {
changelog = "https://github.com/imLinguin/comet/releases/tag/v${version}";
changelog = "https://github.com/imLinguin/comet/releases/tag/${finalAttrs.src.tag}";
description = "Open Source implementation of GOG Galaxy's Communication Service";
homepage = "https://github.com/imLinguin/comet";
license = lib.licenses.gpl3Plus;
mainProgram = "comet";
maintainers = with lib.maintainers; [ tomasajt ];
};
}
})

View File

@@ -2650,6 +2650,8 @@ with pkgs;
cocoapods-beta = lowPrio (callPackage ../development/tools/cocoapods { beta = true; });
comet-gog_heroic = callPackage ../by-name/co/comet-gog/package.nix { comet-gog_kind = "heroic"; };
compass = callPackage ../development/tools/compass { };
cone = callPackage ../development/compilers/cone {