summaryrefslogtreecommitdiff
path: root/pkgs/astal/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/astal/default.nix')
-rw-r--r--pkgs/astal/default.nix35
1 files changed, 16 insertions, 19 deletions
diff --git a/pkgs/astal/default.nix b/pkgs/astal/default.nix
index dc8f2a7..d076f07 100644
--- a/pkgs/astal/default.nix
+++ b/pkgs/astal/default.nix
@@ -1,32 +1,29 @@
{
- pkgs,
- stdenv,
- inputs,
- options,
+ astal,
+ callPackage,
+ dart-sass,
+ networkmanager,
+ runCommand,
+ writeShellApplication,
+ # System theme must be passed in
+ theme ? null,
...
}: let
- inherit (pkgs) runCommand 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
@@ -36,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}