aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2022-03-24 14:02:33 +0100
committerGitHub <noreply@github.com>2022-03-24 14:02:33 +0100
commit97734fea1b94d03a6ef00ae5bf8adf38013a96ba (patch)
tree56d09e872e03de7469a85bef81f2696f114bde8c /src
parent721481e092740c18d21d00e683d62357adb22260 (diff)
parent4546a007a46fe12b77a49ae8753ab186d0b55fdd (diff)
Merge pull request #6308 from NixOS/consisten-use-of-url-uri-5872
Fix flake profile use of originalUrl vs. originalUri
Diffstat (limited to 'src')
-rw-r--r--src/nix/profile.cc5
-rw-r--r--src/nix/profile.md6
2 files changed, 6 insertions, 5 deletions
diff --git a/src/nix/profile.cc b/src/nix/profile.cc
index a8ff9c78a..da990ddc8 100644
--- a/src/nix/profile.cc
+++ b/src/nix/profile.cc
@@ -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;
}
diff --git a/src/nix/profile.md b/src/nix/profile.md
index 0a4ff2fa9..8dade051d 100644
--- a/src/nix/profile.md
+++ b/src/nix/profile.md
@@ -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