2022-04-23 00:55:01 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
2022-08-31 15:31:40 +00:00
|
|
|
, extra-cmake-modules
|
2022-04-23 00:55:01 +00:00
|
|
|
, ninja
|
|
|
|
, wayland
|
2022-08-31 15:31:40 +00:00
|
|
|
, wayland-scanner
|
2022-04-23 00:55:01 +00:00
|
|
|
, obs-studio
|
2023-04-12 22:35:04 +00:00
|
|
|
, libffi
|
2022-04-23 00:55:01 +00:00
|
|
|
, libX11
|
2023-04-12 22:35:04 +00:00
|
|
|
, libXau
|
|
|
|
, libXdmcp
|
2023-02-16 02:51:40 +00:00
|
|
|
, libxcb
|
2022-04-23 00:55:01 +00:00
|
|
|
, vulkan-headers
|
|
|
|
, vulkan-loader
|
|
|
|
, libGL
|
2022-08-29 11:57:18 +00:00
|
|
|
, obs-vkcapture32
|
2022-04-23 00:55:01 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "obs-vkcapture";
|
2023-04-12 22:35:04 +00:00
|
|
|
version = "1.3.2";
|
2022-04-23 00:55:01 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nowrep";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-04-12 22:35:04 +00:00
|
|
|
hash = "sha256-UQQ8oBEnOxmSN4ZyW4LdPZYvd5eB9EmdR0UvE1wgMZw=";
|
2022-04-23 00:55:01 +00:00
|
|
|
};
|
|
|
|
|
2022-08-29 11:57:18 +00: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"
|
|
|
|
];
|
|
|
|
|
2022-08-31 15:31:40 +00:00
|
|
|
nativeBuildInputs = [ cmake extra-cmake-modules ninja wayland-scanner ];
|
2022-08-29 11:57:18 +00:00
|
|
|
buildInputs = [
|
|
|
|
libGL
|
2023-04-12 22:35:04 +00:00
|
|
|
libffi
|
2022-08-29 11:57:18 +00:00
|
|
|
libX11
|
2023-04-12 22:35:04 +00:00
|
|
|
libXau
|
|
|
|
libXdmcp
|
2023-02-16 02:51:40 +00:00
|
|
|
libxcb
|
2022-08-29 11:57:18 +00:00
|
|
|
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 00:55:01 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "OBS Linux Vulkan/OpenGL game capture";
|
|
|
|
homepage = "https://github.com/nowrep/obs-vkcapture";
|
2022-08-25 13:16:02 +00:00
|
|
|
maintainers = with maintainers; [ atila pedrohlc ];
|
2022-04-23 00:55:01 +00:00
|
|
|
license = licenses.gpl2Only;
|
2022-07-21 12:30:13 +00:00
|
|
|
platforms = platforms.linux;
|
2022-04-23 00:55:01 +00:00
|
|
|
};
|
|
|
|
}
|