gogdl: 1.1.2 -> 1.2.0
This commit is contained in:
@@ -1,25 +1,28 @@
|
||||
{
|
||||
lib,
|
||||
writeScript,
|
||||
python3Packages,
|
||||
fetchFromGitHub,
|
||||
cacert,
|
||||
}:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
python3Packages.buildPythonApplication (finalAttrs: {
|
||||
pname = "gogdl";
|
||||
version = "1.1.2";
|
||||
version = "1.2.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Heroic-Games-Launcher";
|
||||
repo = "heroic-gogdl";
|
||||
rev = "1ff09820915f855ea764c6e49ea2def63e86b3bb";
|
||||
hash = "sha256-pK6JeTJeBq9qVfflNSYs3s4HuD0Kz6k9DDUVHL81FV0=";
|
||||
# two commits after the v1.2.0 tag, because the release messed up submodule fetching
|
||||
rev = "9759dfb1f50e0c68854f938e9568d84cab59652c";
|
||||
fetchSubmodules = true;
|
||||
hash = "sha256-yjiPHEiZjs9TnBRaKzm1TpLcPK0tfIrzM30DX66m+1Y=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = with python3Packages; [
|
||||
build-system = with python3Packages; [
|
||||
setuptools
|
||||
];
|
||||
|
||||
dependencies = with python3Packages; [
|
||||
requests
|
||||
];
|
||||
|
||||
@@ -32,31 +35,4 @@ python3Packages.buildPythonApplication rec {
|
||||
license = with lib.licenses; [ gpl3 ];
|
||||
maintainers = [ ];
|
||||
};
|
||||
|
||||
# Upstream no longer create git tags when bumping the version, so we have to
|
||||
# extract it from the source code on the main branch.
|
||||
passthru.updateScript = writeScript "gogdl-update-script" ''
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl gnused jq common-updater-scripts
|
||||
set -eou pipefail;
|
||||
|
||||
owner=Heroic-Games-Launcher
|
||||
repo=heroic-gogdl
|
||||
path='gogdl/__init__.py'
|
||||
|
||||
version=$(
|
||||
curl --cacert "${cacert}/etc/ssl/certs/ca-bundle.crt" \
|
||||
https://raw.githubusercontent.com/$owner/$repo/main/$path |
|
||||
sed -n 's/^\s*version\s*=\s*"\([0-9]\.[0-9]\.[0-9]\)"\s*$/\1/p')
|
||||
|
||||
commit=$(curl --cacert "${cacert}/etc/ssl/certs/ca-bundle.crt" \
|
||||
https://api.github.com/repos/$owner/$repo/commits?path=$path |
|
||||
jq -r '.[0].sha')
|
||||
|
||||
update-source-version \
|
||||
${pname} \
|
||||
"$version" \
|
||||
--file=./pkgs/games/gogdl/default.nix \
|
||||
--rev=$commit
|
||||
'';
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user