add shellcolord, use alacritty instead of kitty

This commit is contained in:
Gabriel Fontes
2021-12-11 15:14:31 -03:00
parent 0d7f1b0be3
commit 4db730c1c1
15 changed files with 254 additions and 193 deletions
+116
View File
@@ -0,0 +1,116 @@
{ stdenv
, lib
, fetchFromGitHub
, fetchpatch
, rustPlatform
, cmake
, gzip
, installShellFiles
, makeWrapper
, ncurses
, pkg-config
, python3
, expat
, fontconfig
, freetype
, libGL
, libX11
, libXcursor
, libXi
, libXrandr
, libXxf86vm
, libxcb
, libxkbcommon
, wayland
, xdg-utils
, zlib
}:
let
rpathLibs = [
expat
fontconfig
freetype
libGL
libX11
libXcursor
libXi
libXrandr
libXxf86vm
libxcb
] ++ lib.optionals stdenv.isLinux [
libxkbcommon
wayland
zlib
];
in
rustPlatform.buildRustPackage rec {
pname = "alacritty";
version = "master";
src = fetchFromGitHub {
owner = "fee1-dead";
repo = pname;
rev = "77e6d029d9e0ce980c71abf793d50a9a5f4e1564";
sha256 = "sha256-h4XG9jJofjHs1l1hfcDkTVFocZ0k9Co2eTv36hV6FpU=";
};
cargoSha256 = "sha256-hHAlNxHvsKzqpOfnEmvAaMsrQynRXTLjdjGrUjFxAz0=";
nativeBuildInputs = [
cmake
gzip
installShellFiles
makeWrapper
ncurses
pkg-config
python3
];
buildInputs = rpathLibs;
outputs = [ "out" "terminfo" ];
postPatch = ''
substituteInPlace alacritty/src/config/ui_config.rs \
--replace xdg-open ${xdg-utils}/bin/xdg-open
'';
# TODO find out why tests fail
doCheck = false;
postInstall = ''
install -D extra/linux/Alacritty.desktop -t $out/share/applications/
install -D extra/linux/io.alacritty.Alacritty.appdata.xml -t $out/share/appdata/
install -D extra/logo/compat/alacritty-term.svg $out/share/icons/hicolor/scalable/apps/Alacritty.svg
# patchelf generates an ELF that binutils' "strip" doesn't like:
# strip: not enough room for program headers, try linking with -N
# As a workaround, strip manually before running patchelf.
strip -S $out/bin/alacritty
patchelf --set-rpath "${lib.makeLibraryPath rpathLibs}" $out/bin/alacritty
'' + ''
installShellCompletion --zsh extra/completions/_alacritty
installShellCompletion --bash extra/completions/alacritty.bash
installShellCompletion --fish extra/completions/alacritty.fish
install -dm 755 "$out/share/man/man1"
gzip -c extra/alacritty.man > "$out/share/man/man1/alacritty.1.gz"
install -Dm 644 alacritty.yml $out/share/doc/alacritty.yml
install -dm 755 "$terminfo/share/terminfo/a/"
tic -xe alacritty,alacritty-direct -o "$terminfo/share/terminfo" extra/alacritty.info
mkdir -p $out/nix-support
echo "$terminfo" >> $out/nix-support/propagated-user-env-packages
'';
dontPatchELF = true;
meta = with lib; {
description = "A cross-platform, GPU-accelerated terminal emulator";
homepage = "https://github.com/alacritty/alacritty";
license = licenses.asl20;
maintainers = with maintainers; [ Br1ght0ne mic92 ma27 ];
platforms = platforms.unix;
changelog = "https://github.com/alacritty/alacritty/blob/v${version}/CHANGELOG.md";
};
}
+17 -13
View File
@@ -1,26 +1,30 @@
{ pkgs }: {
amdgpu-clocks = pkgs.callPackage ../pkgs/amdgpu-clocks { };
preferredplayer = pkgs.callPackage ../pkgs/preferredplayer { };
rgbdaemon = pkgs.callPackage ../pkgs/rgbdaemon { };
sistemer-bot = pkgs.callPackage ../pkgs/sistemer-bot { };
soundwire = pkgs.libsForQt5.callPackage ../pkgs/soundwire { };
wallpapers = pkgs.callPackage ../pkgs/wallpapers { };
zenity-askpass = pkgs.callPackage ../pkgs/zenity-askpass { };
amdgpu-clocks = pkgs.callPackage ./amdgpu-clocks { };
preferredplayer = pkgs.callPackage ./preferredplayer { };
rgbdaemon = pkgs.callPackage ./rgbdaemon { };
sistemer-bot = pkgs.callPackage ./sistemer-bot { };
soundwire = pkgs.libsForQt5.callPackage ./soundwire { };
wallpapers = pkgs.callPackage ./wallpapers { };
zenity-askpass = pkgs.callPackage ./zenity-askpass { };
setscheme = pkgs.callPackage ../pkgs/setscheme { };
setwallpaper = pkgs.callPackage ../pkgs/setwallpaper { };
setscheme = pkgs.callPackage ./setscheme { };
setwallpaper = pkgs.callPackage ./setwallpaper { };
setscheme-wofi = pkgs.callPackage ../pkgs/setscheme-wofi {
setscheme-wofi = pkgs.callPackage ./setscheme-wofi {
inherit (pkgs.gnome) zenity;
};
setwallpaper-wofi = pkgs.callPackage ../pkgs/setwallpaper-wofi {
setwallpaper-wofi = pkgs.callPackage ./setwallpaper-wofi {
inherit (pkgs.gnome) zenity;
};
shellcolord = pkgs.callPackage ./shellcolord { };
# Experimental papermc version
papermc-experimental = pkgs.callPackage ../pkgs/papermc-experimental { };
papermc-experimental = pkgs.callPackage ./papermc-experimental { };
pass-wofi = pkgs.callPackage ../pkgs/pass-wofi {
pass-wofi = pkgs.callPackage ./pass-wofi {
pass = pkgs.pass.withExtensions (exts: [ exts.pass-otp ]);
};
alacritty-ligatures = pkgs.callPackage ./alacritty-ligatures { };
}
+1
View File
@@ -1,3 +1,4 @@
# This "package" is not used in my install, this file is meant for building through the flake on CI (for caching gtk themes).
{ pkgs, nix-colors }:
with nix-colors.lib { inherit pkgs; };
+24
View File
@@ -0,0 +1,24 @@
{ lib, stdenv, fetchFromSourcehut }:
with lib;
stdenv.mkDerivation rec {
name = "shellcolord";
version = "0.1";
src = fetchFromSourcehut {
owner = "~misterio";
repo = name;
rev = "250cb20b9d931092ddd9ccf1f66d52aaf72b71b7";
sha256 = "sha256-eL+4ikdTiwoMB/gu1CTYTL+V2tnVDo03Mwh4a9nuT38=";
};
makeFlags = [ "PREFIX=$(out)" ];
meta = {
description = "A daemon that themes your shell remotely";
homepage = "https://git.sr.ht/~misterio/${name}";
license = licenses.unlicense;
platforms = platforms.all;
maintainers = with maintainers; [ misterio77 ];
};
}