Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(flake.nix): install locales on linux host devShells #16120

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dogfood/contents/Dockerfile.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build stage
FROM nixos/nix:2.19.2 as nix
FROM nixos/nix:2.19.2 AS nix

# enable --experimental-features 'nix-command flakes' globally
# nix does not enable these features by default these are required to run commands like
Expand All @@ -14,7 +14,7 @@ RUN nix profile install "/app#all" --priority 4 && \
nix-collect-garbage -d

# Final image
FROM codercom/enterprise-base:latest as final
FROM codercom/enterprise-base:latest AS final

# Set the non-root user
USER root
Expand Down
14 changes: 9 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -58,20 +58,22 @@

# The minimal set of packages to build Coder.
devShellPackages = with pkgs; [
# google-chrome is not available on OSX and aarch64 linux
(if pkgs.stdenv.hostPlatform.isDarwin || pkgs.stdenv.hostPlatform.isAarch64 then null else google-chrome)
# google-chrome is not available on aarch64 linux
(lib.optionalDrvAttr ( !stdenv.isLinux || !stdenv.isAarch64 ) google-chrome)
# strace is not available on OSX
(if pkgs.stdenv.hostPlatform.isDarwin then null else strace)
(lib.optionalDrvAttr ( !pkgs.stdenv.isDarwin ) strace)
bat
cairo
curl
delve
drpc.defaultPackage.${system}
fzf
gcc
gdk
getopt
gh
git
(lib.optionalDrvAttr stdenv.isLinux glibcLocales)
gnumake
gnused
go_1_22
Expand All @@ -85,8 +87,10 @@
kubernetes-helm
less
mockgen
moreutils
nfpm
nodejs
neovim
pnpm
openssh
openssl
Expand All @@ -98,8 +102,6 @@
protobuf
proto_gen_go_1_30
ripgrep
# This doesn't build on latest nixpkgs (July 10 2024)
(pinnedPkgs.sapling)
shellcheck
(pinnedPkgs.shfmt)
sqlc
Expand Down Expand Up @@ -165,6 +167,8 @@
export PLAYWRIGHT_BROWSERS_PATH=${pkgs.playwright-driver.browsers}
export PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS=true
'';

LOCALE_ARCHIVE = with pkgs; lib.optionalDrvAttr stdenv.isLinux "${glibcLocales}/lib/locale/locale-archive";
};
packages = {
proto_gen_go = proto_gen_go_1_30;
Expand Down
Loading