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