From d0461152d2060f248a0cd53604f89370990d9eb4 Mon Sep 17 00:00:00 2001 From: Dimitar Nestorov <8790386+dimitarnestorov@users.noreply.github.com> Date: Tue, 28 Apr 2026 23:28:34 +0300 Subject: [PATCH] uppy-companion: fix for Yarn 4.14 --- pkgs/by-name/up/uppy-companion/package.nix | 10 +++++++-- .../up/uppy-companion/yarn-4.14-support.patch | 22 +++++++++++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 pkgs/by-name/up/uppy-companion/yarn-4.14-support.patch diff --git a/pkgs/by-name/up/uppy-companion/package.nix b/pkgs/by-name/up/uppy-companion/package.nix index b9f0ee323e30..c31a93e57995 100644 --- a/pkgs/by-name/up/uppy-companion/package.nix +++ b/pkgs/by-name/up/uppy-companion/package.nix @@ -17,6 +17,12 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-FF5I4D9obRVJqyjucemnxZiPcNHdQdo3S0z/h96Fe6c="; }; + patches = [ + # Remove after upstream updates to Yarn 4.14 + # https://github.com/transloadit/uppy/blob/main/package.json#L39 + ./yarn-4.14-support.patch + ]; + nativeBuildInputs = [ nodejs yarn-berry_4.yarnBerryConfigHook @@ -30,8 +36,8 @@ stdenv.mkDerivation (finalAttrs: { missingHashes = ./missing-hashes.json; offlineCache = yarn-berry_4.fetchYarnBerryDeps { - inherit (finalAttrs) src missingHashes; - hash = "sha256-euKvBI3Y15SmBoVOEbS8GIJT/kIOhayLKGVSd8JztqI="; + inherit (finalAttrs) src missingHashes patches; + hash = "sha256-vmya3c+ec93T8kNoooUu4risqScY0b4cwML7d2kYz88="; }; buildPhase = '' diff --git a/pkgs/by-name/up/uppy-companion/yarn-4.14-support.patch b/pkgs/by-name/up/uppy-companion/yarn-4.14-support.patch new file mode 100644 index 000000000000..1cb3aa5b44da --- /dev/null +++ b/pkgs/by-name/up/uppy-companion/yarn-4.14-support.patch @@ -0,0 +1,22 @@ +diff --git a/.yarnrc.yml b/.yarnrc.yml +--- a/.yarnrc.yml ++++ b/.yarnrc.yml +@@ -11,3 +11,7 @@ nodeLinker: node-modules + + npmPublishAccess: public + ++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 +