2023-04-12 12:48:02 +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
|
|
|
|
|
, lcms2
|
2021-01-09 10:05:03 +00:00
|
|
|
|
, libGL
|
|
|
|
|
, xorg
|
2022-01-19 23:45:15 +00:00
|
|
|
|
, libunwind
|
2023-04-12 12:48:02 +00:00
|
|
|
|
, libdovi
|
2020-04-24 23:36:52 +00:00
|
|
|
|
}:
|
|
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
|
pname = "libplacebo";
|
2023-04-12 12:48:02 +00:00
|
|
|
|
version = "5.264.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
|
domain = "code.videolan.org";
|
|
|
|
|
owner = "videolan";
|
|
|
|
|
repo = pname;
|
|
|
|
|
rev = "v${version}";
|
2023-04-12 12:48:02 +00:00
|
|
|
|
hash = "sha256-YEefuEfJURi5/wswQKskA/J1UGzessQQkBpltJ0Spq8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
|
meson
|
|
|
|
|
ninja
|
2020-07-18 16:06:22 +00:00
|
|
|
|
pkg-config
|
2023-04-12 12:48:02 +00:00
|
|
|
|
vulkan-headers
|
|
|
|
|
python3Packages.jinja2
|
|
|
|
|
python3Packages.glad2
|
2020-04-24 23:36:52 +00:00
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
|
vulkan-loader
|
|
|
|
|
shaderc
|
|
|
|
|
lcms2
|
2021-01-09 10:05:03 +00:00
|
|
|
|
libGL
|
|
|
|
|
xorg.libX11
|
2022-01-19 23:45:15 +00:00
|
|
|
|
libunwind
|
2023-04-12 12:48:02 +00:00
|
|
|
|
libdovi
|
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
|
2023-01-11 07:51:40 +00:00
|
|
|
|
"-Dglslang=disabled" # rely on shaderc for GLSL compilation instead
|
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
|
|
|
|
];
|
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
|
postPatch = ''
|
|
|
|
|
substituteInPlace meson.build \
|
|
|
|
|
--replace 'python_env.append' '#'
|
|
|
|
|
'';
|
|
|
|
|
|
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;
|
|
|
|
|
};
|
|
|
|
|
}
|