Skip to content

Instantly share code, notes, and snippets.

@mguentner
Created September 5, 2017 15:38
Show Gist options
  • Save mguentner/f358f9ba00f94bdb2fa9c8419e8917d4 to your computer and use it in GitHub Desktop.
Save mguentner/f358f9ba00f94bdb2fa9c8419e8917d4 to your computer and use it in GitHub Desktop.
Alacritty with scrollback support -> https://github.com/jwilm/alacritty/pull/657
{
alacritty_sb = callPackage ./alacritty {
inherit (pkgs.xorg) libXcursor libXxf86vm libXi libX11;
};
}
{ stdenv,
fetchFromGitHub,
rustPlatform,
cmake,
makeWrapper,
expat,
pkgconfig,
freetype,
fontconfig,
libX11,
gperf,
libXcursor,
libXxf86vm,
libXi,
xclip }:
with rustPlatform;
let
rpathLibs = [
expat
freetype
fontconfig
libX11
libXcursor
libXxf86vm
libXi
];
in
buildRustPackage rec {
name = "alacritty-scrollback-2017-09-05";
src = fetchFromGitHub {
owner = "neon64";
repo = "alacritty";
rev = "d742fb7a9e1a3bc616040682f85418853919d04f";
sha256 = "02rjz0dmp438yg6f5masdima83mph65vmfk4bhji2k1dcg5chjpj";
};
depsSha256 = "19lrj4i6vzmf22r6xg99zcwvzjpiar8pqin1m2nvv78xzxx5yvgb";
buildInputs = [
cmake
makeWrapper
pkgconfig
] ++ rpathLibs;
checkPhase = ''
echo "Omitting alacritty test"
'';
patchPhase = ''
substituteInPlace copypasta/src/x11.rs \
--replace Command::new\(\"xclip\"\) Command::new\(\"${xclip}/bin/xclip\"\)
'';
installPhase = ''
mkdir -p $out/bin
for f in $(find target/release -maxdepth 1 -type f); do
cp $f $out/bin
done;
patchelf --set-rpath "${stdenv.lib.makeLibraryPath rpathLibs}" $out/bin/alacritty
'';
dontPatchELF = true;
meta = with stdenv.lib; {
description = "GPU-accelerated terminal emulator";
homepage = https://github.com/jwilm/alacritty;
license = with licenses; [ asl20 ];
maintainers = with maintainers; [ mic92 ];
platforms = platforms.linux;
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment