1{
2 lib,
3 stdenv,
4 fetchurl,
5 jre,
6}:
7
8stdenv.mkDerivation rec {
9 pname = "subsonic";
10 version = "6.1.6";
11
12 src = fetchurl {
13 url = "mirror://sourceforge/subsonic/subsonic-${version}-standalone.tar.gz";
14 sha256 = "180qdk8mnc147az8v9rmc1kgf8b13mmq88l195gjdwiqpflqzdyz";
15 };
16
17 inherit jre;
18
19 # Create temporary directory to extract tarball into to satisfy Nix's need
20 # for a directory to be created in the unpack phase.
21 unpackPhase = ''
22 runHook preUnpack
23 mkdir ${pname}-${version}
24 tar -C ${pname}-${version} -xzf $src
25 runHook postUnpack
26 '';
27 installPhase = ''
28 runHook preInstall
29 mkdir $out
30 cp -r ${pname}-${version}/* $out
31 runHook postInstall
32 '';
33
34 meta = with lib; {
35 homepage = "http://subsonic.org";
36 description = "Personal media streamer";
37 license = licenses.unfree;
38 maintainers = with maintainers; [ telotortium ];
39 platforms = platforms.unix;
40 };
41}