From c0c8a3671623b66cd605697d8abd408877b55d68 Mon Sep 17 00:00:00 2001 From: Kira Bruneau Date: Sat, 13 Jul 2024 14:41:29 -0400 Subject: [PATCH] replay-sorcery: remove as it is unmaintained upstream --- .../manual/release-notes/rl-2411.section.md | 2 + nixos/modules/module-list.nix | 1 - nixos/modules/rename.nix | 1 + .../modules/services/video/replay-sorcery.nix | 72 ------------------- pkgs/tools/video/replay-sorcery/default.nix | 63 ---------------- .../replay-sorcery/fix-global-config.patch | 13 ---- .../replay-sorcery/hardcode-libnotify.patch | 25 ------- pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 2 - 9 files changed, 4 insertions(+), 176 deletions(-) delete mode 100644 nixos/modules/services/video/replay-sorcery.nix delete mode 100644 pkgs/tools/video/replay-sorcery/default.nix delete mode 100644 pkgs/tools/video/replay-sorcery/fix-global-config.patch delete mode 100644 pkgs/tools/video/replay-sorcery/hardcode-libnotify.patch diff --git a/nixos/doc/manual/release-notes/rl-2411.section.md b/nixos/doc/manual/release-notes/rl-2411.section.md index 7e1127ba6cb1..cf0f3496f465 100644 --- a/nixos/doc/manual/release-notes/rl-2411.section.md +++ b/nixos/doc/manual/release-notes/rl-2411.section.md @@ -171,6 +171,8 @@ - `gitlab` has been updated from 16.x to 17.x and requires at least `postgresql` 14.9, as stated in the [documentation](https://docs.gitlab.com/17.1/ee/install/requirements.html#postgresql-requirements). Check the [upgrade guide](#module-services-postgres-upgrading) in the NixOS manual on how to upgrade your PostgreSQL installation. +- The `replay-sorcery` package and module was removed as it unmaintained upstream. Consider using `gpu-screen-recorder` or `obs-studio` instead. + - `zx` was updated to v8, which introduces several breaking changes. See the [v8 changelog](https://github.com/google/zx/releases/tag/8.0.0) for more information. diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 31e592d5d9fe..a72a9982707c 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -1345,7 +1345,6 @@ ./services/video/frigate.nix ./services/video/mirakurun.nix ./services/video/photonvision.nix - ./services/video/replay-sorcery.nix ./services/video/mediamtx.nix ./services/video/unifi-video.nix ./services/video/v4l2-relayd.nix diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix index a4c0f0d5c25e..b6cc6cd9929c 100644 --- a/nixos/modules/rename.nix +++ b/nixos/modules/rename.nix @@ -85,6 +85,7 @@ in '') (mkRemovedOptionModule [ "services" "quagga" ] "the corresponding package has been removed from nixpkgs") (mkRemovedOptionModule [ "services" "railcar" ] "the corresponding package has been removed from nixpkgs") + (mkRemovedOptionModule [ "services" "replay-sorcery" ] "the corresponding package has been removed from nixpkgs as it is unmaintained upstream. Consider using `gpu-screen-recorder` or `obs-studio` instead.") (mkRemovedOptionModule [ "services" "seeks" ] "") (mkRemovedOptionModule [ "services" "ssmtp" ] '' The ssmtp package and the corresponding module have been removed due to diff --git a/nixos/modules/services/video/replay-sorcery.nix b/nixos/modules/services/video/replay-sorcery.nix deleted file mode 100644 index abe7202a4a86..000000000000 --- a/nixos/modules/services/video/replay-sorcery.nix +++ /dev/null @@ -1,72 +0,0 @@ -{ config, lib, pkgs, ... }: - -with lib; - -let - cfg = config.services.replay-sorcery; - configFile = generators.toKeyValue {} cfg.settings; -in -{ - options = with types; { - services.replay-sorcery = { - enable = mkEnableOption "the ReplaySorcery service for instant-replays"; - - enableSysAdminCapability = mkEnableOption '' - the system admin capability to support hardware accelerated - video capture. This is equivalent to running ReplaySorcery as - root, so use with caution''; - - autoStart = mkOption { - type = bool; - default = false; - description = "Automatically start ReplaySorcery when graphical-session.target starts."; - }; - - settings = mkOption { - type = attrsOf (oneOf [ str int ]); - default = {}; - description = "System-wide configuration for ReplaySorcery (/etc/replay-sorcery.conf)."; - example = literalExpression '' - { - videoInput = "hwaccel"; # requires `services.replay-sorcery.enableSysAdminCapability = true` - videoFramerate = 60; - } - ''; - }; - }; - }; - - config = mkIf cfg.enable { - environment = { - systemPackages = [ pkgs.replay-sorcery ]; - etc."replay-sorcery.conf".text = configFile; - }; - - security.wrappers = mkIf cfg.enableSysAdminCapability { - replay-sorcery = { - owner = "root"; - group = "root"; - capabilities = "cap_sys_admin+ep"; - source = "${pkgs.replay-sorcery}/bin/replay-sorcery"; - }; - }; - - systemd = { - packages = [ pkgs.replay-sorcery ]; - user.services.replay-sorcery = { - wantedBy = mkIf cfg.autoStart [ "graphical-session.target" ]; - partOf = mkIf cfg.autoStart [ "graphical-session.target" ]; - serviceConfig = { - ExecStart = mkIf cfg.enableSysAdminCapability [ - "" # Tell systemd to clear the existing ExecStart list, to prevent appending to it. - "${config.security.wrapperDir}/replay-sorcery" - ]; - }; - }; - }; - }; - - meta = { - maintainers = with maintainers; [ kira-bruneau ]; - }; -} diff --git a/pkgs/tools/video/replay-sorcery/default.nix b/pkgs/tools/video/replay-sorcery/default.nix deleted file mode 100644 index 151ceda8b73c..000000000000 --- a/pkgs/tools/video/replay-sorcery/default.nix +++ /dev/null @@ -1,63 +0,0 @@ -{ lib -, stdenv -, fetchFromGitHub -, substituteAll -, cmake -, pkg-config -, ffmpeg -, libX11 -, drmSupport ? true, libdrm -, notifySupport ? true, libnotify -, pulseaudioSupport ? true, libpulseaudio -}: - -stdenv.mkDerivation rec { - pname = "replay-sorcery"; - version = "0.5.0"; - - src = fetchFromGitHub { - owner = "matanui159"; - repo = "ReplaySorcery"; - rev = version; - fetchSubmodules = true; - hash = "sha256-HPkSOwfwcg4jLUzKfqdXgLu7mgD5H4wb9d2BrqWQeHc="; - }; - - patches = [ - # Use global config generated by NixOS (/etc/replay-sorcery.conf) - # instead of $out/etc/replay-sorcery.conf. - ./fix-global-config.patch - ] ++ lib.optional notifySupport (substituteAll { - # Patch in libnotify if support is enabled. Can't use makeWrapper - # since it would break the security wrapper in the NixOS module. - src = ./hardcode-libnotify.patch; - inherit libnotify; - }); - - nativeBuildInputs = [ - cmake - pkg-config - ]; - - buildInputs = [ ffmpeg libX11 ] - ++ lib.optional drmSupport libdrm - ++ lib.optional pulseaudioSupport libpulseaudio; - - cmakeFlags = [ - "-DRS_SYSTEMD_DIR=${placeholder "out"}/lib/systemd/user" - - # SETUID & SETGID permissions required for hardware accelerated - # video capture can't be set during the build. Use the NixOS - # module if you want hardware accelerated video capture. - "-DRS_SETID=OFF" - ]; - - meta = with lib; { - description = "Open-source, instant-replay solution for Linux"; - homepage = "https://github.com/matanui159/ReplaySorcery"; - license = licenses.gpl3Plus; - maintainers = with maintainers; [ kira-bruneau ]; - platforms = platforms.linux; - mainProgram = "replay-sorcery"; - }; -} diff --git a/pkgs/tools/video/replay-sorcery/fix-global-config.patch b/pkgs/tools/video/replay-sorcery/fix-global-config.patch deleted file mode 100644 index 4f30e2875cf7..000000000000 --- a/pkgs/tools/video/replay-sorcery/fix-global-config.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/rsbuild.h.in b/src/rsbuild.h.in -index ff0a0f6..5529556 100644 ---- a/src/rsbuild.h.in -+++ b/src/rsbuild.h.in -@@ -20,7 +20,7 @@ - #ifndef RS_BUILD_H - #define RS_BUILD_H - --#define RS_BUILD_GLOBAL_CONFIG "@CMAKE_INSTALL_PREFIX@/etc/replay-sorcery.conf" -+#define RS_BUILD_GLOBAL_CONFIG "/etc/replay-sorcery.conf" - #define RS_BUILD_LOCAL_CONFIG "%s/.config/replay-sorcery.conf" - - #cmakedefine RS_BUILD_PTHREAD_FOUND diff --git a/pkgs/tools/video/replay-sorcery/hardcode-libnotify.patch b/pkgs/tools/video/replay-sorcery/hardcode-libnotify.patch deleted file mode 100644 index 8ff42bec92fa..000000000000 --- a/pkgs/tools/video/replay-sorcery/hardcode-libnotify.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff --git a/src/config.c b/src/config.c -index 3af7455..12cb6b5 100644 ---- a/src/config.c -+++ b/src/config.c -@@ -129,7 +129,7 @@ static const AVOption configOptions[] = { - CONFIG_CONST(alt, RS_CONFIG_KEYMOD_ALT, keyMods), - CONFIG_CONST(super, RS_CONFIG_KEYMOD_SUPER, keyMods), - CONFIG_STRING(outputFile, "~/Videos/ReplaySorcery_%F_%H-%M-%S.mp4"), -- CONFIG_STRING(outputCommand, "notify-send " RS_NAME " \"Saved replay as %s\""), -+ CONFIG_STRING(outputCommand, "@libnotify@/bin/notify-send " RS_NAME " \"Saved replay as %s\""), - {NULL}}; - - static const AVClass configClass = { -diff --git a/sys/replay-sorcery.conf b/sys/replay-sorcery.conf -index 5cd0aa6..c600e7f 100644 ---- a/sys/replay-sorcery.conf -+++ b/sys/replay-sorcery.conf -@@ -123,5 +123,5 @@ outputFile = ~/Videos/ReplaySorcery_%F_%H-%M-%S.mp4 - - # A command to run when a video is successfully saved - # Possible values: a printf formatted command --# Default value: notify-send ReplaySorcery "Saved replay as %s" --outputCommand = notify-send ReplaySorcery "Saved replay as %s" -+# Default value: @libnotify@/bin/notify-send ReplaySorcery "Saved replay as %s" -+outputCommand = @libnotify@/bin/notify-send ReplaySorcery "Saved replay as %s" diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index d1a1bae4e9c3..2fa2620280b9 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -1206,6 +1206,7 @@ mapAliases ({ redocly-cli = redocly; # Added 2024-04-14 redpanda = redpanda-client; # Added 2023-10-14 redpanda-server = throw "'redpanda-server' has been removed because it was broken for a long time"; # Added 2024-06-10 + replay-sorcery = throw "replay-sorcery has been removed as it is unmaintained upstream. Consider using gpu-screen-recorder or obs-studio instead."; # Added 2024-07-13 restinio_0_6 = throw "restinio_0_6 has been removed from nixpkgs as it's not needed by downstream packages"; # Added 2024-07-04 restya-board = throw "'restya-board' has been removed from nixpkgs, as it was broken and unmaintained"; # Added 2024-01-22 retdec-full = throw "'retdec-full' is no longer needed, please use 'retdec'"; # Added 2024-02-05 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3e631b0ffbeb..aea228e512b6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6180,8 +6180,6 @@ with pkgs; razergenie = libsForQt5.callPackage ../applications/misc/razergenie { }; - replay-sorcery = callPackage ../tools/video/replay-sorcery { }; - recyclarr = callPackage ../tools/video/recyclarr { }; tsduck = callPackage ../tools/video/tsduck { };