From fe47133e9d7c9180a5c270f7a36b0df4b4426473 Mon Sep 17 00:00:00 2001 From: Eric Drechsel Date: Fri, 3 Jun 2022 14:02:13 -0700 Subject: [PATCH] Set packages.default for `nix run` With the pre-2.7 `defaultPackage` key, one would write ``` defaultPackage = packages.hello ``` I guess you can do the same in 2.7, but then you have two attrs in packages, which seems like it might confuse tooling: ``` packages.default = packages.hello ``` I wonder if packages.default shouldn't be a string? but then it would need validation... --- template/default/flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template/default/flake.nix b/template/default/flake.nix index 9277a70..e85b119 100644 --- a/template/default/flake.nix +++ b/template/default/flake.nix @@ -23,7 +23,7 @@ # system. # Equivalent to inputs'.nixpkgs.legacyPackages.hello; - packages.hello = pkgs.hello; + packages.default = pkgs.hello; }; flake = { # The usual flake attributes can be defined here, including system-