nixos-configs/scopedPackages/dracula/git.nix

23 lines
429 B
Nix
Raw Permalink Normal View History

{
stdenv,
git-theme-src,
2024-06-13 22:27:54 -04:00
mkVersion,
...
}:
stdenv.mkDerivation {
pname = "dracula-git";
2024-06-13 22:27:54 -04:00
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
'';
}