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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
{
config,
lib,
stdenv,
autoPatchelfHook,
autoreconfHook,
fetchFromGitHub,
nix-update-script,
chromecastSupport ? config.chromecast or stdenv.hostPlatform.isLinux,
pulseSupport ? config.pulseaudio or stdenv.hostPlatform.isLinux,
avahi,
curl,
bison,
ffmpeg,
flex,
gettext,
gnutls,
gperf,
json_c,
libconfuse,
libevent,
libgcrypt,
libgpg-error,
libplist,
libpulseaudio,
libsodium,
libtool,
libunistring,
libwebsockets,
libxml2,
pkg-config,
protobufc,
sqlite,
zlib,
}:
stdenv.mkDerivation (finalAttrs: {
version = "28.12";
pname = "owntone";
src = fetchFromGitHub {
owner = "owntone";
repo = "owntone-server";
tag = finalAttrs.version;
hash = "sha256-Mj3G1+Hwa/zl0AM4SO6TcB4W3WJkpIDzrSPEFx0vaEk=";
};
nativeBuildInputs = [
autoPatchelfHook
autoreconfHook
bison
flex
libtool
gperf
pkg-config
];
buildInputs =
[
avahi
curl
ffmpeg
gettext
json_c
libconfuse
libevent
libgcrypt
libgpg-error
libplist
libsodium
libunistring
libwebsockets
libxml2
protobufc
sqlite
zlib
]
++ lib.optionals chromecastSupport [ gnutls ]
++ lib.optionals pulseSupport [ libpulseaudio ];
configureFlags =
lib.optionals chromecastSupport [ "--enable-chromecast" ]
++ lib.optionals pulseSupport [ "--with-pulseaudio" ];
passthru.updateScript = nix-update-script { };
meta = {
description = "Media server to stream audio to AirPlay and Chromecast receivers";
homepage = "https://github.com/owntone/owntone-server";
downloadPage = "https://github.com/owntone/owntone-server/releases/tag/${finalAttrs.version}";
changelog = "https://github.com/owntone/owntone-server/releases/tag/${finalAttrs.version}";
mainProgram = "owntone";
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [
hensoko
];
platforms = lib.platforms.linux;
};
})
|