about summary refs log tree commit diff
path: root/tvix/eval/src/tests/nix_tests/eval-okay-delayed-with-inherit.nix
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-11-05T12·07+0300
committertazjin <tazjin@tvl.su>2022-11-06T08·10+0000
commit290a8190189891fc46d7a0b48ed6a2d28b9a4878 (patch)
tree2ec10aa361906b41a8cfbc6229c34b1e93613f2a /tvix/eval/src/tests/nix_tests/eval-okay-delayed-with-inherit.nix
parentc877e1d920f3dce5598fd50f68c05b5e876dea5f (diff)
feat(tvix/eval): placeholder builtin implementations r/5255
Adds initial placeholders for builtins.{derivation,
unsafeDiscardStringContext}.

Change-Id: I67a126c9b9f9f4f11e2256e69b9a32ebd9eb1b0e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7187
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
Diffstat (limited to 'tvix/eval/src/tests/nix_tests/eval-okay-delayed-with-inherit.nix')
-rw-r--r--tvix/eval/src/tests/nix_tests/eval-okay-delayed-with-inherit.nix24
1 files changed, 24 insertions, 0 deletions
diff --git a/tvix/eval/src/tests/nix_tests/eval-okay-delayed-with-inherit.nix b/tvix/eval/src/tests/nix_tests/eval-okay-delayed-with-inherit.nix
new file mode 100644
index 000000000000..84b388c27130
--- /dev/null
+++ b/tvix/eval/src/tests/nix_tests/eval-okay-delayed-with-inherit.nix
@@ -0,0 +1,24 @@
+let
+  pkgs_ = with pkgs; {
+    a = derivation {
+      name = "a";
+      system = builtins.currentSystem;
+      builder = "/bin/sh";
+      args = [ "-c" "touch $out" ];
+      inherit b;
+    };
+
+    inherit b;
+  };
+
+  packageOverrides = p: {
+    b = derivation {
+      name = "b-overridden";
+      system = builtins.currentSystem;
+      builder = "/bin/sh";
+      args = [ "-c" "touch $out" ];
+    };
+  };
+
+  pkgs = pkgs_ // (packageOverrides pkgs_);
+in pkgs.a.b.name