flake-utils/examples/each-system/flake.nix

20 lines
547 B
Nix
Raw Permalink Normal View History

2020-04-22 17:12:09 +02:00
{
description = "Flake utils demo";
2020-07-07 14:01:39 +02:00
inputs.flake-utils.url = "github:numtide/flake-utils";
2020-04-22 17:12:09 +02:00
2020-07-07 14:01:39 +02:00
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
2020-04-22 17:12:09 +02:00
let pkgs = nixpkgs.legacyPackages.${system}; in
rec {
packages = flake-utils.lib.flattenTree {
hello = pkgs.hello;
gitAndTools = pkgs.gitAndTools;
};
2020-04-22 17:12:09 +02:00
defaultPackage = packages.hello;
2020-07-07 14:01:39 +02:00
apps.hello = flake-utils.lib.mkApp { drv = packages.hello; };
2020-04-22 17:12:09 +02:00
defaultApp = apps.hello;
}
);
}