Merge pull request #6308 from NixOS/consisten-use-of-url-uri-5872
Fix flake profile use of originalUrl vs. originalUri
This commit is contained in:
commit
97734fea1b
|
@ -107,8 +107,9 @@ struct ProfileManifest
|
|||
element.storePaths.insert(state.store->parseStorePath((std::string) p));
|
||||
element.active = e["active"];
|
||||
if (e.value("uri", "") != "") {
|
||||
auto originalUrl = e.value("originalUrl", e["originalUri"]);
|
||||
element.source = ProfileElementSource{
|
||||
parseFlakeRef(e["originalUri"]),
|
||||
parseFlakeRef(originalUrl),
|
||||
parseFlakeRef(e["uri"]),
|
||||
e["attrPath"]
|
||||
};
|
||||
|
@ -143,7 +144,7 @@ struct ProfileManifest
|
|||
obj["storePaths"] = paths;
|
||||
obj["active"] = element.active;
|
||||
if (element.source) {
|
||||
obj["originalUri"] = element.source->originalRef.to_string();
|
||||
obj["originalUrl"] = element.source->originalRef.to_string();
|
||||
obj["uri"] = element.source->resolvedRef.to_string();
|
||||
obj["attrPath"] = element.source->attrPath;
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@ are installed in this version of the profile. It looks like this:
|
|||
{
|
||||
"active": true,
|
||||
"attrPath": "legacyPackages.x86_64-linux.zoom-us",
|
||||
"originalUri": "flake:nixpkgs",
|
||||
"originalUrl": "flake:nixpkgs",
|
||||
"storePaths": [
|
||||
"/nix/store/wbhg2ga8f3h87s9h5k0slxk0m81m4cxl-zoom-us-5.3.469451.0927"
|
||||
],
|
||||
|
@ -84,11 +84,11 @@ are installed in this version of the profile. It looks like this:
|
|||
Each object in the array `elements` denotes an installed package and
|
||||
has the following fields:
|
||||
|
||||
* `originalUri`: The [flake reference](./nix3-flake.md) specified by
|
||||
* `originalUrl`: The [flake reference](./nix3-flake.md) specified by
|
||||
the user at the time of installation (e.g. `nixpkgs`). This is also
|
||||
the flake reference that will be used by `nix profile upgrade`.
|
||||
|
||||
* `uri`: The immutable flake reference to which `originalUri`
|
||||
* `uri`: The immutable flake reference to which `originalUrl`
|
||||
resolved.
|
||||
|
||||
* `attrPath`: The flake output attribute that provided this
|
||||
|
|
Loading…
Reference in a new issue