From b44629b35913518dce1a5f499b00163fc01f4abf Mon Sep 17 00:00:00 2001 From: Sarah Clark Date: Tue, 28 Apr 2026 13:58:12 -0700 Subject: [PATCH] python3Packages.google-cloud-firestore: switch to github --- .../google-cloud-firestore/default.nix | 25 +++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/google-cloud-firestore/default.nix b/pkgs/development/python-modules/google-cloud-firestore/default.nix index d013d37607cd..1377f8e92f93 100644 --- a/pkgs/development/python-modules/google-cloud-firestore/default.nix +++ b/pkgs/development/python-modules/google-cloud-firestore/default.nix @@ -2,7 +2,7 @@ lib, aiounittest, buildPythonPackage, - fetchPypi, + fetchFromGitHub, freezegun, google-api-core, google-cloud-core, @@ -16,6 +16,7 @@ pythonOlder, pyyaml, setuptools, + nix-update-script, }: buildPythonPackage (finalAttrs: { @@ -23,12 +24,15 @@ buildPythonPackage (finalAttrs: { version = "2.27.0"; pyproject = true; - src = fetchPypi { - pname = "google_cloud_firestore"; - inherit (finalAttrs) version; - hash = "sha256-VjPLFk71bKbHOoB4IhkaVqmPbxDnaXjE8usZeuAzg9I="; + src = fetchFromGitHub { + owner = "googleapis"; + repo = "google-cloud-python"; + tag = "google-cloud-firestore-v${finalAttrs.version}"; + hash = "sha256-hdUT4SRPOL+ArpU4RcsNCUCV3UCW3vQgwtHuxJiyZeU="; }; + sourceRoot = "${finalAttrs.src.name}/packages/google-cloud-firestore"; + build-system = [ setuptools ]; dependencies = [ @@ -78,10 +82,17 @@ buildPythonPackage (finalAttrs: { "google.cloud.firestore_admin_v1" ]; + updateScript = nix-update-script { + extraArgs = [ + "--version-regex" + "google-cloud-firestore-v(.*)" + ]; + }; + meta = { description = "Google Cloud Firestore API client library"; - homepage = "https://github.com/googleapis/python-firestore"; - changelog = "https://github.com/googleapis/python-firestore/blob/v${finalAttrs.version}/CHANGELOG.md"; + homepage = "https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-firestore"; + changelog = "https://github.com/googleapis/google-cloud-python/tree/${finalAttrs.src.tag}/packages/google-cloud-firestore/CHANGELOG.md"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [ sarahec ]; };