Merge pull request #224877 from IndeedNotJames/forgejo

This commit is contained in:
Sandro 2023-04-09 04:01:17 +02:00 committed by GitHub
commit c060b3d41f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,13 +25,11 @@
buildGoModule rec { buildGoModule rec {
pname = "forgejo"; pname = "forgejo";
version = "1.19.0-2"; version = "1.19.0-3";
src = fetchurl { src = fetchurl {
name = "${pname}-src-${version}.tar.gz"; url = "https://codeberg.org/forgejo/forgejo/releases/download/v${version}/forgejo-src-${version}.tar.gz";
# see https://codeberg.org/forgejo/forgejo/releases hash = "sha256-u27DDw3JUtVJ2nvkKfaGzpYP8bpRnwc1LUVra8Epkjc=";
url = "https://codeberg.org/attachments/2bf497db-fa91-4260-9c98-5c791b6b397c";
hash = "sha256-neDIT+V3qHR8xgP4iy4TJQ6PCWO3svpSA7FLCacQSMI=";
}; };
vendorHash = null; vendorHash = null;
@ -105,7 +103,6 @@ buildGoModule rec {
| { $version, html_url } + (.assets | map(select(.name | startswith($filename)) | {(.name | split(".") | last): .browser_download_url}) | add)' \ | { $version, html_url } + (.assets | map(select(.name | startswith($filename)) | {(.name | split(".") | last): .browser_download_url}) | add)' \
<<< "$releases") <<< "$releases")
archive_url=$(jq -r .gz <<< "$stable")
checksum_url=$(jq -r .sha256 <<< "$stable") checksum_url=$(jq -r .sha256 <<< "$stable")
release_url=$(jq -r .html_url <<< "$stable") release_url=$(jq -r .html_url <<< "$stable")
version=$(jq -r .version <<< "$stable") version=$(jq -r .version <<< "$stable")
@ -120,7 +117,7 @@ buildGoModule rec {
sha256=$(curl "$checksum_url" --silent | cut --delimiter " " --fields 1) sha256=$(curl "$checksum_url" --silent | cut --delimiter " " --fields 1)
sri_hash=$(nix hash to-sri --type sha256 "$sha256") sri_hash=$(nix hash to-sri --type sha256 "$sha256")
update-source-version "${pname}" "$version" "$sri_hash" "$archive_url" update-source-version "${pname}" "$version" "$sri_hash"
''; '';
}); });
}; };