Skip to content

Commit ebc4577

Browse files
committed
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.
1 parent 690f698 commit ebc4577

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

flake.nix

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
name = base.name + "-activate-rs";
7575
text = ''
7676
#!${final.runtimeShell}
77-
exec ${self.defaultPackage.${system}}/bin/activate "$@"
77+
exec ${self.packages.${system}.default}/bin/activate "$@"
7878
'';
7979
executable = true;
8080
destination = "/activate-rs";
@@ -133,12 +133,14 @@
133133
in
134134
{
135135
defaultPackage = self.packages."${system}".deploy-rs;
136+
packages.default = self.packages."${system}".deploy-rs;
136137
packages.deploy-rs = pkgs.deploy-rs.deploy-rs;
137138

138139
defaultApp = self.apps."${system}".deploy-rs;
140+
apps.default = self.apps."${system}".deploy-rs;
139141
apps.deploy-rs = {
140142
type = "app";
141-
program = "${self.defaultPackage."${system}"}/bin/deploy";
143+
program = "${self.packages."${system}".default}/bin/deploy";
142144
};
143145

144146
devShell = pkgs.mkShell {
@@ -157,7 +159,7 @@
157159
};
158160

159161
checks = {
160-
deploy-rs = self.defaultPackage.${system}.overrideAttrs (super: { doCheck = true; });
162+
deploy-rs = self.packages.${system}.default.overrideAttrs (super: { doCheck = true; });
161163
};
162164

163165
lib = pkgs.deploy-rs.lib;

0 commit comments

Comments
 (0)