2025-04-08 16:26:28 +02:00
|
|
|
{
|
|
|
|
|
rustPlatform,
|
|
|
|
|
lib,
|
|
|
|
|
fetchFromGitHub,
|
|
|
|
|
cmake,
|
|
|
|
|
protobuf,
|
|
|
|
|
webrtc,
|
2025-05-18 16:06:32 +02:00
|
|
|
pkg-config,
|
|
|
|
|
cubeb,
|
2025-04-08 16:26:28 +02:00
|
|
|
}:
|
2025-05-18 16:06:32 +02:00
|
|
|
let
|
|
|
|
|
cubeb' = cubeb.override {
|
|
|
|
|
alsaSupport = false;
|
|
|
|
|
pulseSupport = true;
|
|
|
|
|
jackSupport = false;
|
|
|
|
|
sndioSupport = false;
|
2025-05-25 10:14:42 +02:00
|
|
|
enableShared = false;
|
2025-05-18 16:06:32 +02:00
|
|
|
};
|
|
|
|
|
in
|
2025-04-08 16:26:28 +02:00
|
|
|
rustPlatform.buildRustPackage (finalAttrs: {
|
|
|
|
|
pname = "ringrtc";
|
2025-08-14 22:06:30 +02:00
|
|
|
version = "2.56.0";
|
2025-04-08 16:26:28 +02:00
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
|
owner = "signalapp";
|
|
|
|
|
repo = "ringrtc";
|
|
|
|
|
tag = "v${finalAttrs.version}";
|
2025-08-14 22:06:30 +02:00
|
|
|
hash = "sha256-KEwN6x24hXmK9lqU2M9/5qbBk7zDxeTRbB0vJ1K9d3U=";
|
2025-04-08 16:26:28 +02:00
|
|
|
};
|
2025-07-15 13:27:09 +02:00
|
|
|
|
2025-08-14 22:06:30 +02:00
|
|
|
cargoHash = "sha256-ghuF1wxAf5psZoWNYOCAubGo0KDwJlqcBXgUbPMD9ac=";
|
2025-04-08 16:26:28 +02:00
|
|
|
|
|
|
|
|
cargoBuildFlags = [
|
|
|
|
|
"-p"
|
|
|
|
|
"ringrtc"
|
|
|
|
|
"--features"
|
|
|
|
|
"electron"
|
|
|
|
|
];
|
|
|
|
|
doCheck = false;
|
|
|
|
|
|
2025-05-18 16:06:32 +02:00
|
|
|
env = {
|
|
|
|
|
LIBCUBEB_SYS_USE_PKG_CONFIG = 1;
|
|
|
|
|
LIBCUBEB_STATIC = 1;
|
|
|
|
|
};
|
|
|
|
|
|
2025-04-08 16:26:28 +02:00
|
|
|
nativeBuildInputs = [
|
|
|
|
|
protobuf
|
|
|
|
|
cmake
|
2025-05-18 16:06:32 +02:00
|
|
|
pkg-config
|
2025-04-08 16:26:28 +02:00
|
|
|
];
|
2025-05-24 12:07:54 +02:00
|
|
|
buildInputs = [
|
|
|
|
|
webrtc
|
|
|
|
|
cubeb'
|
|
|
|
|
]
|
|
|
|
|
# Workaround for https://github.com/NixOS/nixpkgs/pull/394607
|
|
|
|
|
++ cubeb'.buildInputs;
|
2025-04-08 16:26:28 +02:00
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
|
homepage = "https://github.com/signalapp/ringrtc";
|
|
|
|
|
description = "RingRTC library used by Signal";
|
|
|
|
|
license = lib.licenses.agpl3Only;
|
|
|
|
|
platforms = lib.platforms.unix;
|
|
|
|
|
};
|
|
|
|
|
})
|