navidrome: adhoc hack to fix the build

This is very hacky, but I currently see any other way that does not
involve changing node2nix in a non trivial way to allow these type of patches.
This commit is contained in:
Jörg Thalheim 2022-09-16 11:29:15 +02:00
parent 8051e9c4ae
commit c0cd90470b
3 changed files with 17 additions and 6 deletions

View file

@ -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;
};

View file

@ -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;
}

View file

@ -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";