1 { stdenv, lib, fetchFromGitHub, cmake, pkg-config, gtk3
2 , audacious, mpg123, ffmpeg, libvorbis, libao, jansson, speex
4 , buildAudaciousPlugin ? false # only build cli by default, pkgs.audacious-plugins sets this to enable plugin support
7 stdenv.mkDerivation rec {
11 src = fetchFromGitHub {
14 rev = "refs/tags/r${version}";
15 hash = "sha256-Wa0FAUHdJtG+u9y3ZOt8dxRIo78lekFPghiu67KJZ9s=";
18 passthru.updateScript = nix-update-script {
19 attrPath = "vgmstream";
20 extraArgs = [ "--version-regex" "r(.*)" ];
26 ] ++ lib.optional buildAudaciousPlugin gtk3;
35 ] ++ lib.optional buildAudaciousPlugin (audacious.override { audacious-plugins = null; });
38 substituteInPlace cmake/dependencies/audacious.cmake \
39 --replace "pkg_get_variable(AUDACIOUS_PLUGIN_DIR audacious plugin_dir)" "set(AUDACIOUS_PLUGIN_DIR \"$out/lib/audacious\")"
43 # It always tries to download it, no option to use the system one
45 ] ++ lib.optional (! buildAudaciousPlugin) "-DBUILD_AUDACIOUS=OFF";
48 description = "Library for playback of various streamed audio formats used in video games";
49 homepage = "https://vgmstream.org";
50 maintainers = with maintainers; [ zane ];
51 license = with licenses; isc;
52 platforms = with platforms; unix;