chromium,chromedriver: 129.0.6668.91 -> 129.0.6668.100
[NixPkgs.git] / pkgs / by-name / di / discord-gamesdk / package.nix
blob5d7a8185be45ad73ee8557a79a8346c9851caafb
2   lib,
3   stdenv,
4   fetchzip,
5   autoPatchelfHook,
6 }:
8 stdenv.mkDerivation rec {
9   pname = "discord-gamesdk";
10   version = "3.2.1";
12   src = fetchzip {
13     url = "https://dl-game-sdk.discordapp.net/${version}/discord_game_sdk.zip";
14     hash = "sha256-83DgL9y3lHLLJ8vgL3EOVk2Tjcue64N+iuDj/UpSdLc=";
15     stripRoot = false;
16   };
18   outputs = [
19     "out"
20     "dev"
21   ];
23   buildInputs = [ (stdenv.cc.cc.libgcc or null) ];
25   nativeBuildInputs = lib.optional stdenv.hostPlatform.isLinux autoPatchelfHook;
27   installPhase =
28     let
29       processor = stdenv.hostPlatform.uname.processor;
30       sharedLibrary = stdenv.hostPlatform.extensions.sharedLibrary;
31     in
32     ''
33       runHook preInstall
35       install -Dm555 lib/${processor}/discord_game_sdk${sharedLibrary} $out/lib/discord_game_sdk${sharedLibrary}
37       install -Dm444 c/discord_game_sdk.h $dev/lib/include/discord_game_sdk.h
39       runHook postInstall
40     '';
42   meta = with lib; {
43     homepage = "https://discord.com/developers/docs/game-sdk/sdk-starter-guide";
44     description = "Library to allow other programs to interact with the Discord desktop application";
45     license = licenses.unfree;
46     maintainers = with maintainers; [ tomodachi94 ];
47     sourceProvenance = with sourceTypes; [ binaryNativeCode ];
48     platforms = [
49       "x86_64-linux"
50       "x86_64-darwin"
51       "aarch64-darwin"
52       "x86_64-windows"
53     ];
54   };