From 43d5c5f87b0f1cc9405709a777d66496b4ca4e21 Mon Sep 17 00:00:00 2001 From: regnat Date: Tue, 13 Jul 2021 13:44:47 +0200 Subject: [PATCH] Make `nix flake show` display the `devShells` --- src/nix/flake.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/nix/flake.cc b/src/nix/flake.cc index 9055b07eb..ce82eb8e8 100644 --- a/src/nix/flake.cc +++ b/src/nix/flake.cc @@ -914,6 +914,7 @@ struct CmdFlakeShow : FlakeCommand logger->cout("%s: %s '%s'", headerPrefix, attrPath.size() == 2 && attrPath[0] == "devShell" ? "development environment" : + attrPath.size() >= 2 && attrPath[0] == "devShells" ? "development environment" : attrPath.size() == 3 && attrPath[0] == "checks" ? "derivation" : attrPath.size() >= 1 && attrPath[0] == "hydraJobs" ? "derivation" : "package", @@ -932,6 +933,7 @@ struct CmdFlakeShow : FlakeCommand || ((attrPath.size() == 1 || attrPath.size() == 2) && (attrPath[0] == "checks" || attrPath[0] == "packages" + || attrPath[0] == "devShells" || attrPath[0] == "apps")) ) { @@ -940,7 +942,7 @@ struct CmdFlakeShow : FlakeCommand else if ( (attrPath.size() == 2 && (attrPath[0] == "defaultPackage" || attrPath[0] == "devShell")) - || (attrPath.size() == 3 && (attrPath[0] == "checks" || attrPath[0] == "packages")) + || (attrPath.size() == 3 && (attrPath[0] == "checks" || attrPath[0] == "packages" || attrPath[0] == "devShells")) ) { if (visitor.isDerivation())