Home Explore Blog Models CI



nixpkgs

doc/languages-frameworks/astal.section.md
1ba1020834c91f596b37a2d02b454c695fd757137fb21781000000030000035b
# Astal {#astal}

Astal is a collection of building blocks for creating custom desktop shells.

## Bundling {#astal-bundling}

Bundling an Astal application is done using the `ags` tool. You can use it like this:

```nix
ags.bundle {
  pname = "hyprpanel";
  version = "1.0.0";

  src = fetchFromGitHub {
    #...
  };

  # change your entry file (default is `app.ts`)
  entry = "app.ts";

  dependencies = [
    # list here astal modules that your package depends on
    # `astal3`, `astal4` and `astal.io` are automatically included
    astal.apps
    astal.battery
    astal.bluetooth

    # you can also list here other runtime dependencies
    hypridle
    hyprpicker
    hyprsunset
  ];

  # GTK 4 support is opt-in
  enableGtk4 = true;

  meta = {
    #...
  };
}
```

You can also pass all other arguments that are supported by `stdenv.mkDerivation`.

Chunks
22a5e6fb (1st chunk of `doc/languages-frameworks/astal.section.md`)
Title: Astal: Building Custom Desktop Shells and Application Bundling
Summary
Astal is a collection of building blocks designed for creating custom desktop shells. This section details the process of bundling an Astal application using the `ags` tool. The bundling configuration allows specifying project details like `pname`, `version`, `src` (source code), and the `entry` file (defaulting to `app.ts`). Users can declare Astal modules their package depends on (e.g., `astal.apps`, `astal.battery`), as well as other runtime dependencies. Optional GTK 4 support can be enabled, and all other arguments supported by `stdenv.mkDerivation` are also accepted.