Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pufferpanel: build frontend from source #234124

Merged
merged 3 commits into from
Jul 17, 2023

Conversation

tie
Copy link
Member

@tie tie commented May 26, 2023

Description of changes

This change updates the PufferPanel package to build frontend from source. Note that cross-compilation with buildNpmPackage seems to be broken (at least from aarch64-linux to x86_64-linux), but the frontend is platform-independent so we use pkgsBuildBuild.buildNpmPackage.

It is bundled with 2.6.7 version bump since it allows us to drop upstreamed patches.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.05 Release Notes (or backporting 22.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Copy link
Member

@SuperSandro2000 SuperSandro2000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if that is not working than we have a special case herre which probably requires some more work.

pkgs/servers/pufferpanel/default.nix Outdated Show resolved Hide resolved
pkgs/servers/pufferpanel/default.nix Outdated Show resolved Hide resolved
@tie
Copy link
Member Author

tie commented Jun 16, 2023

if that is not working than we have a special case herre which probably requires some more work.

I think I’ve tracked down the cross-compilation issue to Nodejs build system. Currently pkgsCross.gnu64.nodejs fails because -m64 flag is passed for both host and target toolchain on aarch64-linux.
https://github.com/nodejs/node/blob/57679e1c97a90057d5ca9e1f0d1f3c6255d20200/common.gypi#L416-L435

I can successfully build pkgsCross.gnu64.nodejs_20 (but not 18) with the 840141d commit applied. When overriding buildNpmPackage to nodejs_20, pkgsCross.gnu64.pufferpanel successfully builds and runs on target system.

tie added 3 commits July 8, 2023 10:49
This change updates the PufferPanel package to build frontend from
source.
This change removes pathDeps argument from pufferpanel package. It is
rather wasteful to rebuild package to change PATH environment variable.
Instead, users should create a separate wrapper derivation or set
services.pufferpanel.extraPackages in NixOS configuration.
@tie tie force-pushed the pufferpanel-frontend branch from abe082d to da4bcf4 Compare July 8, 2023 07:51
@SuperSandro2000 SuperSandro2000 merged commit 27eb270 into NixOS:master Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants