|
71 | 71 | vendorHash = null; |
72 | 72 | }; |
73 | 73 |
|
| 74 | + # Packages required to build the frontend |
| 75 | + frontendPackages = |
| 76 | + with pkgs; |
| 77 | + [ |
| 78 | + cairo |
| 79 | + pango |
| 80 | + pixman |
| 81 | + libpng |
| 82 | + libjpeg |
| 83 | + giflib |
| 84 | + librsvg |
| 85 | + python312Packages.setuptools # Needed for node-gyp |
| 86 | + ] |
| 87 | + ++ (lib.optionals stdenv.targetPlatform.isDarwin [ |
| 88 | + darwin.apple_sdk.frameworks.Foundation |
| 89 | + xcbuild |
| 90 | + ]); |
| 91 | + |
74 | 92 | # The minimal set of packages to build Coder. |
75 | | - devShellPackages = with pkgs; [ |
76 | | - # google-chrome is not available on aarch64 linux |
77 | | - (lib.optionalDrvAttr (!stdenv.isLinux || !stdenv.isAarch64) google-chrome) |
78 | | - # strace is not available on OSX |
79 | | - (lib.optionalDrvAttr (!pkgs.stdenv.isDarwin) strace) |
80 | | - bat |
81 | | - cairo |
82 | | - curl |
83 | | - delve |
84 | | - dive |
85 | | - drpc.defaultPackage.${system} |
86 | | - formatter |
87 | | - fzf |
88 | | - gcc13 |
89 | | - gdk |
90 | | - getopt |
91 | | - gh |
92 | | - git |
93 | | - (lib.optionalDrvAttr stdenv.isLinux glibcLocales) |
94 | | - gnumake |
95 | | - gnused |
96 | | - go_1_22 |
97 | | - go-migrate |
98 | | - (pinnedPkgs.golangci-lint) |
99 | | - gopls |
100 | | - gotestsum |
101 | | - jq |
102 | | - kubectl |
103 | | - kubectx |
104 | | - kubernetes-helm |
105 | | - lazygit |
106 | | - less |
107 | | - mockgen |
108 | | - moreutils |
109 | | - neovim |
110 | | - nfpm |
111 | | - nix-prefetch-git |
112 | | - nodejs |
113 | | - openssh |
114 | | - openssl |
115 | | - pango |
116 | | - pixman |
117 | | - pkg-config |
118 | | - playwright-driver.browsers |
119 | | - pnpm |
120 | | - postgresql_16 |
121 | | - proto_gen_go_1_30 |
122 | | - protobuf_23 |
123 | | - ripgrep |
124 | | - shellcheck |
125 | | - (pinnedPkgs.shfmt) |
126 | | - sqlc |
127 | | - terraform |
128 | | - typos |
129 | | - # Needed for many LD system libs! |
130 | | - (lib.optional stdenv.isLinux util-linux) |
131 | | - vim |
132 | | - wget |
133 | | - yq-go |
134 | | - zip |
135 | | - zsh |
136 | | - zstd |
137 | | - ]; |
| 93 | + devShellPackages = |
| 94 | + with pkgs; |
| 95 | + [ |
| 96 | + # google-chrome is not available on aarch64 linux |
| 97 | + (lib.optionalDrvAttr (!stdenv.isLinux || !stdenv.isAarch64) google-chrome) |
| 98 | + # strace is not available on OSX |
| 99 | + (lib.optionalDrvAttr (!pkgs.stdenv.isDarwin) strace) |
| 100 | + bat |
| 101 | + cairo |
| 102 | + curl |
| 103 | + delve |
| 104 | + dive |
| 105 | + drpc.defaultPackage.${system} |
| 106 | + formatter |
| 107 | + fzf |
| 108 | + gcc13 |
| 109 | + gdk |
| 110 | + getopt |
| 111 | + gh |
| 112 | + git |
| 113 | + (lib.optionalDrvAttr stdenv.isLinux glibcLocales) |
| 114 | + gnumake |
| 115 | + gnused |
| 116 | + go_1_22 |
| 117 | + go-migrate |
| 118 | + (pinnedPkgs.golangci-lint) |
| 119 | + gopls |
| 120 | + gotestsum |
| 121 | + jq |
| 122 | + kubectl |
| 123 | + kubectx |
| 124 | + kubernetes-helm |
| 125 | + lazygit |
| 126 | + less |
| 127 | + mockgen |
| 128 | + moreutils |
| 129 | + neovim |
| 130 | + nfpm |
| 131 | + nix-prefetch-git |
| 132 | + nodejs |
| 133 | + openssh |
| 134 | + openssl |
| 135 | + pango |
| 136 | + pixman |
| 137 | + pkg-config |
| 138 | + playwright-driver.browsers |
| 139 | + pnpm |
| 140 | + postgresql_16 |
| 141 | + proto_gen_go_1_30 |
| 142 | + protobuf_23 |
| 143 | + ripgrep |
| 144 | + shellcheck |
| 145 | + (pinnedPkgs.shfmt) |
| 146 | + sqlc |
| 147 | + terraform |
| 148 | + typos |
| 149 | + # Needed for many LD system libs! |
| 150 | + (lib.optional stdenv.isLinux util-linux) |
| 151 | + vim |
| 152 | + wget |
| 153 | + yq-go |
| 154 | + zip |
| 155 | + zsh |
| 156 | + zstd |
| 157 | + ] |
| 158 | + ++ frontendPackages; |
138 | 159 |
|
139 | 160 | docker = pkgs.callPackage ./nix/docker.nix { }; |
140 | 161 |
|
|
144 | 165 |
|
145 | 166 | src = ./site/.; |
146 | 167 | # Required for the `canvas` package! |
147 | | - extraBuildInputs = |
148 | | - with pkgs; |
149 | | - [ |
150 | | - cairo |
151 | | - pango |
152 | | - pixman |
153 | | - libpng |
154 | | - libjpeg |
155 | | - giflib |
156 | | - librsvg |
157 | | - python312Packages.setuptools |
158 | | - ] |
159 | | - ++ (lib.optionals stdenv.targetPlatform.isDarwin [ |
160 | | - darwin.apple_sdk.frameworks.Foundation |
161 | | - xcbuild |
162 | | - ]); |
| 168 | + extraBuildInputs = frontendPackages; |
163 | 169 | installInPlace = true; |
164 | 170 | distDir = "out"; |
165 | 171 | }; |
|
219 | 225 | LOCALE_ARCHIVE = |
220 | 226 | with pkgs; |
221 | 227 | lib.optionalDrvAttr stdenv.isLinux "${glibcLocales}/lib/locale/locale-archive"; |
| 228 | + |
| 229 | + NODE_OPTIONS = "--max-old-space-size=8192"; |
| 230 | + GOPRIVATE = "coder.com,cdr.dev,go.coder.com,github.com/cdr,github.com/coder"; |
222 | 231 | }; |
223 | 232 | }; |
224 | 233 |
|
|
252 | 261 | drv = devShells.default.overrideAttrs (oldAttrs: { |
253 | 262 | buildInputs = |
254 | 263 | (with pkgs; [ |
255 | | - busybox |
256 | 264 | coreutils |
257 | 265 | nix |
258 | 266 | curl.bin # Ensure the actual curl binary is included in the PATH |
259 | 267 | glibc.bin # Ensure the glibc binaries are included in the PATH |
| 268 | + jq.bin |
260 | 269 | binutils # ld and strings |
261 | 270 | filebrowser # Ensure that we're not redownloading filebrowser on each launch |
| 271 | + systemd.out |
| 272 | + service-wrapper |
| 273 | + docker_26 |
| 274 | + shadow.out |
| 275 | + su |
| 276 | + ncurses # clear |
| 277 | + unzip |
262 | 278 | ]) |
263 | 279 | ++ oldAttrs.buildInputs; |
264 | 280 | }); |
|
0 commit comments