From 220392fb85b4767a100dd0fbd9e6ec86371c7580 Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Mon, 7 Aug 2023 21:33:18 -0400 Subject: [PATCH] packages: Add fluent-icons Used for eww. --- assets/eww/eww.yuck | 2 +- packages/default.nix | 2 ++ packages/fluent-icons.nix | 41 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 packages/fluent-icons.nix diff --git a/assets/eww/eww.yuck b/assets/eww/eww.yuck index 93509a30..150c750d 100644 --- a/assets/eww/eww.yuck +++ b/assets/eww/eww.yuck @@ -9,7 +9,7 @@ (defwidget icon [img 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 :monitor 0 diff --git a/packages/default.nix b/packages/default.nix index ebd53247..7357c475 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -3,9 +3,11 @@ { environment.pathsToLink = [ "/share/backgrounds" + "/share/eww" ]; environment.systemPackages = [ (pkgs.callPackage ./osu-backgrounds.nix { }) + (pkgs.callPackage ./fluent-icons.nix { }) ]; } diff --git a/packages/fluent-icons.nix b/packages/fluent-icons.nix new file mode 100644 index 00000000..624a949a --- /dev/null +++ b/packages/fluent-icons.nix @@ -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"; + }; +}