discord-gamesdk: init at 3.2.1

This commit is contained in:
Tomo 2023-01-28 13:06:23 -08:00 committed by Tomo
parent e1cf19931b
commit 407b029dde
2 changed files with 43 additions and 0 deletions

View file

@ -0,0 +1,41 @@
{ lib
, stdenv
, fetchzip
, autoPatchelfHook
}:
stdenv.mkDerivation rec {
pname = "discord-gamesdk";
version = "3.2.1";
src = fetchzip {
url = "https://dl-game-sdk.discordapp.net/${version}/discord_game_sdk.zip";
sha256 = "sha256-83DgL9y3lHLLJ8vgL3EOVk2Tjcue64N+iuDj/UpSdLc=";
stripRoot = false;
};
nativeBuildInputs = [
autoPatchelfHook
];
installPhase =
let
processor = stdenv.hostPlatform.uname.processor;
sharedLibrary = stdenv.hostPlatform.extensions.sharedLibrary;
in
''
runHook preInstall
install -Dm555 lib/${processor}/discord_game_sdk${sharedLibrary} $out/lib/discord_game_sdk${sharedLibrary}
runHook postInstall
'';
meta = with lib; {
homepage = "https://discord.com/developers/docs/game-sdk/sdk-starter-guide";
description = "Library to allow other programs to interact with the Discord desktop application";
license = licenses.unfree;
maintainers = with maintainers; [ tomodachi94 ];
platforms = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" "x86_64-windows" ];
};
}

View file

@ -19242,6 +19242,8 @@ with pkgs;
discordchatexporter-cli = callPackage ../tools/backup/discordchatexporter-cli { };
discord-gamesdk = callPackage ../development/libraries/discord-gamesdk { };
discord-rpc = callPackage ../development/libraries/discord-rpc {
inherit (darwin.apple_sdk.frameworks) AppKit;
};