3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #283632 from dotlambda/librewolf-codeberg

librewolf-unwrapped: repository moved to Codeberg
This commit is contained in:
Robert Schütz 2024-02-11 18:49:30 +00:00 committed by GitHub
commit 2b7423c470
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 6 deletions

View file

@ -1,11 +1,12 @@
{ lib, fetchurl, fetchFromGitLab, fetchFromGitea }:
{ lib, fetchurl, fetchFromGitea }:
let src = lib.importJSON ./src.json;
in
{
inherit (src) packageVersion;
source = fetchFromGitLab {
owner = "librewolf-community";
repo = "browser/source";
source = fetchFromGitea {
domain = "codeberg.org";
owner = "librewolf";
repo = "source";
fetchSubmodules = true;
inherit (src.source) rev sha256;
};

View file

@ -17,7 +17,7 @@ writeScript "update-librewolf" ''
PATH=${lib.makeBinPath [ coreutils curl gnugrep gnupg gnused jq moreutils nix-prefetch-git ]}
set -euo pipefail
latestTag=$(curl https://gitlab.com/api/v4/projects/librewolf-community%2Fbrowser%2Fsource/repository/tags?per_page=1 | jq -r .[0].name)
latestTag=$(curl "https://codeberg.org/api/v1/repos/librewolf/source/tags?page=1&limit=1" | jq -r .[0].name)
echo "latestTag=$latestTag"
srcJson=pkgs/applications/networking/browsers/librewolf/src.json
@ -29,7 +29,7 @@ writeScript "update-librewolf" ''
fi
prefetchOut=$(mktemp)
repoUrl=https://gitlab.com/librewolf-community/browser/source.git/
repoUrl=https://codeberg.org/librewolf/source.git
nix-prefetch-git $repoUrl --quiet --rev $latestTag --fetch-submodules > $prefetchOut
srcDir=$(jq -r .path < $prefetchOut)
srcHash=$(jq -r .sha256 < $prefetchOut)