Commit b44629b3 authored by Sarah Clark's avatar Sarah Clark
Browse files

python3Packages.google-cloud-firestore: switch to github

parent 97347cde
Loading
Loading
Loading
Loading
+18 −7
Original line number Diff line number Diff line
@@ -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 ];
  };