slimserver: add bin symlink and meta.mainProgram

This commit is contained in:
Adam Stephens 2023-11-04 21:45:06 -04:00
parent 713a7d7fa0
commit 431b9f23ad
No known key found for this signature in database
2 changed files with 4 additions and 1 deletions

View File

@ -54,7 +54,7 @@ in {
serviceConfig = {
User = "slimserver";
# 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";
ExecStart = "${lib.getExe cfg.package} --logdir ${cfg.dataDir}/logs --prefsdir ${cfg.dataDir}/prefs --cachedir ${cfg.dataDir}/cache --noimage --novideo";
};
};

View File

@ -59,6 +59,8 @@ perlPackages.buildPerlPackage rec {
wrapProgram $out/slimserver.pl \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ zlib stdenv.cc.cc.lib ]}" \
--prefix PATH : "${lib.makeBinPath [ lame flac faad2 sox monkeysAudio wavpack ]}"
mkdir $out/bin
ln -s $out/slimserver.pl $out/bin/slimserver
'';
outputs = [ "out" ];
@ -73,6 +75,7 @@ perlPackages.buildPerlPackage rec {
# the firmware is not under a free license, but not included in the default package
# https://github.com/Logitech/slimserver/blob/public/8.3/License.txt
license = if enableUnfreeFirmware then licenses.unfree else licenses.gpl2Only;
mainProgram = "slimserver";
maintainers = with maintainers; [ adamcstephens jecaro ];
platforms = platforms.unix;
};