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