Update README to reflect example for eachDefaultSystem (#90)

packages.default instead of defaultPackage. Same for apps.
This commit is contained in:
Abin Simon 2023-03-15 23:03:47 +05:30 committed by GitHub
parent 3db36a8b46
commit 93a2b84fc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -72,14 +72,15 @@ eachSystem allSystems (system: { hello = 42; })
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = nixpkgs.legacyPackages.${system}; in
rec {
packages = flake-utils.lib.flattenTree {
{
packages = rec {
hello = pkgs.hello;
gitAndTools = pkgs.gitAndTools;
default = hello;
};
apps = rec {
hello = flake-utils.lib.mkApp { drv = self.packages.${system}.hello; };
default = hello;
};
defaultPackage = packages.hello;
apps.hello = flake-utils.lib.mkApp { drv = packages.hello; };
defaultApp = apps.hello;
}
);
}