about summary refs log tree commit diff
path: root/third_party/nix/src/libstore
diff options
context:
space:
mode:
authorGriffin Smith <grfn@gws.fyi>2020-11-27T21·24-0500
committerglittershark <grfn@gws.fyi>2020-11-27T21·28+0000
commit1d22874ab29f696c38146750bdd26645d4d75ccc (patch)
tree4d5ca1536a40e3d9b2c91f9625baf1dc6def1d9d /third_party/nix/src/libstore
parentc885bd0274ba878d336e440651994c5d265c54dd (diff)
fix(tvix): Don't call assertStorePath on BasicDerivation.builder r/1945
Upstream doesn't, and for good reason - this might not be a store path,
for example if it's /bin/sh

Fixes: b/73
Change-Id: If9aa96de2cd8ab941c098a9f122b8b302a92ec38
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2175
Reviewed-by: kanepyork <rikingcoding@gmail.com>
Tested-by: BuildkiteCI
Diffstat (limited to 'third_party/nix/src/libstore')
-rw-r--r--third_party/nix/src/libstore/derivations.cc3
-rw-r--r--third_party/nix/src/libstore/derivations.hh5
2 files changed, 3 insertions, 5 deletions
diff --git a/third_party/nix/src/libstore/derivations.cc b/third_party/nix/src/libstore/derivations.cc
index ed184b6d9de4..9c344502f386 100644
--- a/third_party/nix/src/libstore/derivations.cc
+++ b/third_party/nix/src/libstore/derivations.cc
@@ -43,11 +43,10 @@ nix::proto::Derivation_DerivationOutput DerivationOutput::to_proto() const {
 }
 
 BasicDerivation BasicDerivation::from_proto(
-    const nix::proto::Derivation* proto_derivation, const nix::Store& store) {
+    const nix::proto::Derivation* proto_derivation) {
   BasicDerivation result;
   result.platform = proto_derivation->platform();
   result.builder = proto_derivation->builder().path();
-  store.assertStorePath(result.builder);
 
   for (auto [k, v] : proto_derivation->outputs()) {
     result.outputs.emplace(k, v);
diff --git a/third_party/nix/src/libstore/derivations.hh b/third_party/nix/src/libstore/derivations.hh
index 8d46b58b5c0d..4966b858d3b3 100644
--- a/third_party/nix/src/libstore/derivations.hh
+++ b/third_party/nix/src/libstore/derivations.hh
@@ -58,10 +58,9 @@ struct BasicDerivation {
 
   BasicDerivation() = default;
 
-  // Convert the given proto derivation to a BasicDerivation in the given
-  // nix::Store.
+  // Convert the given proto derivation to a BasicDerivation
   static BasicDerivation from_proto(
-      const nix::proto::Derivation* proto_derivation, const nix::Store& store);
+      const nix::proto::Derivation* proto_derivation);
 
   [[nodiscard]] nix::proto::Derivation to_proto() const;