feat(theme): make overlay for dracula to get latest commit and merge plymouth with it

This commit is contained in:
matt1432 2023-10-03 14:42:50 -04:00
parent b478cbd316
commit 30c548d68c
4 changed files with 52 additions and 43 deletions

View file

@ -44,7 +44,7 @@
plymouth = { plymouth = {
enable = true; enable = true;
themePackages = [ pkgs.dracula-plymouth ]; themePackages = [ pkgs.dracula-theme ];
theme = "dracula"; theme = "dracula";
}; };

View file

@ -0,0 +1,50 @@
final: prev: {
dracula-theme = prev.dracula-theme.overrideAttrs (oldAttrs: rec {
plymouth = prev.fetchFromGitHub {
owner = "dracula";
repo = "plymouth";
rev = "37aa09b27ecee4a825b43d2c1d20b502e8f19c96";
hash = "sha256-7YwkBzkAND9lfH2ewuwna1zUkQStBBx4JHGw3/+svhA=";
};
src = prev.fetchFromGitHub {
owner = "dracula";
repo = "gtk";
rev = "84dd7a3021938ceec8a0ee292a8561f8a6d47ebe";
hash = "sha256-xHf+f0RGMtbprJX+3c0cmp5LKkf0V7BHKcoiAW60du8=";
};
preInstallPhase = ''
'';
installPhase = ''
runHook preInstall
cp -a ${plymouth}/dracula ./dracula
chmod 777 ./dracula
sed -i "s@\/usr\/@$out\/@" ./dracula/dracula.plymouth
mkdir -p $out/share/plymouth/themes
cp -a ./dracula $out/share/plymouth/themes/
mkdir -p $out/share/themes/Dracula
cp -a {assets,cinnamon,gnome-shell,gtk-2.0,gtk-3.0,gtk-3.20,gtk-4.0,index.theme,metacity-1,unity,xfwm4} $out/share/themes/Dracula
cp -a kde/{color-schemes,plasma} $out/share/
cp -a kde/kvantum $out/share/Kvantum
mkdir -p $out/share/aurorae/themes
cp -a kde/aurorae/* $out/share/aurorae/themes/
mkdir -p $out/share/sddm/themes
cp -a kde/sddm/* $out/share/sddm/themes/
mkdir -p $out/share/icons/Dracula-cursors
mv kde/cursors/Dracula-cursors/index.theme $out/share/icons/Dracula-cursors/cursor.theme
mv kde/cursors/Dracula-cursors/cursors $out/share/icons/Dracula-cursors/cursors
runHook postInstall
'';
});
}

View file

@ -4,6 +4,7 @@
nixpkgs.overlays = [ nixpkgs.overlays = [
(import ./swayosd.nix) (import ./swayosd.nix)
(import ./blueberry.nix) (import ./blueberry.nix)
(import ./dracula-theme.nix)
(final: prev: { (final: prev: {
input-emulator = final.callPackage ./pkgs/input-emulator.nix {}; input-emulator = final.callPackage ./pkgs/input-emulator.nix {};
@ -13,10 +14,6 @@
pam-fprint-grosshack = final.callPackage ./pkgs/pam-fprint-grosshack.nix {}; pam-fprint-grosshack = final.callPackage ./pkgs/pam-fprint-grosshack.nix {};
}) })
(final: prev: {
dracula-plymouth = final.callPackage ./pkgs/dracula-plymouth.nix {};
})
(final: prev: { (final: prev: {
coloryou = final.callPackage ./pkgs/coloryou/default.nix {}; coloryou = final.callPackage ./pkgs/coloryou/default.nix {};
}) })

View file

@ -1,38 +0,0 @@
{ lib
, stdenv
, fetchFromGitHub
}:
stdenv.mkDerivation {
name = "dracula-plymouth";
version = "unstable-2023-01-13";
src = fetchFromGitHub {
repo = "plymouth";
owner = "dracula";
rev = "37aa09b27ecee4a825b43d2c1d20b502e8f19c96";
hash = "sha256-7YwkBzkAND9lfH2ewuwna1zUkQStBBx4JHGw3/+svhA=";
};
dontConfigure = true;
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir -p $out/share/plymouth/themes
mv ./dracula $out/share/plymouth/themes/
sed -i "s@\/usr\/@$out\/@" $out/share/plymouth/themes/dracula/dracula.plymouth
runHook postInstall
'';
meta = with lib; {
description = "A dark theme for Plymouth";
homepage = "https://github.com/dracula/plymouth/tree/main";
license = licenses.mit;
maintainers = with maintainers; [ matt1432 ];
platforms = platforms.all;
};
}