about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2024-04-13T10·50+0300
committerclbot <clbot@tvl.fyi>2024-04-13T12·09+0000
commit01f8ef15604642505e9618e66184e9d83be1f6b6 (patch)
treef76e80060ca54327ab24ee0b25ed4c74f1f9d0df
parente5b87d549620a0745eef41afe665218c4c153442 (diff)
fix(tvix): apply cbtemulator patch in tvix view r/7908
This tells josh to include the patch from
third_party/overlays/patches/cbtemulator-uds.patch at
nixpkgs/cbtemulator-uds.patch.

We then use the `additionalOverlays` feature introduced earlier, and
pass it an overlay adding the patch to `cbtemulator`.

This only gets applied if tvix/shell.nix is not called with a pkgs
argument, which is the case in the tvix view.

Change-Id: I7bc5543460ddd30325ab0998e891c15fcaf8bcfe
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11408
Tested-by: BuildkiteCI
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Autosubmit: flokli <flokli@flokli.de>
-rw-r--r--tvix/shell.nix11
-rw-r--r--views/tvix/workspace.josh3
2 files changed, 12 insertions, 2 deletions
diff --git a/tvix/shell.nix b/tvix/shell.nix
index 75e64b88b2f9..422f1c8dd40a 100644
--- a/tvix/shell.nix
+++ b/tvix/shell.nix
@@ -8,7 +8,16 @@
   pkgs ? (import ./nixpkgs {
     depotOverlays = false;
     depot.third_party.sources = import ./sources { };
-    additionalOverlays = [ ];
+    additionalOverlays = [
+      (self: super: {
+        # https://github.com/googleapis/google-cloud-go/pull/9665
+        cbtemulator = super.cbtemulator.overrideAttrs (old: {
+          patches = old.patches or [ ] ++ [
+            ./nixpkgs/cbtemulator-uds.patch
+          ];
+        });
+      })
+    ];
   })
 , ...
 }:
diff --git a/views/tvix/workspace.josh b/views/tvix/workspace.josh
index 58c83f861b20..57d5f8a8c44c 100644
--- a/views/tvix/workspace.josh
+++ b/views/tvix/workspace.josh
@@ -1,8 +1,9 @@
 :/third_party:[
-    ::nixpkgs/
+    ::nixpkgs/,
     ::sources/
 ]
 ::tvix:exclude[
     ::tvix/default.nix
     ::tvix/**/default.nix:exclude[::tvix/eval/src/tests/tvix_tests/directory/default.nix]
 ]:/tvix
+::third_party/overlays/patches/cbtemulator-uds.patch:/third_party/overlays/patches:prefix=nixpkgs