2018-05-19 10:20:00 +02:00
|
|
|
{ stdenv, buildPerlPackage, fetchurl, fetchpatch, makeWrapper
|
|
|
|
, perl, perlPackages, flac, faad2, sox, lame, monkeysAudio, wavpack }:
|
2017-03-02 20:38:06 +01:00
|
|
|
|
2017-03-14 22:34:12 +01:00
|
|
|
buildPerlPackage rec {
|
2017-03-02 20:38:06 +01:00
|
|
|
name = "slimserver-${version}";
|
2018-05-16 20:42:09 +02:00
|
|
|
version = "7.9.1";
|
2017-03-02 20:38:06 +01:00
|
|
|
|
2017-03-16 19:54:27 +01:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/Logitech/slimserver/archive/${version}.tar.gz";
|
2018-05-16 20:42:09 +02:00
|
|
|
sha256 = "0szp5zkmx2b5lncsijf97asjnl73fyijkbgbwkl1i7p8qnqrb4mp";
|
2017-03-02 20:38:06 +01:00
|
|
|
};
|
|
|
|
|
2018-05-16 20:46:16 +02:00
|
|
|
patches = [ (fetchpatch {
|
|
|
|
url = "https://github.com/Logitech/slimserver/pull/204.patch";
|
|
|
|
sha256 = "0n1c8nsbvqkmwj5ivkcxh1wkqqm1lwymmfz9i47ih6ifj06hkpxk";
|
|
|
|
} ) ];
|
|
|
|
|
2017-03-02 20:38:06 +01:00
|
|
|
buildInputs = [
|
2018-05-19 10:20:00 +02:00
|
|
|
makeWrapper
|
2017-03-02 20:38:06 +01:00
|
|
|
perl
|
2017-03-14 22:34:12 +01:00
|
|
|
perlPackages.AnyEvent
|
2017-03-02 20:38:06 +01:00
|
|
|
perlPackages.AudioScan
|
2017-03-14 22:34:12 +01:00
|
|
|
perlPackages.CarpClan
|
|
|
|
perlPackages.CGI
|
2017-03-15 22:34:10 +01:00
|
|
|
perlPackages.ClassXSAccessor
|
2017-03-14 22:54:58 +01:00
|
|
|
perlPackages.DataDump
|
2017-03-14 22:34:12 +01:00
|
|
|
perlPackages.DataURIEncode
|
|
|
|
perlPackages.DBDSQLite
|
2017-03-14 21:20:55 +01:00
|
|
|
perlPackages.DBI
|
2017-03-14 22:34:12 +01:00
|
|
|
perlPackages.DBIxClass
|
2017-03-14 21:20:55 +01:00
|
|
|
perlPackages.DigestSHA1
|
|
|
|
perlPackages.EV
|
2017-03-14 22:34:12 +01:00
|
|
|
perlPackages.ExporterLite
|
|
|
|
perlPackages.FileBOM
|
2017-03-14 22:54:58 +01:00
|
|
|
perlPackages.FileCopyRecursive
|
2017-03-14 22:34:12 +01:00
|
|
|
perlPackages.FileNext
|
2017-03-15 22:34:10 +01:00
|
|
|
perlPackages.FileReadBackwards
|
2017-03-14 22:34:12 +01:00
|
|
|
perlPackages.FileSlurp
|
|
|
|
perlPackages.FileWhich
|
2017-03-14 21:20:55 +01:00
|
|
|
perlPackages.HTMLParser
|
2017-03-14 22:34:12 +01:00
|
|
|
perlPackages.HTTPCookies
|
2017-03-14 22:54:58 +01:00
|
|
|
perlPackages.HTTPDaemon
|
2017-03-14 22:34:12 +01:00
|
|
|
perlPackages.HTTPMessage
|
2017-03-02 20:38:06 +01:00
|
|
|
perlPackages.ImageScale
|
2017-03-14 22:34:12 +01:00
|
|
|
perlPackages.IOSocketSSL
|
|
|
|
perlPackages.IOString
|
2017-03-14 21:20:55 +01:00
|
|
|
perlPackages.JSONXSVersionOneAndTwo
|
2018-07-22 04:03:24 +02:00
|
|
|
perlPackages.LogLog4perl
|
|
|
|
perlPackages.LWP
|
2017-03-14 22:34:12 +01:00
|
|
|
perlPackages.NetHTTP
|
|
|
|
perlPackages.ProcBackground
|
2017-03-14 21:20:55 +01:00
|
|
|
perlPackages.SubName
|
2017-03-15 22:39:03 +01:00
|
|
|
perlPackages.TemplateToolkit
|
2017-03-14 22:34:12 +01:00
|
|
|
perlPackages.TextUnidecode
|
|
|
|
perlPackages.TieCacheLRU
|
|
|
|
perlPackages.TieCacheLRUExpires
|
|
|
|
perlPackages.TieRegexpHash
|
|
|
|
perlPackages.TimeDate
|
|
|
|
perlPackages.URI
|
2017-03-14 22:54:58 +01:00
|
|
|
perlPackages.URIFind
|
|
|
|
perlPackages.UUIDTiny
|
2017-03-14 21:20:55 +01:00
|
|
|
perlPackages.XMLParser
|
2017-03-14 22:34:12 +01:00
|
|
|
perlPackages.XMLSimple
|
|
|
|
perlPackages.YAMLLibYAML
|
2017-03-02 20:38:06 +01:00
|
|
|
];
|
|
|
|
|
2017-03-14 22:34:12 +01:00
|
|
|
|
|
|
|
prePatch = ''
|
2017-03-15 22:34:10 +01:00
|
|
|
mkdir CPAN_used
|
2017-03-16 20:50:10 +01:00
|
|
|
# slimserver doesn't work with current DBIx/SQL versions, use bundled copies
|
2017-03-15 22:39:03 +01:00
|
|
|
mv CPAN/DBIx CPAN/SQL CPAN_used
|
2017-03-14 22:34:12 +01:00
|
|
|
rm -rf CPAN
|
|
|
|
rm -rf Bin
|
|
|
|
touch Makefile.PL
|
|
|
|
'';
|
|
|
|
|
|
|
|
preConfigurePhase = "";
|
|
|
|
|
2018-05-19 10:20:00 +02:00
|
|
|
buildPhase = ''
|
2017-03-14 22:34:12 +01:00
|
|
|
mv lib tmp
|
2017-03-15 22:34:10 +01:00
|
|
|
mkdir -p lib/perl5/site_perl
|
|
|
|
mv CPAN_used/* lib/perl5/site_perl
|
|
|
|
cp -rf tmp/* lib/perl5/site_perl
|
2018-05-19 10:20:00 +02:00
|
|
|
'';
|
2017-03-14 22:34:12 +01:00
|
|
|
|
|
|
|
doCheck = false;
|
2017-03-02 20:38:06 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
cp -r . $out
|
2018-05-19 10:20:00 +02:00
|
|
|
wrapProgram $out/slimserver.pl \
|
|
|
|
--prefix PATH : "${stdenv.lib.makeBinPath [ lame flac faad2 sox monkeysAudio wavpack ]}"
|
2017-03-02 20:38:06 +01:00
|
|
|
'';
|
2017-03-14 22:34:12 +01:00
|
|
|
|
|
|
|
outputs = [ "out" ];
|
2017-03-02 20:38:06 +01:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = https://github.com/Logitech/slimserver;
|
|
|
|
description = "Server for Logitech Squeezebox players. This server is also called Logitech Media Server";
|
2017-03-16 20:59:12 +01:00
|
|
|
# the firmware is not under a free license!
|
|
|
|
# https://github.com/Logitech/slimserver/blob/public/7.9/License.txt
|
|
|
|
license = licenses.unfree;
|
2017-03-02 20:38:06 +01:00
|
|
|
maintainers = [ maintainers.phile314 ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|