From 4d2865053d5ef9b8ef96134a31681e1106cdfa4b Mon Sep 17 00:00:00 2001 From: Fuwn Date: Fri, 18 Oct 2024 01:09:57 +0000 Subject: docs(examples): add readme --- examples/README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 examples/README.md diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 0000000..c70edc6 --- /dev/null +++ b/examples/README.md @@ -0,0 +1,24 @@ +# Examples + +## [Nixpkgs](https://github.com/Fuwn/yae/tree/main/examples/nixpkgs) + +This example showcases adding the Nixpkgs unstable branch as a Yae source, +consuming it within an example flake, and mirroring the `hello` package from +Nixpkgs as a flake output. + +Note that the flake has no inputs. This is because Yae directly manages the +Nixpkgs source. + +This example is extremely useful and is intended be adapted to suite the specific +needs of flake-less Nix configurations, like classic Nix shells and flake-less system +configurations. + +## [Nixpkgs Simple](https://github.com/Fuwn/yae/tree/main/examples/nixpkgs-simple) + +This example is functionally identical to the Nixpkgs example, with the exception +that it utilises `builtins.currentSystem` to populate the `nixpkgs.system` +attribute, requiring the `--impure` command-line flag. + +This example is purely for the sake of example, since in a real-world scenario, +you'd likely use something similar to [flake-utils](https://github.com/numtide/flake-utils) +for multi-system output management and populating the `nixpkgs.system` attribute. -- cgit v1.2.3