1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
{
tgcMaintainers,
lib,
stdenvNoCC,
fetchFromGitHub,
gtk3,
hicolor-icon-theme,
adwaita-icon-theme,
...
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "adwaita-colors-icon-theme";
version = "2.4.1";
rev = "v${finalAttrs.version}";
srcHash = "sha256-M5dFb759sXfpD9/gQVF3sngyW4WdSgy4usInds9VIWk=";
src = fetchFromGitHub {
owner = "dpejoh";
repo = "Adwaita-colors";
hash = finalAttrs.srcHash;
inherit (finalAttrs) rev;
};
nativeBuildInputs = [
gtk3
];
propagatedBuildInputs = [
hicolor-icon-theme
adwaita-icon-theme
];
patchPhase = ''
# for some reason there are fucking broken symlinks?!
rm ./Adwaita-blue/scalable/places/com.bitwig.BitwigStudio.application-bitwig-project-folder-legacy.svg
find ./ -type d -name "Adwaita-*" | while read -r dir; do
# Construct the full path to the "index.theme" file
file="$dir/index.theme"
# Check if the file exists and contains the target text
if [ -f "$file" ]; then
substituteInPlace $file \
--replace-fail "Hidden=true" "" \
--replace-fail "AdwaitaLegacy," ""
fi
done
'';
installPhase = ''
runHook preInstall
install -d $out/share/icons
cp -r Adwaita-* $out/share/icons/
gtk-update-icon-cache -f -t $out/share/icons/Adwaita*
runHook postInstall
'';
dontDropIconThemeCache = true;
meta = {
description = "Adwaita Colors customizes Adwaita icons to match your GNOME theme's accent color, providing a cohesive, personalized look.";
homepage = "https://github.com/dpejoh/Adwaita-colors";
license = with lib.licenses; [ gpl3Only ];
platforms = lib.platforms.linux;
maintainers = [ tgcMaintainers.zaphyra ];
};
})