feat(3p/chicago95): package chicago95 theme for GTK/Qt/etc.

Change-Id: Ib72ac7e4490b793940f25b0e6b8fac8c62686092
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12445
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
This commit is contained in:
Vincent Ambo 2024-09-07 01:04:24 +03:00 committed by tazjin
parent f51d27acb2
commit 732b46c6fa

47
third_party/chicago95/default.nix vendored Normal file
View file

@ -0,0 +1,47 @@
# A rendition of everyone's favourite computer theme.
{ pkgs, ... }:
let
# Chicago95 has no GTK-4 theme (because GTK-4 removed important features that
# it needs), but there is a project with an approximation.
#
# This is a bit of a hack, but I inject that project's GTK-4 theme as if it
# was a part of Chicago95.
#
# This other project is GPL-3.0, under which Chicago95 is also distributed.
gtk4ProjectSrc = pkgs.fetchFromGitHub {
owner = "B00merang-Project";
repo = "Windows-95";
rev = "055abd7a3608afdcb2ef021732e07020f2b416b2";
hash = "sha256:1li6wzyn3y09d188xki1h96pmn4xcx2lklfc4rkiq2y2r22wx7kz";
};
in
pkgs.stdenvNoCC.mkDerivation {
pname = "Chicago95";
version = "master";
src = pkgs.fetchFromGitHub {
owner = "grassmunk";
repo = "Chicago95";
rev = "bdf5cf36a16102aaac297f3de887c601c2b1146f";
hash = "sha256:11fsy3bam1rhp1292zflvzmf1432z1p0ncwy3601wl2f8rnvfdfm";
};
# The project has a Makefile, but it's broken in all sorts of ways, so we just
# copy the important stuff manually.
dontBuild = true;
installPhase = ''
mkdir -p $out/share/{icons,fonts,themes,sounds,qt5ct/colors}
cp -r Theme/Chicago95 $out/share/themes
cp -r Icons/* $out/share/icons
cp -r Cursors/* $out/share/icons
cp -r Fonts/* $out/share/fonts
cp Extras/Chicago95_qt.conf $out/share/qt5ct/colors
cp -r ${gtk4ProjectSrc}/gtk-4.0 $out/share/themes/Chicago95
'';
meta.license = pkgs.lib.licenses.gpl3;
}