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

element-desktop: build native modules #132601

Merged
merged 1 commit into from Aug 4, 2021
Merged

element-desktop: build native modules #132601

merged 1 commit into from Aug 4, 2021

Conversation

ghost
Copy link

@ghost ghost commented Aug 3, 2021

Motivation for this change

Fixes #87752.

Since matrix-seshat has a release with N-API support now, we can completely ignore the hak build system and electron, and link it together afterwards.

Just as the previous solution - this works on my machines. If it doesn't work on your machine, please go into as much detail as possible. I don't plan on debugging this much further if someone just posts "It doesn't work".

Also, even if some people have problems with this, it might still be better than no support at all.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • 21.11 Release Notes (or backporting 21.05 Relase 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.

@bb010g
Copy link
Contributor

bb010g commented Aug 3, 2021

Encrypted message search is confirmed working on my NixOS machine via nix run "github:petabyteboy/nixpkgs/feature/seshat2#element-desktop".

@r-rmcgibbo
Copy link

r-rmcgibbo commented Aug 4, 2021

Result of nixpkgs-review pr 132601 at 5568297 run on x86_64-linux 1

1 package built successfully:
  • element-desktop
3 suggestions:
  • warning: build-tools-in-build-inputs

    yarn is a build tool so it likely goes to nativeBuildInputs, not buildInputs.

    Near pkgs/development/tools/yarn2nix-moretea/yarn2nix/default.nix:294:7:

        |
    294 |       buildInputs = [ yarn nodejs rsync ] ++ extraBuildInputs;
        |       ^
    
  • warning: missing-phase-hooks

    installPhase should probably contain runHook preInstall and runHook postInstall.

    Near pkgs/development/tools/yarn2nix-moretea/yarn2nix/default.nix:334:7:

        |
    334 |       installPhase = attrs.installPhase or ''
        |       ^
    
  • warning: build-tools-in-build-inputs

    rsync is a build tool so it likely goes to nativeBuildInputs, not buildInputs.

    Near pkgs/development/tools/yarn2nix-moretea/yarn2nix/default.nix:294:7:

        |
    294 |       buildInputs = [ yarn nodejs rsync ] ++ extraBuildInputs;
        |       ^
    

Result of nixpkgs-review pr 132601 at 5568297 run on aarch64-linux 1

1 package built successfully:
  • element-desktop

@Mic92
Copy link
Member

Mic92 commented Aug 4, 2021

@siraben
Copy link
Member

siraben commented Aug 4, 2021

Result of nixpkgs-review pr 132601 run on x86_64-linux 1

1 package built:
  • element-desktop

@siraben siraben merged commit 1ad0542 into NixOS:master Aug 4, 2021
Copy link
Member

@yayayayaka yayayayaka left a comment

Choose a reason for hiding this comment

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

I'm a bit late to the party but can confirm the application builds on nixos x86_64-linux, indexed my encrypted messages and search results of encrypted messages do appear on my application.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2021

Successfully created backport PR #132633 for release-21.05.

chmod u+w . ./yarn.lock
export HOME=/tmp
yarn config --offline set yarn-offline-mirror ${yarnOfflineCache}
${fixup_yarn_lock}/bin/fixup_yarn_lock yarn.lock
Copy link
Member

Choose a reason for hiding this comment

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

why isn't fixup_yarn_lock in nativeBuildInputs?

Copy link
Contributor

@yu-re-ka yu-re-ka Aug 13, 2021

Choose a reason for hiding this comment

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

GitLab has the same mistake/improvement

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.

Our element-desktop is not built with encrypted chat search support
8 participants