rose-pine-gtk: squash variants into one package
This commit is contained in:
parent
99a82dd360
commit
ab43cc69fa
3 changed files with 11 additions and 39 deletions
|
@ -2,21 +2,9 @@
|
|||
stdenv,
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
variant ? "default",
|
||||
}: let
|
||||
source-locations = {
|
||||
default = "icons/rose-pine-icons";
|
||||
moon = "icons/rose-pine-moon-icons";
|
||||
dawn = "icons/rose-pine-dawn-icons";
|
||||
};
|
||||
|
||||
source-location =
|
||||
if builtins.hasAttr variant source-locations
|
||||
then source-locations.${variant}
|
||||
else abort "unknown rose-pine variant ${variant}";
|
||||
in
|
||||
}:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "rose-pine-${variant}-icon-theme";
|
||||
pname = "rose-pine-icon-theme";
|
||||
version = "unstable-2022-09-01";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
|
@ -33,7 +21,9 @@ in
|
|||
runHook preInstall
|
||||
|
||||
mkdir -p $out/share/icons
|
||||
mv ${source-location} $out/share/icons/rose-pine
|
||||
mv icons/rose-pine-icons $out/share/icons/rose-pine
|
||||
mv icons/rose-pine-dawn-icons $out/share/icons/rose-pine-dawn
|
||||
mv icons/rose-pine-moon-icons $out/share/icons/rose-pine-moon
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
|
|
@ -4,20 +4,8 @@
|
|||
lib,
|
||||
gnome-themes-extra,
|
||||
gtk-engine-murrine,
|
||||
gtk_engines,
|
||||
variant ? "default",
|
||||
}: let
|
||||
source-locations = {
|
||||
default = "gtk3/rose-pine-gtk";
|
||||
moon = "gtk3/rose-pine-moon-gtk";
|
||||
dawn = "gtk3/rose-pine-dawn-gtk";
|
||||
};
|
||||
|
||||
source-location =
|
||||
if builtins.hasAttr variant source-locations
|
||||
then source-locations.${variant}
|
||||
else abort "unknown rose-pine variant ${variant}";
|
||||
in
|
||||
gtk_engines
|
||||
}:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "rose-pine-${variant}-gtk-theme";
|
||||
version = "unstable-2022-09-01";
|
||||
|
@ -45,12 +33,10 @@ in
|
|||
runHook preInstall
|
||||
|
||||
mkdir -p $out/share/themes
|
||||
mv ${source-location} $out/share/themes/rose-pine
|
||||
${
|
||||
if variant == "moon"
|
||||
then "mv gnome_shell/moon/gnome-shell $out/share/themes/rose-pine"
|
||||
else ""
|
||||
}
|
||||
mv gtk3/rose-pine-gtk $out/share/themes/rose-pine
|
||||
mv gtk3/rose-pine-moon-gtk $out/share/themes/rose-pine-moon
|
||||
mv gtk3/rose-pine-dawn-gtk $out/share/themes/rose-pine-dawn
|
||||
mv gnome_shell/moon/gnome-shell $out/share/themes/rose-pine-moon
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
|
|
@ -27195,11 +27195,7 @@ with pkgs;
|
|||
roapi-http = callPackage ../servers/roapi/http.nix { };
|
||||
|
||||
rose-pine-gtk-theme = callPackage ../data/themes/rose-pine-gtk { };
|
||||
rose-pine-dawn-gtk-theme = callPackage ../data/themes/rose-pine-gtk { variant = "dawn"; };
|
||||
rose-pine-moon-gtk-theme = callPackage ../data/themes/rose-pine-gtk { variant = "moon"; };
|
||||
rose-pine-icon-theme = callPackage ../data/icons/rose-pine { };
|
||||
rose-pine-dawn-icon-theme = callPackage ../data/icons/rose-pine { variant = "dawn"; };
|
||||
rose-pine-moon-icon-theme = callPackage ../data/icons/rose-pine { variant = "moon"; };
|
||||
|
||||
route159 = callPackage ../data/fonts/route159 { };
|
||||
|
||||
|
|
Loading…
Reference in a new issue