aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2022-03-01 11:29:19 +0100
committerEelco Dolstra <edolstra@gmail.com>2022-03-01 11:30:26 +0100
commitd974d2ad59d1cc8aee63e2a18124e58c1084ff65 (patch)
tree918733a03a2f3b295271fed1d1cd0baa412559d7
parent9ab81a9d386c40cc518db896553f88e64d10a39b (diff)
fetch{url,Tarball}: Remove 'narHash' attribute
This was introduced in #6174. However fetch{url,Tarball} are legacy and we shouldn't have an undocumented attribute that does the same thing as one that already exists ('sha256').
-rw-r--r--src/libexpr/eval.cc2
-rw-r--r--src/libexpr/eval.hh2
-rw-r--r--src/libexpr/primops/fetchTree.cc2
3 files changed, 2 insertions, 4 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc
index d94afbb99..8c5888497 100644
--- a/src/libexpr/eval.cc
+++ b/src/libexpr/eval.cc
@@ -517,7 +517,7 @@ void EvalState::allowPath(const StorePath & storePath)
allowedPaths->insert(store->toRealPath(storePath));
}
-void EvalState::allowAndSetStorePathString(const StorePath &storePath, Value &v)
+void EvalState::allowAndSetStorePathString(const StorePath &storePath, Value & v)
{
allowPath(storePath);
diff --git a/src/libexpr/eval.hh b/src/libexpr/eval.hh
index 9324961f7..36a53729a 100644
--- a/src/libexpr/eval.hh
+++ b/src/libexpr/eval.hh
@@ -162,7 +162,7 @@ public:
void allowPath(const StorePath & storePath);
/* Allow access to a store path and return it as a string. */
- void allowAndSetStorePathString(const StorePath & storePath, Value &v);
+ void allowAndSetStorePathString(const StorePath & storePath, Value & v);
/* Check whether access to a path is allowed and throw an error if
not. Otherwise return the canonicalised path. */
diff --git a/src/libexpr/primops/fetchTree.cc b/src/libexpr/primops/fetchTree.cc
index 2eeee7173..cb929b99a 100644
--- a/src/libexpr/primops/fetchTree.cc
+++ b/src/libexpr/primops/fetchTree.cc
@@ -203,8 +203,6 @@ static void fetch(EvalState & state, const Pos & pos, Value * * args, Value & v,
url = state.forceStringNoCtx(*attr.value, *attr.pos);
else if (n == "sha256")
expectedHash = newHashAllowEmpty(state.forceStringNoCtx(*attr.value, *attr.pos), htSHA256);
- else if (n == "narHash")
- expectedHash = newHashAllowEmpty(state.forceStringNoCtx(*attr.value, *attr.pos), htSHA256);
else if (n == "name")
name = state.forceStringNoCtx(*attr.value, *attr.pos);
else