Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / libraries / discord-rpc / default.nix
blob213096f5abf12acbc5652276a7f1fa1b4ad8ad10
1 { lib, stdenv
2 , fetchFromGitHub
3 , cmake
4 , rapidjson
5 , AppKit
6 , buildExamples ? false
7 }:
9 stdenv.mkDerivation rec {
10   pname = "discord-rpc";
11   version = "3.4.0";
13   src = fetchFromGitHub {
14     owner = "discordapp";
15     repo = pname;
16     rev = "v${version}";
17     sha256 = "04cxhqdv5r92lrpnhxf8702a8iackdf3sfk1050z7pijbijiql2a";
18   };
20   nativeBuildInputs = [
21     cmake
22   ];
24   buildInputs = [
25     rapidjson
26   ] ++ lib.optional stdenv.isDarwin AppKit;
28   cmakeFlags = [
29     "-DBUILD_SHARED_LIBS=true"
30     "-DBUILD_EXAMPLES=${lib.boolToString buildExamples}"
31   ];
33   meta = with lib; {
34     description = "Official library to interface with the Discord client";
35     homepage = "https://github.com/discordapp/discord-rpc";
36     license = licenses.mit;
37     maintainers = with maintainers; [ tadeokondrak ];
38     platforms = platforms.all;
39   };