on master help sign in
Add a desk output to the flake, with default pointing at it
7bd213eiko
README.md+4−4
@@ -55,9 +55,9 @@ belongs to Landscape.
55
55
56## Building with Nix
56## Building with Nix
57
57
58−`flake.nix` has one output: `packages.<system>.default`, the desk. Building it
58+`flake.nix` has one output: the desk, `packages.<system>.desk`, which is also
59−copies `desk/` into the Nix store; nothing is compiled, because Clay compiles
59+the default package. Building it copies `desk/` into the Nix store; nothing is
60−the Hoon on your ship when you commit the desk.
60+compiled, because Clay compiles the Hoon on your ship when you commit the desk.
61
61
62| Command | Builds |
62| Command | Builds |
63|---|---|
63|---|---|
@@ -88,7 +88,7 @@ result/
88 ```nix
88 ```nix
89 inputs.shelf.url = "github:iko-soy/shelf";
89 inputs.shelf.url = "github:iko-soy/shelf";
90 # …
90 # …
91− shelf.packages.${system}.default
91+ shelf.packages.${system}.desk
92 ```
92 ```
93
93
94## Update
94## Update
flake.nix+10−5
@@ -10,10 +10,15 @@
10 in
10 in
11 {
11 {
12 # The desk: copy it into a mounted %shelf desk and |commit it.
12 # The desk: copy it into a mounted %shelf desk and |commit it.
13− packages = forAllSystems (pkgs: {
13+ packages = forAllSystems (pkgs:
14+ let
14− default = pkgs.runCommandLocal "shelf-desk" { } ''
15+ desk = pkgs.runCommandLocal "shelf-desk" { } ''
15− cp -r ${./desk} $out
16+ cp -r ${./desk} $out
16− '';
17+ '';
18+ in
19+ {
20+ inherit desk;
21+ default = desk;
17− });
22+ });
18 };
23 };
19}
24}