From a1d904f9a4803e5c1a411e01307de25f212d6658 Mon Sep 17 00:00:00 2001 From: VuiMuich Date: Thu, 15 May 2025 08:06:18 +0200 Subject: [PATCH] alacritty-graphics: init at 0.15.1 --- pkgs/by-name/al/alacritty/package.nix | 32 ++++++++++++++++++++------- pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/pkgs/by-name/al/alacritty/package.nix b/pkgs/by-name/al/alacritty/package.nix index 6fd102d45387..b1e36dd0ea31 100644 --- a/pkgs/by-name/al/alacritty/package.nix +++ b/pkgs/by-name/al/alacritty/package.nix @@ -23,6 +23,7 @@ xdg-utils, nix-update-script, + withGraphics ? false, }: let rpathLibs = @@ -44,17 +45,32 @@ let in rustPlatform.buildRustPackage rec { pname = "alacritty"; - version = "0.15.1"; + version = "0.15.1" + lib.optionalString withGraphics "-graphics"; - src = fetchFromGitHub { - owner = "alacritty"; - repo = "alacritty"; - tag = "v${version}"; - hash = "sha256-/yERMNfCFLPb1S17Y9OacVH8UobDIIZDhM2qPzf5Vds="; - }; + src = + # by default we want the official package + if !withGraphics then + fetchFromGitHub { + owner = "alacritty"; + repo = "alacritty"; + tag = "v${version}"; + hash = "sha256-/yERMNfCFLPb1S17Y9OacVH8UobDIIZDhM2qPzf5Vds="; + } + # optionally we want to build the sixels feature fork + else + fetchFromGitHub { + owner = "ayosec"; + repo = "alacritty"; + tag = "v${version}"; + hash = "sha256-n8vO6Q4bzWLaOqg8YhZ+aLOtBBTQ9plKIEJHXq+hhnM="; + }; useFetchCargoVendor = true; - cargoHash = "sha256-uXwefUV1NAKqwwPIWj4Slkx0c5b+RfLR3caTb42fc4M="; + cargoHash = + if !withGraphics then + "sha256-uXwefUV1NAKqwwPIWj4Slkx0c5b+RfLR3caTb42fc4M=" + else + "sha256-UtxZFqU974N+YcHoEHifBjNSyaVuMvuc1clTDgUPuoQ="; nativeBuildInputs = [ cmake diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 57c631edd034..3221dff980ec 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -274,6 +274,8 @@ with pkgs; '' ); + alacritty-graphics = callPackage ../by-name/al/alacritty/package.nix { withGraphics = true; }; + # addDriverRunpath is the preferred package name, as this enables # many more scenarios than just opengl now. aocd = with python3Packages; toPythonApplication aocd;