Change:
Describe the bug Sources from archives from fail to download with hash mismatches. To Reproduce Expected behavior The hash should match and the source should download. Additional context It sounds like , causing changes to all generated archives (to come in-line with GNU gzip). I've determined some packages which this affects (listed in "Maintainer information") by . I'm happy to have a go making a PR for all of these packages with the following process: archive from cache (by with subsituters) archive from both and confirm tar files are identical hash according to newly retrieved archive But if there's a better process, please let me know :) Notify maintainers Metadata system: host os: multi-user?: sandbox: version: channels(root): nixpkgs: Maintainer information:
Sounds good
I think it is preferable to switch all affected derivations to fetchzip. This should prevent this from happening again, if the actual content of the tarball is the same. Even better, you could add a fetchFromSourceHut function which uses fetchzip under the hood, like fetchFromGitHub and fetchFromGitLab. This would encourage people not to use fetchurl to fetch procedurally generated tarballs from sourcehut.
From a quick look at the ticket, this is supposed to be a one-time change to make the hash the same as in other forges though
I think getting the new hashes with e.g. should be enough (fetches securely via HTTPS and we should be able to trust that the contents remain unchanged). +1, that seems like the best (long-term) solution. Edit: And IMO we should keep using archives (e.g. because it's consistent with the GitHub and GitLab fetchers) and should indeed be fine now:
the point is: with fetchzip, we don't have to trust this pinky promise (I mean, I'm sure that they intend to keep it, but it could break unwillingly). That's exactly why fetchzip exists in the first place. So on fixes keeping fetchurl.
oh, my bad, I didn't read your comment carefully enough :o I thought you've meant vs. (which didn't make much sense) but realized now that it was vs. . :+1: for that then :)
Hah, same. too then
is merged now so you could submit a PR to switch the affected attributes/packages to the new (s. ). I can also take care of it if you want.

Discussion:
<del> { lib, stdenv, rustPlatform, fetchurl, pkg-config, ncurses, openssl, Security }: </del> <ins> { lib, stdenv, rustPlatform, fetchFromSourcehut, pkg-config, ncurses, openssl, Security }: </ins> rustPlatform.buildRustPackage rec { pname = "asuka"; version = "0.8.1"; <del> src = fetchurl { url = "https://git.sr.ht/~julienxx/${pname}/archive/${version}.tar.gz"; sha256 = "07i80qmdpwfdgwrk1gzs10wln91v23qjrsk0x134xf5mjnakxc06"; </del> <ins> src = fetchFromSourcehut { owner = "~julienxx"; repo = pname; rev = version; sha256 = "1y8v4qc5dng3v9k0bky1xlf3qi9pk2vdsi29lff4ha5310467f0k"; </ins> }; cargoSha256 = "0p0x4ch04kydg76bfal5zqzr9hvn5268wf3k2v9h7g8r4y8xqlhw";

<del> { lib, buildGoModule, fetchurl </del> <ins> { lib, buildGoModule, fetchFromSourcehut </ins> , ncurses, notmuch, scdoc , python3, w3m, dante }:

pname = "aerc"; version = "0.5.2"; <del> src = fetchurl { url = "https://git.sr.ht/~sircmpwn/aerc/archive/${version}.tar.gz"; sha256 = "h7kiRA5TuZ8mDSMymWU33stFLIOMd06TQLYzKW+faO4="; </del> <ins> src = fetchFromSourcehut { owner = "~sircmpwn"; repo = pname; rev = version; sha256 = "1ja639qry8h2d6y7qshf62ypkzs2rzady59p81scqh8nx0g9bils"; </ins> }; runVend = true;

<del> { lib, stdenv, fetchurl }: </del> <ins> { lib, stdenv, fetchFromSourcehut }: </ins> stdenv.mkDerivation rec { pname = "scdoc"; version = "1.11.1"; <del> src = fetchurl { url = "https://git.sr.ht/~sircmpwn/scdoc/archive/${version}.tar.gz"; sha256 = "007pm3gspvya58cwb12wpnrm9dq5p28max2s0b2y9rq80nqgqag5"; </del> <ins> src = fetchFromSourcehut { owner = "~sircmpwn"; repo = pname; rev = version; sha256 = "1g37j847j3h4a4qbbfbr6vvsxpifj9v25jgv25nd71d1n0dxlhvk"; </ins> }; postPatch = ''

{ lib , stdenv <del> , fetchurl </del> <ins> , fetchFromSourcehut </ins> , pkg-config , scdoc , wayland

pname = "wev"; version = "1.0.0"; <del> src = fetchurl { url = "https://git.sr.ht/~sircmpwn/wev/archive/${version}.tar.gz"; sha256 = "0vlxdkb59v6nb10j28gh1a56sx8jk7ak7liwzv911kpmygnls03g"; </del> <ins> src = fetchFromSourcehut { owner = "~sircmpwn"; repo = pname; rev = version; sha256 = "0l71v3fzgiiv6xkk365q1l08qvaymxd4kpaya6r2g8yzkr7i2hms"; </ins> }; nativeBuildInputs = [ pkg-config scdoc wayland ];

<del> { lib, stdenv, fetchurl, meson, pkg-config, ninja, wayland </del> <ins> { lib, stdenv, fetchFromSourcehut, meson, pkg-config, ninja, wayland </ins> , wayland-protocols }:

pname = "wlsunset"; version = "0.1.0"; <del> src = fetchurl { url = "https://git.sr.ht/~kennylevinsen/wlsunset/archive/${version}.tar.gz"; sha256 = "0g7mk14hlbwbhq6nqr84452sbgcja3hdxsqf0vws4njhfjgqiv3q"; </del> <ins> src = fetchFromSourcehut { owner = "~kennylevinsen"; repo = pname; rev = version; sha256 = "12snizvf49y40cirhr2brgyldhsykv4k2gnln2sdrajqzhrc98v6"; </ins> }; nativeBuildInputs = [ meson pkg-config ninja wayland ];

<del> { lib, stdenv, fetchurl </del> <ins> { lib, stdenv, fetchFromSourcehut </ins> , meson, pkg-config, wayland, ninja , cairo, libinput, pango, wayland-protocols, libxkbcommon }:

pname = "wshowkeys-unstable"; inherit version; <del> src = fetchurl { url = "https://git.sr.ht/~sircmpwn/wshowkeys/archive/${commit}.tar.gz"; sha256 = "0iplmw13jmc8d3m307kc047zq8yqwm42kw9fpm270562i3p0qk4d"; </del> <ins> src = fetchFromSourcehut { owner = "~sircmpwn"; repo = "wshowkeys"; rev = commit; sha256 = "10kafdja5cwbypspwhvaxjz3hvf51vqjzbgdasl977193cvxgmbs"; </ins> }; nativeBuildInputs = [ meson pkg-config wayland ninja ];