diff options
| author | Boris Nagaev <bnagaev@gmail.com> | 2025-06-20 03:09:55 -0300 |
|---|---|---|
| committer | Boris Nagaev <bnagaev@gmail.com> | 2025-07-06 20:51:45 -0300 |
| commit | 0a419572969eff6ebcf90ce5d6af1c67df11faaa (patch) | |
| tree | 595d5328691bd88013f2bc74dce3e5733fec89c4 /pkgs/development/python-modules/termplotlib/gnuplot-subprocess.patch | |
| parent | 34fa8ce995b5a377fae41031340210444f50ca89 (diff) | |
lightning-terminal: fix frontend build
Previously, the yarn app was not built correctly and the resulting files were
not placed where the backend (via Go's //go:embed) expects them. As a result,
litd served an empty web UI page with a single link to .gitkeep, the only file
present in app/build from Git.
Upstream uses a Dockerfile and app/gen_app_docker.sh to install yarn and
populate that directory. This commit replicates that behavior using Nix.
Since the app uses yarn v1, mkYarnPackage was inappropriate and was replaced
with a stdenv.mkDerivation using yarnConfigHook, yarnInstallHook, yarnBuildHook.
Linters were disabled to prevent build failures due to findings such as single
vs double quotes.
The package.json file included a postbuild step using 'git restore', which
failed in the Nix sandbox due to the absence of Git. This step was disabled,
as the file it touches is not modified or necessary for the build.
To ensure the backend can embed the frontend properly, this commit copies the
built frontend files into app/build inside the backend's source tree during
postUnpack. An assertion was added to check that index.html exists there to
prevent this issue from silently recurring. Also a nix test was added that runs
litd and checks that it serves index.html using curl.
Diffstat (limited to 'pkgs/development/python-modules/termplotlib/gnuplot-subprocess.patch')
0 files changed, 0 insertions, 0 deletions
