aboutsummaryrefslogtreecommitdiff
path: root/src/nix/search.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-06-04 20:02:50 +0200
committerEelco Dolstra <edolstra@gmail.com>2020-06-04 20:22:25 +0200
commit810b2c6a48b5ecd468bd4f65963ce5a7aa96832e (patch)
tree6d0cf088c2b5ef713ef00d81da9413eb23916569 /src/nix/search.cc
parentdc305500c38c5e2227bea696949970c562046a8f (diff)
nix flake init: Add a '--template' flag
The initial contents of the flake is specified by the 'templates.<name>' or 'defaultTemplate' output of another flake. E.g. outputs = { self }: { templates = { nixos-container = { path = ./nixos-container; description = "An example of a NixOS container"; }; }; }; allows $ nix flake init -t templates#nixos-container Also add a command 'nix flake new', which is identical to 'nix flake init' except that it initializes a specified directory rather than the current directory.
Diffstat (limited to 'src/nix/search.cc')
-rw-r--r--src/nix/search.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nix/search.cc b/src/nix/search.cc
index bbac56fcb..65a1e1818 100644
--- a/src/nix/search.cc
+++ b/src/nix/search.cc
@@ -177,7 +177,7 @@ struct CmdSearch : InstallableCommand, MixJSON
}
};
- for (auto & [cursor, prefix] : installable->getCursor(*state, true))
+ for (auto & [cursor, prefix] : installable->getCursors(*state, true))
visit(*cursor, parseAttrPath(*state, prefix));
if (!json && !results)