Unverified Commit 0d497d93 authored by Weijia Wang's avatar Weijia Wang Committed by GitHub
Browse files

Merge pull request #233286 from wegank/ueberzugpp-bump

ueberzugpp: 2.8.3 -> 2.8.5
parents 4cca6cf8 de87ba42
Loading
Loading
Loading
Loading
+44 −10
Original line number Diff line number Diff line
@@ -15,27 +15,47 @@
, nlohmann_json
, libsixel
, microsoft-gsl
, chafa
, libuuid
, libossp_uuid
, enableOpencv ? stdenv.isLinux
, opencv
, enableSway ? stdenv.isLinux
, extra-cmake-modules
, wayland
, wayland-protocols
, enableX11 ? stdenv.isLinux
, xorg
, withOpencv ? stdenv.isLinux
, withX11 ? stdenv.isLinux
, withoutStdRanges ? stdenv.isDarwin
, range-v3
}:

stdenv.mkDerivation rec {
  pname = "ueberzugpp";
  version = "2.8.3";
  version = "2.8.5";

  src = fetchFromGitHub {
    owner = "jstkdng";
    repo = "ueberzugpp";
    rev = "v${version}";
    hash = "sha256-U6jw1VQmc/E/vXBCVvjBsmLjhVf0MFuK+FK8jnEEl1M=";
    hash = "sha256-WnrKwbh7m84xlKMuixkB8LLw8Pzb8+mZV9cHWiI6cBY=";
  };

  # error: no member named 'ranges' in namespace 'std'
  postPatch = lib.optionalString withoutStdRanges ''
    for f in src/canvas/chafa.cpp src/canvas/iterm2/iterm2.cpp; do
      sed -i "1i #include <range/v3/algorithm/for_each.hpp>" $f
      substituteInPlace $f \
        --replace "#include <ranges>" "" \
        --replace "std::ranges" "ranges"
    done
  '';

  strictDeps = true;

  nativeBuildInputs = [
    cmake
    pkg-config
    cli11
  ];

  buildInputs = [
@@ -50,16 +70,27 @@ stdenv.mkDerivation rec {
    nlohmann_json
    libsixel
    microsoft-gsl
  ] ++ lib.optionals withOpencv [
    chafa
    cli11
    (if stdenv.isLinux then libuuid else libossp_uuid)
  ] ++ lib.optionals enableOpencv [
    opencv
  ] ++ lib.optionals withX11 [
  ] ++ lib.optionals enableSway [
    extra-cmake-modules
    wayland
    wayland-protocols
  ] ++ lib.optionals enableX11 [
    xorg.libX11
    xorg.xcbutilimage
  ] ++ lib.optionals withoutStdRanges [
    range-v3
  ];

  cmakeFlags = lib.optionals (!withOpencv) [
  cmakeFlags = lib.optionals (!enableOpencv) [
    "-DENABLE_OPENCV=OFF"
  ] ++ lib.optionals (!withX11) [
  ] ++ lib.optionals enableSway [
    "-DENABLE_SWAY=ON"
  ] ++ lib.optionals (!enableX11) [
    "-DENABLE_X11=OFF"
  ];

@@ -68,11 +99,14 @@ stdenv.mkDerivation rec {
    export MACOSX_DEPLOYMENT_TARGET=10.14
  '';

  postInstall = ''
    ln -s $out/bin/ueberzug $out/bin/ueberzugpp
  '';

  meta = with lib; {
    description = "Drop in replacement for ueberzug written in C++";
    homepage = "https://github.com/jstkdng/ueberzugpp";
    license = licenses.gpl3Plus;
    mainProgram = "ueberzug";
    maintainers = with maintainers; [ aleksana wegank ];
    platforms = platforms.unix;
  };
+1 −1
Original line number Diff line number Diff line
@@ -34796,7 +34796,7 @@ with pkgs;
  ueberzug = with python3Packages; toPythonApplication ueberzug;
  ueberzugpp = callPackage ../tools/graphics/ueberzugpp { };
  ueberzugpp = darwin.apple_sdk_11_0.callPackage ../tools/graphics/ueberzugpp { };
  uefi-run = callPackage ../tools/virtualization/uefi-run { };