feat: add obs with obs-ndi

This commit is contained in:
Ashhhleyyy 2023-10-31 13:35:21 +00:00
parent 3ddb041508
commit 8161724ea5
Signed by: ash
GPG key ID: 83B789081A0878FB
2 changed files with 41 additions and 0 deletions

View file

@ -35,6 +35,35 @@
overlays = [ overlays = [
fsh.overlays.default fsh.overlays.default
vscode-extensions.overlays.default vscode-extensions.overlays.default
(final: prev: {
ndi = prev.ndi.overrideAttrs (self: super: {
version = "5.5.4";
src = prev.pkgs.requireFile rec {
name = "${self.installerName}.tar.gz";
sha256 = "sha256:7e5c54693d6aee6b6f1d6d49f48d4effd7281abd216d9ff601be2d55af12f7f5";
message = self.installerName;
};
unpackPhase = "unpackFile \${src}\necho y | ./${self.installerName}.sh\nsourceRoot=\"NDI SDK for Linux\";\n";
installPhase = ''
mkdir $out
mv bin/x86_64-linux-gnu $out/bin
for i in $out/bin/*; do
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$i"
done
patchelf --set-rpath "${prev.avahi}/lib:${prev.stdenv.cc.libc}/lib" $out/bin/ndi-record
mv lib/x86_64-linux-gnu $out/lib
for i in $out/lib/*; do
if [ -L "$i" ]; then continue; fi
patchelf --set-rpath "${prev.avahi}/lib:${prev.stdenv.cc.libc}/lib" "$i"
done
mv include examples $out/
mkdir -p $out/share/doc/${self.pname}-${self.version}
mv licenses $out/share/doc/${self.pname}-${self.version}/licenses
mv documentation/* $out/share/doc/${self.pname}-${self.version}/
'';
}
);
})
]; ];
overlays-module = ({ nixpkgs, ... }: { overlays-module = ({ nixpkgs, ... }: {
nixpkgs.overlays = overlays; nixpkgs.overlays = overlays;
@ -76,6 +105,7 @@
./home/ash ./home/ash
./home/ash/alex.nix ./home/ash/alex.nix
./home/ash/desktop.nix ./home/ash/desktop.nix
./home/ash/obs.nix
./home/ash/tpm-fido.nix ./home/ash/tpm-fido.nix
./home/ash/vscodium.nix ./home/ash/vscodium.nix
]; ];

11
home/ash/obs.nix Normal file
View file

@ -0,0 +1,11 @@
{ config, pkgs, ... }: {
programs.obs-studio = {
enable = true;
plugins = with pkgs.obs-studio-plugins; [
wlrobs
obs-backgroundremoval
obs-pipewire-audio-capture
obs-ndi
];
};
}