nixos-configs/common/overlays/dracula-theme/git.nix
matt1432 a7b7966d52
All checks were successful
Discord / discord commits (push) Has been skipped
refactor: improve custom packages' versioning
2024-03-25 22:42:23 -04:00

23 lines
413 B
Nix

{
stdenv,
git-theme-src,
...
}:
stdenv.mkDerivation {
name = "dracula-git";
version = git-theme-src.shortRev;
src = git-theme-src;
installPhase = ''
# Git colors
cp -a ./config/gitconfig ./git-colors
chmod 777 ./git-colors
line=$(grep -n 'Dracula Dark Theme' ./git-colors | cut -d: -f1)
sed -i "1,$((line-1))d" ./git-colors
mkdir $out
cp -a ./git-colors $out
'';
}