Merge pull request #213321 from tomodachi94/discord-gamesdk

discord-gamesdk: init at 3.2.1
This commit is contained in:
Nick Cao 2023-01-29 16:24:55 +08:00 committed by GitHub
commit 6224e5c235
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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

@ -19309,6 +19309,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;
};