From 98e24eb258d730c48c36ca7862cc28a59694556e Mon Sep 17 00:00:00 2001 From: Andrey Petrov Date: Sat, 30 Mar 2019 12:40:45 -0400 Subject: [PATCH 1/2] libmicrodns: init at 0.0.10 Required for Chromecast support by VLC. --- maintainers/maintainer-list.nix | 5 ++++ .../libraries/libmicrodns/default.nix | 30 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 37 insertions(+) create mode 100644 pkgs/development/libraries/libmicrodns/default.nix diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index e59cf106a75b..416ebdd5947e 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -5391,4 +5391,9 @@ github = "minijackson"; name = "RĂ©mi Nicole"; }; + shazow = { + email = "andrey.petrov@shazow.net"; + github = "shazow"; + name = "Andrey Petrov"; + }; } diff --git a/pkgs/development/libraries/libmicrodns/default.nix b/pkgs/development/libraries/libmicrodns/default.nix new file mode 100644 index 000000000000..3c55a6b036cc --- /dev/null +++ b/pkgs/development/libraries/libmicrodns/default.nix @@ -0,0 +1,30 @@ +{ 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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bfa6313df477..db42506a3bc2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4095,6 +4095,8 @@ in libpointmatcher = callPackage ../development/libraries/libpointmatcher { }; + libmicrodns = callPackage ../development/libraries/libmicrodns { }; + libnids = callPackage ../tools/networking/libnids { }; libtorrent = callPackage ../tools/networking/p2p/libtorrent { }; From c37aa79639cbcbe7bc5942da11aae2109b8714b1 Mon Sep 17 00:00:00 2001 From: Andrey Petrov Date: Sat, 30 Mar 2019 12:41:09 -0400 Subject: [PATCH 2/2] vlc: add chromecastSupport option Enables Chromecast support by default in VLC. Fixes #58365. Includes release note. --- nixos/doc/manual/release-notes/rl-1909.xml | 10 ++++++++++ pkgs/applications/video/vlc/default.nix | 15 +++++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/nixos/doc/manual/release-notes/rl-1909.xml b/nixos/doc/manual/release-notes/rl-1909.xml index 97a381020139..2cfaec49c02e 100644 --- a/nixos/doc/manual/release-notes/rl-1909.xml +++ b/nixos/doc/manual/release-notes/rl-1909.xml @@ -99,6 +99,16 @@ and fix all the bugs it uncovers. + + + The vlc package gained support for Chromecast + streaming, enabled by default. TCP port 8010 must be open for it to work, + so something like networking.firewall.allowedTCPPorts = [ 8010 + ]; may be required in your configuration. Also consider enabling + + Accelerated Video Playback for better transcoding performance. + + diff --git a/pkgs/applications/video/vlc/default.nix b/pkgs/applications/video/vlc/default.nix index cd3999e38c09..7f1233a4e04e 100644 --- a/pkgs/applications/video/vlc/default.nix +++ b/pkgs/applications/video/vlc/default.nix @@ -13,8 +13,13 @@ , jackSupport ? false , fetchpatch , removeReferencesTo +, chromecastSupport ? true, protobuf, libmicrodns }: +# 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 ]; + with stdenv.lib; assert (withQt5 -> qtbase != null && qtsvg != null && qtx11extras != null); @@ -42,7 +47,8 @@ stdenv.mkDerivation rec { fluidsynth wayland wayland-protocols ] ++ optional (!stdenv.hostPlatform.isAarch64) live555 ++ optionals withQt5 [ qtbase qtsvg qtx11extras ] - ++ optional jackSupport libjack2; + ++ optional jackSupport libjack2 + ++ optionals chromecastSupport [ protobuf libmicrodns ]; nativeBuildInputs = [ autoreconfHook perl pkgconfig removeReferencesTo ]; @@ -76,7 +82,12 @@ stdenv.mkDerivation rec { # "--enable-foo" flags here configureFlags = [ "--with-kde-solid=$out/share/apps/solid/actions" - ] ++ optional onlyLibVLC "--disable-vlc"; + ] ++ optional onlyLibVLC "--disable-vlc" + ++ optionals chromecastSupport [ + "--enable-sout" + "--enable-chromecast" + "--enable-microdns" + ]; # Remove runtime dependencies on libraries postConfigure = ''