{ config, pkgs, lib, ... }: let # Core dependencies needed by most Nomarchy scripts nomarchy-deps = with pkgs; [ gum hyprland procps libnotify coreutils gnused gnugrep pciutils findutils jq swww xmlstarlet wl-clipboard grim slurp brightnessctl playerctl pamixer pulseaudio wireplumber swayosd gawk curl wget # Add any others commonly used in bin/ ]; nomarchy-scripts = pkgs.stdenv.mkDerivation { pname = "nomarchy-scripts"; version = "1.0.0"; src = ../../bin; nativeBuildInputs = [ pkgs.makeWrapper ]; installPhase = '' mkdir -p $out/bin cp -r * $out/bin/ chmod +x $out/bin/* # Wrap every script to ensure dependencies are in PATH for file in $out/bin/*; do if [ -f "$file" ]; then wrapProgram "$file" \ --prefix PATH : ${lib.makeBinPath nomarchy-deps} fi done ''; }; in { home.packages = [ nomarchy-scripts ]; }