Loading pkgs/applications/terminal-emulators/rio/default.nix +108 −90 Original line number Diff line number Diff line { lib , stdenv , darwin , fetchFromGitHub , rustPlatform , nixosTests , nix-update-script , autoPatchelfHook , cmake , ncurses , pkg-config , gcc-unwrapped , fontconfig , libGL , vulkan-loader , libxkbcommon , withX11 ? !stdenv.hostPlatform.isDarwin , libX11 , libXcursor , libXi , libXrandr , libxcb , withWayland ? !stdenv.hostPlatform.isDarwin , wayland , testers , rio { lib, stdenv, darwin, fetchFromGitHub, rustPlatform, nixosTests, nix-update-script, autoPatchelfHook, cmake, ncurses, pkg-config, gcc-unwrapped, fontconfig, libGL, vulkan-loader, libxkbcommon, apple-sdk_11, withX11 ? !stdenv.hostPlatform.isDarwin, libX11, libXcursor, libXi, libXrandr, libxcb, withWayland ? !stdenv.hostPlatform.isDarwin, wayland, testers, rio, }: let rlinkLibs = if stdenv.hostPlatform.isDarwin then [ darwin.libobjc darwin.apple_sdk_11_0.frameworks.AppKit darwin.apple_sdk_11_0.frameworks.AVFoundation darwin.apple_sdk_11_0.frameworks.MetalKit darwin.apple_sdk_11_0.frameworks.Vision ] else [ rlinkLibs = lib.optionals stdenv.hostPlatform.isLinux [ (lib.getLib gcc-unwrapped) fontconfig libGL libxkbcommon vulkan-loader ] ++ lib.optionals withX11 [ ] ++ lib.optionals withX11 [ libX11 libXcursor libXi libXrandr libxcb ] ++ lib.optionals withWayland [ ] ++ lib.optionals withWayland [ wayland ]; in Loading @@ -66,9 +65,11 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-yGOvY5+ThSey/k8ilTTC0CzaOIJtc4hDYmdrHJC3HyE="; nativeBuildInputs = [ nativeBuildInputs = [ ncurses ] ++ lib.optionals stdenv.hostPlatform.isLinux [ ] ++ lib.optionals stdenv.hostPlatform.isLinux [ cmake pkg-config autoPatchelfHook Loading @@ -76,21 +77,28 @@ rustPlatform.buildRustPackage rec { runtimeDependencies = rlinkLibs; buildInputs = rlinkLibs; buildInputs = rlinkLibs ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.libutil apple-sdk_11 # Needs _NSPasteboardTypeFileURL, can be removed once x86_64-darwin defaults to a higher SDK ]; outputs = [ "out" "terminfo" ]; outputs = [ "out" "terminfo" ]; buildNoDefaultFeatures = true; buildFeatures = [ ] ++ lib.optional withX11 "x11" ++ lib.optional withWayland "wayland"; buildFeatures = [ ] ++ lib.optional withX11 "x11" ++ lib.optional withWayland "wayland"; checkFlags = [ # Fail to run in sandbox environment. "--skip=sys::unix::eventedfd::EventedFd" ]; postInstall = '' postInstall = '' install -D -m 644 misc/rio.desktop -t $out/share/applications install -D -m 644 misc/logo.svg \ $out/share/icons/hicolor/scalable/apps/rio.svg Loading @@ -99,7 +107,8 @@ rustPlatform.buildRustPackage rec { tic -xe rio,rio-direct -o "$terminfo/share/terminfo" misc/rio.terminfo mkdir -p $out/nix-support echo "$terminfo" >> $out/nix-support/propagated-user-env-packages '' + lib.optionalString stdenv.hostPlatform.isDarwin '' '' + lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir $out/Applications/ mv misc/osx/Rio.app/ $out/Applications/ mkdir $out/Applications/Rio.app/Contents/MacOS/ Loading @@ -108,12 +117,17 @@ rustPlatform.buildRustPackage rec { passthru = { updateScript = nix-update-script { extraArgs = [ "--version-regex" "v([0-9.]+)" ]; extraArgs = [ "--version-regex" "v([0-9.]+)" ]; }; tests = { tests = { version = testers.testVersion { package = rio; }; } // lib.optionalAttrs stdenv.buildPlatform.isLinux { } // lib.optionalAttrs stdenv.buildPlatform.isLinux { # FIXME: Restrict test execution inside nixosTests for Linux devices as ofborg # 'passthru.tests' nixosTests are failing on Darwin architectures. # Loading @@ -126,7 +140,11 @@ rustPlatform.buildRustPackage rec { description = "Hardware-accelerated GPU terminal emulator powered by WebGPU"; homepage = "https://raphamorim.io/rio"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ tornax otavio oluceps ]; maintainers = with lib.maintainers; [ tornax otavio oluceps ]; platforms = lib.platforms.unix; changelog = "https://github.com/raphamorim/rio/blob/v${version}/docs/docs/releases.md"; mainProgram = "rio"; Loading Loading
pkgs/applications/terminal-emulators/rio/default.nix +108 −90 Original line number Diff line number Diff line { lib , stdenv , darwin , fetchFromGitHub , rustPlatform , nixosTests , nix-update-script , autoPatchelfHook , cmake , ncurses , pkg-config , gcc-unwrapped , fontconfig , libGL , vulkan-loader , libxkbcommon , withX11 ? !stdenv.hostPlatform.isDarwin , libX11 , libXcursor , libXi , libXrandr , libxcb , withWayland ? !stdenv.hostPlatform.isDarwin , wayland , testers , rio { lib, stdenv, darwin, fetchFromGitHub, rustPlatform, nixosTests, nix-update-script, autoPatchelfHook, cmake, ncurses, pkg-config, gcc-unwrapped, fontconfig, libGL, vulkan-loader, libxkbcommon, apple-sdk_11, withX11 ? !stdenv.hostPlatform.isDarwin, libX11, libXcursor, libXi, libXrandr, libxcb, withWayland ? !stdenv.hostPlatform.isDarwin, wayland, testers, rio, }: let rlinkLibs = if stdenv.hostPlatform.isDarwin then [ darwin.libobjc darwin.apple_sdk_11_0.frameworks.AppKit darwin.apple_sdk_11_0.frameworks.AVFoundation darwin.apple_sdk_11_0.frameworks.MetalKit darwin.apple_sdk_11_0.frameworks.Vision ] else [ rlinkLibs = lib.optionals stdenv.hostPlatform.isLinux [ (lib.getLib gcc-unwrapped) fontconfig libGL libxkbcommon vulkan-loader ] ++ lib.optionals withX11 [ ] ++ lib.optionals withX11 [ libX11 libXcursor libXi libXrandr libxcb ] ++ lib.optionals withWayland [ ] ++ lib.optionals withWayland [ wayland ]; in Loading @@ -66,9 +65,11 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-yGOvY5+ThSey/k8ilTTC0CzaOIJtc4hDYmdrHJC3HyE="; nativeBuildInputs = [ nativeBuildInputs = [ ncurses ] ++ lib.optionals stdenv.hostPlatform.isLinux [ ] ++ lib.optionals stdenv.hostPlatform.isLinux [ cmake pkg-config autoPatchelfHook Loading @@ -76,21 +77,28 @@ rustPlatform.buildRustPackage rec { runtimeDependencies = rlinkLibs; buildInputs = rlinkLibs; buildInputs = rlinkLibs ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.libutil apple-sdk_11 # Needs _NSPasteboardTypeFileURL, can be removed once x86_64-darwin defaults to a higher SDK ]; outputs = [ "out" "terminfo" ]; outputs = [ "out" "terminfo" ]; buildNoDefaultFeatures = true; buildFeatures = [ ] ++ lib.optional withX11 "x11" ++ lib.optional withWayland "wayland"; buildFeatures = [ ] ++ lib.optional withX11 "x11" ++ lib.optional withWayland "wayland"; checkFlags = [ # Fail to run in sandbox environment. "--skip=sys::unix::eventedfd::EventedFd" ]; postInstall = '' postInstall = '' install -D -m 644 misc/rio.desktop -t $out/share/applications install -D -m 644 misc/logo.svg \ $out/share/icons/hicolor/scalable/apps/rio.svg Loading @@ -99,7 +107,8 @@ rustPlatform.buildRustPackage rec { tic -xe rio,rio-direct -o "$terminfo/share/terminfo" misc/rio.terminfo mkdir -p $out/nix-support echo "$terminfo" >> $out/nix-support/propagated-user-env-packages '' + lib.optionalString stdenv.hostPlatform.isDarwin '' '' + lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir $out/Applications/ mv misc/osx/Rio.app/ $out/Applications/ mkdir $out/Applications/Rio.app/Contents/MacOS/ Loading @@ -108,12 +117,17 @@ rustPlatform.buildRustPackage rec { passthru = { updateScript = nix-update-script { extraArgs = [ "--version-regex" "v([0-9.]+)" ]; extraArgs = [ "--version-regex" "v([0-9.]+)" ]; }; tests = { tests = { version = testers.testVersion { package = rio; }; } // lib.optionalAttrs stdenv.buildPlatform.isLinux { } // lib.optionalAttrs stdenv.buildPlatform.isLinux { # FIXME: Restrict test execution inside nixosTests for Linux devices as ofborg # 'passthru.tests' nixosTests are failing on Darwin architectures. # Loading @@ -126,7 +140,11 @@ rustPlatform.buildRustPackage rec { description = "Hardware-accelerated GPU terminal emulator powered by WebGPU"; homepage = "https://raphamorim.io/rio"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ tornax otavio oluceps ]; maintainers = with lib.maintainers; [ tornax otavio oluceps ]; platforms = lib.platforms.unix; changelog = "https://github.com/raphamorim/rio/blob/v${version}/docs/docs/releases.md"; mainProgram = "rio"; Loading