⛩️ Powerful yet Minimal Nix Dependency Manager
flake flakes home-manager nixos go nix dependency dependencies
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs(readme): add extensive usage instructions

Fuwn 822c58f3 0433ac6a

+63 -1
+63 -1
README.md
··· 13 13 Additionally, [Tsutsumi](https://github.com/Fuwn/tsutsumi) uses Yae to manage 14 14 dependencies. You can check out a working implementation there. 15 15 16 + ## Usage 17 + 18 + View the [installations instructions](#installation) below to set up Yae after 19 + running `yae init`. 20 + 21 + ```sh 22 + # Initialises a Yae environment in the current directory by creating an empty `yae.json` 23 + # file 24 + yae init 25 + 26 + # Adds a Yae dependency named `zen-browser-twilight-bin` using a floating tag 27 + # (tag always remain `twilight`, but may receive frequent hash changes) 28 + yae add \ 29 + --type binary \ 30 + --version twilight \ 31 + --unpack \ 32 + zen-browser-twilight-bin \ 33 + 'https://github.com/zen-browser/desktop/releases/download/{version}/zen.linux-specific.tar.bz2' 34 + 35 + # Adds a Yae dependency named `zen-browser-bin` pinned at tag `1.0.1-a.7` 36 + yae add \ 37 + --type git \ 38 + --version 1.0.1-a.7 \ 39 + --unpack \ 40 + zen-browser-bin \ 41 + 'https://github.com/zen-browser/desktop/releases/download/{version}/zen.linux-specific.tar.bz2' 42 + 43 + # Updates all dependencies, e.g., updates the hash of `zen-browser-twilight-bin` 44 + # and bumps the version of `zen-browser-bin` to `1.0.1-a.8`, handling URI and 45 + # hash recalculations 46 + yae update 47 + 48 + # Only updates `zen-browser-twilight-bin` 49 + yae update zen-browser-twilight-bin 50 + ``` 51 + 16 52 ## Installation 17 53 18 - Follow the installation instructions at [Tsutsumi](https://github.com/Fuwn/tsutsumi). 54 + Follow the installation instructions at [Tsutsumi](https://github.com/Fuwn/tsutsumi), 55 + which provides both flake and flake-less installation options. 56 + 57 + Alternatively, without flake-less support, install the 58 + `inputs.yae.packages.${pkgs.system}.yae` package exposed by this flake. 59 + 60 + ### Nix 61 + 62 + To add Yae support to your Nix expression after running `yae init`, just read 63 + from the Yae environment file. 64 + 65 + Here's an example taken from [Tsutsumi's zen-browser-bin package](https://github.com/Fuwn/tsutsumi/blob/main/pkgs/zen-browser-bin.nix). 66 + 67 + ```nix 68 + # pkgs/zen-browser-bin.nix 69 + 70 + { 71 + pkgs, 72 + self, 73 + yae ? builtins.fromJSON (builtins.readFile "${self}/yae.json"), 74 + }: 75 + import "${self}/lib/zen-browser-bin.nix" { 76 + # Effortless dependency updates just by running `yae update` from CI using a 77 + # CRON job 78 + inherit (yae.zen-browser-bin) sha256 version; 79 + } { inherit pkgs; } 80 + ``` 19 81 20 82 ## `--help` 21 83