Nixpkgs: Discord was updated and no longer works (again)

Created on 6 Aug 2020  路  9Comments  路  Source: NixOS/nixpkgs

Basically the exact same issue as this: #54003 (discord released update 0.0.11 and older versions no longer work).
Has there been any success in trying to contact discord about this?

And I was wondering, surely there is also other (proprietary) software which forces you to update (I don't know any that does but it seems plausible for programs which require network communication).
So don't we need a solution to this delayed updating in general?

bug

Most helpful comment

If you're impatient you can build discord off of git repo.

To install discord from latest master to your profile, run

nix-env -f https://github.com/NixOS/nixpkgs/archive/master.tar.gz -iA discord

All 9 comments

94811 is up, this issue probably should stay open though, it would be nice to find a solution.

It doesn't seem like other package managers have any solution to this (I'm on Arch and while the package was updated quicker there were still ~30 min in which I couldn't update).

Is there any reason why we need to have a human being manually change the hash and version number?
It's probably for security reasons but in cases like these where you already only get a proprietary binary from a central source I don't see what benefit there is over some script on a server auto-updating the hash and version number.

I don't think we can do anything about that without Discord support. Currently when new version of Discord is being released the old one is immediately disabled. Discord could have gave time for distributions to update, but they don't. Compare with say Signal Desktop (another application that automatically disables old versions) which actually gives time for the package to be properly updated.

Could a bot automatically update Discord versions? Sure, but there is no real value in doing so. Discord versions in nixpkgs get updated quickly, and you would still need to wait for Hydra to build release.

@xfix Yeah I definetely agree that discord is at fault here and should at least implement a grace period but I think this could be a problem that's not exclusive to discord (online games come to mind but they aren't in the repos afaik).

Could a bot automatically update Discord versions? Sure, but there is no real value in doing so.

Well I personally find having to wait ~1h or longer every few months to use an application again quite unacceptable if its for such a trivial reason (again, definitely the fault of the developers of the program but we have to deal with it).
Also I don't see the value in a person updating discord versions.
I mean I assume the one updating it simply downloads the new package and edits the hash, why can't a bot do that?

EDIT: there already is nixpkgs/pkgs/applications/networking/instant-messengers/discord/update-discord.sh which is used to update the version so what gain is there in a human running the script themselves?

Even if a bot did update Discord version you would still need to wait for Hydra which may be building other things at that time (Chromium builds can take a long time), and the channel won't progress until everything is built. Waiting for Hydra is very likely to be longer part of a process than updating nixpkgs.

Having a bot with commit access would also mean additional risk because if such a bot got compromised it could commit to master and potentially compromise NixOS installations.

And in the end, the recent update was from 0.0.10 to 0.0.11. This means that Discord update occured at most 12 times so far, and if you look into History updates that necessitate package update are getting rarer and rarer with time (Discord developers can update most things without having to update the package, and I assume what they needed package updates for they already updated to not need them anymore). This isn't necessary for Discord.

Also, Discord provides a reasonable option of opening their client in a web browser while you wait for package to be updated.

The best course of action here is probably to convince Discord (the company) to allow a grace period of at least a few days when they roll out updates like these. Surely NixOS is not the only platform affected by this problem.

As for making the Discord build somehow non-deterministic, well, Nix is designed to be deterministic. Checksums of downloaded files need to be known in advance. And besides, even if a build was somehow non-deterministic how would nix know it should download a new version when it gets released.

This is already implemented somewhat by the update.sh

Master and release have been updated: #94811 #94814 #94817

Please allow for the channels to do their CI/CD, and update.

If you're impatient you can build discord off of git repo.

If you're impatient you can build discord off of git repo.

To install discord from latest master to your profile, run

nix-env -f https://github.com/NixOS/nixpkgs/archive/master.tar.gz -iA discord
Was this page helpful?
0 / 5 - 0 ratings

Related issues

grahamc picture grahamc  路  3Comments

langston-barrett picture langston-barrett  路  3Comments

teto picture teto  路  3Comments

sid-kap picture sid-kap  路  3Comments

matthiasbeyer picture matthiasbeyer  路  3Comments