diff options
Diffstat (limited to 'pkgs/applications/audio/squeezelite/default.nix')
-rw-r--r-- | pkgs/applications/audio/squeezelite/default.nix | 115 |
1 files changed, 0 insertions, 115 deletions
diff --git a/pkgs/applications/audio/squeezelite/default.nix b/pkgs/applications/audio/squeezelite/default.nix deleted file mode 100644 index deaec9e16d7cc..0000000000000 --- a/pkgs/applications/audio/squeezelite/default.nix +++ /dev/null @@ -1,115 +0,0 @@ -{ lib -, stdenv -, fetchFromGitHub -, flac -, libgpiod -, libmad -, libpulseaudio -, libvorbis -, mpg123 -, audioBackend ? if stdenv.isLinux then "alsa" else "portaudio" -, alsaSupport ? stdenv.isLinux -, alsa-lib -, dsdSupport ? true -, faad2Support ? true -, faad2 -, ffmpegSupport ? true -, ffmpeg -, opusSupport ? true -, opusfile -, resampleSupport ? true -, soxr -, sslSupport ? true -, openssl -, portaudioSupport ? stdenv.isDarwin -, portaudio -, slimserver -, AudioToolbox -, AudioUnit -, Carbon -, CoreAudio -, CoreVideo -, VideoDecodeAcceleration -}: - -let - inherit (lib) optional optionals optionalString; - - pulseSupport = audioBackend == "pulse"; - - 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` - # see https://github.com/ralph-irving/squeezelite/issues/29 - version = "2.0.0.1486"; - - src = fetchFromGitHub { - owner = "ralph-irving"; - repo = "squeezelite"; - rev = "fd4a82e7d0e53124d9618320f3c115d90654509d"; - hash = "sha256-nR2Px7VYjAktUsueEyBAV2392+/dX6JYIy7YSMh05c0="; - }; - - buildInputs = [ flac libmad libvorbis mpg123 ] - ++ optional pulseSupport libpulseaudio - ++ optional alsaSupport alsa-lib - ++ optional portaudioSupport portaudio - ++ optionals stdenv.isDarwin [ CoreVideo VideoDecodeAcceleration CoreAudio AudioToolbox AudioUnit Carbon ] - ++ optional faad2Support faad2 - ++ optional ffmpegSupport ffmpeg - ++ optional opusSupport opusfile - ++ optional resampleSupport soxr - ++ optional sslSupport openssl - ++ optional (stdenv.isAarch32 or stdenv.isAarch64) libgpiod; - - enableParallelBuilding = true; - - postPatch = '' - substituteInPlace opus.c \ - --replace "<opusfile.h>" "<opus/opusfile.h>" - ''; - - EXECUTABLE = binName; - - OPTS = [ "-DLINKALL" "-DGPIO" ] - ++ optional dsdSupport "-DDSD" - ++ optional (!faad2Support) "-DNO_FAAD" - ++ optional ffmpegSupport "-DFFMPEG" - ++ optional opusSupport "-DOPUS" - ++ optional portaudioSupport "-DPORTAUDIO" - ++ optional pulseSupport "-DPULSEAUDIO" - ++ optional resampleSupport "-DRESAMPLE" - ++ optional sslSupport "-DUSE_SSL" - ++ optional (stdenv.isAarch32 or stdenv.isAarch64) "-DRPI"; - - env = lib.optionalAttrs stdenv.isDarwin { - LDADD = "-lportaudio -lpthread"; - }; - - installPhase = '' - runHook preInstall - - install -Dm555 -t $out/bin ${binName} - install -Dm444 -t $out/share/doc/squeezelite *.txt *.md - - runHook postInstall - ''; - - passthru = { - inherit (slimserver) tests; - updateScript = ./update.sh; - }; - - meta = with lib; { - description = "Lightweight headless squeezebox client emulator"; - homepage = "https://github.com/ralph-irving/squeezelite"; - license = with licenses; [ gpl3Plus ] ++ optional dsdSupport bsd2; - mainProgram = binName; - maintainers = with maintainers; [ adamcstephens ]; - platforms = if (audioBackend == "pulse") then platforms.linux else platforms.linux ++ platforms.darwin; - }; -} |