summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorx10an14 <x10an14@users.noreply.github.com>2023-08-30 18:09:41 +0200
committerx10an14 <x10an14@users.noreply.github.com>2023-08-30 18:09:41 +0200
commit60b848760033ee3f7a6522929f7b4aa21064c5e2 (patch)
tree23ce43235e768555fb84eb2c29a41792fc336a66
parent2d1da2ab57080e32725612ffddb82006f47f7f71 (diff)
feat(flake): Add defaults to commands in flake
So that: - `nix build .#`, and - `nix run .#` both work.
-rw-r--r--flake.nix13
1 files changed, 13 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
index 5dbca5c..791c36f 100644
--- a/flake.nix
+++ b/flake.nix
@@ -60,5 +60,18 @@
clippy
] ++ cargoBuildInputs;
};
+ apps = let
+ rustlings-app = {
+ type = "app";
+ program = "${rustlings}/bin/rustlings";
+ };
+ in {
+ default = rustlings-app;
+ rustlings = rustlings-app;
+ };
+ packages = {
+ inherit rustlings;
+ default = rustlings;
+ };
});
}