diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2022-03-28 14:21:35 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2022-03-28 14:23:39 +0200 |
commit | 057f9ee1900312f42efe6c5cebb02b07b4ff2131 (patch) | |
tree | 2ed1780944480eaed55a0a1e812a7743d679dc64 /src/libstore/derived-path.hh | |
parent | 1844172dd16cab611a0148be9381ab856bf241df (diff) |
nix profile install: Don't use queryDerivationOutputMap()
Instead get the outputs from Installable::build(). This will also
allow 'nix profile install' to support impure derivations.
Fixes #6286.
Diffstat (limited to 'src/libstore/derived-path.hh')
-rw-r--r-- | src/libstore/derived-path.hh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libstore/derived-path.hh b/src/libstore/derived-path.hh index 8ca0882a4..24a0ae773 100644 --- a/src/libstore/derived-path.hh +++ b/src/libstore/derived-path.hh @@ -25,6 +25,9 @@ struct DerivedPathOpaque { nlohmann::json toJSON(ref<Store> store) const; std::string to_string(const Store & store) const; static DerivedPathOpaque parse(const Store & store, std::string_view); + + bool operator < (const DerivedPathOpaque & b) const + { return path < b.path; } }; /** @@ -46,6 +49,9 @@ struct DerivedPathBuilt { std::string to_string(const Store & store) const; static DerivedPathBuilt parse(const Store & store, std::string_view); nlohmann::json toJSON(ref<Store> store) const; + + bool operator < (const DerivedPathBuilt & b) const + { return std::make_pair(drvPath, outputs) < std::make_pair(b.drvPath, b.outputs); } }; using _DerivedPathRaw = std::variant< |