about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2024-05-19 00:03:16 +0200
committerAlan Pearce2024-05-19 00:03:16 +0200
commitbadd116ce551ea2787e312a45d815e253b74d8cd (patch)
treef94e088a4621a7a0572155c792b2f16641f18fb4
parent8dfa231be5a30221c36e0431f07bfadb3348a09b (diff)
downloadnix-packages-badd116ce551ea2787e312a45d815e253b74d8cd.tar.lz
nix-packages-badd116ce551ea2787e312a45d815e253b74d8cd.tar.zst
nix-packages-badd116ce551ea2787e312a45d815e253b74d8cd.zip
flake: add `all` output for easier pushing in CI
-rw-r--r--flake.nix23
1 files changed, 18 insertions, 5 deletions
diff --git a/flake.nix b/flake.nix
index 281bc6c..484f924 100644
--- a/flake.nix
+++ b/flake.nix
@@ -15,12 +15,25 @@
       forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
     in
     {
-      legacyPackages = forAllSystems (system: import ./default.nix {
+      legacyPackages = forAllSystems (system: (import ./default.nix {
         pkgs = import nixpkgs { inherit system; };
-      });
+      }));
       packages = forAllSystems (system:
-        nixpkgs.lib.filterAttrs
-          (_: v: nixpkgs.lib.isDerivation v)
-          self.legacyPackages.${system});
+        let
+          pkgs = import nixpkgs { inherit system; };
+
+          lpkgs = nixpkgs.lib.filterAttrs
+            (_: v: nixpkgs.lib.isDerivation v)
+            self.legacyPackages.${system};
+
+          all = pkgs.symlinkJoin {
+            name = "all";
+            paths = builtins.attrValues lpkgs;
+          };
+        in
+        (lpkgs // {
+          inherit all;
+          default = all;
+        }));
     };
 }