From 60b848760033ee3f7a6522929f7b4aa21064c5e2 Mon Sep 17 00:00:00 2001 From: x10an14 Date: Wed, 30 Aug 2023 18:09:41 +0200 Subject: [PATCH] feat(flake): Add defaults to commands in flake So that: - `nix build .#`, and - `nix run .#` both work. --- flake.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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; + }; }); }