{ pkgs, inputs, system, options, ... }: let runCommand = pkgs.runCommand; dart-sass = pkgs.dart-sass; apkgs = inputs.astal.packages.${system}; scss = "${dart-sass}/bin/sass"; theme = import ./theme.nix {inherit options;}; mkAstal = file: inputs.astal.lib.mkLuaPackage { pkgs = pkgs // { # use luajit lua = pkgs.luajit; }; src = runCommand "src" {} '' mkdir -p $out cp -r ${./src}/{*.lua,widget} $out/ cp $out/${file}.lua $out/init.lua cp -r ${./src}/style/* . echo '${theme}' > theme.scss cat theme.scss style.scss widget/* > main.scss ${scss} main.scss $out/main.css ''; name = "astal-${file}"; extraPackages = (with apkgs; [ apps battery hyprland mpris network notifd tray wireplumber ]) ++ (with pkgs; [ networkmanager ]); }; mkAstalWrapper = file: let pkg = mkAstal file; in pkgs.writeShellApplication { name = "astal-${file}"; text = '' ${pkg}/bin/astal-${file} ''; }; in { shell = mkAstalWrapper "shell"; launcher = mkAstalWrapper "launcher"; }