diff --git a/pkgs/servers/misc/navidrome/default.nix b/pkgs/servers/misc/navidrome/default.nix index 173dd0caa88f..7a8d759a6988 100644 --- a/pkgs/servers/misc/navidrome/default.nix +++ b/pkgs/servers/misc/navidrome/default.nix @@ -23,6 +23,8 @@ let hash = "sha256-gTvJI+brdEpdpbEcdQycqw15seI+k5dMDVrjY3v6i14="; }; + # FIXME: we currently manually inject a patch for react-scripts in here + # See https://github.com/navidrome/navidrome/pull/1767 ui = callPackage ./ui { inherit src version; }; diff --git a/pkgs/servers/misc/navidrome/ui/node-composition.nix b/pkgs/servers/misc/navidrome/ui/node-composition.nix index a10eaa345edf..2ebf5ef666f0 100644 --- a/pkgs/servers/misc/navidrome/ui/node-composition.nix +++ b/pkgs/servers/misc/navidrome/ui/node-composition.nix @@ -12,6 +12,6 @@ let }; in import ./node-packages.nix { - inherit (pkgs) fetchurl nix-gitignore stdenv lib fetchgit; + inherit (pkgs) fetchurl nix-gitignore stdenv lib fetchgit runCommand fetchpatch; inherit nodeEnv; } diff --git a/pkgs/servers/misc/navidrome/ui/node-packages.nix b/pkgs/servers/misc/navidrome/ui/node-packages.nix index f3743f8a990b..177f22921efa 100644 --- a/pkgs/servers/misc/navidrome/ui/node-packages.nix +++ b/pkgs/servers/misc/navidrome/ui/node-packages.nix @@ -1,6 +1,6 @@ # This file has been generated by node2nix 1.11.1. Do not edit! -{nodeEnv, fetchurl, fetchgit, nix-gitignore, stdenv, lib, globalBuildInputs ? []}: +{nodeEnv, runCommand, fetchpatch, fetchurl, fetchgit, nix-gitignore, stdenv, lib, globalBuildInputs ? []}: let sources = { @@ -11258,10 +11258,19 @@ let name = "react-scripts"; packageName = "react-scripts"; version = "4.0.3"; - src = fetchurl { - url = "https://registry.npmjs.org/react-scripts/-/react-scripts-4.0.3.tgz"; - sha512 = "S5eO4vjUzUisvkIPB7jVsKtuH2HhWcASREYWHAQ1FP5HyCv3xgn+wpILAEWkmy+A+tTNbSZClhxjT3qz6g4L1A=="; - }; + src = runCommand "src.tgz" {} '' + tar -xvf ${fetchurl { + url = "https://registry.npmjs.org/react-scripts/-/react-scripts-4.0.3.tgz"; + sha512 = "S5eO4vjUzUisvkIPB7jVsKtuH2HhWcASREYWHAQ1FP5HyCv3xgn+wpILAEWkmy+A+tTNbSZClhxjT3qz6g4L1A=="; + }} + pushd package + patch -p2 < ${fetchpatch { + url = "https://raw.githubusercontent.com/navidrome/navidrome/c0364331748b8e0600b27caa956caa8160b2bdcd/ui/webpack-patch-for-openssl3.patch"; + sha512 = "sha512-PS1/yzneLGV76J+LvRuKtMv8imIBzB1gXnK2+vw61xQOWdNDffgfeFRUdQFBhp3Zm9oykX+YQcrwO215z+SQkg=="; + }} + popd + tar -czvf $out package + ''; }; "react-transition-group-4.4.1" = { name = "react-transition-group";