From 6f5d7aa29b42985366396c5c7aa488bb20d464f0 Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Sun, 19 Sep 2021 22:03:39 -0700 Subject: [PATCH] flake.nix: Clean up and add overlay --- flake.nix | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index a7b5d62..bcaae4a 100644 --- a/flake.nix +++ b/flake.nix @@ -12,13 +12,13 @@ }; outputs = { self, nixpkgs, utils, ... }: let - supportedSystems = utils.lib.defaultSystems ++ [ "riscv64-linux" ]; + supportedSystems = utils.lib.defaultSystems; in utils.lib.eachSystem supportedSystems (system: let pkgs = import nixpkgs { inherit system; }; in rec { # We still maintain the expression in a Nixpkgs-acceptable form - legacyPackages.colmena = import ./default.nix { inherit pkgs; }; - defaultPackage = self.legacyPackages.${system}.colmena; + packages.colmena = import ./default.nix { inherit pkgs; }; + defaultPackage = self.packages.${system}.colmena; defaultApp = self.apps.${system}.colmena; apps.colmena = { @@ -33,5 +33,11 @@ export NIX_PATH=nixpkgs=${pkgs.path} ''; }; - }); + }) // { + overlay = final: prev: { + colmena = import ./default.nix { + pkgs = final; + }; + }; + }; }