@@ -80,25 +80,17 @@ packages you create, plus a bunch of other things that aren't important to us. W
8080has everything we'll want when writing a Pebble app. pebble.nix has a function called ` pebbleEnv ` that has all of that
8181stuff included - we just need to create a flake that tells Nix to use ` pebbleEnv ` for our project's devshell.
8282
83- Paste the following into a file at the root of your project, called ` flake.nix ` :
84- ``` nix
85- {
86- inputs = {
87- pebble.url = "github:Sorixelle/pebble.nix";
88- flake-utils.url = "github:numtide/flake-utils";
89- };
90-
91- outputs =
92- { pebble, flake-utils, ... }:
93- flake-utils.lib.eachDefaultSystem (system: {
94- devShell = pebble.pebbleEnv.${system} { };
95- });
96- }
83+ pebble.nix provides a template for setting up a flake with a development shell in an existing project. To use that
84+ template, run:
85+
86+ ``` shell
87+ nix flake init -t github:Sorixelle/pebble.nix
9788```
9889
99- Once that file is created, run ` nix develop ` in the project. You'll be dropped into a new shell session, that has
100- everything you need to build Pebble apps - the ` pebble ` tool, the emulator, and an ARM compiler! You can use the
101- ` pebble ` tool exactly like you would in a normal install while you're in here.
90+ You should now have a ` flake.nix ` file in your project with a development shell ready to use. To ender the shell, run
91+ ` nix develop ` in the project. You'll be dropped into a new shell session, that has everything you need to build Pebble
92+ apps - the ` pebble ` tool, the emulator, and an ARM compiler! You can use the ` pebble ` tool exactly like you would in a
93+ normal install while you're in here.
10294
10395You'll notice a ` flake.lock ` file was created after running ` nix develop ` . That file makes sure none of the flake's
10496inputs (such as pebble.nix) update out of nowhere and potentially break your setup, similarly to things like npm's
0 commit comments