···7272To add Yae support to your Nix expression after running `yae init`, just read
7373from the Yae environment file.
74747575-Here's an example taken from [Tsutsumi's `zen-browser-bin` package](https://github.com/Fuwn/tsutsumi/blob/main/pkgs/zen-browser-bin.nix).
7575+Here's an example snippet taken from Tsutsumi's [`zen-browser-bin` package](https://github.com/Fuwn/tsutsumi/blob/main/pkgs/zen-browser-bin.nix)
7676+and [`yae.json`](https://github.com/Fuwn/tsutsumi/blob/main/yae.json#L59-L67)
7777+showcasing Yae in action.
76787779```nix
7880# pkgs/zen-browser-bin.nix
79818282+# This expression produces the `zen-browser-bin` package that Tsutsumi exposes
8383+# as a Nix package derivation.
8484+#
8585+# Since it is managed by Yae, it is kept 100% up to date with zero effort through
8686+# a Github Actions CRON job workflow that executes `yae update` periodically.
8087{
8188 pkgs,
8289 self,
9090+ # This line imports Yae's environment configuration to be used below.
8391 yae ? builtins.fromJSON (builtins.readFile "${self}/yae.json"),
8492}:
9393+# Tsutsumi exposes two versions of the Zen browser, the latest stable release
9494+# and the latest Twilight release (a bleeding edge, daily build). This library
9595+# function is one that takes one of two Yae sources for the Zen browser, and produces
9696+# a Nix package derivation for it.
8597import "${self}/lib/zen-browser-bin.nix" {
8686- # Effortless dependency updates just by running `yae update` from CI using a
8787- # CRON job
9898+ # Here, the latest SHA256 hash and release version from Yae are passed to Tsutsumi's
9999+ # Zen browser packace function.
100100+ #
101101+ # If `yae update` is ran and a new release is detected, these values are
102102+ # updated by Yae, which then triggers another workflow to build and send the
103103+ # resulting derivation to Tsutsumi's binary cache.
88104 inherit (yae.zen-browser-bin) sha256 version;
105105+106106+ # To generate the Twilight release package, this is all that is changed.
107107+ # inherit (yae.zen-browser-twilight-bin) sha256 version;
89108} { inherit pkgs; }
90109```
91110