diff options
author | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2024-02-24 23:56:57 +0100 |
---|---|---|
committer | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2024-02-24 23:56:57 +0100 |
commit | be840e52ede33d07d3de8d62405ddf4023c1195b (patch) | |
tree | 8a2977d795b845ac5ad7fc8c81b36db573e3edb8 /pkgs/by-name/ue | |
parent | 7b1a32ed15e0f28b0648f00d8aad1c27cc3160d5 (diff) |
ueberzugpp: move to pkgs/by-name
Diffstat (limited to 'pkgs/by-name/ue')
-rw-r--r-- | pkgs/by-name/ue/ueberzugpp/package.nix | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/pkgs/by-name/ue/ueberzugpp/package.nix b/pkgs/by-name/ue/ueberzugpp/package.nix new file mode 100644 index 0000000000000..af9d00b861c39 --- /dev/null +++ b/pkgs/by-name/ue/ueberzugpp/package.nix @@ -0,0 +1,96 @@ +{ lib +, stdenv +, fetchFromGitHub +, cmake +, pkg-config +, openssl +, zeromq +, cppzmq +, tbb_2021_8 +, spdlog +, libsodium +, fmt +, vips +, nlohmann_json +, libsixel +, microsoft-gsl +, chafa +, cli11 +, libexif +, range-v3 +, enableOpencv ? stdenv.isLinux +, opencv +, enableWayland ? stdenv.isLinux +, extra-cmake-modules +, wayland +, wayland-protocols +, enableX11 ? stdenv.isLinux +, xorg +}: + +stdenv.mkDerivation rec { + pname = "ueberzugpp"; + version = "2.9.3"; + + src = fetchFromGitHub { + owner = "jstkdng"; + repo = "ueberzugpp"; + rev = "v${version}"; + hash = "sha256-jNiDQy9el9fUK03Dt55wPb4LFB1iDiytUxg8zM4Bj6E="; + }; + + strictDeps = true; + + nativeBuildInputs = [ + cmake + pkg-config + ]; + + buildInputs = [ + openssl + zeromq + cppzmq + tbb_2021_8 + spdlog + libsodium + fmt + vips + nlohmann_json + libsixel + microsoft-gsl + chafa + cli11 + libexif + range-v3 + ] ++ lib.optionals enableOpencv [ + opencv + ] ++ lib.optionals enableWayland [ + extra-cmake-modules + wayland + wayland-protocols + ] ++ lib.optionals enableX11 [ + xorg.libX11 + xorg.xcbutilimage + ]; + + cmakeFlags = lib.optionals (!enableOpencv) [ + "-DENABLE_OPENCV=OFF" + ] ++ lib.optionals enableWayland [ + "-DENABLE_WAYLAND=ON" + ] ++ lib.optionals (!enableX11) [ + "-DENABLE_X11=OFF" + ]; + + # error: aligned deallocation function of type 'void (void *, std::align_val_t) noexcept' is only available on macOS 10.14 or newer + preBuild = lib.optionalString (stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "11.0") '' + export MACOSX_DEPLOYMENT_TARGET=10.14 + ''; + + meta = with lib; { + description = "Drop in replacement for ueberzug written in C++"; + homepage = "https://github.com/jstkdng/ueberzugpp"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ aleksana wegank ]; + platforms = platforms.unix; + }; +} |