-
Notifications
You must be signed in to change notification settings - Fork 78
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
Use nix shell #16359
base: master
Are you sure you want to change the base?
Use nix shell #16359
Conversation
Jenkins BuildsClick to see older builds (125)
|
@igor-sirotin, @alexjba, @caybro, @micieslak, This PR is enforcing Nix environment for Linux builds. As a benefit you will have:
FYI @anastasiyaig |
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.
Not sure if I'm a fan of this flake-compat
stuff, but other than that this looks good.
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.
Glad to see this change! 🍻
@yakimant @siddarthkay we need to tell tests to use another artefact :) |
Need to sort out the locations of:
Possible places:
Links:
Env vars (5.15.8):
|
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.
Looking good.
@yakimant could you please give me some instructions on how to build and run the app using the nix shell? I have a new linux environment with just a bare minimum of packages installed: build-essential, git, nix, direnv. If I understand it correctly it's all I should have to get me started, right? |
One other note: would it be a good chance to update the |
@alexjba There are 2 options:
In regards of |
Thank you! I've followed the steps and this is my result:
|
@yakimant I think we'll need to find a way to share the nix packages. I've been naive enough to give it a spin in a linux VM and 15h later it's still compiling chromium. I'm really a nix noob, but I see lots of resources on sharing the pre-compiled packages. |
We have it setup already: So you need to run
before entering the nix shell. I will make sure it is set for all the cases, added to TODO. |
Hopefully a more permanent fix here #16443 |
@yakimant i dont see nix linux artefact here. perhaps i am getting dumb. Which build to look at? |
Isn't it just the linux one? |
there was a link to nix build job , i used that one before.. Maybe i need to use it again, hence asking :D |
@anastasiyaig, this PR is also getting rid of non-Nix build in Jenkins (subject to change). |
@anastasiyaig, very good! I'm not good in Stats / QtWebEngine functionality. |
it looks like we dont care much about Browser as standalone part of the app (with a hope and plans to rewrite it some day). All is needed now is to make the wallet connect thing working (on the screenshot), it seem to be working :) i will wait what @alexjba says |
Short term it's ok to disable the gpu on webviews. Long term it's probably not. But we won't need this once #16443 is merged. Found a way to overcome the freeze on 5.15.8 without disabling anything. |
nixGL issue, when used with bisected nixGL to find the last working commit and it works! @alexjba, please try |
I'm getting
|
NVM! Had an issue with the display and all graphical apps would fail to find the display. @yakimant Works nicely! |
2c0f63e
to
c35a8a8
Compare
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.
Looks nice. Good work.
check-nix-shell: | ||
ifeq ($(detected_OS),Linux) | ||
ifndef IN_NIX_SHELL | ||
$(error Running outside of Nix shell is not supported) |
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.
Harsh :D.
}: | ||
|
||
let | ||
qtCustom = (with pkgs.qt515_8; |
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.
Another point in case, the latest released Qt version is 5.15.15, why do we have to use sth that's years old?
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 was originally requested by:
#9350
Switching to newer version will not be a problem. It's a next step.
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 would be great, and since this PR is still WIP and has many TODOs, how hard would be to make the switch now and not later? ;)
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.
If with switching to Qt 5.15.15 I will not need to implement and opt-out logic (to build and run with system libs) - I would certainly prefer this.
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.
Deal ;) I can test this locally on my machine next week, and provide patches/PR on top of this PR if needed
To summarize my concerns here; the usecase is pretty simple, I as a developer want to be able to:
The compatibility changes I'd like to propose are pretty simple, touching just the
For (a simple) example, the new Similarly, old |
After making a nix shell to build a Linux binary:
#9350
It was running as a part of CI:
https://ci.status.im/job/status-desktop/job/systems/job/linux/job/x86_64/job/package-nix/
Now it's time to switch developers to use it and eventually cleanup non-Nix shell related code.
What does the PR do
nix develop
)direnv
setup (`nix-direnv)check-nix-shell
Makefile target to block further run makeHow to test
direnv allow
nix develop
nix-shell
Useful Links
TODO
export FLAG_DAPPS_ENABLED=1
nix/README.md
ubuntu_build_setup.sh
(used in Ansible CI fleet)nix develop
issue:unsupported tarball input attribute 'lastModified'
. Maybe wrongnix
versionnix.conf
is loaded in each case (direnv, develop, shell)make run
fails to run in nix shellrun-storybook-tests
andrun-statusq-tests
in Nix shell