2022-01-11 12:43:34 +00:00
|
|
|
{ lib
|
2024-01-23 10:25:23 +00:00
|
|
|
, stdenvNoCC
|
2022-01-11 12:43:34 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, gtk-engine-murrine
|
2023-10-21 14:56:04 +00:00
|
|
|
, breeze-icons
|
|
|
|
, plasma-framework
|
|
|
|
, plasma-workspace
|
2022-01-11 12:43:34 +00:00
|
|
|
, jdupes
|
|
|
|
}:
|
2018-11-21 22:50:32 +00:00
|
|
|
|
2024-01-23 10:25:23 +00:00
|
|
|
stdenvNoCC.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "nordic";
|
2024-01-29 20:56:49 +00:00
|
|
|
version = "2.2.0-unstable-2024-02-20";
|
2018-11-21 22:50:32 +00:00
|
|
|
|
|
|
|
srcs = [
|
2021-05-27 03:17:21 +00:00
|
|
|
(fetchFromGitHub {
|
|
|
|
owner = "EliverLara";
|
|
|
|
repo = pname;
|
2024-01-29 20:56:49 +00:00
|
|
|
rev = "58d5a8e10ae068b98a63e6de2791e289f417842d";
|
|
|
|
hash = "sha256-Z3e7DoakK6f+UMBr78gZ+NJPb5vuJCfDgPRYywFDYeg=";
|
2021-05-27 03:17:21 +00:00
|
|
|
name = "Nordic";
|
2019-01-19 19:57:31 +00:00
|
|
|
})
|
2021-05-27 03:17:21 +00:00
|
|
|
|
|
|
|
(fetchFromGitHub {
|
|
|
|
owner = "EliverLara";
|
|
|
|
repo = pname;
|
2024-01-29 20:56:49 +00:00
|
|
|
rev = "cb7d95bd5438728f30f361a888dfb33b7f6ad28c";
|
|
|
|
hash = "sha256-ZWGmDiXjEt0UuALyw7cjTYgdw9kdJJKc0vkclbZkBvo=";
|
2021-05-27 03:17:21 +00:00
|
|
|
name = "Nordic-standard-buttons";
|
2018-11-21 22:50:32 +00:00
|
|
|
})
|
2021-05-27 03:17:21 +00:00
|
|
|
|
|
|
|
(fetchFromGitHub {
|
|
|
|
owner = "EliverLara";
|
|
|
|
repo = pname;
|
2024-01-29 20:56:49 +00:00
|
|
|
rev = "37b86a30ad3e048f87a689f2813aa28644035fa8";
|
|
|
|
hash = "sha256-+O8+30H6humVQTwgFL3uQkeo5gPYrokpAKbT56PX6YQ=";
|
2021-05-27 03:17:21 +00:00
|
|
|
name = "Nordic-darker";
|
2019-01-19 19:57:31 +00:00
|
|
|
})
|
2021-05-27 03:17:21 +00:00
|
|
|
|
|
|
|
(fetchFromGitHub {
|
|
|
|
owner = "EliverLara";
|
|
|
|
repo = pname;
|
2024-01-29 20:56:49 +00:00
|
|
|
rev = "926b215d14394ff043f2d2969e730759af7acd86";
|
|
|
|
hash = "sha256-yR0DfmUW1rr38Zbwtr7TUYL6z8vTNyoj0vEhphbZieU=";
|
2021-05-27 03:17:21 +00:00
|
|
|
name = "Nordic-darker-standard-buttons";
|
2020-02-21 13:34:05 +00:00
|
|
|
})
|
2021-05-27 03:17:21 +00:00
|
|
|
|
|
|
|
(fetchFromGitHub {
|
|
|
|
owner = "EliverLara";
|
|
|
|
repo = pname;
|
2024-01-29 20:56:49 +00:00
|
|
|
rev = "1ae59d40ba8342fc14f3a55a2fb37446a8d10880";
|
|
|
|
hash = "sha256-tFIXPP5Ohw8atNIqvMtB7sLka+/tw+aSbjMdzKfI9r0=";
|
2021-05-27 03:17:21 +00:00
|
|
|
name = "Nordic-bluish-accent";
|
2020-02-21 13:34:05 +00:00
|
|
|
})
|
2021-05-27 03:17:21 +00:00
|
|
|
|
|
|
|
(fetchFromGitHub {
|
|
|
|
owner = "EliverLara";
|
|
|
|
repo = pname;
|
2024-01-29 20:56:49 +00:00
|
|
|
rev = "aaaa5dab0517f182a85a75d457da70d22e577b26";
|
|
|
|
hash = "sha256-J/nti2jxQ0VfTbp5WfrE0CN6Pvfg1edplL6/QPKUBzc=";
|
2021-05-27 03:17:21 +00:00
|
|
|
name = "Nordic-bluish-accent-standard-buttons";
|
2018-11-21 22:50:32 +00:00
|
|
|
})
|
2021-05-27 12:05:33 +00:00
|
|
|
|
|
|
|
(fetchFromGitHub {
|
|
|
|
owner = "EliverLara";
|
|
|
|
repo = "${pname}-polar";
|
2024-01-29 20:56:49 +00:00
|
|
|
rev = "733d5ea57c6ecd8209ec0a928029e28b3f54f83d";
|
|
|
|
hash = "sha256-y3ge0DF0SdKFjH+mZdHDpK3YG7Ng3rN0y0Er2WBC6Sc=";
|
2021-05-27 12:05:33 +00:00
|
|
|
name = "Nordic-Polar";
|
|
|
|
})
|
|
|
|
|
|
|
|
(fetchFromGitHub {
|
|
|
|
owner = "EliverLara";
|
|
|
|
repo = "${pname}-polar";
|
2024-01-29 20:56:49 +00:00
|
|
|
rev = "667dfe4f6e8157f30a4e0ea5dc1d17438520d6cf";
|
|
|
|
hash = "sha256-p7bY1r8Ik+jsIyjR75UFHw8XuiGz5LmT09txBLyZpx4=";
|
2021-05-27 12:05:33 +00:00
|
|
|
name = "Nordic-Polar-standard-buttons";
|
|
|
|
})
|
2018-11-21 22:50:32 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
sourceRoot = ".";
|
|
|
|
|
2023-10-27 21:31:16 +00:00
|
|
|
outputs = [ "out" "sddm" ];
|
|
|
|
|
2022-01-11 12:43:34 +00:00
|
|
|
nativeBuildInputs = [ jdupes ];
|
|
|
|
|
2023-10-27 21:31:16 +00:00
|
|
|
propagatedUserEnvPkgs = [ gtk-engine-murrine ];
|
2023-10-18 00:28:02 +00:00
|
|
|
|
|
|
|
dontWrapQtApps = true;
|
|
|
|
|
2018-11-21 22:50:32 +00:00
|
|
|
installPhase = ''
|
2021-05-27 03:17:21 +00:00
|
|
|
runHook preInstall
|
2021-11-22 12:50:55 +00:00
|
|
|
|
2023-10-21 14:20:23 +00:00
|
|
|
# install theme files
|
2018-11-21 22:50:32 +00:00
|
|
|
mkdir -p $out/share/themes
|
|
|
|
cp -a Nordic* $out/share/themes
|
2023-10-21 14:20:23 +00:00
|
|
|
|
|
|
|
# remove uneeded files
|
2021-05-27 03:17:21 +00:00
|
|
|
rm -r $out/share/themes/*/.gitignore
|
|
|
|
rm -r $out/share/themes/*/Art
|
2023-10-21 14:20:23 +00:00
|
|
|
rm -r $out/share/themes/*/FUNDING.yml
|
2021-05-27 03:17:21 +00:00
|
|
|
rm -r $out/share/themes/*/LICENSE
|
|
|
|
rm -r $out/share/themes/*/README.md
|
|
|
|
rm -r $out/share/themes/*/{package.json,package-lock.json,Gulpfile.js}
|
|
|
|
rm -r $out/share/themes/*/src
|
|
|
|
rm -r $out/share/themes/*/cinnamon/*.scss
|
2023-10-21 14:20:23 +00:00
|
|
|
rm -r $out/share/themes/*/gnome-shell/{earlier-versions,extensions,*.scss}
|
2021-05-27 03:17:21 +00:00
|
|
|
rm -r $out/share/themes/*/gtk-2.0/{assets.svg,assets.txt,links.fish,render-assets.sh}
|
|
|
|
rm -r $out/share/themes/*/gtk-3.0/{apps,widgets,*.scss}
|
2023-10-21 14:20:23 +00:00
|
|
|
rm -r $out/share/themes/*/gtk-4.0/{apps,widgets,*.scss}
|
2021-05-27 03:17:21 +00:00
|
|
|
rm -r $out/share/themes/*/xfwm4/{assets,render_assets.fish}
|
2021-11-22 12:50:55 +00:00
|
|
|
|
2023-10-22 20:40:36 +00:00
|
|
|
# move wallpapers to appropriate directory
|
|
|
|
mkdir -p $out/share/wallpapers/Nordic
|
|
|
|
mv -v $out/share/themes/Nordic/extras/wallpapers/* $out/share/wallpapers/Nordic/
|
|
|
|
rmdir $out/share/themes/Nordic/extras{/wallpapers,}
|
|
|
|
|
2021-11-22 12:50:55 +00:00
|
|
|
# move kde related contents to appropriate directories
|
2023-10-27 21:31:16 +00:00
|
|
|
mkdir -p $out/share/{aurorae/themes,color-schemes,Kvantum,plasma,icons}
|
2021-11-22 12:50:55 +00:00
|
|
|
mv -v $out/share/themes/Nordic/kde/aurorae/* $out/share/aurorae/themes/
|
|
|
|
mv -v $out/share/themes/Nordic/kde/colorschemes/* $out/share/color-schemes/
|
|
|
|
mv -v $out/share/themes/Nordic/kde/konsole $out/share/
|
|
|
|
mv -v $out/share/themes/Nordic/kde/kvantum/* $out/share/Kvantum/
|
2024-02-15 04:44:36 +00:00
|
|
|
cp -vr $out/share/themes/Nordic/kde/plasma/look-and-feel $out/share/plasma/look-and-feel/
|
|
|
|
mv -v $out/share/themes/Nordic/kde/plasma/look-and-feel $out/share/plasma/desktoptheme/
|
2023-10-22 21:19:01 +00:00
|
|
|
mv -v $out/share/themes/Nordic/kde/folders/* $out/share/icons/
|
|
|
|
mv -v $out/share/themes/Nordic/kde/cursors/*-cursors $out/share/icons/
|
2023-10-27 21:31:16 +00:00
|
|
|
|
2024-02-15 04:44:36 +00:00
|
|
|
rm -rf $out/share/plasma/look-and-feel/*/contents/{logout,osd,components}
|
|
|
|
rm -rf $out/share/plasma/desktoptheme/*/contents/{{defaults,splash,previews}
|
|
|
|
|
2023-10-27 21:31:16 +00:00
|
|
|
mkdir -p $sddm/share/sddm/themes
|
|
|
|
mv -v $out/share/themes/Nordic/kde/sddm/* $sddm/share/sddm/themes/
|
|
|
|
|
2021-11-22 12:50:55 +00:00
|
|
|
rm -rf $out/share/themes/Nordic/kde
|
|
|
|
|
2023-10-21 14:22:51 +00:00
|
|
|
# Replace duplicate files with symbolic links to the first file in
|
|
|
|
# each set of duplicates, reducing the installed size in about 53%
|
|
|
|
jdupes --quiet --link-soft --recurse $out/share
|
2022-01-11 12:43:34 +00:00
|
|
|
|
2021-05-27 03:17:21 +00:00
|
|
|
runHook postInstall
|
2018-11-21 22:50:32 +00:00
|
|
|
'';
|
|
|
|
|
2023-10-27 21:31:16 +00:00
|
|
|
postFixup = ''
|
|
|
|
# Propagate sddm theme dependencies to user env otherwise sddm
|
2024-01-23 10:25:23 +00:00
|
|
|
# does not find them. Putting them in buildInputs is not enough.
|
2023-10-27 21:31:16 +00:00
|
|
|
|
|
|
|
mkdir -p $sddm/nix-support
|
|
|
|
|
|
|
|
printWords ${breeze-icons} ${plasma-framework} ${plasma-workspace} \
|
|
|
|
>> $sddm/nix-support/propagated-user-env-packages
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2021-11-22 12:50:55 +00:00
|
|
|
description = "Gtk and KDE themes using the Nord color pallete";
|
2020-02-21 13:34:05 +00:00
|
|
|
homepage = "https://github.com/EliverLara/Nordic";
|
2021-05-27 03:17:21 +00:00
|
|
|
license = licenses.gpl3Only;
|
2018-11-21 22:50:32 +00:00
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = [ maintainers.romildo ];
|
|
|
|
};
|
|
|
|
}
|