1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 autoreconfHook,
6 pkg-config,
7 avahi,
8 libao,
9}:
10
11stdenv.mkDerivation rec {
12 pname = "shairplay-unstable";
13 version = "2018-08-24";
14
15 src = fetchFromGitHub {
16 owner = "juhovh";
17 repo = "shairplay";
18 rev = "096b61ad14c90169f438e690d096e3fcf87e504e";
19 sha256 = "02xkd9al79pbqh8rhzz5w99vv43jg5vqkqg7kxsw8c8sz9di9wsa";
20 };
21
22 nativeBuildInputs = [
23 autoreconfHook
24 pkg-config
25 ];
26
27 buildInputs = [
28 avahi
29 libao
30 ];
31
32 enableParallelBuilding = true;
33
34 # the build will fail without complaining about a reference to /tmp
35 preFixup = lib.optionalString stdenv.hostPlatform.isLinux ''
36 patchelf \
37 --set-rpath "${lib.makeLibraryPath buildInputs}:$out/lib" \
38 $out/bin/shairplay
39 '';
40
41 meta = with lib; {
42 inherit (src.meta) homepage;
43 description = "Apple AirPlay and RAOP protocol server";
44 license = licenses.mit;
45 maintainers = with maintainers; [ peterhoeg ];
46 platforms = platforms.unix;
47 mainProgram = "shairplay";
48 };
49}