From 53b17694d3c4c3c6ec505b3958a966d972e5d0ec Mon Sep 17 00:00:00 2001 From: Adithya Nair Date: Mon, 16 Oct 2023 22:55:53 +0530 Subject: [PATCH] switch to newaita-reborn --- home/gtk.nix | 7 ++- packages/default.nix | 2 +- packages/newaita-icon-theme/default.nix | 63 ------------------------- packages/newaita-reborn/default.nix | 55 +++++++++++++++++++++ 4 files changed, 59 insertions(+), 68 deletions(-) delete mode 100644 packages/newaita-icon-theme/default.nix create mode 100644 packages/newaita-reborn/default.nix diff --git a/home/gtk.nix b/home/gtk.nix index 2432e7e..f753cdb 100644 --- a/home/gtk.nix +++ b/home/gtk.nix @@ -9,10 +9,9 @@ }; iconTheme = { - name = "Newaita-dark"; - package = pkgs.newaita-icon-theme.override { - panel = "dark"; - folder = "bluegray"; + name = "Newaita-reborn"; + package = pkgs.newaita-reborn.override { + flavour = "dracula"; }; }; diff --git a/packages/default.nix b/packages/default.nix index 80e9125..d317174 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -1,7 +1,7 @@ self: super: { adi1090x-plymouth = super.callPackage ./adi1090x-plymouth {}; dracula-gtk = super.callPackage ./dracula-gtk {}; - newaita-icon-theme = super.callPackage ./newaita-icon-theme {}; + newaita-reborn = super.callPackage ./newaita-reborn {}; scripts = super.callPackage ./scripts {}; rofi-bluetooth = super.callPackage ./rofi-bluetooth {}; } diff --git a/packages/newaita-icon-theme/default.nix b/packages/newaita-icon-theme/default.nix deleted file mode 100644 index 8f6bc47..0000000 --- a/packages/newaita-icon-theme/default.nix +++ /dev/null @@ -1,63 +0,0 @@ -{ - lib, - stdenvNoCC, - fetchFromGitHub, - gtk3, - gnome, - gnome-icon-theme, - hicolor-icon-theme, - panel ? "dark", - folder ? "default", -}: -stdenvNoCC.mkDerivation { - pname = "newaita-icon-theme"; - version = "latest"; - - src = fetchFromGitHub { - owner = "cbrnix"; - repo = "Newaita"; - rev = "c2b596b097a83be23833dc7bc40b5d07a63315e3"; - hash = "sha256-tqtjUy8RjvOu0NaK+iE0R1g7/eqCpmhbdxuNGd/YfSI="; - }; - - nativeBuildInputs = [gtk3]; - - propagatedBuildInputs = [ - gnome.adwaita-icon-theme - gnome-icon-theme - hicolor-icon-theme - ]; - - dontDropIconThemeCache = true; - - installPhase = '' - runHook preInstall - - PANEL_DIR=".DP" - if [ "${panel}" != "dark" ]; then - PANEL_DIR=".LP" - fi - - FOLDER_DIR=".places-${folder}" - - mkdir -p $out/share/icons/Newaita{,-dark} - cp -ra Newaita/{actions,apps,categories,devices,emblems,mimetypes,status,icon-theme.cache,index.theme} $out/share/icons/Newaita/ - cp -ra Newaita-dark/{actions,apps,categories,devices,emblems,mimetypes,status,icon-theme.cache,index.theme} $out/share/icons/Newaita-dark/ - - cp -ra Newaita/''$PANEL_DIR $out/share/icons/Newaita/panel - cp -ra Newaita-dark/''$PANEL_DIR $out/share/icons/Newaita-dark/panel - - cp -ra Newaita/''$FOLDER_DIR $out/share/icons/Newaita/places - cp -ra Newaita-dark/''$FOLDER_DIR $out/share/icons/Newaita-dark/places - - runHook postInstall - ''; - - postFixup = "gtk-update-icon-cache $out/share/icons/Newaita{,-dark}"; - - meta = with lib; { - description = "Newaita icon theme"; - homepage = "https://github.com/cbrnix/Newaita"; - platforms = platforms.linux; - }; -} diff --git a/packages/newaita-reborn/default.nix b/packages/newaita-reborn/default.nix new file mode 100644 index 0000000..4a81164 --- /dev/null +++ b/packages/newaita-reborn/default.nix @@ -0,0 +1,55 @@ +{ + lib, + stdenvNoCC, + fetchFromGitHub, + gtk3, + gnome, + gnome-icon-theme, + hicolor-icon-theme, + flavour ? "", +}: +stdenvNoCC.mkDerivation { + pname = "newaita-icon-theme"; + version = "unstable-2022-03-18"; + + src = fetchFromGitHub { + owner = "cbrnix"; + repo = "Newaita-reborn"; + rev = "5b19f46a4ca918585038547b27810502a5997401"; + hash = "sha256-nA0l+xH9BlxID0lsXkojKvQRZgkJulSWsRinDre0oW8="; + }; + + nativeBuildInputs = [gtk3]; + + propagatedBuildInputs = [ + gnome.adwaita-icon-theme + gnome-icon-theme + hicolor-icon-theme + ]; + + dontDropIconThemeCache = true; + + installPhase = '' + runHook preInstall + + mkdir -p $out/share/icons/Newaita-reborn{,-dark} + + FLAVOUR="${flavour}" + if [ -n ''$FLAVOUR ]; then + FLAVOUR="-''$FLAVOUR" + fi + + cp -ra Newaita-reborn''$FLAVOUR/{actions,apps,categories,devices,emblems,mimetypes,status,panel,places,index.theme} $out/share/icons/Newaita-reborn/ + cp -ra Newaita-reborn''$FLAVOUR-dark/{actions,apps,categories,devices,emblems,mimetypes,status,panel,places,index.theme} $out/share/icons/Newaita-reborn-dark/ + + runHook postInstall + ''; + + postFixup = "gtk-update-icon-cache $out/share/icons/Newaita-reborn{,-dark}"; + + meta = with lib; { + description = "Remaster Newaita icon theme"; + homepage = "https://github.com/cbrnix/Newaita-reborn"; + platforms = platforms.linux; + }; +}