lol

fava: build frontend from source

+43 -6
+11
pkgs/by-name/fa/fava/dont-compile-frontend.patch
··· 1 + --- a/_build_backend.py 2 + +++ b/_build_backend.py 3 + @@ -87,7 +87,7 @@ 4 + 5 + def _build_fava() -> None: 6 + """Run the build steps for Fava.""" 7 + - _compile_frontend() 8 + + # _compile_frontend() 9 + _compile_translations() 10 + 11 +
+32 -6
pkgs/by-name/fa/fava/package.nix
··· 1 1 { 2 2 lib, 3 3 python3Packages, 4 - fetchPypi, 4 + buildNpmPackage, 5 + fetchFromGitHub, 5 6 stdenv, 6 7 }: 8 + let 9 + src = buildNpmPackage (finalAttrs: { 10 + pname = "fava-frontend"; 11 + version = "1.30.5"; 7 12 8 - python3Packages.buildPythonApplication rec { 13 + src = fetchFromGitHub { 14 + owner = "beancount"; 15 + repo = "fava"; 16 + tag = "v${finalAttrs.version}"; 17 + hash = "sha256-46ze+1sdgXq9Unhu1ec4buXbH3s/PCcfCx+rmYc+fZw="; 18 + }; 19 + sourceRoot = "${finalAttrs.src.name}/frontend"; 20 + 21 + npmDepsHash = "sha256-ImBNqccAd61c9ASzklcooQyh7BYdgJW9DTcQRmFHqho="; 22 + makeCacheWritable = true; 23 + 24 + preBuild = '' 25 + chmod -R u+w .. 26 + ''; 27 + 28 + installPhase = '' 29 + runHook preInstall 30 + cp -R .. $out 31 + runHook postInstall 32 + ''; 33 + }); 34 + in 35 + python3Packages.buildPythonApplication { 9 36 pname = "fava"; 10 37 version = "1.30.5"; 11 38 pyproject = true; 12 39 13 - src = fetchPypi { 14 - inherit pname version; 15 - hash = "sha256-pfnRNhAcyuYFHqPBF0qCrK7w1PJiMOdYXCGj+xXi6uQ="; 16 - }; 40 + inherit src; 41 + 42 + patches = [ ./dont-compile-frontend.patch ]; 17 43 18 44 postPatch = '' 19 45 substituteInPlace tests/test_cli.py \