diff options
Diffstat (limited to 'pkgs/astal/default.nix')
| -rw-r--r-- | pkgs/astal/default.nix | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/pkgs/astal/default.nix b/pkgs/astal/default.nix index 6317f3b..d076f07 100644 --- a/pkgs/astal/default.nix +++ b/pkgs/astal/default.nix @@ -1,33 +1,29 @@ { - pkgs, - stdenv, - inputs, - options, + astal, + callPackage, + dart-sass, + networkmanager, + runCommand, + writeShellApplication, + # System theme must be passed in + theme ? null, ... }: let - runCommand = pkgs.runCommand; - dart-sass = pkgs.dart-sass; - - apkgs = inputs.astal.packages.${stdenv.hostPlatform.system}; - scss = "${dart-sass}/bin/sass"; - theme = import ./theme.nix {inherit options;}; - + vars = import ./theme.nix {inherit theme;}; mkAstal = file: - import ./builder.nix { - inherit pkgs; - astal = inputs.astal; + 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 '${theme}' > theme.scss + echo '${vars}' > theme.scss cat theme.scss style.scss widget/* > main.scss - ${scss} main.scss $out/main.css + ${dart-sass}/bin/sass main.scss $out/main.css ''; name = "astal-${file}"; extraPackages = - (with apkgs; [ + (with astal; [ apps battery hyprland @@ -37,15 +33,15 @@ tray wireplumber ]) - ++ (with pkgs; [ + ++ [ networkmanager - ]); + ]; }; mkAstalWrapper = file: let pkg = mkAstal file; in - pkgs.writeShellApplication { + writeShellApplication { name = "astal-${file}"; text = '' ${pkg}/bin/astal-${file} |