about summary refs log tree commit diff
diff options
context:
space:
mode:
authoraszlig <aszlig@nix.build>2020-11-02 21:26:37 +0100
committeraszlig <aszlig@nix.build>2020-11-02 21:29:23 +0100
commit9ac9166d6a9398bbf31b6e3d0f30a835226c854c (patch)
treecf473e09cd39a50bba987fc9049f26590a40a1f1
parent7f6a99a89fc9fd7dbd660ddcb4da4b7b0f9a84bf (diff)
flake.nix: Expose packages as legacyPackages
While the "packages" within Nix Flakes does make a few things a bit
simpler it also only allows us to export a flat structure.

However, in Vuizvui we want to use namespaces for the corresponding
package sets, since different packages could have different overrides
depending on the namespace of the corresponding author.

Signed-off-by: aszlig <aszlig@nix.build>
-rw-r--r--flake.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/flake.nix b/flake.nix
index a235d3ca..585fef9c 100644
--- a/flake.nix
+++ b/flake.nix
@@ -1,8 +1,12 @@
 {
   description = "Vuizvui";
 
-  outputs = _: {
+  outputs = { self, nixpkgs }: {
     nixosModules.vuizvui = import modules/module-list.nix;
     overlay = _: pkgs: { vuizvui = import ./pkgs { inherit pkgs; }; };
+
+    legacyPackages = nixpkgs.lib.mapAttrs (_: pkgs: let
+      inherit (pkgs.extend self.overlay) vuizvui;
+    in vuizvui) nixpkgs.legacyPackages;
   };
 }