nixpkgs/pkgs/data/themes/nordic/default.nix

126 lines
3.9 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, fetchFromGitHub
, gtk-engine-murrine
, jdupes
}:
2018-11-21 22:50:32 +00:00
stdenv.mkDerivation rec {
pname = "nordic";
2022-01-11 12:42:34 +00:00
version = "unstable-2022-01-08";
2018-11-21 22:50:32 +00:00
srcs = [
(fetchFromGitHub {
owner = "EliverLara";
repo = pname;
2022-01-11 12:42:34 +00:00
rev = "85086324c2a8fa7ca538b85ad0681e03733b2c86";
sha256 = "sha256-p1nr71iJZm+2123WF67NkunBX2dR4ruK2Afqd7XdeGc=";
name = "Nordic";
2019-01-19 19:57:31 +00:00
})
(fetchFromGitHub {
owner = "EliverLara";
repo = pname;
2022-01-11 12:42:34 +00:00
rev = "46c9e6665963ccb54938d7730e520bd8c52f4307";
sha256 = "sha256-uFnNLshyKOvzaij7tEKb0fw0j3/GGfzznAf/aaKx7XI=";
name = "Nordic-standard-buttons";
2018-11-21 22:50:32 +00:00
})
(fetchFromGitHub {
owner = "EliverLara";
repo = pname;
2022-01-11 12:42:34 +00:00
rev = "da5c930386427fce65ea185f164709c8a20e362f";
sha256 = "sha256-Ee9ymuMWs2ZgU+8FVLaviGtHMT4Sz5NWLaEGln2Z4V0=";
name = "Nordic-darker";
2019-01-19 19:57:31 +00:00
})
(fetchFromGitHub {
owner = "EliverLara";
repo = pname;
2022-01-11 12:42:34 +00:00
rev = "fd85fb2712ac1192e35c92149b75bfc3c440b1c7";
sha256 = "sha256-6WUQBeNq7EKNkYcCt/fUYloue90gxfp8bDYawkQQ6ss=";
name = "Nordic-darker-standard-buttons";
2020-02-21 13:34:05 +00:00
})
(fetchFromGitHub {
owner = "EliverLara";
repo = pname;
2022-01-11 12:42:34 +00:00
rev = "259e30ce13566214c7594b038dd2c240648a07a0";
sha256 = "sha256-F6hC6XbT9yJl6SW9qJNlwmmBcvOrOS5yPCQALZFhgbM=";
name = "Nordic-bluish-accent";
2020-02-21 13:34:05 +00:00
})
(fetchFromGitHub {
owner = "EliverLara";
repo = pname;
2022-01-11 12:42:34 +00:00
rev = "2a27051d87558dfa595fb94eff34241d3a1b8c30";
sha256 = "sha256-JIld6GVtr1tz02Do2Ft92qtza6iGrPapasd6jmMFG6k=";
name = "Nordic-bluish-accent-standard-buttons";
2018-11-21 22:50:32 +00:00
})
(fetchFromGitHub {
owner = "EliverLara";
repo = "${pname}-polar";
2022-01-11 12:42:34 +00:00
rev = "0bea76aed39bb2a2669278b8403c4129aa47be0f";
sha256 = "sha256-OXmz6uHXh1zl93sgv5WEwARkEUCr4PRh0/mJyMLXpnk=";
name = "Nordic-Polar";
})
(fetchFromGitHub {
owner = "EliverLara";
repo = "${pname}-polar";
2022-01-11 12:42:34 +00:00
rev = "8fe52b6c276a7e548e87a558db6734cf9f003b06";
sha256 = "sha256-/IxlBvMLAK+mGRyaa7bTv/oZS24nSNeE5GsyJIeN6UU=";
name = "Nordic-Polar-standard-buttons";
})
2018-11-21 22:50:32 +00:00
];
sourceRoot = ".";
nativeBuildInputs = [ jdupes ];
2018-11-21 22:50:32 +00:00
propagatedUserEnvPkgs = [ gtk-engine-murrine ];
installPhase = ''
runHook preInstall
2021-11-22 12:50:55 +00:00
2018-11-21 22:50:32 +00:00
mkdir -p $out/share/themes
cp -a Nordic* $out/share/themes
rm -r $out/share/themes/*/.gitignore
rm -r $out/share/themes/*/Art
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
rm -r $out/share/themes/*/gnome-shell/{extensions,*.scss}
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}
rm -r $out/share/themes/*/xfwm4/{assets,render_assets.fish}
2021-11-22 12:50:55 +00:00
# move kde related contents to appropriate directories
mkdir -p $out/share/{aurorae/themes,color-schemes,Kvantum,plasma,sddm/themes/Nordic}
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/
mv -v $out/share/themes/Nordic/kde/plasma/look-and-feel $out/share/plasma/
mv -v $out/share/themes/Nordic/kde/sddm/* $out/share/sddm/themes/Nordic/
rm -rf $out/share/themes/Nordic/kde
# Replace duplicate files with hardlinks to the first file in each
# set of duplicates, reducing the installed size in about 65%
jdupes -L -r $out/share
runHook postInstall
2018-11-21 22:50:32 +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";
license = licenses.gpl3Only;
2018-11-21 22:50:32 +00:00
platforms = platforms.all;
maintainers = [ maintainers.romildo ];
};
}