about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorIan McFarlane <i.mcfarlane2002@gmail.com>2023-01-03 11:16:13 -0600
committerIan McFarlane <i.mcfarlane2002@gmail.com>2023-01-03 11:25:04 -0600
commit89bdfaa08cd1ebd6892841d08fe86b87b85029d6 (patch)
tree3873e26a14903cec539bcf7acaeb6f26706484c9 /pkgs
parent2bd27f69f7bedb05a8089d1d8c33bb0b43f39975 (diff)
rose-pine-gtk: unstable-2021-02-22 -> unstable-2022-09-01
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/data/icons/rose-pine/default.nix48
-rw-r--r--pkgs/data/themes/rose-pine-gtk/default.nix34
-rw-r--r--pkgs/top-level/all-packages.nix5
3 files changed, 80 insertions, 7 deletions
diff --git a/pkgs/data/icons/rose-pine/default.nix b/pkgs/data/icons/rose-pine/default.nix
new file mode 100644
index 0000000000000..0aee480fb76a5
--- /dev/null
+++ b/pkgs/data/icons/rose-pine/default.nix
@@ -0,0 +1,48 @@
+{
+  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";
+    version = "unstable-2022-09-01";
+
+    src = fetchFromGitHub {
+      owner = "rose-pine";
+      repo = "gtk";
+      rev = "7a4c40989fd42fd8d4a797f460c79fc4a085c304";
+      sha256 = "0q74wjyrsjyym770i3sqs071bvanwmm727xzv50wk6kzvpyqgi67";
+    };
+
+    # avoid the makefile which is only for the theme maintainers
+    dontBuild = true;
+
+    installPhase = ''
+      runHook preInstall
+
+      mkdir -p $out/share/icons
+      mv ${source-location} $out/share/icons/rose-pine
+
+      runHook postInstall
+    '';
+
+    meta = with lib; {
+      description = "Rosé Pine icon theme for GTK";
+      homepage = "https://github.com/rose-pine/gtk";
+      license = licenses.gpl3Only;
+      platforms = platforms.linux;
+      maintainers = [maintainers.romildo];
+    };
+  }
diff --git a/pkgs/data/themes/rose-pine-gtk/default.nix b/pkgs/data/themes/rose-pine-gtk/default.nix
index d139876e14295..7cbe2d36e1923 100644
--- a/pkgs/data/themes/rose-pine-gtk/default.nix
+++ b/pkgs/data/themes/rose-pine-gtk/default.nix
@@ -4,17 +4,28 @@
 , 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
 stdenv.mkDerivation rec {
-  pname = "rose-pine-gtk-theme";
-  version = "unstable-2021-02-22";
+  pname = "rose-pine-${variant}-gtk-theme";
+  version = "unstable-2022-09-01";
 
   src = fetchFromGitHub {
     owner = "rose-pine";
     repo = "gtk";
-    rev = "9cd2dd449f911973ec549231a57a070d256da9fd";
-    sha256 = "0lqx8dmv754ix3xbg7h440x964n0bg4lb06vbzvsydnbx79h7lvy";
+    rev = "7a4c40989fd42fd8d4a797f460c79fc4a085c304";
+    sha256 = "0q74wjyrsjyym770i3sqs071bvanwmm727xzv50wk6kzvpyqgi67";
   };
 
   buildInputs = [
@@ -26,11 +37,20 @@ stdenv.mkDerivation rec {
     gtk-engine-murrine # murrine engine for Gtk2
   ];
 
+  # avoid the makefile which is only for theme maintainers
+  dontBuild = true;
+
   installPhase = ''
     runHook preInstall
+
     mkdir -p $out/share/themes
-    cp -a Rose-Pine $out/share/themes
-    rm $out/share/themes/*/LICENSE
+    mv ${source-location} $out/share/themes/rose-pine
+    ${
+    if variant == "moon"
+    then "mv gnome_shell/moon/gnome-shell $out/share/themes/rose-pine"
+    else ""
+    }
+
     runHook postInstall
   '';
 
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 104f8eef991ab..9e3392ff47f14 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -27195,6 +27195,11 @@ 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 { };