Home Explore Blog CI



nixpkgs

doc/languages-frameworks/astal.section.md
131bb89bc9300b78ec0f714abca08303346e2434e7d2dc800000000300000355
# Astal {#astal}

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

## Bundling {#astal-bundling}

Bundling Astal application is done using `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
d5722b4b (1st chunk of `doc/languages-frameworks/astal.section.md`)
Title: Astal: Building Blocks for Desktop Shells and Bundling with AGS
Summary
Astal is a collection of building blocks for creating custom desktop shells. The `ags` tool is used for bundling Astal applications. The code snippet demonstrates how to use `ags.bundle` within a Nix configuration to package an application like 'hyprpanel', specifying its source, entry point, dependencies (including Astal modules and other runtime dependencies), GTK4 support, and metadata. It also mentions that all arguments supported by `stdenv.mkDerivation` can be passed.