packages: Add fluent-icons

Used for eww.
This commit is contained in:
Donovan Glover 2023-08-07 21:33:18 -04:00
parent 955ed07d33
commit 220392fb85
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65
3 changed files with 44 additions and 1 deletions

View File

@ -9,7 +9,7 @@
(defwidget icon [img exec] (defwidget icon [img exec]
(eventbox :cursor "pointer" :onclick "lnch thunar ${exec}" :tooltip "${exec}" (eventbox :cursor "pointer" :onclick "lnch thunar ${exec}" :tooltip "${exec}"
(image :path "/home/user/.config/eww/${img}.png" :image-width 128))) (image :path "/run/current-system/sw/share/eww/Fluent-Icons/${img}.png" :image-width 128)))
(defwindow desktop-icons (defwindow desktop-icons
:monitor 0 :monitor 0

View File

@ -3,9 +3,11 @@
{ {
environment.pathsToLink = [ environment.pathsToLink = [
"/share/backgrounds" "/share/backgrounds"
"/share/eww"
]; ];
environment.systemPackages = [ environment.systemPackages = [
(pkgs.callPackage ./osu-backgrounds.nix { }) (pkgs.callPackage ./osu-backgrounds.nix { })
(pkgs.callPackage ./fluent-icons.nix { })
]; ];
} }

41
packages/fluent-icons.nix Normal file
View File

@ -0,0 +1,41 @@
{ stdenvNoCC
, fetchurl
, unar
}:
stdenvNoCC.mkDerivation {
pname = "fluent-icons";
version = "2023-08-07";
src = fetchurl {
name = "Fluent Icons.zip";
url = "https://files.catbox.moe/a6iswm.zip";
hash = "sha256-LsMZr+RedK2Vi21K44A/vpBv54BISjshZ2+iAlMYASU=";
};
nativeBuildInputs = [ unar ];
unpackPhase = /* bash */ ''
runHook preUnpack
cp "$src" $(stripHash "$src")
unar $(stripHash "$src")
runHook postUnpack
'';
#
installPhase = /* bash */ ''
runHook preInstall
mkdir -p $out/share/eww
cp -r */ $out/share/eww
runHook postInstall
'';
meta = {
homepage = "https://github.com/vinceliuice/Fluent-icon-theme";
description = "Fluent folder icons converted to png";
};
}