diff --git a/pkgs/servers/home-assistant/custom-lovelace-modules/horizon-card/package.nix b/pkgs/servers/home-assistant/custom-lovelace-modules/horizon-card/package.nix index 15555be3ee4b..7664dfc4f47a 100644 --- a/pkgs/servers/home-assistant/custom-lovelace-modules/horizon-card/package.nix +++ b/pkgs/servers/home-assistant/custom-lovelace-modules/horizon-card/package.nix @@ -16,14 +16,20 @@ stdenvNoCC.mkDerivation (finalAttrs: { hash = "sha256-z2cJ6BIhNnzUo9nIFxVyrPBVWSKf35fyLXK72pE8TJw="; }; + patches = [ + # Remove after upstream updates to Yarn 4.14 + # https://github.com/rejuvenate/lovelace-horizon-card/blob/main/package.json#L4 + ./yarn-4.14-support.patch + ]; + nativeBuildInputs = [ yarn-berry yarn-berry.yarnBerryConfigHook ]; offlineCache = yarn-berry.fetchYarnBerryDeps { - inherit (finalAttrs) src; - hash = "sha256-LYPHBnDRcGeXo2btx1A4/e7fr7MYg/2G5GkuG/xDG+I="; + inherit (finalAttrs) src patches; + hash = "sha256-KWbXvivHxoV4xQuY2m/wpajjIZcypeh6nuvRVnrtFM0="; }; buildPhase = '' diff --git a/pkgs/servers/home-assistant/custom-lovelace-modules/horizon-card/yarn-4.14-support.patch b/pkgs/servers/home-assistant/custom-lovelace-modules/horizon-card/yarn-4.14-support.patch new file mode 100644 index 000000000000..75225db95b78 --- /dev/null +++ b/pkgs/servers/home-assistant/custom-lovelace-modules/horizon-card/yarn-4.14-support.patch @@ -0,0 +1,20 @@ +diff --git a/.yarnrc.yml b/.yarnrc.yml +--- a/.yarnrc.yml ++++ b/.yarnrc.yml +@@ -1,2 +1,5 @@ + nodeLinker: node-modules + nmMode: hardlinks-local ++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: 10c0 +