Merge pull request #306025 from hufman/audacious-vgmstream

Add vgmstream plugin to audacious

authored by Thiago Kenji Okada and committed by GitHub cfad7aa4 b58121a5

+26 -7
+5
pkgs/applications/audio/audacious/plugins.nix
··· 41 41 , qtmultimedia 42 42 , qtx11extras 43 43 , soxr 44 + , vgmstream 44 45 , wavpack 45 46 }: 46 47 ··· 108 109 ]; 109 110 110 111 dontWrapQtApps = true; 112 + 113 + postInstall = '' 114 + ln -s ${vgmstream.override { buildAudaciousPlugin = true; }}/lib/audacious/Input/* $out/lib/audacious/Input 115 + ''; 111 116 112 117 meta = audacious.meta // { 113 118 description = "Plugins for Audacious music player";
+21 -7
pkgs/applications/audio/vgmstream/default.nix
··· 1 - { stdenv, lib, fetchFromGitHub, cmake, pkg-config 2 - , mpg123, ffmpeg, libvorbis, libao, jansson, speex 1 + { stdenv, lib, fetchFromGitHub, cmake, pkg-config, gtk3 2 + , audacious, mpg123, ffmpeg, libvorbis, libao, jansson, speex 3 3 , nix-update-script 4 + , buildAudaciousPlugin ? false # only build cli by default, pkgs.audacious-plugins sets this to enable plugin support 4 5 }: 5 6 6 7 stdenv.mkDerivation rec { ··· 19 20 extraArgs = [ "--version-regex" "r(.*)" ]; 20 21 }; 21 22 22 - nativeBuildInputs = [ cmake pkg-config ]; 23 + nativeBuildInputs = [ 24 + cmake 25 + pkg-config 26 + ] ++ lib.optional buildAudaciousPlugin gtk3; 23 27 24 - buildInputs = [ mpg123 ffmpeg libvorbis libao jansson speex ]; 28 + buildInputs = [ 29 + mpg123 30 + ffmpeg 31 + libvorbis 32 + libao 33 + jansson 34 + speex 35 + ] ++ lib.optional buildAudaciousPlugin (audacious.override { audacious-plugins = null; }); 36 + 37 + preConfigure = '' 38 + substituteInPlace cmake/dependencies/audacious.cmake \ 39 + --replace "pkg_get_variable(AUDACIOUS_PLUGIN_DIR audacious plugin_dir)" "set(AUDACIOUS_PLUGIN_DIR \"$out/lib/audacious\")" 40 + ''; 25 41 26 42 cmakeFlags = [ 27 - # There's no nice way to build the audacious plugin without a circular dependency 28 - "-DBUILD_AUDACIOUS=OFF" 29 43 # It always tries to download it, no option to use the system one 30 44 "-DUSE_CELT=OFF" 31 - ]; 45 + ] ++ lib.optional (! buildAudaciousPlugin) "-DBUILD_AUDACIOUS=OFF"; 32 46 33 47 meta = with lib; { 34 48 description = "A library for playback of various streamed audio formats used in video games";