Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8c0a262

Browse files
committed
fix(flake.nix): fix site build & add missing inputs for darwin hosts
Change-Id: I28f0e301298806f251121cc93224740bcc02bcbaSigned-off-by: Thomas Kosiewski <tk@coder.com>
1 parente7f1081 commit8c0a262

File tree

3 files changed

+1337
-1321
lines changed

3 files changed

+1337
-1321
lines changed

‎flake.nix

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
inheritsystem;
3333
};
3434

35-
nodejs=pkgs.nodejs-18_x;
35+
nodejs=pkgs.nodejs_20;
3636
# Check in https://search.nixos.org/packages to find new packages.
3737
# Use `nix --extra-experimental-features nix-command --extra-experimental-features flakes flake update`
3838
# to update the lock file if packages are out-of-date.
@@ -88,6 +88,7 @@
8888
less
8989
mockgen
9090
moreutils
91+
nix-prefetch-git
9192
nfpm
9293
nodejs
9394
neovim
@@ -119,9 +120,17 @@
119120

120121
# buildSite packages the site directory.
121122
buildSite=pnpm2nix.packages.${system}.mkPnpmPackage{
123+
inheritnodejs;
124+
122125
src=./site/.;
123126
# Required for the `canvas` package!
124-
extraBuildInputs=withpkgs;[pkgs.cairopkgs.pangopkgs.pixman];
127+
extraBuildInputs=withpkgs;[
128+
cairo
129+
pango
130+
pixman
131+
libpnglibjpeggifliblibrsvg
132+
python312Packages.setuptools
133+
]++(lib.optionalsstdenv.targetPlatform.isDarwin[darwin.apple_sdk.frameworks.Foundationxcbuild]);
125134
installInPlace=true;
126135
distDir="out";
127136
};
@@ -161,15 +170,18 @@
161170
};
162171
in
163172
{
164-
devShell=pkgs.mkShell{
165-
buildInputs=devShellPackages;
166-
shellHook=''
167-
export PLAYWRIGHT_BROWSERS_PATH=${pkgs.playwright-driver.browsers}
168-
export PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS=true
169-
'';
170-
171-
LOCALE_ARCHIVE=withpkgs;lib.optionalDrvAttrstdenv.isLinux"${glibcLocales}/lib/locale/locale-archive";
173+
devShells={
174+
default=pkgs.mkShell{
175+
buildInputs=devShellPackages;
176+
shellHook=''
177+
export PLAYWRIGHT_BROWSERS_PATH=${pkgs.playwright-driver.browsers}
178+
export PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS=true
179+
'';
180+
181+
LOCALE_ARCHIVE=withpkgs;lib.optionalDrvAttrstdenv.isLinux"${glibcLocales}/lib/locale/locale-archive";
182+
};
172183
};
184+
173185
packages={
174186
proto_gen_go=proto_gen_go_1_30;
175187
all=pkgs.buildEnv{

‎site/.npmrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
save-exact=true
22
engine-strict=true
3+
4+
# Needed for nix builds of the site; see: https://github.com/nzbr/pnpm2nix-nzbr/issues/33#issuecomment-2381628294
5+
lockfile-include-tarball-url=true

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp