depot/third_party/nixpkgs/pkgs/applications/terminal-emulators/rio/default.nix
Default email 9c6ee729d6 Project import generated by Copybara.
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
2023-07-15 19:15:38 +02:00

85 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";
};
}