summaryrefslogtreecommitdiff
path: root/pkgs/astal/default.nix
blob: dc19a1908c29217489e1651e9fa0d9efff5e1e9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{
  pkgs,
  inputs,
  system,
  options,
  runCommand,
  dart-sass,
  ...
}:

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