Răsfoiți Sursa

fix(nix): match current flake output schema

by adding `packages.<system>.default` and `devShells.<system>.default`,
which are used in the current flake output schema in place of,
respectively,  `defaultPackage.<system>` and `devShell.<system>`.

Retain `defaultPackage.<system>` and `devShell.<system>` for
compatibility with older Nix clients, but make them aliases for the
newer output schema attributes.
Matt Schreiber 2 ani în urmă
părinte
comite
f6398d491d
1 a modificat fișierele cu 13 adăugiri și 5 ștergeri
  1. 13 5
      flake.nix

+ 13 - 5
flake.nix

@@ -30,13 +30,21 @@
           make OUT_DIR="$out"
         '';
     in {
-      packages = perSystem (system: {
-        resume = buildResumeFor system;
+      packages = perSystem (system:
+        let
+          resume = buildResumeFor system;
+        in
+        {
+          inherit resume;
+          default = resume;
+        });
+
+      devShells = perSystem (system: {
+        default = import ./shell.nix { pkgs = pkgsFor system; };
       });
 
-      devShell =
-        perSystem (system: import ./shell.nix { pkgs = pkgsFor system; });
+      devShell = perSystem (system: self.devShells.${system}.default);
 
-      defaultPackage = perSystem (system: self.packages.${system}.resume);
+      defaultPackage = perSystem (system: self.packages.${system}.default);
     };
 }