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
rambox: build from source #31137
rambox: build from source #31137
Conversation
Checksum seems be wrong:
|
@Mic92 Interesting, Could you show the full log? Also I think this relies on f1e8138, NPM until recently was not deterministic, see npm/npm#17979 (comment). |
@yegortimoshenko Wow, you've made a great work!!! 👍 Works fine (aside of url opening under wayland). No errors in console so far. |
rm $out/shell-wrapper.sh $out/Uninstaller | ||
''; | ||
|
||
meta = with stdenv.lib; { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sencha license?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it should be licenses.unfree
.
description = "Free and Open Source messaging and emailing app that combines common web applications into one"; | ||
homepage = http://rambox.pro; | ||
license = licenses.mit; | ||
maintainers = [ maintainers.gnidorah ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you don't want to add yourself to maintainers? :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👺
|
||
postFixup = '' | ||
paxmark m $out/opt/Rambox/rambox | ||
wrapProgram $out/opt/Rambox/rambox --prefix PATH : ${xdg_utils}/bin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is still needed for url opening under wayland, since xdg-utils is not a part of e.g. sway compositor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, thanks!
@@ -0,0 +1 @@ | |||
var auth0Cfg={clientID:"y9am0DVawe2tvlA3ucD7OufpJHZZMjsO",domain:"rambox.auth0.com"}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we allowed to put this client ID in our repo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, not explicitly.
A new client ID requires an account at https://auth0.com/. I could register one on my own but I'm not sure if that's appropriate. Chromium derivation also has API credentials:
nixpkgs/pkgs/applications/networking/browsers/chromium/common.nix
Lines 197 to 203 in e8f1ddc
# Google API keys, see: | |
# http://www.chromium.org/developers/how-tos/api-keys | |
# Note: These are for NixOS/nixpkgs use ONLY. For your own distribution, | |
# please get your own set of keys. | |
google_api_key = "AIzaSyDGi15Zwl11UNe6Y-5XW_upsfyw31qwZPI"; | |
google_default_client_id = "404761575300.apps.googleusercontent.com"; | |
google_default_client_secret = "9rIFQjfnkykEmqb6FfjJQD1D"; |
Are they registered using a special email address or is it just someone who happens to maintain the derivation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nevermind, used my own account for now. Fixed!
@yegortimoshenko I have build you pull request both rebased against master and your pull request branch: https://gist.github.com/Mic92/f47265189009d4cbd202c2dafec3ecaf The only difference I can spot is that I use |
597a258
to
e7fc6fd
Compare
@Mic92 This is probably due to some install script. I've disabled those and forced Now there should be very little surface for non-determinism. Could you please try again? |
8e96d14
to
d48662b
Compare
I've made a few other fixes: switched file layout/naming, added another patch to completely disable auto-update functionality along with passing |
Now I get:
I have uploaded $ tar --xattrs -czpf node-modules.tar.gz /tmp/nix-build-node_modules.drv-0 You can diff it with |
Could you show
|
homepage = http://rambox.pro; | ||
license = licenses.gpl3; | ||
maintainers = with maintainers; [ gnidorah ]; | ||
platforms = platforms.linux; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
someone with Mac to test it there? :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That'd take some effort: Sencha CMD derivation should be extended to Darwin first. And I'd wager that most macOS users are more comfortable with packaging native to their platform anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with you. Just some offtopic: some nixpkgs macOS users don't agree, see discussion #20670 (comment)
$ tar --xattrs -czpf ~/upload/node-modules.tar.gz /nix/store/mfb04xbqdmbh5cpmwqrhvq8jbmfb81lx-node_modules https://dl.thalheim.io/wCrMmJa1V6fYMGbzdZ7IUw/node-modules.tar.gz |
d48662b
to
cc04a30
Compare
@Mic92 Thanks a lot! My build dir is different from yours for some reason:
Of course this metadata should not affect the checksum. I've updated the fetcher to strip it using |
@yegortimoshenko this is due nixUnstable, I suppose. Hydra will have the same build path. But looks like it could be normalized. Why do they store this information at all? |
They store this information to speed up next |
But it will not build in hydra because the wrong checksum. |
But checks have passed. I've already fixed the fetcher, it now normalizes |
@Mic92 Will hydra build it? Rambox dependency Sencha is unfree. We can "build" w/o Sencha, like Rambox CI scripts do https://github.com/NixOS/nixpkgs/pull/20657/files#diff-5a9e329a438665eff30913e6b6d5bb72R46 but that's not cool |
@yegortimoshenko thanks, with the normalization it works. @gnidorah hydra will not build it with sencha beeing marked as unfree. But the build seems pretty fast to me, so maybe it does not matter. |
jq -S 'delpaths(keys | map(select(startswith("_")) | [.]))' $f > $f.tmp | ||
mv $f.tmp $f | ||
done | ||
mv node_modules $out |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This snippet is actually pretty cool. We can use it to build other node.js applications without adding thousands of npm dependencies to nixpkgs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Mic92 Thanks! I'll test it with another package or two and then I'll move it to build-support
. Pretty sure it's deterministic now, but ignoring scripts might be a problem with some builds. Running scripts will likely cause different checksums for different platforms/architectures.
I also have a fetcher for Maven/Leiningen project dependencies:
https://github.com/yegortimoshenko/overlay/blob/master/pkgs/fetchMaven/default.nix
@yegortimoshenko Thank you much! |
Motivation for this change
This makes rambox build from source. It also includes Sencha Cmd derivation (build tool used by rambox) and
fetchNodeModules
fetcher both of which are currently not available at top-level (not good enough).@gnidorah, please check this out and tell if it works for you, and if you see any errors in DevTools console in normal workflow.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)