From 4d1c96e59b6f46a9538fa49f586049850f1f4110 Mon Sep 17 00:00:00 2001 From: Philipp Schmitt Date: Tue, 29 Aug 2023 20:40:02 +0200 Subject: [PATCH 1/2] libcaption: init at 0.7 --- .../libraries/libcaption/default.nix | 30 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 32 insertions(+) create mode 100644 pkgs/development/libraries/libcaption/default.nix diff --git a/pkgs/development/libraries/libcaption/default.nix b/pkgs/development/libraries/libcaption/default.nix new file mode 100644 index 000000000000..78cf5214051d --- /dev/null +++ b/pkgs/development/libraries/libcaption/default.nix @@ -0,0 +1,30 @@ +{ stdenv +, lib +, fetchFromGitHub +, cmake +, re2c +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "libcaption"; + version = "0.7"; + + src = fetchFromGitHub { + owner = "szatmary"; + repo = "libcaption"; + rev = finalAttrs.version; + sha256 = "sha256-OBtxoFJF0cxC+kfSK8TIKIdLkmCh5WOJlI0fejnisJo="; + fetchSubmodules = true; + }; + + nativeBuildInputs = [ cmake ]; + buildInputs = [ re2c ]; + + meta = with lib; { + description = "Free open-source CEA608 / CEA708 closed-caption encoder/decoder"; + homepage = "https://github.com/szatmary/libcaption"; + license = licenses.mit; + platforms = platforms.all; + maintainers = with maintainers; [ pschmitt ]; + }; +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1cd7fcd65596..1bc7188d2c8d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -22590,6 +22590,8 @@ with pkgs; then pkgs.libcanberra else pkgs.libcanberra-gtk2; + libcaption = callPackage ../development/libraries/libcaption { }; + libcbor = callPackage ../development/libraries/libcbor { }; libccd = callPackage ../development/libraries/libccd { }; From 049871afaf583f984d1440f64620757c6ad87c8d Mon Sep 17 00:00:00 2001 From: Philipp Schmitt Date: Tue, 29 Aug 2023 20:41:45 +0200 Subject: [PATCH 2/2] obs-studio-plugins.obs-replay-source: init at 1.6.12 --- .../video/obs-studio/plugins/default.nix | 2 + .../obs-studio/plugins/obs-replay-source.nix | 40 +++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 pkgs/applications/video/obs-studio/plugins/obs-replay-source.nix diff --git a/pkgs/applications/video/obs-studio/plugins/default.nix b/pkgs/applications/video/obs-studio/plugins/default.nix index 63bad0fe6459..d3d1ceb2de6e 100644 --- a/pkgs/applications/video/obs-studio/plugins/default.nix +++ b/pkgs/applications/video/obs-studio/plugins/default.nix @@ -42,6 +42,8 @@ obs-pipewire-audio-capture = callPackage ./obs-pipewire-audio-capture.nix { }; + obs-replay-source = qt6Packages.callPackage ./obs-replay-source.nix { }; + obs-rgb-levels-filter = callPackage ./obs-rgb-levels-filter.nix { }; obs-scale-to-sound = callPackage ./obs-scale-to-sound.nix { }; diff --git a/pkgs/applications/video/obs-studio/plugins/obs-replay-source.nix b/pkgs/applications/video/obs-studio/plugins/obs-replay-source.nix new file mode 100644 index 000000000000..994a56d4c86d --- /dev/null +++ b/pkgs/applications/video/obs-studio/plugins/obs-replay-source.nix @@ -0,0 +1,40 @@ +{ stdenv +, lib +, fetchFromGitHub +, cmake +, libcaption +, obs-studio +, qtbase +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "obs-replay-source"; + version = "1.6.12"; + + src = fetchFromGitHub { + owner = "exeldro"; + repo = "obs-replay-source"; + rev = finalAttrs.version; + sha256 = "sha256-MzugH6r/jY5Kg7GIR8/o1BN36FenBzMnqrPUceJmbPs="; + }; + + nativeBuildInputs = [ cmake ]; + buildInputs = [ libcaption obs-studio qtbase ]; + + postInstall = '' + mkdir -p "$out/lib" "$out/share" + mv "$out/obs-plugins/64bit" "$out/lib/obs-plugins" + rm -rf "$out/obs-plugins" + mv "$out/data" "$out/share/obs" + ''; + + dontWrapQtApps = true; + + meta = with lib; { + description = "Replay source for OBS studio"; + homepage = "https://github.com/exeldro/obs-replay-source"; + license = licenses.gpl2Only; + platforms = platforms.linux; + maintainers = with maintainers; [ pschmitt ]; + }; +})