refactor!: start migration to latest ags

This commit is contained in:
2025-12-05 17:00:22 -08:00
parent 1759e2d976
commit 42b4f99c37
12 changed files with 191 additions and 147 deletions

View File

@@ -4,6 +4,11 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
astal = {
url = "github:aylur/astal";
inputs.nixpkgs.follows = "nixpkgs";
};
ags = {
url = "github:aylur/ags";
inputs.nixpkgs.follows = "nixpkgs";
@@ -15,6 +20,7 @@
self,
nixpkgs,
ags,
astal,
}:
let
system = "x86_64-linux";
@@ -28,20 +34,52 @@
];
in
{
packages.${system} = {
status-bar = ags.lib.bundle {
inherit pkgs;
src = ./.;
name = "status-bar";
entry = "app.ts";
# packages.${system} = {
# status-bar = ags.lib.bundle {
# inherit pkgs;
# src = ./.;
# name = "status-bar";
# entry = "app.ts";
#
# extraPackages =
# with pkgs;
# extraPkgs
# ++ [
# libgtop
# ];
# };
# };
packages.${system}.default = pkgs.stdenv.mkDerivation rec {
pname = "status-bar";
name = "status-bar";
extraPackages =
with pkgs;
extraPkgs
++ [
libgtop
];
};
src = ./.;
nativeBuildInputs = with pkgs; [
wrapGAppsHook3
gobject-introspection
ags.packages.${system}.default
];
buildInputs = [
pkgs.glib
pkgs.libgtop
pkgs.gjs
astal.packages.${system}.io
astal.packages.${system}.astal4
astal.packages.${system}.battery
astal.packages.${system}.hyprland
astal.packages.${system}.network
astal.packages.${system}.wireplumber
];
installPhase = ''
mkdir -p $out/bin
mkdir -p $out/share
cp -r * $out/share
jj
ags bundle app.ts $out/bin/${pname} -d "SRC='$out/share'"
'';
};
devShells.${system} = {