flake.nix: Clean up and add overlay

This commit is contained in:
Zhaofeng Li 2021-09-19 22:03:39 -07:00
parent 37b43cd6d7
commit 6f5d7aa29b

View file

@ -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;
};
};
};
}