nixos-configs/pkgs/dracula/git.nix
matt1432 a51db7b00f
All checks were successful
Discord / discord commits (push) Has been skipped
refactor: move dracula from common overlays to pkgs
2024-06-08 23:40:44 -04:00

21 lines
415 B
Nix

{
stdenv,
git-theme-src,
...
}:
stdenv.mkDerivation {
pname = "dracula-git";
version = git-theme-src.shortRev;
src = git-theme-src;
installPhase = ''
chmod 777 ./config/gitconfig
# Remove every line above 'Dracula Dark Theme'
line=$(grep -n 'Dracula Dark Theme' ./config/gitconfig | cut -d: -f1)
sed -i "1,$((line-1))d" ./config/gitconfig
cat ./config/gitconfig > $out
'';
}