{ 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 ]; }; })