Change:
The current vlc derivation does not include chromecast support. I believe we need to add the flags during the configuration step to enable it by default, which I think is a reasonable thing to do. I tried to do the minimal change myself, but looks like we need some new dependencies that don't exist in nixpkg yet: I'm still fairly new so it will take some learning to figure out what needs to be done to package protobuf-lite (not sure I'll get around to it anytime soon). If anyone else is into making these changes, it would be much appreciated. Or please let me know if I'm off-track here and there's a better way to do this.
You're on the right track. This should work:
Ah, now it builds, and I can see the relevant chromecast features, but it's still not finding the chromecast. Thank you! Sounds like that happens when microdns is not available. I tried adding nssmdns to the derivation but that didn't do the trick. is enabled. Hmmmm.
FWIW (mostly because I like linking things together), but sounds like you're past what is useful from that :). I frequently find chromecast programs on NixOS don't work... especially scanning support... with the firewall enabled. . Should only need mdns support for discovery/scanning, I think :).
Yea I did see that. I don't think it's the firewall, as google-chrome chromecasts fine. Even VLC via flatpak manages to connect to the chromecast (but fails to encode due to some other error). I believe mdns is used to find the chromecast automagically.
Make sure avahi is running and that mdns is set in resolvconf
Avahi is running and nssmdns is enabled, if that's what you mean. Is it working for you? Reading an older VLC PR: Sounds like we need VLC's own libmicrodns packaged before this will work: Edit: Indeed building with :
I managed to package up libmicrodns and it's working now! I'll clean up and send a PR. :) Thanks for the help everyone.

Discussion:
github = "minijackson"; name = "Rémi Nicole"; }; <ins> shazow = { email = "andrey.petrov@shazow.net"; github = "shazow"; name = "Andrey Petrov"; }; </ins> }

and fix all the bugs it uncovers. </para> </listitem> <ins> <listitem> <para> The <literal>vlc</literal> package gained support for Chromecast streaming, enabled by default. TCP port 8010 must be open for it to work, so something like <literal>networking.firewall.allowedTCPPorts = [ 8010 ];</literal> may be required in your configuration. Also consider enabling <link xlink:href="https://nixos.wiki/wiki/Accelerated_Video_Playback"> Accelerated Video Playback</link> for better transcoding performance. </para> </listitem> </ins> </itemizedlist> </section> </section>

, jackSupport ? false , fetchpatch , removeReferencesTo <ins> , chromecastSupport ? true, protobuf, libmicrodns </ins> }: <ins> # chromecastSupport requires TCP port 8010 to be open for it to work. # If your firewall is enabled, make sure to have something like: #   networking.firewall.allowedTCPPorts = [ 8010 ]; </ins> with stdenv.lib; assert (withQt5 -> qtbase != null && qtsvg != null && qtx11extras != null);

fluidsynth wayland wayland-protocols ] ++ optional (!stdenv.hostPlatform.isAarch64) live555 ++ optionals withQt5    [ qtbase qtsvg qtx11extras ] <del> ++ optional jackSupport libjack2; </del> <ins> ++ optional jackSupport libjack2 ++ optionals chromecastSupport [ protobuf libmicrodns ]; </ins> nativeBuildInputs = [ autoreconfHook perl pkgconfig removeReferencesTo ];

# "--enable-foo" flags here configureFlags = [ "--with-kde-solid=$out/share/apps/solid/actions" <del> ] ++ optional onlyLibVLC "--disable-vlc"; </del> <ins> ] ++ optional onlyLibVLC "--disable-vlc" ++ optionals chromecastSupport [ "--enable-sout" "--enable-chromecast" "--enable-microdns" ]; </ins> # Remove runtime dependencies on libraries postConfigure = ''

<ins> { stdenv , fetchFromGitHub , autoreconfHook , pkgconfig }: stdenv.mkDerivation rec { version = "0.0.10"; pname = "libmicrodns"; src = fetchFromGitHub { owner = "videolabs"; repo = pname; rev = version; sha256 = "1xvl9k49ng35wbsqmnjnyqvkyjf8dcq2ywsq3jp3wh0rgmxhq2fh"; }; nativeBuildInputs = [ autoreconfHook pkgconfig ]; meta = with stdenv.lib; { description = "Minimal mDNS resolver library, used by VLC"; homepage = https://github.com/videolabs/libmicrodns; license = licenses.lgpl21; platforms = platforms.linux; maintainers = [ maintainers.shazow ]; }; } </ins>

libpointmatcher = callPackage ../development/libraries/libpointmatcher { }; <ins> libmicrodns = callPackage ../development/libraries/libmicrodns { }; </ins> libnids = callPackage ../tools/networking/libnids { }; libtorrent = callPackage ../tools/networking/p2p/libtorrent { };