nixos-configs/legacyPackages/dracula/git.nix
matt1432 c701e335d1
All checks were successful
Discord / discord commits (push) Has been skipped
refactor(flake): move some code out of flake.in.nix
2024-07-21 17:12:26 -04:00

22 lines
429 B
Nix

{
stdenv,
git-theme-src,
mkVersion,
...
}:
stdenv.mkDerivation {
pname = "dracula-git";
version = mkVersion git-theme-src;
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
'';
}