refactor: move dracula from common overlays to pkgs

This commit is contained in:
matt1432 2024-06-08 23:40:44 -04:00
parent fe7b03dd4a
commit a51db7b00f
23 changed files with 154 additions and 107 deletions

View file

@ -4,13 +4,15 @@
pam-fprint-grosshack-src,
pokemon-colorscripts-src,
...
}: {
} @ inputs: {
coloryou = pkgs.callPackage ./coloryou {};
curseforge-server-downloader = pkgs.callPackage ./curseforge-server-downloader {
inherit curseforge-server-downloader-src;
};
dracula = import ./dracula inputs;
pam-fprint-grosshack = pkgs.callPackage ./pam-fprint-grosshack {
inherit pam-fprint-grosshack-src;
};

15
pkgs/dracula/bat.nix Normal file
View file

@ -0,0 +1,15 @@
{
bat-theme-src,
stdenv,
...
}:
stdenv.mkDerivation {
pname = "dracula-bat";
version = bat-theme-src.shortRev;
src = bat-theme-src;
installPhase = ''
cat ./Dracula.tmTheme > $out
'';
}

9
pkgs/dracula/default.nix Normal file
View file

@ -0,0 +1,9 @@
{pkgs, ...} @ inputs: {
bat = pkgs.callPackage ./bat.nix {inherit (inputs) bat-theme-src;};
git = pkgs.callPackage ./git.nix {inherit (inputs) git-theme-src;};
gtk = import ./gtk.nix {inherit (inputs) gtk-theme-src pkgs;};
plymouth = pkgs.callPackage ./plymouth.nix {inherit (inputs) dracula-plymouth-src;};
sioyek = pkgs.callPackage ./sioyek.nix {inherit (inputs) sioyek-theme-src;};
wallpaper = pkgs.fetchurl (import ./wallpaper.nix);
xresources = pkgs.callPackage ./xresources.nix {inherit (inputs) xresources-src;};
}

21
pkgs/dracula/git.nix Normal file
View file

@ -0,0 +1,21 @@
{
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
'';
}

9
pkgs/dracula/gtk.nix Normal file
View file

@ -0,0 +1,9 @@
{
gtk-theme-src,
pkgs,
...
}:
pkgs.dracula-theme.overrideAttrs {
version = gtk-theme-src.shortRev;
src = gtk-theme-src;
}

20
pkgs/dracula/plymouth.nix Normal file
View file

@ -0,0 +1,20 @@
{
stdenv,
dracula-plymouth-src,
...
}:
stdenv.mkDerivation {
pname = "dracula-plymouth";
version = dracula-plymouth-src.shortRev;
src = dracula-plymouth-src;
installPhase = ''
chmod 777 ./dracula
sed -i "s@\/usr\/@$out\/@" ./dracula/dracula.plymouth
mkdir -p $out/share/plymouth/themes
cp -a ./dracula $out/share/plymouth/themes/
'';
}

15
pkgs/dracula/sioyek.nix Normal file
View file

@ -0,0 +1,15 @@
{
sioyek-theme-src,
stdenv,
...
}:
stdenv.mkDerivation {
pname = "dracula-sioyek";
version = sioyek-theme-src.shortRev;
src = sioyek-theme-src;
installPhase = ''
cat ./dracula.config > $out
'';
}

View file

@ -0,0 +1,4 @@
{
url = "https://raw.githubusercontent.com/aynp/dracula-wallpapers/main/Art/4k/Waves%201.png";
hash = "sha256-f9FwSOSvqTeDj4bOjYUQ6TM+/carCD9o5dhg/MnP/lk=";
}

View file

@ -0,0 +1,15 @@
{
xresources-src,
stdenv,
...
}:
stdenv.mkDerivation {
pname = "dracula-xresources";
version = xresources-src.shortRev;
src = xresources-src;
installPhase = ''
cat ./Xresources > $out
'';
}