diff --git a/pkgs/by-name/al/alacritty/package.nix b/pkgs/by-name/al/alacritty/package.nix index 1141b6ee14aa..cb57b10a43f0 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 2b6062720976..005f5ae7c3c6 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;