From 89bdfaa08cd1ebd6892841d08fe86b87b85029d6 Mon Sep 17 00:00:00 2001 From: Ian McFarlane Date: Tue, 3 Jan 2023 11:16:13 -0600 Subject: rose-pine-gtk: unstable-2021-02-22 -> unstable-2022-09-01 --- pkgs/data/icons/rose-pine/default.nix | 48 ++++++++++++++++++++++++++++++ pkgs/data/themes/rose-pine-gtk/default.nix | 34 ++++++++++++++++----- pkgs/top-level/all-packages.nix | 5 ++++ 3 files changed, 80 insertions(+), 7 deletions(-) create mode 100644 pkgs/data/icons/rose-pine/default.nix (limited to 'pkgs') 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 { }; -- cgit 1.4.1