Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
52 lines
1.1 KiB
Nix
52 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
fetchpatch,
|
|
cmake,
|
|
rapidjson,
|
|
buildExamples ? false,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "discord-rpc";
|
|
version = "3.4.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "discordapp";
|
|
repo = "discord-rpc";
|
|
rev = "v${version}";
|
|
sha256 = "04cxhqdv5r92lrpnhxf8702a8iackdf3sfk1050z7pijbijiql2a";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
];
|
|
|
|
buildInputs = [
|
|
rapidjson
|
|
];
|
|
|
|
cmakeFlags = [
|
|
"-DBUILD_SHARED_LIBS=true"
|
|
"-DBUILD_EXAMPLES=${lib.boolToString buildExamples}"
|
|
];
|
|
|
|
patches = [
|
|
# Adds unreleased PR https://github.com/discord/discord-rpc/pull/387
|
|
(fetchpatch {
|
|
name = "0001-Update-.clang-format.patch";
|
|
url = "https://github.com/discord/discord-rpc/commit/dc26645316a1996a10995d9f5fae53ca1caddade.patch";
|
|
hash = "sha256-geofgXwfbDsvsYCz92IVFrdvBDiGvMBiFd3GEbsdoHU=";
|
|
})
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Official library to interface with the Discord client";
|
|
homepage = "https://github.com/discordapp/discord-rpc";
|
|
license = licenses.mit;
|
|
maintainers = [ ];
|
|
platforms = platforms.all;
|
|
};
|
|
}
|