Skip to content

Commit 60b8487

Browse files
committed
feat(flake): Add defaults to commands in flake
So that: - `nix build .#`, and - `nix run .#` both work.
1 parent 2d1da2a commit 60b8487

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

flake.nix

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,18 @@
6060
clippy
6161
] ++ cargoBuildInputs;
6262
};
63+
apps = let
64+
rustlings-app = {
65+
type = "app";
66+
program = "${rustlings}/bin/rustlings";
67+
};
68+
in {
69+
default = rustlings-app;
70+
rustlings = rustlings-app;
71+
};
72+
packages = {
73+
inherit rustlings;
74+
default = rustlings;
75+
};
6376
});
6477
}

0 commit comments

Comments
 (0)