dream2nix icon indicating copy to clipboard operation
dream2nix copied to clipboard

Better way to update electron hashes.

Open DavHau opened this issue 3 years ago • 1 comments

Currently dream2nix will crash as soon as the binary hashes for a given minor version are missing in /overrides/nodejs/default.nix

Other problems: The error is different if a the major version if missing completely, vs. only the minor version of the hash in dream2nix is wrong.

related: https://github.com/nix-community/dream2nix/issues/211

Possible solution:

  • put electron hash map in separate file (JSON)
  • provide script which updates the hash for each electron version (keeping only the latest bugfix version of each minor version)
  • raise better error if electron version is missing on how to update
  • (provide interface to temporarily add electron hashes, so forking dream2nix is not necessary)

DavHau avatar Aug 25 '22 13:08 DavHau

updated description

DavHau avatar Aug 25 '22 14:08 DavHau

I'm curious, is it specific to electron? Why don't you have similar issues for all packages? (at least those that need patch)

tobiasBora avatar Nov 09 '22 19:11 tobiasBora

I'm curious, is it specific to electron? Why don't you have similar issues for all packages? (at least those that need patch)

We have it in several places I think, but so far electron was the one hurting frequently.

DavHau avatar Nov 09 '22 20:11 DavHau

So I guess we should try to find a generic fix right? Also, would it make sense when a library does not have any up-to-date derivation in nixpkgs to just try to use the existing derivation + update the source? This way when libraries do minimal updates it won't need a whole new package.

tobiasBora avatar Nov 09 '22 20:11 tobiasBora