bump
This commit is contained in:
parent
a068b3c11a
commit
835e79ffcf
2 changed files with 61 additions and 40 deletions
|
|
@ -2,9 +2,8 @@
|
|||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
hicolor-icon-theme,
|
||||
}:
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation {
|
||||
pname = "vivid-icons";
|
||||
version = "unstable-${builtins.substring 0 7 "fe8b8f1bdd3784dc838c125bb9e1b2d713f40e67"}";
|
||||
src = fetchFromGitHub {
|
||||
|
|
@ -13,42 +12,64 @@ stdenv.mkDerivation rec {
|
|||
rev = "fe8b8f1bdd3784dc838c125bb9e1b2d713f40e67";
|
||||
sha256 = "UlZkxeWb2n5TexaQymeyEqAjKwDfonTXO2OYjICHl+U=";
|
||||
};
|
||||
buildInputs = [hicolor-icon-theme];
|
||||
buildInputs = [ ];
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/icons
|
||||
for dir in Vivid-Icons-*; do
|
||||
if [ -d "$dir" ]; then
|
||||
theme_name=$(basename "$dir")
|
||||
dest_dir="$out/share/icons/$theme_name"
|
||||
cp -r "$dir" "$dest_dir"
|
||||
echo "[Icon Theme]" > "$dest_dir/index.theme"
|
||||
echo "Name=$theme_name" >> "$dest_dir/index.theme"
|
||||
echo "Comment=$theme_name icons" >> "$dest_dir/index.theme"
|
||||
echo "Inherits=hicolor" >> "$dest_dir/index.theme"
|
||||
directories=""
|
||||
for size_dir in "$dest_dir"/*; do
|
||||
if [ -d "$size_dir" ]; then
|
||||
size=$(basename "$size_dir")
|
||||
if [[ "$size" =~ ^[0-9]+x[0-9]+$ ]]; then
|
||||
directories="$directories''${directories:+,}$size"
|
||||
echo "[$size]" >> "$dest_dir/index.theme"
|
||||
echo "Size=''${size%%x*}" >> "$dest_dir/index.theme"
|
||||
echo "Context=Actions" >> "$dest_dir/index.theme"
|
||||
echo "Type=Fixed" >> "$dest_dir/index.theme"
|
||||
fi
|
||||
echo "Source contents at root:"
|
||||
ls -la .
|
||||
mkdir -p $out/share/icons
|
||||
cd "Vivid Icons Themes"
|
||||
echo "Contents of Vivid Icons Themes:"
|
||||
ls -la .
|
||||
for dir in Vivid-Dark-Icons Vivid-Glassy-Dark-Icons Vivid-Magna-Glassy-Dark-Icons; do
|
||||
if [ -d "$dir" ]; then
|
||||
echo "Processing: $dir"
|
||||
theme_name="$dir"
|
||||
dest_dir="$out/share/icons/$theme_name"
|
||||
mkdir -p "$dest_dir"
|
||||
find "$dir" -type d -regex ".*/[0-9]+" | while read -r size_dir; do
|
||||
size=$(basename "$size_dir")
|
||||
category=$(basename "$(dirname "$size_dir")")
|
||||
target_dir="$dest_dir/''${size}x''${size}/$category"
|
||||
mkdir -p "$target_dir"
|
||||
cp -rv "$size_dir"/* "$target_dir/"
|
||||
done
|
||||
echo "[Icon Theme]" > "$dest_dir/index.theme"
|
||||
echo "Name=$theme_name" >> "$dest_dir/index.theme"
|
||||
echo "Comment=$theme_name icons" >> "$dest_dir/index.theme"
|
||||
directories=""
|
||||
for size_dir in "$dest_dir"/*; do
|
||||
if [ -d "$size_dir" ]; then
|
||||
size=$(basename "$size_dir") # e.g., "22x22"
|
||||
if [[ "$size" =~ ^[0-9]+x[0-9]+$ ]]; then
|
||||
directories="$directories''${directories:+,}$size"
|
||||
echo "[$size]" >> "$dest_dir/index.theme"
|
||||
echo "Size=''${size%%x*}" >> "$dest_dir/index.theme"
|
||||
echo "Context=Actions" >> "$dest_dir/index.theme"
|
||||
echo "Type=Fixed" >> "$dest_dir/index.theme"
|
||||
fi
|
||||
done
|
||||
echo "Directories=$directories" >> "$dest_dir/index.theme"
|
||||
fi
|
||||
done
|
||||
if [ -z "$directories" ]; then
|
||||
echo "No size dirs found for $theme_name, adding fallback"
|
||||
directories="scalable"
|
||||
echo "[scalable]" >> "$dest_dir/index.theme"
|
||||
echo "Size=48" >> "$dest_dir/index.theme"
|
||||
echo "Context=Actions" >> "$dest_dir/index.theme"
|
||||
echo "Type=Scalable" >> "$dest_dir/index.theme"
|
||||
fi
|
||||
done
|
||||
echo "Installed themes:"
|
||||
ls -la $out/share/icons/
|
||||
'';
|
||||
echo "Directories=$directories" >> "$dest_dir/index.theme"
|
||||
else
|
||||
echo "Warning: $dir not found in Vivid Icons Themes"
|
||||
fi
|
||||
done
|
||||
echo "Installed themes:"
|
||||
ls -la $out/share/icons/
|
||||
'';
|
||||
meta = with lib; {
|
||||
description = "Vivid Icons Theme";
|
||||
homepage = "https://github.com/L4ki/Vivid-Plasma-Themes";
|
||||
license = licenses.gpl3;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; ["Cobray"];
|
||||
maintainers = with maintainers; [ "Cobray" ];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue