Unverified Commit dbb781fd authored by natsukium's avatar natsukium
Browse files

python3Packages.dazl: refactor

parent 9409fe08
Loading
Loading
Loading
Loading
+28 −31
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchPypi,

  fetchFromGitHub,
  poetry-core,

  aiohttp,
  googleapis-common-protos,
  grpcio,
  protobuf,
  requests,
  semver,
  toposort,

  #, async_exit_stack
  #, dataclasses
  google-auth,
  oauthlib,
  prometheus-client,
  pygments,
  pyopenssl,
  typing-extensions,
  pytestCheckHook,
  pyyaml,
}:

buildPythonPackage rec {
@@ -28,40 +19,46 @@ buildPythonPackage rec {
  version = "8.2.1";
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-RwLjvVRAb7B1y0Hqd0lwYiqS8qrL8MhoH92RIMPWLqQ=";
  src = fetchFromGitHub {
    owner = "digital-asset";
    repo = "dazl-client";
    tag = "v${version}";
    hash = "sha256-JeAdg+OW3Zd275zIYDmfBaF7RWEb+sLQ7xFIl67L2R8=";
  };

  pythonRelaxDeps = [
    "grpcio"
  ];

  nativeBuildInputs = [ poetry-core ];
  build-system = [ poetry-core ];

  propagatedBuildInputs = [
    aiohttp
  dependencies = [
    googleapis-common-protos
    grpcio
    protobuf
    requests
    semver
    toposort
    typing-extensions
  ];

    # optional
  optional-dependencies = {
    pygments = [ pygments ];
    tls-testing = [ pyopenssl ];
  };

    #async-exit-stack
    #dataclasses
    google-auth
    oauthlib
    prometheus-client
    pygments
    pyopenssl
    typing-extensions
  pythonImportsCheck = [ "dazl" ];

  # daml: command not found
  doCheck = false;

  nativeCheckInputs = [
    pytestCheckHook
    pyyaml
  ];

  meta = with lib; {
  meta = {
    description = "High-level Ledger API client for Daml ledgers";
    license = licenses.asl20;
    license = lib.licenses.asl20;
    homepage = "https://github.com/digital-asset/dazl-client";
    changelog = "https://github.com/digital-asset/dazl-client/releases/tag/v${version}";
  };
}