diff options
author | regnat <rg@regnat.ovh> | 2021-07-13 13:44:47 +0200 |
---|---|---|
committer | regnat <rg@regnat.ovh> | 2021-07-13 17:25:27 +0200 |
commit | 43d5c5f87b0f1cc9405709a777d66496b4ca4e21 (patch) | |
tree | 23f21157b880f0ade562bc88be087b6a06bf2132 /src | |
parent | 037c86ee04d681170cedaf71f9d75c186abe9719 (diff) |
Make `nix flake show` display the `devShells`
Diffstat (limited to 'src')
-rw-r--r-- | src/nix/flake.cc | 4 |
1 files changed, 3 insertions, 1 deletions
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()) |