fix(flake.nix): include dev buildInputs in dogfood nix image (#16325)

This commit is contained in:
Thomas Kosiewski
2025-01-30 17:47:19 +01:00
committed by GitHub
parent 1aee589095
commit 6e2dc6ffd2
3 changed files with 73 additions and 21 deletions
+20 -13
View File
@@ -85,7 +85,7 @@
drpc.defaultPackage.${system}
formatter
fzf
gcc
gcc13
gdk
getopt
gh
@@ -174,7 +174,7 @@
name = "coder-${osArch}";
# Updated with ./scripts/update-flake.sh`.
# This should be updated whenever go.mod changes!
vendorHash = "sha256-hJBNmHz9ZJLS/QTu8w8y1w/Yi45aSoaSeZ//ysllp6c=";
vendorHash = "sha256-QjqF+QZ5JKMnqkpNh6ZjrJU2QcSqiT4Dip1KoicwLYc=";
proxyVendor = true;
src = ./.;
nativeBuildInputs = with pkgs; [
@@ -212,10 +212,9 @@
devShells = {
default = pkgs.mkShell {
buildInputs = devShellPackages;
shellHook = ''
export PLAYWRIGHT_BROWSERS_PATH=${pkgs.playwright-driver.browsers}
export PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS=true
'';
PLAYWRIGHT_BROWSERS_PATH = pkgs.playwright-driver.browsers;
PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS = true;
LOCALE_ARCHIVE =
with pkgs;
@@ -239,21 +238,29 @@
aarch64-windows = buildFat "windows_arm64.exe";
}
// (pkgs.lib.optionalAttrs pkgs.stdenv.isLinux {
dev_image = docker.buildNixShellImage {
dev_image = docker.buildNixShellImage rec {
name = "codercom/oss-dogfood-nix";
tag = "latest-${system}";
# (ThomasK33): Workaround for images with too many layers (>64 layers) causing sysbox
# to have issues on dogfood envs.
maxLayers = 32;
uname = "coder";
homeDirectory = "/home/${uname}";
drv = devShells.default.overrideAttrs (oldAttrs: {
# (ThomasK33): Workaround for images with too many layers (>64 layers) causing sysbox
# to have issues on dogfood envs.
buildInputs =
oldAttrs.buildInputs
++ (with pkgs; [
nix
(with pkgs; [
busybox
coreutils
]);
nix
curl.bin # Ensure the actual curl binary is included in the PATH
glibc.bin # Ensure the glibc binaries are included in the PATH
binutils # ld and strings
filebrowser # Ensure that we're not redownloading filebrowser on each launch
])
++ oldAttrs.buildInputs;
});
};
});