From 0ecc1cbf402c08df37c48d30571771e33b212548 Mon Sep 17 00:00:00 2001 From: ooks-io Date: Mon, 20 Jan 2025 11:29:49 +1100 Subject: [PATCH] alejandra --- outputs/lib/icon/mkLogo.nix | 122 ------------------------------------ outputs/lib/icon/utils.nix | 16 ----- 2 files changed, 138 deletions(-) delete mode 100644 outputs/lib/icon/mkLogo.nix delete mode 100644 outputs/lib/icon/utils.nix diff --git a/outputs/lib/icon/mkLogo.nix b/outputs/lib/icon/mkLogo.nix deleted file mode 100644 index 2fb7303..0000000 --- a/outputs/lib/icon/mkLogo.nix +++ /dev/null @@ -1,122 +0,0 @@ -{ - lib, - pkgs, - hozen, - ... -}: let - inherit (lib) makeExtensible; - inherit (hozen) color; -in - makeExtensible (self: { - # Base logo derivation - mkLogo = { - name ? "ooknet-logo", - width ? 512, - height ? 512, - dark ? color.neutrals."800", - mid ? color.neutrals."650", - light ? color.neutrals."550", - shadow ? color.neutrals."700", - highlight ? color.neutrals."300", - }: - pkgs.stdenv.mkDerivation { - inherit name width height; - - # Use your SVG content here - src = pkgs.writeTextFile { - name = "logo.svg"; - text = - /* - html - */ - '' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ''; - }; - - nativeBuildInputs = [pkgs.inkscape]; - - # Proper build phases - buildPhase = '' - # Ensure output directory exists - mkdir -p $out/share/icons - - # Convert SVG to PNG - inkscape --export-type="png" \ - --export-filename="$out/share/icons/${name}.png" \ - --export-width=${toString width} \ - --export-height=${toString height} \ - $src - - # Also keep the SVG - cp $src "$out/share/icons/${name}.svg" - ''; - - # Meta information is always good practice - meta = { - description = "OokNet Logo"; - mainProgram = name; - }; - }; - - # Wallpaper derivation that uses the logo - mkWallpaper = { - width, - height, - logo ? self.mkLogo {}, - backgroundColor ? "282828", - }: - pkgs.stdenv.mkDerivation { - name = "ooknet-wallpaper"; - - buildInputs = [pkgs.imagemagick]; - - buildPhase = '' - # Create background - convert -size ${toString width}x${toString height} \ - xc:#${backgroundColor} \ - background.png - - # Composite logo onto center of background - composite -gravity center \ - ${logo}/share/icons/*.png \ - background.png \ - $out - ''; - }; - }) diff --git a/outputs/lib/icon/utils.nix b/outputs/lib/icon/utils.nix deleted file mode 100644 index 57ac62c..0000000 --- a/outputs/lib/icon/utils.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ - lib, - pkgs, - ... -}: let - inherit (lib) concatStrings; - - mkIcon = { - svg, - colors, {}, - height ? 24, - width ? 24 - }: let - - in - in