From ebc457799080d43e8e22166043fc0a84c0b14d93 Mon Sep 17 00:00:00 2001 From: Xavier Vello Date: Sat, 14 May 2022 21:50:01 +0200 Subject: Update flake to support nix 2.8 nix 2.7 renamed defaultApp and defaultPackage. Both the old and new names are supported in 2.7, but 2.8 has removed support for the old names, breaking the nix run invocation. Old names are kept in this PR to keep compatibility with nix 2.6, but could be removed if support of this version is not needed anymore. --- flake.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 3344e71..7a75d7c 100644 --- a/flake.nix +++ b/flake.nix @@ -74,7 +74,7 @@ name = base.name + "-activate-rs"; text = '' #!${final.runtimeShell} - exec ${self.defaultPackage.${system}}/bin/activate "$@" + exec ${self.packages.${system}.default}/bin/activate "$@" ''; executable = true; destination = "/activate-rs"; @@ -133,12 +133,14 @@ in { defaultPackage = self.packages."${system}".deploy-rs; + packages.default = self.packages."${system}".deploy-rs; packages.deploy-rs = pkgs.deploy-rs.deploy-rs; defaultApp = self.apps."${system}".deploy-rs; + apps.default = self.apps."${system}".deploy-rs; apps.deploy-rs = { type = "app"; - program = "${self.defaultPackage."${system}"}/bin/deploy"; + program = "${self.packages."${system}".default}/bin/deploy"; }; devShell = pkgs.mkShell { @@ -157,7 +159,7 @@ }; checks = { - deploy-rs = self.defaultPackage.${system}.overrideAttrs (super: { doCheck = true; }); + deploy-rs = self.packages.${system}.default.overrideAttrs (super: { doCheck = true; }); }; lib = pkgs.deploy-rs.lib; -- cgit v1.2.3