slimserver: remove vendored lib/Audio/Scan, update wrappers

This commit is contained in:
Adam Stephens 2023-12-13 16:06:08 -05:00
parent cb3660e7e4
commit 692408956b
No known key found for this signature in database

View File

@ -16,6 +16,9 @@
let
perlPackages = perl538Packages;
binPath = lib.makeBinPath ([ lame flac faad2 sox wavpack ] ++ (lib.optional stdenv.isLinux monkeysAudio));
libPath = lib.makeLibraryPath [ zlib stdenv.cc.cc.lib ];
in
perlPackages.buildPerlPackage rec {
pname = "slimserver";
@ -118,6 +121,9 @@ perlPackages.buildPerlPackage rec {
rm -r CPAN
mv CPAN_used CPAN
# another set of vendored/modified modules exist in lib, more selectively cleaned for now
rm -rf lib/Audio
${lib.optionalString (!enableUnfreeFirmware) ''
# remove unfree firmware
rm -rf Firmware
@ -130,9 +136,8 @@ perlPackages.buildPerlPackage rec {
installPhase = ''
cp -r . $out
wrapProgram $out/slimserver.pl \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ zlib stdenv.cc.cc.lib ]}" \
--prefix PATH : "${lib.makeBinPath ([ lame flac faad2 sox wavpack ] ++ (lib.optional stdenv.isLinux monkeysAudio))}"
wrapProgram $out/slimserver.pl --prefix LD_LIBRARY_PATH : "${libPath}" --prefix PATH : "${binPath}"
wrapProgram $out/scanner.pl --prefix LD_LIBRARY_PATH : "${libPath}" --prefix PATH : "${binPath}"
mkdir $out/bin
ln -s $out/slimserver.pl $out/bin/slimserver
'';