2021-02-05 17:12:51 +00:00
|
|
|
|
{ lib, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
|
, fetchFromGitLab
|
|
|
|
|
, meson
|
|
|
|
|
, ninja
|
2020-07-18 16:06:22 +00:00
|
|
|
|
, pkg-config
|
|
|
|
|
, python3Packages
|
2020-04-24 23:36:52 +00:00
|
|
|
|
, vulkan-headers
|
|
|
|
|
, vulkan-loader
|
|
|
|
|
, shaderc
|
|
|
|
|
, glslang
|
|
|
|
|
, lcms2
|
2021-12-06 16:07:01 +00:00
|
|
|
|
, libepoxy
|
2021-01-09 10:05:03 +00:00
|
|
|
|
, libGL
|
|
|
|
|
, xorg
|
2022-01-19 23:45:15 +00:00
|
|
|
|
, libunwind
|
2020-04-24 23:36:52 +00:00
|
|
|
|
}:
|
|
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
|
pname = "libplacebo";
|
2022-07-18 16:21:45 +00:00
|
|
|
|
version = "4.208.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
|
domain = "code.videolan.org";
|
|
|
|
|
owner = "videolan";
|
|
|
|
|
repo = pname;
|
|
|
|
|
rev = "v${version}";
|
2022-07-18 16:21:45 +00:00
|
|
|
|
sha256 = "161dp5781s74ca3gglaxlmchx7glyshf0wg43w98pl22n1jcm5qk";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
|
meson
|
|
|
|
|
ninja
|
2020-07-18 16:06:22 +00:00
|
|
|
|
pkg-config
|
|
|
|
|
python3Packages.Mako
|
2020-04-24 23:36:52 +00:00
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
|
vulkan-headers
|
|
|
|
|
vulkan-loader
|
|
|
|
|
shaderc
|
|
|
|
|
glslang
|
|
|
|
|
lcms2
|
2021-12-06 16:07:01 +00:00
|
|
|
|
libepoxy
|
2021-01-09 10:05:03 +00:00
|
|
|
|
libGL
|
|
|
|
|
xorg.libX11
|
2022-01-19 23:45:15 +00:00
|
|
|
|
libunwind
|
2020-07-18 16:06:22 +00:00
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
mesonFlags = [
|
|
|
|
|
"-Dvulkan-registry=${vulkan-headers}/share/vulkan/registry/vk.xml"
|
2021-09-18 10:52:07 +00:00
|
|
|
|
"-Ddemos=false" # Don't build and install the demo programs
|
|
|
|
|
"-Dd3d11=disabled" # Disable the Direct3D 11 based renderer
|
2022-08-12 12:06:08 +00:00
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
|
"-Dunwind=disabled" # libplacebo doesn’t build with `darwin.libunwind`
|
2020-04-24 23:36:52 +00:00
|
|
|
|
];
|
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
|
description = "Reusable library for GPU-accelerated video/image rendering primitives";
|
2020-07-18 16:06:22 +00:00
|
|
|
|
longDescription = ''
|
|
|
|
|
Reusable library for GPU-accelerated image/view processing primitives and
|
|
|
|
|
shaders, as well a batteries-included, extensible, high-quality rendering
|
|
|
|
|
pipeline (similar to mpv's vo_gpu). Supports Vulkan, OpenGL and Metal (via
|
|
|
|
|
MoltenVK).
|
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
homepage = "https://code.videolan.org/videolan/libplacebo";
|
2020-07-18 16:06:22 +00:00
|
|
|
|
changelog = "https://code.videolan.org/videolan/libplacebo/-/tags/v${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
license = licenses.lgpl21Plus;
|
2020-07-18 16:06:22 +00:00
|
|
|
|
maintainers = with maintainers; [ primeos tadeokondrak ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
platforms = platforms.all;
|
|
|
|
|
};
|
|
|
|
|
}
|