2023-01-03 18:39:02 +01:00
|
|
|
{
|
|
|
|
stdenv,
|
|
|
|
fetchFromGitHub,
|
|
|
|
lib,
|
|
|
|
gnome-themes-extra,
|
|
|
|
gtk-engine-murrine,
|
|
|
|
gtk_engines,
|
|
|
|
variant ? "default",
|
2023-01-03 18:16:13 +01:00
|
|
|
}: let
|
|
|
|
source-locations = {
|
|
|
|
default = "gtk3/rose-pine-gtk";
|
|
|
|
moon = "gtk3/rose-pine-moon-gtk";
|
|
|
|
dawn = "gtk3/rose-pine-dawn-gtk";
|
|
|
|
};
|
2021-11-17 02:23:04 +01:00
|
|
|
|
2023-01-03 18:16:13 +01:00
|
|
|
source-location =
|
|
|
|
if builtins.hasAttr variant source-locations
|
|
|
|
then source-locations.${variant}
|
|
|
|
else abort "unknown rose-pine variant ${variant}";
|
|
|
|
in
|
2023-01-03 18:39:02 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "rose-pine-${variant}-gtk-theme";
|
|
|
|
version = "unstable-2022-09-01";
|
2021-11-17 02:23:04 +01:00
|
|
|
|
2023-01-03 18:39:02 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rose-pine";
|
|
|
|
repo = "gtk";
|
|
|
|
rev = "7a4c40989fd42fd8d4a797f460c79fc4a085c304";
|
|
|
|
sha256 = "0q74wjyrsjyym770i3sqs071bvanwmm727xzv50wk6kzvpyqgi67";
|
|
|
|
};
|
2021-11-17 02:23:04 +01:00
|
|
|
|
2023-01-03 18:39:02 +01:00
|
|
|
buildInputs = [
|
|
|
|
gnome-themes-extra # adwaita engine for Gtk2
|
|
|
|
gtk_engines # pixmap engine for Gtk2
|
|
|
|
];
|
2021-11-17 02:23:04 +01:00
|
|
|
|
2023-01-03 18:39:02 +01:00
|
|
|
propagatedUserEnvPkgs = [
|
|
|
|
gtk-engine-murrine # murrine engine for Gtk2
|
|
|
|
];
|
2021-11-17 02:23:04 +01:00
|
|
|
|
2023-01-03 18:39:02 +01:00
|
|
|
# avoid the makefile which is only for theme maintainers
|
|
|
|
dontBuild = true;
|
2023-01-03 18:16:13 +01:00
|
|
|
|
2023-01-03 18:39:02 +01:00
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
2023-01-03 18:16:13 +01:00
|
|
|
|
2023-01-03 18:39:02 +01:00
|
|
|
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 ""
|
|
|
|
}
|
2023-01-03 18:16:13 +01:00
|
|
|
|
2023-01-03 18:39:02 +01:00
|
|
|
runHook postInstall
|
|
|
|
'';
|
2021-11-17 02:23:04 +01:00
|
|
|
|
2023-01-03 18:39:02 +01:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Rosé Pine theme for GTK";
|
|
|
|
homepage = "https://github.com/rose-pine/gtk";
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [romildo the-argus];
|
|
|
|
};
|
|
|
|
}
|