2019-07-08 14:49:41 +02:00
|
|
|
{ stdenv
|
|
|
|
, fetchFromGitLab
|
2020-08-02 13:27:05 +02:00
|
|
|
, fetchpatch
|
2019-07-08 14:49:41 +02:00
|
|
|
, meson
|
|
|
|
, ninja
|
2020-07-16 11:20:57 +02:00
|
|
|
, pkg-config
|
|
|
|
, python3Packages
|
2019-07-08 14:49:41 +02:00
|
|
|
, vulkan-headers
|
|
|
|
, vulkan-loader
|
|
|
|
, shaderc
|
|
|
|
, glslang
|
|
|
|
, lcms2
|
2020-07-16 11:20:57 +02:00
|
|
|
, epoxy
|
2019-07-08 14:49:41 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libplacebo";
|
2020-07-16 11:20:57 +02:00
|
|
|
version = "2.72.0";
|
2019-07-08 14:49:41 +02:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "code.videolan.org";
|
|
|
|
owner = "videolan";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2020-07-16 11:20:57 +02:00
|
|
|
sha256 = "1yhf9xyxdawbihsx89dpjlac800wrmpwx63rphad2nj225y9q40f";
|
2019-07-08 14:49:41 +02:00
|
|
|
};
|
|
|
|
|
2020-08-02 13:27:05 +02:00
|
|
|
patches = [
|
|
|
|
# to work with latest glslang, remove on release >2.72.0
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://code.videolan.org/videolan/libplacebo/-/commit/523056828ab86c2f17ea65f432424d48b6fdd389.patch";
|
|
|
|
sha256 = "051vhd0l3yad1fzn5zayi08kqs9an9j8p7m63kgqyfv1ksnydpcs";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2019-07-08 14:49:41 +02:00
|
|
|
nativeBuildInputs = [
|
|
|
|
meson
|
|
|
|
ninja
|
2020-07-16 11:20:57 +02:00
|
|
|
pkg-config
|
|
|
|
python3Packages.Mako
|
2019-07-08 14:49:41 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
vulkan-headers
|
|
|
|
vulkan-loader
|
|
|
|
shaderc
|
|
|
|
glslang
|
|
|
|
lcms2
|
2020-07-16 11:20:57 +02:00
|
|
|
epoxy
|
|
|
|
];
|
|
|
|
|
|
|
|
mesonFlags = [
|
|
|
|
"-Dvulkan-registry=${vulkan-headers}/share/vulkan/registry/vk.xml"
|
2019-07-08 14:49:41 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Reusable library for GPU-accelerated video/image rendering primitives";
|
2020-07-16 11:20:57 +02: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).
|
|
|
|
'';
|
2019-07-08 14:49:41 +02:00
|
|
|
homepage = "https://code.videolan.org/videolan/libplacebo";
|
2020-07-16 11:20:57 +02:00
|
|
|
changelog = "https://code.videolan.org/videolan/libplacebo/-/tags/v${version}";
|
2019-07-08 14:49:41 +02:00
|
|
|
license = licenses.lgpl21Plus;
|
2020-07-16 11:20:57 +02:00
|
|
|
maintainers = with maintainers; [ primeos tadeokondrak ];
|
2019-07-08 14:49:41 +02:00
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|