ueberzugpp: cleanup, fix with cudaSupport (#467646)

This commit is contained in:
Aleksana
2025-12-04 01:59:02 +00:00
committed by GitHub
+24 -17
View File
@@ -1,6 +1,7 @@
{
lib,
stdenv,
config,
fetchFromGitHub,
cmake,
pkg-config,
@@ -28,16 +29,18 @@
wayland-scanner,
enableX11 ? stdenv.hostPlatform.isLinux,
xorg,
cudaSupport ? config.cudaSupport,
cudaPackages,
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "ueberzugpp";
version = "2.9.8";
src = fetchFromGitHub {
owner = "jstkdng";
repo = "ueberzugpp";
rev = "v${version}";
tag = "v${finalAttrs.version}";
hash = "sha256-BTOuOS0zCdYTTc47UHaGI6wqFEv6e71cD2XBZtnKGLU=";
};
@@ -49,6 +52,10 @@ stdenv.mkDerivation rec {
]
++ lib.optionals enableWayland [
wayland-scanner
]
# Required by opencv when cudaSupport is enabled
++ lib.optionals cudaSupport [
(lib.getBin cudaPackages.cuda_nvcc)
];
buildInputs = [
@@ -79,27 +86,27 @@ stdenv.mkDerivation rec {
++ lib.optionals enableX11 [
xorg.libX11
xorg.xcbutilimage
]
# Required by opencv when cudaSupport is enabled
++ lib.optionals cudaSupport [
cudaPackages.cuda_cudart
];
cmakeFlags =
lib.optionals (!enableOpencv) [
"-DENABLE_OPENCV=OFF"
]
++ lib.optionals enableWayland [
"-DENABLE_WAYLAND=ON"
]
++ lib.optionals (!enableX11) [
"-DENABLE_X11=OFF"
];
cmakeFlags = [
(lib.cmakeBool "ENABLE_OPENCV" enableOpencv)
(lib.cmakeBool "ENABLE_WAYLAND" enableWayland)
(lib.cmakeBool "ENABLE_X11" enableX11)
];
meta = with lib; {
meta = {
description = "Drop in replacement for ueberzug written in C++";
homepage = "https://github.com/jstkdng/ueberzugpp";
license = licenses.gpl3Plus;
maintainers = with maintainers; [
changelog = "https://github.com/jstkdng/ueberzugpp/releases/tag/v${finalAttrs.version}";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [
aleksana
wegank
];
platforms = platforms.unix;
platforms = lib.platforms.unix;
};
}
})