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

authored by TomaSajt and committed by Aidan Gauland bdf36222 8622b053

+31 -10
+29 -10
pkgs/by-name/co/comet-gog/package.nix
··· 1 1 { 2 + comet-gog_kind ? "latest", 3 + 2 4 lib, 5 + stdenv, 3 6 rustPlatform, 4 7 fetchFromGitHub, 5 - protobuf, 8 + buildPackages, 6 9 }: 7 10 8 - rustPlatform.buildRustPackage rec { 11 + let 12 + versionInfoTable = { 13 + "latest" = { 14 + version = "0.3.1"; 15 + srcHash = "sha256-asg2xp9A5abmsF+CgOa+ScK2sQwSNFQXD5Qnm76Iyhg="; 16 + cargoHash = "sha256-K0lQuk2PBwnVlkRpYNo4Z7to/Lx2fY6RIlkgmMjvEtc="; 17 + }; 18 + # version pin that is compatible with heroic 19 + "heroic" = { 20 + version = "0.2.0"; 21 + srcHash = "sha256-LAEt2i/SRABrz+y2CTMudrugifLgHNxkMSdC8PXYF0E="; 22 + cargoHash = "sha256-SvDE+QqaSK0+4XgB3bdmqOtwxBDTlf7yckTR8XjmMXc="; 23 + }; 24 + }; 25 + 26 + versionInfo = versionInfoTable.${comet-gog_kind}; 27 + in 28 + rustPlatform.buildRustPackage (finalAttrs: { 9 29 pname = "comet-gog"; 10 - version = "0.3.1"; 30 + inherit (versionInfo) version cargoHash; 11 31 12 32 src = fetchFromGitHub { 13 33 owner = "imLinguin"; 14 34 repo = "comet"; 15 - tag = "v${version}"; 16 - hash = "sha256-asg2xp9A5abmsF+CgOa+ScK2sQwSNFQXD5Qnm76Iyhg="; 35 + tag = "v${finalAttrs.version}"; 36 + hash = versionInfo.srcHash; 17 37 fetchSubmodules = true; 18 38 }; 19 39 20 - cargoHash = "sha256-K0lQuk2PBwnVlkRpYNo4Z7to/Lx2fY6RIlkgmMjvEtc="; 21 - 22 40 # error: linker `aarch64-linux-gnu-gcc` not found 23 41 postPatch = '' 24 42 rm .cargo/config.toml 25 43 ''; 26 44 27 - env.PROTOC = lib.getExe' protobuf "protoc"; 45 + # TECHNICALLY, we could remove this, but then we'd be using the vendored precompiled protoc binary... 46 + env.PROTOC = lib.getExe' buildPackages.protobuf "protoc"; 28 47 29 48 meta = { 30 - changelog = "https://github.com/imLinguin/comet/releases/tag/v${version}"; 49 + changelog = "https://github.com/imLinguin/comet/releases/tag/${finalAttrs.src.tag}"; 31 50 description = "Open Source implementation of GOG Galaxy's Communication Service"; 32 51 homepage = "https://github.com/imLinguin/comet"; 33 52 license = lib.licenses.gpl3Plus; 34 53 mainProgram = "comet"; 35 54 maintainers = with lib.maintainers; [ tomasajt ]; 36 55 }; 37 - } 56 + })
+2
pkgs/top-level/all-packages.nix
··· 2650 2650 2651 2651 cocoapods-beta = lowPrio (callPackage ../development/tools/cocoapods { beta = true; }); 2652 2652 2653 + comet-gog_heroic = callPackage ../by-name/co/comet-gog/package.nix { comet-gog_kind = "heroic"; }; 2654 + 2653 2655 compass = callPackage ../development/tools/compass { }; 2654 2656 2655 2657 cone = callPackage ../development/compilers/cone {