-
Notifications
You must be signed in to change notification settings - Fork 0
/
streamd.nix
57 lines (50 loc) · 1.29 KB
/
streamd.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{ lib
, stdenv
, fetchFromGitHub
, buildGoModule
, pkg-config
, gcc
, makeWrapper
, gst_all_1
, glib
, blackmagic-desktop-video
}:
let
version = "0.0.1";
in
buildGoModule {
pname = "streamd";
inherit version;
# src = fetchFromGitHub {
# owner = "TUM-Dev";
# repo = "LectureMix";
# rev = "v${version}";
# hash = lib.fakeHash;
# };
src = ./streamd;
# GStreamer loads the decklink library via dlopen. We thus need to patch the ld library path
postInstall = ''
wrapProgram $out/bin/streamd \
--prefix LD_LIBRARY_PATH : ${blackmagic-desktop-video}/lib \
--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0"
'';
nativeBuildInputs = [ pkg-config gcc makeWrapper ];
buildInputs = [
gst_all_1.gstreamer
gst_all_1.gst-plugins-ugly
gst_all_1.gst-plugins-bad
gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-good
gst_all_1.gst-vaapi
glib
blackmagic-desktop-video
];
#vendorHash = lib.fakeHash;
vendorHash = "sha256-4NkjfWhA4m3x4byOiKAx1NberaaYETAjX7DJDcguiVQ=";
meta = with lib; {
homepage = "https://github.com/TUM-Dev/streamd";
description = "An open-source live-streaming stack for recording and streaming lectures";
license = licenses.gpl2Only;
maintainers = with maintainers; [ hmelder ];
};
}