-
Notifications
You must be signed in to change notification settings - Fork 113
CI: Travis: add update of Nix packages #625
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
CI: Travis: add update of Nix packages #625
Conversation
d686a66
to
a54bd09
Compare
M .travis.yml
The Cachix suddenly started to fall with: ``` $ nix-env -iA cachix -f https://cachix.org/api/v1/install error: creating directory '/Users/travis/.cache/nix/tarballs': Permission denied The command "nix-env -iA cachix -f https://cachix.org/api/v1/install" exited with 1. ``` There are changes to macOS procedures, Nix updated to 2.2, and Cachix has big upstream changes for macOS processes. So fixing rights management in this way. M .travis.yml
Anyway it takes 30s-1m to the nix-build. M .travis.yml
… 2.2 M .travis.yml
303cbd6
to
ebdb4e8
Compare
Just wanted to let you know (in case it lets you simplify anything--I haven't looked closely at your setup) that Nix support is working on Travis again, and the default version is updated to 2.3.6, as of about an hour ago. |
Yes, I was in the middle of refactoring CI when it got released. They basically switched the installer to multiuser installer by default, but it needs a service reload after trusted-users update, without reload the user was rejected and so the builds were unboxed (unpure) and so the system env went into Nix inputs, which triggered the whole stack rebuilds. I have a long history about those installers, and I am still salty. But I also see my arguments from the talk were accepted as true statements in the end, operating from root is preserved, and even more - explicitly stated, as also explicitness of the installers, actions under superuser are especially explicitly logged. |
Also I see the service restart or even hack for macOS is still needed: https://travis-ci.org/github/haskell-nix/hnix/builds/701405539 |
From which project are you that you know that Nix in Travis CI works again? |
Well, macOS falls even with all current workarounds. !Fun!, it basically fails to update itself having a superuser permissions. https://travis-ci.org/github/haskell-nix/hnix/jobs/701412861 |
If Nix was feeling Ok without updates for 2 years worldwide, I think we can allow and Ok to roll on current Nix version on macOS until we migrate to other CI. |
Just a member from the Nix community (and macOS user) stepping in to make sure Travis CI works again (because I use it myself). I hesitate to try and debug your issue because I'm not sure I understand why your setup script tries to run nix-channel and nix-env with sudo (and why it needs to update?). I don't want to insult you by second-guessing everything. |
Because before this, not so long ago Domen made Cachix work only with recent Nix ( I was updating it with |
I am so tired of fixing the installation issues of Nix (┛ಠ_ಠ)┛彡┻━┻ It is a package manager (installer) that can not install itself on so many systems or operate on them normally after the installation for the last number of years. Today is just a day when I feel more tired and care less about debugging the Nix installer. The macOS migration hack after Nix update now is not needed, but the service restart is still needed. |
Also isn't that logical that CI testing system always should load the latest stable release of Nix, as we install, use and test with current package versions, not legacy ones. I'd preferred if there always loaded the latest container, but that is impossible in Travis, as I know there containers also need to go through presetup. |
It is great that all this happened before I published an article and repo for Haskellers community how to do CI with Nixpkgs, now I do not need to explain installer issues and I can pretend that Nix would work further. |
Wow. Linux currently works only old So there is this, so I can not pretend it works normally. |
Report: #624
This was due because Nix installer installs very old version of
Nix
, and launchesNix-daemon
. So now when we need right after right after the install to update -Nix-daemon
andNix
are incompatible after the update.After Nix updating itself, it fails to operate and needs HACKs to its daemon files and then restart of its daemon so Nix-daemon matches and supports the Nix.
The solution is tweaked out to work of the information from the closed and gorgotten by God report thread.
Just maybe this caveat and how to solve it, should to be documented in the Nix changelogs. And maybe the installer should instal new major version right away in the first place, so users and machines do not need to jump through the hoops on every install and figure-out why everything falls on its face and that is a Nix installation bug and then relearn all the install and migration bugs from the last two years.
We installing Nix on every CI launch, I do not even, why we need to jump though all this just to be able to install&use Cachix.
For what it is it was a major hurdle.