nixpkgs/pkgs/applications/terminal-emulators/rio/default.nix
Otavio Salvador 5ef952ae13 rio: enable Wayland by default
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2023-07-03 17:25:27 -03:00

86 lines
1.5 KiB
Nix

{ lib
, fetchFromGitHub
, rustPlatform
, gitUpdater
, autoPatchelfHook
, pkg-config
, gcc-unwrapped
, fontconfig
, libGL
, vulkan-loader
, libxkbcommon
, withX11 ? true
, libX11
, libXcursor
, libXi
, libXrandr
, libxcb
, withWayland ? true
, wayland
}:
let
rlinkLibs = [
(lib.getLib gcc-unwrapped)
fontconfig
libGL
libxkbcommon
vulkan-loader
] ++ lib.optionals withX11 [
libX11
libXcursor
libXi
libXrandr
libxcb
] ++ lib.optionals withWayland [
wayland
];
in
rustPlatform.buildRustPackage rec {
pname = "rio";
version = "0.0.8";
src = fetchFromGitHub {
owner = "raphamorim";
repo = "rio";
rev = "v${version}";
hash = "sha256-NonIMGBASbkbc5JsHKwfaZ9dGQt1f8+hFh/FFyIlIZs=";
};
cargoHash = "sha256-4IJJtLa25aZkFwkMYpnYyRQLeqoBwncgCjorF6Gx6pk=";
nativeBuildInputs = [
autoPatchelfHook
pkg-config
];
runtimeDependencies = rlinkLibs;
buildInputs = rlinkLibs;
buildNoDefaultFeatures = true;
buildFeatures = [
(lib.optionalString withX11 "x11")
(lib.optionalString withWayland "wayland")
];
passthru = {
updateScript = gitUpdater {
rev-prefix = "v";
ignoredVersions = ".(rc|beta).*";
};
};
meta = {
description = "A hardware-accelerated GPU terminal emulator powered by WebGPU";
homepage = "https://raphamorim.io/rio";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ otavio oluceps ];
platforms = lib.platforms.unix;
changelog = "https://github.com/raphamorim/rio/blob/v${version}/CHANGELOG.md";
};
}