diff --git a/pkgs/applications/terminal-emulators/rio/default.nix b/pkgs/applications/terminal-emulators/rio/default.nix new file mode 100644 index 000000000000..141e593676c6 --- /dev/null +++ b/pkgs/applications/terminal-emulators/rio/default.nix @@ -0,0 +1,83 @@ +{ lib +, fetchFromGitHub +, rustPlatform +, gitUpdater + +, autoPatchelfHook +, pkg-config + +, gcc-unwrapped +, fontconfig +, libGL +, vulkan-loader + +, withX11 ? true +, libX11 +, libXcursor +, libXi +, libXrandr +, libxcb + +, withWayland ? false +, wayland +}: +let + rlinkLibs = [ + (lib.getLib gcc-unwrapped) + fontconfig + libGL + vulkan-loader + ] ++ lib.optional withX11 [ + libX11 + libXcursor + libXi + libXrandr + libxcb + ] ++ lib.optional withWayland [ + wayland + ]; +in +rustPlatform.buildRustPackage rec { + pname = "rio"; + version = "0.0.6.1-unstable-2023-06-18"; + + src = fetchFromGitHub { + owner = "raphamorim"; + repo = "rio"; + rev = "f3fbe7a020528d2f5ed8beaa3afd900a4c2e83a2"; + hash = "sha256-emZqD/vvQHk43E8gTHVczCOni110sCRLMWp9igruYc8="; + }; + + cargoHash = "sha256-1ZQae5IHA+8HwyYGFBy1XPEYR8NAHHrU1JNOMT7T5zA="; + + 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"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 12d4c77f754b..fe9b43f4377e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11728,6 +11728,8 @@ with pkgs; inherit (darwin.apple_sdk_11_0.frameworks) Carbon Cocoa IOKit; }; + rio = callPackage ../applications/terminal-emulators/rio { }; + rig = callPackage ../tools/misc/rig { }; ripdrag = callPackage ../tools/misc/ripdrag { };