From d4a6342d337f0326d9b97051ef2439657f2a34fc Mon Sep 17 00:00:00 2001 From: Dimitar Nestorov <8790386+dimitarnestorov@users.noreply.github.com> Date: Tue, 28 Apr 2026 23:28:31 +0300 Subject: [PATCH] cockpit-zfs: fix for Yarn 4.14 --- pkgs/by-name/co/cockpit-zfs/package.nix | 10 ++++++++-- pkgs/by-name/co/cockpit-zfs/yarn-4.14-support.patch | 11 +++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 pkgs/by-name/co/cockpit-zfs/yarn-4.14-support.patch diff --git a/pkgs/by-name/co/cockpit-zfs/package.nix b/pkgs/by-name/co/cockpit-zfs/package.nix index 5084bdde1de1..70b099943166 100644 --- a/pkgs/by-name/co/cockpit-zfs/package.nix +++ b/pkgs/by-name/co/cockpit-zfs/package.nix @@ -40,12 +40,18 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-d1wurTha4LIe01oogJZHfLdTvBnEsNG9sGO8CfyS+GE="; }; + patches = [ + # Remove after upstream updates to Yarn 4.14 + # https://github.com/45Drives/cockpit-zfs/blob/main/package.json#L13 + ./yarn-4.14-support.patch + ]; + missingHashes = ./missing-hashes.json; # Use buildPackages for cross-compilation support offlineCache = buildPackages.yarn-berry.fetchYarnBerryDeps { - inherit (finalAttrs) src missingHashes; - hash = "sha256-YnR1SqBGnxEQaGUGMNTHHEGcOIhuGbWnqMdr4eRGXcA="; + inherit (finalAttrs) src missingHashes patches; + hash = "sha256-Tdxe5bXN9psSrnUXL1f+1nh4WPzuvOI7j0I+VPU2/1s="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/co/cockpit-zfs/yarn-4.14-support.patch b/pkgs/by-name/co/cockpit-zfs/yarn-4.14-support.patch new file mode 100644 index 000000000000..2d23ed3e118c --- /dev/null +++ b/pkgs/by-name/co/cockpit-zfs/yarn-4.14-support.patch @@ -0,0 +1,11 @@ +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: 10c0 +