1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 autoreconfHook,
6 pkg-config,
7 makeWrapper,
8 gstreamer,
9 gst-plugins-base,
10 gst-plugins-good,
11 gst-plugins-bad,
12 gst-plugins-ugly,
13 gst-libav,
14 libupnp,
15}:
16
17let
18 version = "0.3";
19
20 pluginPath = lib.makeSearchPathOutput "lib" "lib/gstreamer-1.0" [
21 gstreamer
22 gst-plugins-base
23 gst-plugins-good
24 gst-plugins-bad
25 gst-plugins-ugly
26 gst-libav
27 ];
28in
29stdenv.mkDerivation {
30 pname = "gmrender-resurrect";
31 inherit version;
32
33 src = fetchFromGitHub {
34 owner = "hzeller";
35 repo = "gmrender-resurrect";
36 rev = "v${version}";
37 sha256 = "sha256-Zt8YYRqqX5L/MGLsFzR8JOdYoNX9ypXLX5i+fqkzPkk=";
38 };
39
40 buildInputs = [
41 gstreamer
42 libupnp
43 ];
44 nativeBuildInputs = [
45 autoreconfHook
46 pkg-config
47 makeWrapper
48 ];
49
50 postInstall = ''
51 for prog in "$out/bin/"*; do
52 wrapProgram "$prog" --suffix GST_PLUGIN_SYSTEM_PATH_1_0 : "${pluginPath}"
53 done
54 '';
55
56 meta = with lib; {
57 description = "Resource efficient UPnP/DLNA renderer, optimal for Raspberry Pi, CuBox or a general MediaServer";
58 mainProgram = "gmediarender";
59 homepage = "https://github.com/hzeller/gmrender-resurrect";
60 license = licenses.gpl2Plus;
61 platforms = platforms.linux;
62 maintainers = with maintainers; [
63 koral
64 hzeller
65 ];
66 };
67}