aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorXavier Vello2022-05-14 21:50:01 +0200
committerXavier Vello2022-05-14 22:09:00 +0200
commitebc457799080d43e8e22166043fc0a84c0b14d93 (patch)
tree1fe7916be119770091aca5612c5d995cd46a4f5d /flake.nix
parent690f698b18345d894784752b5fa93b9b8f3cc29f (diff)
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.
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix8
1 files 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;