2021-09-19 14:27:29 +01:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, makeWrapper
|
|
|
|
, perlPackages
|
|
|
|
, flac
|
|
|
|
, faad2
|
|
|
|
, sox
|
|
|
|
, lame
|
|
|
|
, monkeysAudio
|
|
|
|
, wavpack
|
|
|
|
}:
|
2017-03-02 19:38:06 +00:00
|
|
|
|
2018-10-13 00:10:38 +01:00
|
|
|
perlPackages.buildPerlPackage rec {
|
2019-06-20 14:07:56 +01:00
|
|
|
pname = "slimserver";
|
2020-03-03 23:37:41 +00:00
|
|
|
version = "7.9.2";
|
2017-03-02 19:38:06 +00:00
|
|
|
|
2021-09-19 14:27:29 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Logitech";
|
|
|
|
repo = "slimserver";
|
|
|
|
rev = version;
|
|
|
|
hash = "sha256-P4CSu/ff6i48uWV5gXsJgayZ1S1s0RAqa5O5y3Y0g9Y=";
|
2017-03-02 19:38:06 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
2018-05-19 09:20:00 +01:00
|
|
|
makeWrapper
|
2018-12-15 03:50:31 +00:00
|
|
|
perlPackages.perl
|
2017-03-14 21:34:12 +00:00
|
|
|
perlPackages.AnyEvent
|
2021-01-06 20:30:30 +00:00
|
|
|
perlPackages.ArchiveZip
|
2017-03-02 19:38:06 +00:00
|
|
|
perlPackages.AudioScan
|
2017-03-14 21:34:12 +00:00
|
|
|
perlPackages.CarpClan
|
|
|
|
perlPackages.CGI
|
2017-03-15 21:34:10 +00:00
|
|
|
perlPackages.ClassXSAccessor
|
2017-03-14 21:54:58 +00:00
|
|
|
perlPackages.DataDump
|
2017-03-14 21:34:12 +00:00
|
|
|
perlPackages.DataURIEncode
|
|
|
|
perlPackages.DBDSQLite
|
2017-03-14 20:20:55 +00:00
|
|
|
perlPackages.DBI
|
2017-03-14 21:34:12 +00:00
|
|
|
perlPackages.DBIxClass
|
2017-03-14 20:20:55 +00:00
|
|
|
perlPackages.DigestSHA1
|
|
|
|
perlPackages.EV
|
2017-03-14 21:34:12 +00:00
|
|
|
perlPackages.ExporterLite
|
|
|
|
perlPackages.FileBOM
|
2017-03-14 21:54:58 +00:00
|
|
|
perlPackages.FileCopyRecursive
|
2017-03-14 21:34:12 +00:00
|
|
|
perlPackages.FileNext
|
2017-03-15 21:34:10 +00:00
|
|
|
perlPackages.FileReadBackwards
|
2017-03-14 21:34:12 +00:00
|
|
|
perlPackages.FileSlurp
|
|
|
|
perlPackages.FileWhich
|
2017-03-14 20:20:55 +00:00
|
|
|
perlPackages.HTMLParser
|
2017-03-14 21:34:12 +00:00
|
|
|
perlPackages.HTTPCookies
|
2017-03-14 21:54:58 +00:00
|
|
|
perlPackages.HTTPDaemon
|
2017-03-14 21:34:12 +00:00
|
|
|
perlPackages.HTTPMessage
|
2017-03-02 19:38:06 +00:00
|
|
|
perlPackages.ImageScale
|
2017-03-14 21:34:12 +00:00
|
|
|
perlPackages.IOSocketSSL
|
|
|
|
perlPackages.IOString
|
2017-03-14 20:20:55 +00:00
|
|
|
perlPackages.JSONXSVersionOneAndTwo
|
2018-07-22 03:03:24 +01:00
|
|
|
perlPackages.LogLog4perl
|
|
|
|
perlPackages.LWP
|
2017-03-14 21:34:12 +00:00
|
|
|
perlPackages.NetHTTP
|
2021-01-13 10:56:15 +00:00
|
|
|
perlPackages.NetHTTPSNB
|
2017-03-14 21:34:12 +00:00
|
|
|
perlPackages.ProcBackground
|
2017-03-14 20:20:55 +00:00
|
|
|
perlPackages.SubName
|
2017-03-15 21:39:03 +00:00
|
|
|
perlPackages.TemplateToolkit
|
2017-03-14 21:34:12 +00:00
|
|
|
perlPackages.TextUnidecode
|
|
|
|
perlPackages.TieCacheLRU
|
|
|
|
perlPackages.TieCacheLRUExpires
|
|
|
|
perlPackages.TieRegexpHash
|
|
|
|
perlPackages.TimeDate
|
|
|
|
perlPackages.URI
|
2017-03-14 21:54:58 +00:00
|
|
|
perlPackages.URIFind
|
|
|
|
perlPackages.UUIDTiny
|
2017-03-14 20:20:55 +00:00
|
|
|
perlPackages.XMLParser
|
2017-03-14 21:34:12 +00:00
|
|
|
perlPackages.XMLSimple
|
|
|
|
perlPackages.YAMLLibYAML
|
2017-03-02 19:38:06 +00:00
|
|
|
];
|
|
|
|
|
2017-03-14 21:34:12 +00:00
|
|
|
|
|
|
|
prePatch = ''
|
2017-03-15 21:34:10 +00:00
|
|
|
mkdir CPAN_used
|
2017-03-16 19:50:10 +00:00
|
|
|
# slimserver doesn't work with current DBIx/SQL versions, use bundled copies
|
2017-03-15 21:39:03 +00:00
|
|
|
mv CPAN/DBIx CPAN/SQL CPAN_used
|
2017-03-14 21:34:12 +00:00
|
|
|
rm -rf CPAN
|
|
|
|
rm -rf Bin
|
|
|
|
touch Makefile.PL
|
2018-10-01 23:08:00 +01:00
|
|
|
|
|
|
|
# relax audio scan version constraints
|
|
|
|
substituteInPlace lib/Audio/Scan.pm --replace "0.93" "1.01"
|
|
|
|
substituteInPlace modules.conf --replace "Audio::Scan 0.93 0.95" "Audio::Scan 0.93"
|
2021-09-19 14:27:29 +01:00
|
|
|
'';
|
2017-03-14 21:34:12 +00:00
|
|
|
|
|
|
|
preConfigurePhase = "";
|
|
|
|
|
2018-05-19 09:20:00 +01:00
|
|
|
buildPhase = ''
|
2017-03-14 21:34:12 +00:00
|
|
|
mv lib tmp
|
2018-12-15 03:50:31 +00:00
|
|
|
mkdir -p ${perlPackages.perl.libPrefix}
|
|
|
|
mv CPAN_used/* ${perlPackages.perl.libPrefix}
|
|
|
|
cp -rf tmp/* ${perlPackages.perl.libPrefix}
|
2018-05-19 09:20:00 +01:00
|
|
|
'';
|
2017-03-14 21:34:12 +00:00
|
|
|
|
|
|
|
doCheck = false;
|
2017-03-02 19:38:06 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
cp -r . $out
|
2018-05-19 09:20:00 +01:00
|
|
|
wrapProgram $out/slimserver.pl \
|
2021-01-15 07:07:56 +00:00
|
|
|
--prefix PATH : "${lib.makeBinPath [ lame flac faad2 sox monkeysAudio wavpack ]}"
|
2017-03-02 19:38:06 +00:00
|
|
|
'';
|
2017-03-14 21:34:12 +00:00
|
|
|
|
|
|
|
outputs = [ "out" ];
|
2017-03-02 19:38:06 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/Logitech/slimserver";
|
2017-03-02 19:38:06 +00:00
|
|
|
description = "Server for Logitech Squeezebox players. This server is also called Logitech Media Server";
|
2017-03-16 19:59:12 +00: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 19:38:06 +00:00
|
|
|
maintainers = [ maintainers.phile314 ];
|
2019-02-17 13:00:33 +00:00
|
|
|
platforms = platforms.unix;
|
2017-03-02 19:38:06 +00:00
|
|
|
};
|
|
|
|
}
|