mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-12 08:43:06 +00:00
5ef952ae13
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
86 lines
1.5 KiB
Nix
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";
|
|
};
|
|
}
|