diff --git a/pkgs/servers/gonic/default.nix b/pkgs/servers/gonic/default.nix index b2f3d61d8f4d..6e53286fcd58 100644 --- a/pkgs/servers/gonic/default.nix +++ b/pkgs/servers/gonic/default.nix @@ -1,6 +1,5 @@ { lib, stdenv, buildGoModule, fetchFromGitHub -, pkg-config, taglib, alsa-lib -, zlib, AudioToolbox, AppKit +, pkg-config, taglib, zlib # Disable on-the-fly transcoding, # removing the dependency on ffmpeg. @@ -8,32 +7,37 @@ # to the original file, but if transcoding is configured # that takes a while. So best to disable all transcoding # in the configuration if you disable transcodingSupport. -, transcodingSupport ? true, ffmpeg }: +, transcodingSupport ? true, ffmpeg +, mpv }: buildGoModule rec { pname = "gonic"; - version = "0.14.0"; + version = "0.15.0"; src = fetchFromGitHub { owner = "sentriz"; repo = pname; rev = "v${version}"; - sha256 = "sha256-wX97HtvHgHpKTDwZl/wHQRpiyDJ7U38CpdzWu/CYizQ="; + sha256 = "sha256-sTvdMLa7rwrTRDH5DR5nJCzzbtXM9y8mq63CNR1lVfI="; }; nativeBuildInputs = [ pkg-config ]; - buildInputs = [ taglib zlib ] - ++ lib.optionals stdenv.isLinux [ alsa-lib ] - ++ lib.optionals stdenv.isDarwin [ AudioToolbox AppKit ]; - vendorSha256 = "sha256-oTuaA5ZsZ7zMcjzGh37zO/1XyOfj6xjfNr6A7ecrOiA="; + buildInputs = [ taglib zlib ]; + vendorSha256 = "sha256-B9qzhh7FKkZPfuylxlyNP0blU5sjGwM6bLsw+vFkkb4="; # TODO(Profpatsch): write a test for transcoding support, # since it is prone to break postPatch = lib.optionalString transcodingSupport '' substituteInPlace \ - server/encode/encode.go \ + transcode/transcode.go \ --replace \ - '"ffmpeg"' \ - '"${lib.getBin ffmpeg}/bin/ffmpeg"' + '`ffmpeg' \ + '`${lib.getBin ffmpeg}/bin/ffmpeg' + '' + '' + substituteInPlace \ + jukebox/jukebox.go \ + --replace \ + '"mpv"' \ + '"${lib.getBin mpv}/bin/mpv"' ''; meta = { @@ -41,5 +45,6 @@ buildGoModule rec { description = "Music streaming server / subsonic server API implementation"; license = lib.licenses.gpl3Plus; maintainers = with lib.maintainers; [ Profpatsch ]; + platforms = lib.platforms.linux; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1b30b5a643af..b88a4ff18fec 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -29141,9 +29141,7 @@ with pkgs; gollum = callPackage ../applications/misc/gollum { }; - gonic = callPackage ../servers/gonic { - inherit (darwin.apple_sdk.frameworks) AppKit AudioToolbox; - }; + gonic = callPackage ../servers/gonic { }; goodvibes = callPackage ../applications/audio/goodvibes { };