Merge pull request #40778 from phile314/slimserver-fix

nixos/slimserver: Fix media scanning & transcoding
This commit is contained in:
Sarah Brofeldt 2018-05-23 13:03:59 +02:00 committed by GitHub
commit a23cf33223
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 5 deletions

View File

@ -51,7 +51,8 @@ in {
serviceConfig = {
User = "slimserver";
PermissionsStartOnly = true;
ExecStart = "${cfg.package}/slimserver.pl --logdir ${cfg.dataDir}/logs --prefsdir ${cfg.dataDir}/prefs --cachedir ${cfg.dataDir}/cache";
# Issue 40589: Disable broken image/video support (audio still works!)
ExecStart = "${cfg.package}/slimserver.pl --logdir ${cfg.dataDir}/logs --prefsdir ${cfg.dataDir}/prefs --cachedir ${cfg.dataDir}/cache --noimage --novideo";
};
};

View File

@ -1,5 +1,5 @@
{ stdenv, buildPerlPackage, fetchurl
, perl, perlPackages, fetchpatch }:
{ stdenv, buildPerlPackage, fetchurl, fetchpatch, makeWrapper
, perl, perlPackages, flac, faad2, sox, lame, monkeysAudio, wavpack }:
buildPerlPackage rec {
name = "slimserver-${version}";
@ -16,6 +16,7 @@ buildPerlPackage rec {
} ) ];
buildInputs = [
makeWrapper
perl
perlPackages.AnyEvent
perlPackages.AudioScan
@ -75,17 +76,19 @@ buildPerlPackage rec {
preConfigurePhase = "";
buildPhase = "
buildPhase = ''
mv lib tmp
mkdir -p lib/perl5/site_perl
mv CPAN_used/* lib/perl5/site_perl
cp -rf tmp/* lib/perl5/site_perl
";
'';
doCheck = false;
installPhase = ''
cp -r . $out
wrapProgram $out/slimserver.pl \
--prefix PATH : "${stdenv.lib.makeBinPath [ lame flac faad2 sox monkeysAudio wavpack ]}"
'';
outputs = [ "out" ];