diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2021-02-17 16:53:19 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2021-02-17 16:53:39 +0100 |
commit | cced73496b835b545be91cbebc4f89f61a7b106f (patch) | |
tree | b9ad65ea81c484729825b1c55628c9366b5351fa /src | |
parent | 063de66909ff1b20394cdebdca1ef62bb6ca1d51 (diff) |
nix flake show: Handle 'overlays' output
Fixes #4542.
Diffstat (limited to 'src')
-rw-r--r-- | src/nix/flake.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nix/flake.cc b/src/nix/flake.cc index 4cd7d77a0..091af8084 100644 --- a/src/nix/flake.cc +++ b/src/nix/flake.cc @@ -880,7 +880,8 @@ struct CmdFlakeShow : FlakeCommand || attrPath[0] == "nixosConfigurations" || attrPath[0] == "nixosModules" || attrPath[0] == "defaultApp" - || attrPath[0] == "templates")) + || attrPath[0] == "templates" + || attrPath[0] == "overlays")) || ((attrPath.size() == 1 || attrPath.size() == 2) && (attrPath[0] == "checks" || attrPath[0] == "packages" @@ -943,7 +944,8 @@ struct CmdFlakeShow : FlakeCommand else { logger->cout("%s: %s", headerPrefix, - attrPath.size() == 1 && attrPath[0] == "overlay" ? "Nixpkgs overlay" : + (attrPath.size() == 1 && attrPath[0] == "overlay") + || (attrPath.size() == 2 && attrPath[0] == "overlays") ? "Nixpkgs overlay" : attrPath.size() == 2 && attrPath[0] == "nixosConfigurations" ? "NixOS configuration" : attrPath.size() == 2 && attrPath[0] == "nixosModules" ? "NixOS module" : ANSI_YELLOW "unknown" ANSI_NORMAL); |