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

mattermost-desktop: init at 4.1.1 #40794

Merged
merged 1 commit into from Jun 13, 2018
Merged

Conversation

averelld
Copy link
Contributor

Motivation for this change

Electron-based desktop client for mattermost. The derivation is based on and therefore very similar to signal-desktop.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

Copy link
Member

@disassembler disassembler left a comment

Choose a reason for hiding this comment

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

Why patchelf a release binary instead of building from source?

@averelld
Copy link
Contributor Author

averelld commented May 20, 2018

Unfortunately the "source build" for these electron apps still needs the same fixes, because it fetches the electron binary as a node module and renames it to "mattermost-desktop", which then still has to be patched.
It also needs some extra attention, for example it pulls a binary 7z extractor, which has to be patched or worked around, removing a useless deb package creation and such.
So it is possible, a little more complexity / less maintainability but a little closer to source builds. Same would hold for signal desktop, and maybe similar packages (actually I couldn't find any package that does the node build directly).
Edit: After just trying it, npm install (which fetches all build dependencies) dosn't work in the sandbox, and all node dependencies would have to be added.

@ryantm
Copy link
Member

ryantm commented May 26, 2018

@GrahamcOfBorg build mattermost-desktop

@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: mattermost-desktop

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: mattermost-desktop

Partial log (click to expand)

100 57.7M  100 57.7M    0     0  3874k      0  0:00:15  0:00:15 --:--:-- 3573k
building '/nix/store/fm4p8vvsf1af2972qadkjy7p40jhph27-mattermost-desktop-4.1.1.drv'...
unpacking sources
unpacking source archive /nix/store/5i0ql8wqsv2m0f29dz45cmrqjwhf6lxm-mattermost-desktop-4.1.1-linux-x64.tar.gz
source root is mattermost-desktop-4.1.1
setting SOURCE_DATE_EPOCH to timestamp 1526567751 of file mattermost-desktop-4.1.1/resources/app.asar
installing
patching script interpreter paths in /nix/store/wj6asrmgp49f139wv2a7g9mhzrhdp7z9-mattermost-desktop-4.1.1/create_desktop_file.sh
/nix/store/wj6asrmgp49f139wv2a7g9mhzrhdp7z9-mattermost-desktop-4.1.1/create_desktop_file.sh: interpreter directive changed from "/bin/sh" to "/nix/store/xn5gv3lpfy91yvfy9b0i7klfcxh9xskz-bash-4.4-p19/bin/sh"
/nix/store/wj6asrmgp49f139wv2a7g9mhzrhdp7z9-mattermost-desktop-4.1.1

@ryantm
Copy link
Member

ryantm commented May 26, 2018

I haven't finished investigating it fully, but I believe we have similar problems with npm building the mattermost-client part of mattermost from source.

@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: mattermost-desktop

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@ryantm
Copy link
Member

ryantm commented Jun 12, 2018

This looks okay to merge to me. We can figure out building from source later.

@xeji xeji merged commit 15b5643 into NixOS:master Jun 13, 2018
orivej added a commit that referenced this pull request Jun 13, 2018
* master: (33 commits)
  Revert "libxml2: add static output"
  yq: 2.5.0 -> 2.6.0 (#41926)
  yoshimi: 1.5.8 -> 1.5.8.2 (#41925)
  haskell generic-builder: Use separate setup db in more cases
  nixos/tests/morty: fix non-deterministic failure
  texlive: Fix 'match-parens' ruby dependency
  chromium: 67.0.3396.62 -> 67.0.3396.87
  ngspice: Fix regression due to missing X libs (#41890)
  mattermost-desktop: init at 4.1.1 (#40794)
  xcircuit: init at 3.9.73 (#41891)
  yarn: 1.7.0 -> 1.8.0 (#41895)
  Update default.nix (#41842)
  libxml2: add static output
  remarshal: supports darwin
  go-ethereum: 1.8.10 -> 1.8.11
  bazel: add darwin support
  llvm: use native cmake for libc++abi
  kicad-unstable: 2018-03-10 -> 2018-06-12
  cmake: Only apply application-services.patch with 3.11
  nixos/tinc: minor fixes
  ...
@averelld averelld deleted the mattermost-desktop branch June 23, 2018 16:12
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.

None yet

5 participants