2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv
|
2019-06-19 03:58:33 +01:00
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, rapidjson
|
|
|
|
, AppKit
|
|
|
|
, buildExamples ? false
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "discord-rpc";
|
|
|
|
version = "3.4.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "discordapp";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "04cxhqdv5r92lrpnhxf8702a8iackdf3sfk1050z7pijbijiql2a";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
rapidjson
|
2021-01-21 17:00:13 +00:00
|
|
|
] ++ lib.optional stdenv.isDarwin AppKit;
|
2019-06-19 03:58:33 +01:00
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DBUILD_SHARED_LIBS=true"
|
2021-01-21 17:00:13 +00:00
|
|
|
"-DBUILD_EXAMPLES=${lib.boolToString buildExamples}"
|
2019-06-19 03:58:33 +01:00
|
|
|
];
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2019-06-19 03:58:33 +01:00
|
|
|
description = "Official library to interface with the Discord client";
|
|
|
|
homepage = "https://github.com/discordapp/discord-rpc";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ tadeokondrak ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|