Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkgs/applications/video/vlc/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
, libmtp
, liboggz
, libopus
, libplacebo
, libplacebo_5
, libpulseaudio
, libraw1394
, librsvg
Expand Down Expand Up @@ -164,7 +164,7 @@ stdenv.mkDerivation (finalAttrs: {
libmtp
liboggz
libopus
libplacebo
libplacebo_5
libpulseaudio
libraw1394
librsvg
Expand Down
3 changes: 2 additions & 1 deletion pkgs/development/libraries/ffmpeg/generic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@
, libopenmpt
, libopus
, libplacebo
, libplacebo_5
, libpulseaudio
, libraw1394
, librsvg
Expand Down Expand Up @@ -577,7 +578,7 @@ stdenv.mkDerivation (finalAttrs: {
++ optionals withIconv [ libiconv ] # On Linux this should be in libc, do we really need it?
++ optionals withJack [ libjack2 ]
++ optionals withLadspa [ ladspaH ]
++ optionals withLibplacebo [ libplacebo vulkan-headers ]
++ optionals withLibplacebo [ (if (lib.versionAtLeast version "6.1") then libplacebo else libplacebo_5) vulkan-headers ]
++ optionals withLzma [ xz ]
++ optionals withMfx [ intel-media-sdk ]
++ optionals withModplug [ libmodplug ]
Expand Down
77 changes: 77 additions & 0 deletions pkgs/development/libraries/libplacebo/5.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{ lib
, stdenv
, fetchFromGitLab
, meson
, ninja
, pkg-config
, python3Packages
, vulkan-headers
, vulkan-loader
, shaderc
, lcms2
, libGL
, libX11
, libunwind
, libdovi
}:

stdenv.mkDerivation rec {
pname = "libplacebo";
version = "5.264.1";

src = fetchFromGitLab {
domain = "code.videolan.org";
owner = "videolan";
repo = pname;
rev = "v${version}";
hash = "sha256-YEefuEfJURi5/wswQKskA/J1UGzessQQkBpltJ0Spq8=";
};

nativeBuildInputs = [
meson
ninja
pkg-config
vulkan-headers
python3Packages.jinja2
python3Packages.glad2
];

buildInputs = [
vulkan-loader
shaderc
lcms2
libGL
libX11
libunwind
libdovi
];

mesonFlags = with lib; [
(mesonOption "vulkan-registry" "${vulkan-headers}/share/vulkan/registry/vk.xml")
(mesonBool "demos" false) # Don't build and install the demo programs
(mesonEnable "d3d11" false) # Disable the Direct3D 11 based renderer
(mesonEnable "glslang" false) # rely on shaderc for GLSL compilation instead
] ++ optionals stdenv.isDarwin [
(mesonEnable "unwind" false) # libplacebo doesn’t build with `darwin.libunwind`
];

postPatch = ''
substituteInPlace meson.build \
--replace 'python_env.append' '#'
'';

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;
};
}
24 changes: 13 additions & 11 deletions pkgs/development/libraries/libplacebo/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,22 @@
, shaderc
, lcms2
, libGL
, xorg
, libX11
, libunwind
, libdovi
, xxHash
}:

stdenv.mkDerivation rec {
pname = "libplacebo";
version = "5.264.1";
version = "6.338.1";

src = fetchFromGitLab {
domain = "code.videolan.org";
owner = "videolan";
repo = pname;
rev = "v${version}";
hash = "sha256-YEefuEfJURi5/wswQKskA/J1UGzessQQkBpltJ0Spq8=";
hash = "sha256-NZmwR3+lIC2PF+k+kqCjoMYkMM/PKOJmDwAq7t6YONY=";
};

nativeBuildInputs = [
Expand All @@ -41,18 +42,19 @@ stdenv.mkDerivation rec {
shaderc
lcms2
libGL
xorg.libX11
libX11
libunwind
libdovi
xxHash
];

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 doesn’t build with `darwin.libunwind`
mesonFlags = with lib; [
(mesonOption "vulkan-registry" "${vulkan-headers}/share/vulkan/registry/vk.xml")
(mesonBool "demos" false) # Don't build and install the demo programs
(mesonEnable "d3d11" false) # Disable the Direct3D 11 based renderer
(mesonEnable "glslang" false) # rely on shaderc for GLSL compilation instead
] ++ optionals stdenv.isDarwin [
(mesonEnable "unwind" false) # libplacebo doesn’t build with `darwin.libunwind`
];

postPatch = ''
Expand Down
1 change: 1 addition & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23418,6 +23418,7 @@ with pkgs;
inherit (darwin.apple_sdk.frameworks) Foundation;
};

libplacebo_5 = callPackage ../development/libraries/libplacebo/5.nix { };
libplacebo = callPackage ../development/libraries/libplacebo { };

libpng = callPackage ../development/libraries/libpng { };
Expand Down