{ astal, callPackage, dart-sass, networkmanager, runCommand, writeShellApplication, # System theme must be passed in theme ? null, ... }: let vars = import ./theme.nix {inherit theme;}; mkAstal = file: callPackage ./builder.nix { src = runCommand "src" {} '' mkdir -p $out cp -r ${./src}/{*.lua,widget} $out/ cp $out/${file}.lua $out/init.lua cp -r ${./src}/style/* . echo '${vars}' > theme.scss cat theme.scss style.scss widget/* > main.scss ${dart-sass}/bin/sass main.scss $out/main.css ''; name = "astal-${file}"; extraPackages = (with astal; [ apps battery hyprland mpris network notifd tray wireplumber ]) ++ [ networkmanager ]; }; mkAstalWrapper = file: let pkg = mkAstal file; in writeShellApplication { name = "astal-${file}"; text = '' ${pkg}/bin/astal-${file} ''; }; in { shell = mkAstalWrapper "shell"; launcher = mkAstalWrapper "launcher"; }