diff options
author | Qyriad <qyriad@qyriad.me> | 2024-04-27 13:24:39 -0600 |
---|---|---|
committer | Qyriad <qyriad@qyriad.me> | 2024-04-29 01:19:21 +0000 |
commit | 2bd57d4d36f66de00fa4f791569056e58598e782 (patch) | |
tree | cf8e49b9f2a3c03068c13baa0ef7c43cfae344f6 /src/nix/diff-closures.cc | |
parent | da677fce395fa86dbd5e8b5e3c0bef1712f9c3f1 (diff) |
refactor some nix-env and profile code to libcmd
Notably, ProfileManifest and ProfileElement are useful generic
profile management code, and nix profile is not the only place in the
codebase where profiles are relevant.
This commit is in preparation for fixing upgrade-nix's interaction with
new-style profiles.
Change-Id: Iefc8bbd34b4bc6012175cb3d6e6a8207973bc792
Diffstat (limited to 'src/nix/diff-closures.cc')
-rw-r--r-- | src/nix/diff-closures.cc | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/nix/diff-closures.cc b/src/nix/diff-closures.cc index c7c37b66f..736cbf55d 100644 --- a/src/nix/diff-closures.cc +++ b/src/nix/diff-closures.cc @@ -1,4 +1,5 @@ #include "command.hh" +#include "cmd-profiles.hh" #include "shared.hh" #include "store-api.hh" #include "common-args.hh" @@ -43,15 +44,6 @@ GroupedPaths getClosureInfo(ref<Store> store, const StorePath & toplevel) return groupedPaths; } -std::string showVersions(const std::set<std::string> & versions) -{ - if (versions.empty()) return "∅"; - std::set<std::string> versions2; - for (auto & version : versions) - versions2.insert(version.empty() ? "ε" : version); - return concatStringsSep(", ", versions2); -} - void printClosureDiff( ref<Store> store, const StorePath & beforePath, |