Merge pull request #11 from lelgenio/fix-for-codeberg

chore: fix fetching source from codeberg
This commit is contained in:
Leonardo Eugênio 2024-12-12 00:31:39 -03:00 committed by GitHub
commit 580022e73e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 9 deletions

View file

@ -2,7 +2,7 @@
lib, lib,
stdenv, stdenv,
pkgs, pkgs,
fetchFromGitHub, fetchFromGitea,
makeWrapper, makeWrapper,
curl, curl,
jq, jq,
@ -15,13 +15,14 @@
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "dzgui"; pname = "dzgui";
version = "5.5.0"; version = "5.5.2";
src = fetchFromGitHub { src = fetchFromGitea {
domain = "codeberg.org";
owner = "aclist"; owner = "aclist";
repo = "dztui"; repo = "dztui";
rev = "bae6a57e1ee5660a07e3a3c326ec68617b831d31"; rev = "32b424da5cfa9955e98d840a5813e0d61cbe0a8a";
sha256 = "sha256-x5GSyrbEZoru5p70QVRSFx52Njkhvtg/+qc94MqpOmo="; hash = "sha256-t2wc3SMMFucVLzROco5Babe+URW3Z9pSsob7PNDMTJo=";
}; };
postPatch = '' postPatch = ''
@ -67,7 +68,7 @@ stdenv.mkDerivation rec {
''; '';
meta = with lib; { meta = with lib; {
homepage = "https://github.com/pronovic/banner"; homepage = "https://codeberg.org/aclist/dztui";
description = "DayZ TUI/GUI server browser"; description = "DayZ TUI/GUI server browser";
license = licenses.gpl3; license = licenses.gpl3;

View file

@ -4,12 +4,12 @@
set -xe set -xe
latest_commit="$( latest_commit="$(
curl -L -s ${GITHUB_TOKEN:+-u ":${GITHUB_TOKEN}"} https://api.github.com/repos/aclist/dztui/branches/master \ curl -L -s https://codeberg.org/api/v1/repos/aclist/dztui/branches/dzgui \
| jq -r .commit.sha | jq -r .commit.id
)" )"
version="$( version="$(
curl https://raw.githubusercontent.com/aclist/dztui/$latest_commit/dzgui.sh \ curl https://codeberg.org/aclist/dztui/raw/commit/$latest_commit/dzgui.sh \
| rg '^version=(.*)$' --replace '$1' | rg '^version=(.*)$' --replace '$1'
)" )"