nixpkgs/pkgs/development/libraries/libplacebo/default.nix
Benjamin Saunders aca0d40720 libplacebo: remove redundant glslang dependency
src/glsl/meson.build says: "we only need one or the other, and shaderc
is preferred". Reduces fragility due to glslang updates.
2022-12-31 15:41:58 -08:00

71 lines
1.7 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ lib, stdenv
, fetchFromGitLab
, meson
, ninja
, pkg-config
, python3Packages
, vulkan-headers
, vulkan-loader
, shaderc
, lcms2
, libepoxy
, libGL
, xorg
, libunwind
}:
stdenv.mkDerivation rec {
pname = "libplacebo";
version = "4.208.0";
src = fetchFromGitLab {
domain = "code.videolan.org";
owner = "videolan";
repo = pname;
rev = "v${version}";
sha256 = "161dp5781s74ca3gglaxlmchx7glyshf0wg43w98pl22n1jcm5qk";
};
nativeBuildInputs = [
meson
ninja
pkg-config
python3Packages.Mako
];
buildInputs = [
vulkan-headers
vulkan-loader
shaderc
lcms2
libepoxy
libGL
xorg.libX11
libunwind
];
mesonFlags = [
"-Dvulkan-registry=${vulkan-headers}/share/vulkan/registry/vk.xml"
"-Ddemos=false" # Don't build and install the demo programs
"-Dd3d11=disabled" # Disable the Direct3D 11 based renderer
"-Dglslang=disabled" # rely on shaderc for GLSL compilation instead
] ++ lib.optionals stdenv.isDarwin [
"-Dunwind=disabled" # libplacebo doesnt build with `darwin.libunwind`
];
meta = with lib; {
description = "Reusable library for GPU-accelerated video/image rendering primitives";
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).
'';
homepage = "https://code.videolan.org/videolan/libplacebo";
changelog = "https://code.videolan.org/videolan/libplacebo/-/tags/v${version}";
license = licenses.lgpl21Plus;
maintainers = with maintainers; [ primeos tadeokondrak ];
platforms = platforms.all;
};
}