fix(tvix): apply cbtemulator patch in tvix view

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>
This commit is contained in:
Florian Klink 2024-04-13 13:50:01 +03:00 committed by clbot
parent e5b87d5496
commit 01f8ef1560
2 changed files with 12 additions and 2 deletions

View file

@ -8,7 +8,16 @@
pkgs ? (import ./nixpkgs { pkgs ? (import ./nixpkgs {
depotOverlays = false; depotOverlays = false;
depot.third_party.sources = import ./sources { }; 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
];
});
})
];
}) })
, ... , ...
}: }:

View file

@ -1,8 +1,9 @@
:/third_party:[ :/third_party:[
::nixpkgs/ ::nixpkgs/,
::sources/ ::sources/
] ]
::tvix:exclude[ ::tvix:exclude[
::tvix/default.nix ::tvix/default.nix
::tvix/**/default.nix:exclude[::tvix/eval/src/tests/tvix_tests/directory/default.nix] ::tvix/**/default.nix:exclude[::tvix/eval/src/tests/tvix_tests/directory/default.nix]
]:/tvix ]:/tvix
::third_party/overlays/patches/cbtemulator-uds.patch:/third_party/overlays/patches:prefix=nixpkgs