From ed1a8e082153d1141ab57ce6f94d87cb0b24af51 Mon Sep 17 00:00:00 2001 From: Knarkzel Date: Sat, 19 Nov 2022 01:00:49 +0100 Subject: [PATCH] Minimal example --- README.md | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e05c9c7..458d5ce 100644 --- a/README.md +++ b/README.md @@ -14,4 +14,36 @@ $ ls result devkitPPC libogc portlibs tools wut ``` -For example usage of `devkitnix`, see the [switch example](https://github.com/knarkzel/switch). +## Minimal example + +```nix +{ + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.05"; + devkitnix = { + url = "github:knarkzel/devkitnix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = { + self, + nixpkgs, + devkitnix, + }: let + pkgs = import nixpkgs {system = "x86_64-linux";}; + devkitA64 = devkitnix.packages.x86_64-linux.devkitA64; + in { + devShells.x86_64-linux.default = pkgs.mkShell { + buildInputs = [ + devkitA64 + ]; + shellHook = '' + export DEVKITPRO=${devkitA64} + ''; + }; + }; +} +``` + +For more example usage of `devkitnix`, see the [switch example](https://github.com/knarkzel/switch).