nixpkgs/pkgs/applications/video/obs-studio/plugins/obs-vkcapture.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

60 lines
1.4 KiB
Nix
Raw Normal View History

2022-04-23 01:55:01 +01:00
{ lib
, stdenv
, fetchFromGitHub
, cmake
, extra-cmake-modules
2022-04-23 01:55:01 +01:00
, ninja
, wayland
, wayland-scanner
2022-04-23 01:55:01 +01:00
, obs-studio
, libX11
, vulkan-headers
, vulkan-loader
, libGL
, obs-vkcapture32
2022-04-23 01:55:01 +01:00
}:
stdenv.mkDerivation rec {
pname = "obs-vkcapture";
2023-01-20 23:56:10 +00:00
version = "1.3.0";
2022-04-23 01:55:01 +01:00
src = fetchFromGitHub {
owner = "nowrep";
repo = pname;
rev = "v${version}";
2023-01-20 23:56:10 +00:00
hash = "sha256-xtIcIT9lWw73Et9WgyEUznwy1X947Rv5nTiM+t0qYaM=";
2022-04-23 01:55:01 +01:00
};
cmakeFlags = lib.optionals stdenv.isi686 [
# We don't want to build the plugin for 32bit. The library integrates with
# the 64bit plugin but it's necessary to be loaded into 32bit games.
"-DBUILD_PLUGIN=OFF"
];
nativeBuildInputs = [ cmake extra-cmake-modules ninja wayland-scanner ];
buildInputs = [
libGL
libX11
vulkan-headers
vulkan-loader
wayland
]
++ lib.optionals (!stdenv.isi686) [
obs-studio
];
# Support 32bit Vulkan applications by linking in the 32bit Vulkan layer
postInstall = lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") ''
ln -s ${obs-vkcapture32}/share/vulkan/implicit_layer.d/obs_vkcapture_32.json \
"$out/share/vulkan/implicit_layer.d/"
'';
2022-04-23 01:55:01 +01:00
meta = with lib; {
description = "OBS Linux Vulkan/OpenGL game capture";
homepage = "https://github.com/nowrep/obs-vkcapture";
maintainers = with maintainers; [ atila pedrohlc ];
2022-04-23 01:55:01 +01:00
license = licenses.gpl2Only;
2022-07-21 13:30:13 +01:00
platforms = platforms.linux;
2022-04-23 01:55:01 +01:00
};
}