diff --git a/pkgs/by-name/pr/prettier/package.nix b/pkgs/by-name/pr/prettier/package.nix index 66a29f0c2660..791506a71b0f 100644 --- a/pkgs/by-name/pr/prettier/package.nix +++ b/pkgs/by-name/pr/prettier/package.nix @@ -80,11 +80,17 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-uMLRFBZP7/42R6nReONcb9/kVGCn3yGHLcLFajMZLmQ="; }; + patches = [ + # Remove after upstream updates to Yarn 4.14 + # https://github.com/prettier/prettier/blob/main/package.json#L265 + ./yarn-4.14-support.patch + ]; + missingHashes = ./missing-hashes.json; offlineCache = yarn-berry.fetchYarnBerryDeps { - inherit (finalAttrs) src missingHashes; - hash = "sha256-dpxzbtWyXsHS6tH6DJ9OqSsUSc+YqYeAPJYb95Qy5wQ="; + inherit (finalAttrs) src missingHashes patches; + hash = "sha256-+cDMrVwkTU5rYOQ7d2TqpsYx5F4JVZCpmf1vjOBhZ3M="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/pr/prettier/yarn-4.14-support.patch b/pkgs/by-name/pr/prettier/yarn-4.14-support.patch new file mode 100644 index 000000000000..ac5d685b2049 --- /dev/null +++ b/pkgs/by-name/pr/prettier/yarn-4.14-support.patch @@ -0,0 +1,23 @@ +diff --git a/.yarnrc.yml b/.yarnrc.yml +--- a/.yarnrc.yml ++++ b/.yarnrc.yml +@@ -9,4 +9,7 @@ nodeLinker: node-modules + plugins: + - .yarn/plugins/plugin-setup-editor.cjs + +-yarnPath: .yarn/releases/yarn-4.9.2.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 +