@@ -0,0 +1,35 @@
1+{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig
2+, avahi, libao }:
3+
4+stdenv.mkDerivation rec {
5+ name = "shairplay-${version}";
6+ version = "2016-01-01";
7+
8+ src = fetchFromGitHub {
9+ owner = "juhovh";
10+ repo = "shairplay";
11+ rev = "ce80e005908f41d0e6fde1c4a21e9cb8ee54007b";
12+ sha256 = "10b4bmqgf4rf1wszvj066mc42p90968vqrmyqyrdal4k6f8by1r6";
13+ };
14+
15+ nativeBuildInputs = [ autoreconfHook pkgconfig ];
16+
17+ buildInputs = [ avahi libao ];
18+
19+ enableParallelBuilding = true;
20+
21+ # the build will fail without complaining about a reference to /tmp
22+ preFixup = ''
23+ patchelf \
24+ --set-rpath "${stdenv.lib.makeLibraryPath buildInputs}:$out/lib" \
25+ $out/bin/shairplay
26+ '';
27+
28+ meta = with stdenv.lib; {
29+ inherit (src.meta) homepage;
30+ description = "Apple airplay and raop protocol server";
31+ license = licenses.mit;
32+ maintainers = with maintainers; [ peterhoeg ];
33+ platforms = platforms.unix;
34+ };
35+}