squeezelite: 1.9.6.1196 -> 1.9.9.1401
Regular update as well as adding support for pulseaudio in addition to the regular ALSA backend.
This commit is contained in:
parent
cc49175ed6
commit
158211b6a1
|
@ -1,39 +1,50 @@
|
||||||
{ lib, stdenv, fetchFromGitHub
|
{ lib
|
||||||
, alsa-lib, flac, libmad, libvorbis, mpg123
|
, stdenv
|
||||||
|
, fetchFromGitHub
|
||||||
|
, alsa-lib
|
||||||
|
, flac
|
||||||
|
, libmad
|
||||||
|
, libpulseaudio
|
||||||
|
, libvorbis
|
||||||
|
, mpg123
|
||||||
|
, audioBackend ? "alsa"
|
||||||
, dsdSupport ? true
|
, dsdSupport ? true
|
||||||
, faad2Support ? true, faad2
|
, faad2Support ? true
|
||||||
, ffmpegSupport ? true, ffmpeg
|
, faad2
|
||||||
, opusSupport ? true, opusfile
|
, ffmpegSupport ? true
|
||||||
, resampleSupport ? true, soxr
|
, ffmpeg
|
||||||
, sslSupport ? true, openssl
|
, opusSupport ? true
|
||||||
|
, opusfile
|
||||||
|
, resampleSupport ? true
|
||||||
|
, soxr
|
||||||
|
, sslSupport ? true
|
||||||
|
, openssl
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
concatStringsSep = lib.concatStringsSep;
|
inherit (lib) optional optionalString;
|
||||||
optional = lib.optional;
|
|
||||||
opts = [ "-DLINKALL" ]
|
|
||||||
++ optional dsdSupport "-DDSD"
|
|
||||||
++ optional (!faad2Support) "-DNO_FAAD"
|
|
||||||
++ optional ffmpegSupport "-DFFMPEG"
|
|
||||||
++ optional opusSupport "-DOPUS"
|
|
||||||
++ optional resampleSupport "-DRESAMPLE"
|
|
||||||
++ optional sslSupport "-DUSE_SSL";
|
|
||||||
|
|
||||||
in stdenv.mkDerivation {
|
pulseSupport = audioBackend == "pulse";
|
||||||
pname = "squeezelite";
|
|
||||||
|
|
||||||
|
binName = "squeezelite${optionalString pulseSupport "-pulse"}";
|
||||||
|
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
# the nixos module uses the pname as the binary name
|
||||||
|
pname = binName;
|
||||||
# versions are specified in `squeezelite.h`
|
# versions are specified in `squeezelite.h`
|
||||||
# see https://github.com/ralph-irving/squeezelite/issues/29
|
# see https://github.com/ralph-irving/squeezelite/issues/29
|
||||||
version = "1.9.6.1196";
|
version = "1.9.9.1401";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "ralph-irving";
|
owner = "ralph-irving";
|
||||||
repo = "squeezelite";
|
repo = "squeezelite";
|
||||||
rev = "2b508464dce2cbdb2a3089c58df2a6fbc36328c0";
|
rev = "894df3ea80f66a27a9ae5fab918acf62a6798b8b";
|
||||||
sha256 = "024ypr1da2r079k3hgiifzd3d3wcfprhbl5zdm40zm0c7frzmr8i";
|
hash = "sha256-LIi+9vb0+56AGvVrLx4gQaUkUNjIi6PmqrLViLT1DSU=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ alsa-lib flac libmad libvorbis mpg123 ]
|
buildInputs = [ flac libmad libvorbis mpg123 ]
|
||||||
|
++ lib.singleton (if pulseSupport then libpulseaudio else alsa-lib)
|
||||||
++ optional faad2Support faad2
|
++ optional faad2Support faad2
|
||||||
++ optional ffmpegSupport ffmpeg
|
++ optional ffmpegSupport ffmpeg
|
||||||
++ optional opusSupport opusfile
|
++ optional opusSupport opusfile
|
||||||
|
@ -47,15 +58,22 @@ in stdenv.mkDerivation {
|
||||||
--replace "<opusfile.h>" "<opus/opusfile.h>"
|
--replace "<opusfile.h>" "<opus/opusfile.h>"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
preBuild = ''
|
EXECUTABLE = binName;
|
||||||
export OPTS="${concatStringsSep " " opts}"
|
|
||||||
'';
|
OPTS = [ "-DLINKALL" ]
|
||||||
|
++ optional dsdSupport "-DDSD"
|
||||||
|
++ optional (!faad2Support) "-DNO_FAAD"
|
||||||
|
++ optional ffmpegSupport "-DFFMPEG"
|
||||||
|
++ optional opusSupport "-DOPUS"
|
||||||
|
++ optional pulseSupport "-DPULSEAUDIO"
|
||||||
|
++ optional resampleSupport "-DRESAMPLE"
|
||||||
|
++ optional sslSupport "-DUSE_SSL";
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
runHook preInstall
|
runHook preInstall
|
||||||
|
|
||||||
install -Dm755 -t $out/bin squeezelite
|
install -Dm555 -t $out/bin ${binName}
|
||||||
install -Dm644 -t $out/share/doc/squeezelite *.txt *.md
|
install -Dm444 -t $out/share/doc/squeezelite *.txt *.md
|
||||||
|
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
@ -63,7 +81,7 @@ in stdenv.mkDerivation {
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Lightweight headless squeezebox client emulator";
|
description = "Lightweight headless squeezebox client emulator";
|
||||||
homepage = "https://github.com/ralph-irving/squeezelite";
|
homepage = "https://github.com/ralph-irving/squeezelite";
|
||||||
license = with licenses; [ gpl3 ] ++ optional dsdSupport bsd2;
|
license = with licenses; [ gpl3Plus ] ++ optional dsdSupport bsd2;
|
||||||
maintainers = with maintainers; [ samdoshi ];
|
maintainers = with maintainers; [ samdoshi ];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
};
|
};
|
||||||
|
|
|
@ -29068,7 +29068,9 @@ with pkgs;
|
||||||
|
|
||||||
psst = callPackage ../applications/audio/psst { };
|
psst = callPackage ../applications/audio/psst { };
|
||||||
|
|
||||||
squeezelite = callPackage ../applications/audio/squeezelite { };
|
squeezelite = callPackage ../applications/audio/squeezelite { audioBackend = "alsa"; };
|
||||||
|
|
||||||
|
squeezelite-pulse = callPackage ../applications/audio/squeezelite { audioBackend = "pulse"; };
|
||||||
|
|
||||||
ltunify = callPackage ../tools/misc/ltunify { };
|
ltunify = callPackage ../tools/misc/ltunify { };
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue