1{ stdenv
2, lib
3, fetchFromGitHub
4, meson
5, ninja
6, makeWrapper
7, pkg-config
8, dleyna-core
9, dleyna-connector-dbus
10, gssdp
11, gupnp
12, gupnp-av
13, gupnp-dlna
14, libsoup
15}:
16
17stdenv.mkDerivation rec {
18 pname = "dleyna-server";
19 version = "0.7.2";
20
21 src = fetchFromGitHub {
22 owner = "phako";
23 repo = pname;
24 rev = "v${version}";
25 sha256 = "sha256-jlF9Lr/NG+Fsy/bB7aLb7xOLqel8GueJK5luo9rsDME=";
26 };
27
28 nativeBuildInputs = [
29 meson
30 ninja
31 pkg-config
32 makeWrapper
33 ];
34
35 buildInputs = [
36 dleyna-core
37 dleyna-connector-dbus # runtime dependency to be picked up to DLEYNA_CONNECTOR_PATH
38 gssdp
39 gupnp
40 gupnp-av
41 gupnp-dlna
42 libsoup
43 ];
44
45 preFixup = ''
46 wrapProgram "$out/libexec/dleyna-server-service" \
47 --set DLEYNA_CONNECTOR_PATH "$DLEYNA_CONNECTOR_PATH"
48 '';
49
50 meta = with lib; {
51 description = "Library to discover, browse and manipulate Digital Media Servers";
52 homepage = "https://github.com/phako/dleyna-server";
53 maintainers = with maintainers; [ jtojnar ];
54 platforms = platforms.linux;
55 license = licenses.lgpl21Only;
56 };
57}