affine: fix for Yarn 4.14

This commit is contained in:
Dimitar Nestorov
2026-05-09 11:15:19 +03:00
committed by K900
parent d4a6342d33
commit f0e285b0cc
2 changed files with 31 additions and 2 deletions
+8 -2
View File
@@ -54,6 +54,12 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-aJeW8I7hx9VN5AU6gVq18cKO0QuKtc7JGUDbVsSXXE4=";
};
patches = [
# Remove after upstream updates to Yarn 4.14
# https://github.com/toeverything/AFFiNE/blob/canary/package.json#L96
./yarn-4.14-support.patch
];
cargoDeps = rustPlatform.fetchCargoVendor {
inherit (finalAttrs) pname version src;
hash = "sha256-vZkKFUaNe9iIAkdUfXnnuD2lM6kuzwqj1Dyt5GAgXsM=";
@@ -62,7 +68,7 @@ stdenv.mkDerivation (finalAttrs: {
# keep yarnOfflineCache same output style with offlineCache = yarn-berry.fetchYarnBerryDeps { inherit (finalAttrs) src missingHashes; hash = "" };
yarnOfflineCache = stdenvNoCC.mkDerivation {
name = "yarn-offline-cache";
inherit (finalAttrs) src;
inherit (finalAttrs) src patches;
nativeBuildInputs = [
yarn-berry
cacert
@@ -106,7 +112,7 @@ stdenv.mkDerivation (finalAttrs: {
'';
dontInstall = true;
outputHashMode = "recursive";
outputHash = "sha256-CSB7fQnxkUx+LRDO0PbiPc2NZuvzWbBLNkImfrSm44o=";
outputHash = "sha256-mNvvKbj9mUioh5Jw4CcRt0CpX1IcQC8JOxUnyy0Lw9c=";
};
buildInputs = lib.optionals hostPlatform.isDarwin [
@@ -0,0 +1,23 @@
diff --git a/.yarnrc.yml b/.yarnrc.yml
--- a/.yarnrc.yml
+++ b/.yarnrc.yml
@@ -12,4 +12,7 @@ npmPublishAccess: public
npmRegistryServer: "https://registry.npmjs.org"
-yarnPath: .yarn/releases/yarn-4.12.0.cjs
+approvedGitRepositories:
+ - "**"
+
+enableScripts: true
diff --git a/yarn.lock b/yarn.lock
--- a/yarn.lock
+++ b/yarn.lock
@@ -2,6 +2,6 @@
# Manual changes might be lost - proceed with caution!
__metadata:
- version: 8
+ version: 9
cacheKey: 10