nixos-configs/scopedPackages/dracula/git/default.nix
matt1432 7b65696436
All checks were successful
Discord / discord commits (push) Has been skipped
refactor(scoped): fix directory structure
2025-02-18 16:04:26 -05:00

32 lines
610 B
Nix

{
# nix build inputs
lib,
stdenv,
mkVersion,
git-theme-src,
...
}:
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
'';
meta = {
license = lib.licenses.mit;
homepage = "https://github.com/dracula/git";
description = ''
Dark theme for Git.
'';
};
}