replay-sorcery: init at 0.5.0
This commit is contained in:
parent
49eaf7eead
commit
30330899d3
56
pkgs/tools/video/replay-sorcery/default.nix
Normal file
56
pkgs/tools/video/replay-sorcery/default.nix
Normal file
|
@ -0,0 +1,56 @@
|
|||
{ 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;
|
||||
sha256 = "sha256-HPkSOwfwcg4jLUzKfqdXgLu7mgD5H4wb9d2BrqWQeHc=";
|
||||
};
|
||||
|
||||
# Patch in libnotify if support is enabled.
|
||||
patches = lib.optional notifySupport (substituteAll {
|
||||
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.
|
||||
"-DRS_SETID=OFF"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "An open-source, instant-replay solution for Linux";
|
||||
homepage = "https://github.com/matanui159/ReplaySorcery";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ kira-bruneau ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
25
pkgs/tools/video/replay-sorcery/hardcode-libnotify.patch
Normal file
25
pkgs/tools/video/replay-sorcery/hardcode-libnotify.patch
Normal file
|
@ -0,0 +1,25 @@
|
|||
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"
|
|
@ -3118,6 +3118,8 @@ in
|
|||
|
||||
razergenie = libsForQt5.callPackage ../applications/misc/razergenie { };
|
||||
|
||||
replay-sorcery = callPackage ../tools/video/replay-sorcery { };
|
||||
|
||||
ring-daemon = callPackage ../applications/networking/instant-messengers/ring-daemon { };
|
||||
|
||||
ripasso-cursive = callPackage ../tools/security/ripasso/cursive.nix {
|
||||
|
|
Loading…
Reference in a new issue