cockpit-zfs: fix build by pinning nodejs to 22
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
mbuffer,
|
||||
msmtp,
|
||||
nix-update-script,
|
||||
nodejs,
|
||||
nodejs_22,
|
||||
openssh,
|
||||
samba,
|
||||
shadow,
|
||||
@@ -27,6 +27,22 @@
|
||||
yarn-berry,
|
||||
zfs,
|
||||
}:
|
||||
let
|
||||
# Pin to Node <24.15.0: Yarn Berry's PnP linker breaks `require.cache` on
|
||||
# newer Node, which crashes tailwindcss mid-build (and ESLint, per
|
||||
# yarnpkg/berry#7106). See NixOS/nixpkgs#530137.
|
||||
#
|
||||
# `nodejs` is rebound here (rather than touched at every call site below)
|
||||
# so the rest of this file is unaffected.
|
||||
#
|
||||
# yarn-berry's own `yarn` binary gets patchShebang'd against whatever
|
||||
# `nodejs` *it* was built with, so overriding nativeBuildInputs alone does
|
||||
# nothing - we have to rebuild yarn-berry itself against nodejs_22, for
|
||||
# both the host and build-platform (cross-compilation) variants.
|
||||
nodejs = nodejs_22;
|
||||
yarnBerry = yarn-berry.override { inherit nodejs; };
|
||||
yarnBerryForBuild = buildPackages.yarn-berry.override { nodejs = buildPackages.nodejs_22; };
|
||||
in
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "cockpit-zfs";
|
||||
@@ -49,17 +65,17 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
missingHashes = ./missing-hashes.json;
|
||||
|
||||
# Use buildPackages for cross-compilation support
|
||||
offlineCache = buildPackages.yarn-berry.fetchYarnBerryDeps {
|
||||
offlineCache = yarnBerryForBuild.fetchYarnBerryDeps {
|
||||
inherit (finalAttrs) src missingHashes patches;
|
||||
hash = "sha256-Tdxe5bXN9psSrnUXL1f+1nh4WPzuvOI7j0I+VPU2/1s=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
makeWrapper
|
||||
nodejs
|
||||
nodejs_22
|
||||
jq
|
||||
yarn-berry
|
||||
buildPackages.yarn-berry.yarnBerryConfigHook
|
||||
yarnBerry
|
||||
yarnBerryForBuild.yarnBerryConfigHook
|
||||
];
|
||||
|
||||
disallowedRequisites = [ finalAttrs.offlineCache ];
|
||||
@@ -76,7 +92,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
lsscsi
|
||||
mbuffer
|
||||
msmtp
|
||||
nodejs
|
||||
nodejs_22
|
||||
openssh
|
||||
samba
|
||||
shadow
|
||||
|
||||
Reference in New Issue
Block a user