From 121dfc185a23113173e653cd538f80ff9171f3c3 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 11 Apr 2023 14:13:50 +0000 Subject: [PATCH 1/3] rtsp-simple-server: 0.21.6 -> 0.22.0 --- pkgs/servers/rtsp-simple-server/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/rtsp-simple-server/default.nix b/pkgs/servers/rtsp-simple-server/default.nix index 985f9bff5f55..a1a2f3e8065e 100644 --- a/pkgs/servers/rtsp-simple-server/default.nix +++ b/pkgs/servers/rtsp-simple-server/default.nix @@ -5,16 +5,16 @@ buildGoModule rec { pname = "rtsp-simple-server"; - version = "0.21.6"; + version = "0.22.0"; src = fetchFromGitHub { owner = "aler9"; repo = pname; rev = "v${version}"; - hash = "sha256-b9sb5XU+wE14N4N7NELE26gSntu7wJgpneIF+T2w6WY="; + hash = "sha256-x+4dU+SHkkF0E/NoVvK0aNBCyAIL3Nfbh1tBVe//nx0="; }; - vendorHash = "sha256-rKmaxsDQ6+cLp6eaw8TRjpPsNcQlPauqmX6hcslc2Wo="; + vendorHash = "sha256-pcHtmkYV3hqb6QQ7O6WQSHqwuYWFq3Xx6vhPAIyuFEI="; # Tests need docker doCheck = false; From 504849a7bb581207756d5767d55213ee422281ce Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Tue, 11 Apr 2023 18:02:48 +0300 Subject: [PATCH 2/3] rtsp-simple-server: rebrand as mediamtx --- .../manual/release-notes/rl-2205.section.md | 2 +- .../manual/release-notes/rl-2305.section.md | 2 ++ nixos/modules/module-list.nix | 2 +- nixos/modules/rename.nix | 1 + .../{rtsp-simple-server.nix => mediamtx.nix} | 32 +++++++++---------- .../default.nix | 4 +-- pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 2 +- 8 files changed, 25 insertions(+), 21 deletions(-) rename nixos/modules/services/video/{rtsp-simple-server.nix => mediamtx.nix} (58%) rename pkgs/servers/{rtsp-simple-server => mediamtx}/default.nix (85%) diff --git a/nixos/doc/manual/release-notes/rl-2205.section.md b/nixos/doc/manual/release-notes/rl-2205.section.md index dce3b3590032..e73be3773c9d 100644 --- a/nixos/doc/manual/release-notes/rl-2205.section.md +++ b/nixos/doc/manual/release-notes/rl-2205.section.md @@ -147,7 +147,7 @@ In addition to numerous new and upgraded packages, this release has the followin - [rstudio-server](https://www.rstudio.com/products/rstudio/#rstudio-server), a browser-based version of the RStudio IDE for the R programming language. Available as [services.rstudio-server](#opt-services.rstudio-server.enable). -- [rtsp-simple-server](https://github.com/aler9/rtsp-simple-server), ready-to-use RTSP / RTMP / HLS server and proxy that allows to read, publish and proxy video and audio streams. Available as [services.rtsp-simple-server](#opt-services.rtsp-simple-server.enable). +- [mediamtx](https://github.com/aler9/mediamtx), ready-to-use RTSP / RTMP / HLS server and proxy that allows to read, publish and proxy video and audio streams. Available as [services.mediamtx](#opt-services.mediamtx.enable). - [Snipe-IT](https://snipeitapp.com), a free open source IT asset/license management system. Available as [services.snipe-it](#opt-services.snipe-it.enable). diff --git a/nixos/doc/manual/release-notes/rl-2305.section.md b/nixos/doc/manual/release-notes/rl-2305.section.md index d994b6535fae..bff854ebccad 100644 --- a/nixos/doc/manual/release-notes/rl-2305.section.md +++ b/nixos/doc/manual/release-notes/rl-2305.section.md @@ -384,6 +384,8 @@ In addition to numerous new and upgraded packages, this release has the followin - The `unifi-poller` package and corresponding NixOS module have been renamed to `unpoller` to match upstream. +- The `rtsp-simple-server` package and corresponding NixOS module have been renamed to `mediamtx` to match upstream. + - The new option `services.tailscale.useRoutingFeatures` controls various settings for using Tailscale features like exit nodes and subnet routers. If you wish to use your machine as an exit node, you can set this setting to `server`, otherwise if you wish to use an exit node you can set this setting to `client`. The strict RPF warning has been removed as the RPF will be loosened automatically based on the value of this setting. - `openjdk` from version 11 and above is not build with `openjfx` (i.e.: JavaFX) support by default anymore. You can re-enable it by overriding, e.g.: `openjdk11.override { enableJavaFX = true; };`. diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index f218df989a41..8ec5eecd4ce5 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -1130,7 +1130,7 @@ ./services/video/epgstation/default.nix ./services/video/mirakurun.nix ./services/video/replay-sorcery.nix - ./services/video/rtsp-simple-server.nix + ./services/video/mediamtx.nix ./services/video/unifi-video.nix ./services/video/v4l2-relayd.nix ./services/wayland/cage.nix diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix index 158c7934195b..85ff56abcb0f 100644 --- a/nixos/modules/rename.nix +++ b/nixos/modules/rename.nix @@ -106,6 +106,7 @@ with lib; (mkRemovedOptionModule [ "services" "openfire" ] "The corresponding package was removed from nixpkgs.") (mkRemovedOptionModule [ "services" "riak" ] "The corresponding package was removed from nixpkgs.") (mkRemovedOptionModule [ "services" "cryptpad" ] "The corresponding package was removed from nixpkgs.") + (mkRemovedOptionModule [ "services" "rtsp-simple-server" ] "Package has been completely rebranded by upstream as mediamtx, and thus the service and the package were renamed in NixOS as well.") (mkRemovedOptionModule [ "i18n" "inputMethod" "fcitx" ] "The fcitx module has been removed. Plesae use fcitx5 instead") diff --git a/nixos/modules/services/video/rtsp-simple-server.nix b/nixos/modules/services/video/mediamtx.nix similarity index 58% rename from nixos/modules/services/video/rtsp-simple-server.nix rename to nixos/modules/services/video/mediamtx.nix index 2dd62edab787..18a9e3d5fe30 100644 --- a/nixos/modules/services/video/rtsp-simple-server.nix +++ b/nixos/modules/services/video/mediamtx.nix @@ -3,19 +3,19 @@ with lib; let - cfg = config.services.rtsp-simple-server; - package = pkgs.rtsp-simple-server; + cfg = config.services.mediamtx; + package = pkgs.mediamtx; format = pkgs.formats.yaml {}; in { options = { - services.rtsp-simple-server = { - enable = mkEnableOption (lib.mdDoc "RTSP Simple Server"); + services.mediamtx = { + enable = mkEnableOption (lib.mdDoc "MediaMTX"); settings = mkOption { description = lib.mdDoc '' - Settings for rtsp-simple-server. - Read more at + Settings for MediaMTX. + Read more at ''; type = format.type; @@ -25,7 +25,7 @@ in "stdout" ]; # we set this so when the user uses it, it just works (see LogsDirectory below). but it's not used by default. - logFile = "/var/log/rtsp-simple-server/rtsp-simple-server.log"; + logFile = "/var/log/mediamtx/mediamtx.log"; }; example = { @@ -40,20 +40,20 @@ in env = mkOption { type = with types; attrsOf anything; - description = lib.mdDoc "Extra environment variables for RTSP Simple Server"; + description = lib.mdDoc "Extra environment variables for MediaMTX"; default = {}; example = { - RTSP_CONFKEY = "mykey"; + MTX_CONFKEY = "mykey"; }; }; }; }; config = mkIf (cfg.enable) { - # NOTE: rtsp-simple-server watches this file and automatically reloads if it changes - environment.etc."rtsp-simple-server.yaml".source = format.generate "rtsp-simple-server.yaml" cfg.settings; + # NOTE: mediamtx watches this file and automatically reloads if it changes + environment.etc."mediamtx.yaml".source = format.generate "mediamtx.yaml" cfg.settings; - systemd.services.rtsp-simple-server = { + systemd.services.mediamtx = { environment = cfg.env; after = [ "network.target" ]; @@ -65,15 +65,15 @@ in serviceConfig = { DynamicUser = true; - User = "rtsp-simple-server"; - Group = "rtsp-simple-server"; + User = "mediamtx"; + Group = "mediamtx"; - LogsDirectory = "rtsp-simple-server"; + LogsDirectory = "mediamtx"; # user likely may want to stream cameras, can't hurt to add video group SupplementaryGroups = "video"; - ExecStart = "${package}/bin/rtsp-simple-server /etc/rtsp-simple-server.yaml"; + ExecStart = "${package}/bin/mediamtx /etc/mediamtx.yaml"; }; }; }; diff --git a/pkgs/servers/rtsp-simple-server/default.nix b/pkgs/servers/mediamtx/default.nix similarity index 85% rename from pkgs/servers/rtsp-simple-server/default.nix rename to pkgs/servers/mediamtx/default.nix index a1a2f3e8065e..a420f95d2dc9 100644 --- a/pkgs/servers/rtsp-simple-server/default.nix +++ b/pkgs/servers/mediamtx/default.nix @@ -4,7 +4,7 @@ }: buildGoModule rec { - pname = "rtsp-simple-server"; + pname = "mediamtx"; version = "0.22.0"; src = fetchFromGitHub { @@ -20,7 +20,7 @@ buildGoModule rec { doCheck = false; ldflags = [ - "-X github.com/aler9/rtsp-simple-server/internal/core.version=v${version}" + "-X github.com/aler9/mediamtx/internal/core.version=v${version}" ]; meta = with lib; { diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 1cbf0e22fad7..258538c98c33 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -1419,6 +1419,7 @@ mapAliases ({ rssglx = throw "'rssglx' has been renamed to/replaced by 'rss-glx'"; # Converted to throw 2022-02-22 rssh = throw "rssh has been removed from nixpkgs: no upstream releases since 2012, several known CVEs"; # Added 2020-08-25 rtv = throw "rtv was archived by upstream. Consider using tuir, an actively maintained fork"; # Added 2021-08-08 + rtsp-simple-server = throw "rtsp-simple-server is rebranded as mediamtx, including default config path update"; # Added 2023-04-11 rubyMinimal = throw "rubyMinimal was removed due to being unused"; runCommandNoCC = runCommand; runCommandNoCCLocal = runCommandLocal; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 205dd6a92086..29222694eccb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -27144,7 +27144,7 @@ with pkgs; rojo = callPackage ../development/tools/rojo { }; - rtsp-simple-server = callPackage ../servers/rtsp-simple-server { }; + mediamtx = callPackage ../servers/mediamtx { }; rtkit = callPackage ../os-specific/linux/rtkit { }; From 197ed8e75df56e5bb9776cda3c04c72a8c939a66 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Wed, 12 Apr 2023 12:21:03 +0300 Subject: [PATCH 3/3] mediamtx: Remove doronbehar from maintenance. --- pkgs/servers/mediamtx/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/servers/mediamtx/default.nix b/pkgs/servers/mediamtx/default.nix index a420f95d2dc9..02d935615675 100644 --- a/pkgs/servers/mediamtx/default.nix +++ b/pkgs/servers/mediamtx/default.nix @@ -29,7 +29,7 @@ buildGoModule rec { ; inherit (src.meta) homepage; license = licenses.mit; - maintainers = with maintainers; [ doronbehar ]; + maintainers = with maintainers; [ ]; }; }