nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 cmake,
4 fetchFromGitHub,
5 libopus,
6 openssl,
7 pkg-config,
8 rustPlatform,
9 stdenv,
10}:
11
12rustPlatform.buildRustPackage rec {
13 pname = "xiu";
14 version = "0.13.0";
15
16 src = fetchFromGitHub {
17 owner = "harlanc";
18 repo = "xiu";
19 rev = "v${version}";
20 hash = "sha256-EjyvCwqcPkOe69YnDiAExtBNPhsqqGa95ao+bn6wcyA=";
21 };
22
23 cargoHash = "sha256-IEIZM27zQZrq63ZsCVAeOl2exuFR5tUG3Gwipjg4+oo=";
24
25 nativeBuildInputs = [
26 cmake
27 pkg-config
28 ];
29
30 buildInputs = [
31 libopus
32 ]
33 ++ lib.optionals stdenv.hostPlatform.isLinux [
34 openssl
35 ];
36
37 env.OPENSSL_NO_VENDOR = 1;
38
39 meta = {
40 description = "Simple, high performance and secure live media server in pure Rust (RTMP[cluster]/RTSP/WebRTC[whip/whep]/HTTP-FLV/HLS";
41 homepage = "https://github.com/harlanc/xiu";
42 changelog = "https://github.com/harlanc/xiu/releases/tag/v${version}";
43 license = lib.licenses.mit;
44 maintainers = with lib.maintainers; [ cafkafk ];
45 mainProgram = "xiu";
46 };
47}