Merge pull request #165871 from terlar/add-pyqldb

This commit is contained in:
Sandro 2022-03-31 14:29:18 +02:00 committed by GitHub
commit 73957ce6aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 133 additions and 0 deletions

View File

@ -0,0 +1,29 @@
{ lib, buildPythonPackage, fetchPypi, jsonconversion, six, pytestCheckHook }:
buildPythonPackage rec {
pname = "amazon-ion";
version = "0.8.0";
src = fetchPypi {
pname = "amazon.ion";
inherit version;
sha256 = "sha256-vtztUHSnGoPYozhwvigxEdieVtbKNfV4B5yZ4MHaWGw=";
};
postPatch = ''
substituteInPlace setup.py --replace "'pytest-runner'," ""
'';
propagatedBuildInputs = [ jsonconversion six ];
checkInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "amazon.ion" ];
meta = with lib; {
description = "A Python implementation of Amazon Ion";
homepage = "https://github.com/amzn/ion-python";
license = licenses.asl20;
maintainers = [ maintainers.terlar ];
};
}

View File

@ -0,0 +1,38 @@
{ lib, buildPythonPackage, fetchFromGitHub, fetchpatch, amazon-ion, six, pytestCheckHook }:
buildPythonPackage rec {
pname = "ionhash";
version = "1.2.1";
src = fetchFromGitHub {
owner = "amzn";
repo = "ion-hash-python";
rev = "v${version}";
sha256 = "sha256-mXOLKXauWwwIA/LnF4qyZsBiF/QM+rF9MmE2ewmozYo=";
fetchSubmodules = true;
};
patches = [
(fetchpatch {
url = "https://github.com/amzn/ion-hash-python/commit/5cab56d694ecc176e394bb455c2d726ba1514ce0.patch";
sha256 = "sha256-P5QByNafgxI//e3m+b0oG00+rVymCsT/J4dOZSk3354=";
})
];
postPatch = ''
substituteInPlace setup.py --replace "'pytest-runner'," ""
'';
propagatedBuildInputs = [ amazon-ion six ];
checkInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "ionhash" ];
meta = with lib; {
description = "Python implementation of Amazon Ion Hash";
homepage = "https://github.com/amzn/ion-hash-python";
license = licenses.asl20;
maintainers = [ maintainers.terlar ];
};
}

View File

@ -0,0 +1,26 @@
{ lib, buildPythonPackage, fetchPypi, pytestCheckHook, numpy }:
buildPythonPackage rec {
pname = "jsonconversion";
version = "0.2.13";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-4hMY0N/Px+g5zn3YzNfDWPyi8Pglvd/c2N9SeC4JoZ0=";
};
postPatch = ''
substituteInPlace setup.py --replace "'pytest-runner'" ""
'';
checkInputs = [ pytestCheckHook numpy ];
pythonImportsCheck = [ "jsonconversion" ];
meta = with lib; {
description = "This python module helps converting arbitrary Python objects into JSON strings and back";
homepage = "https://pypi.org/project/jsonconversion/";
license = licenses.bsd2;
maintainers = [ maintainers.terlar ];
};
}

View File

@ -0,0 +1,32 @@
{ lib, buildPythonPackage, fetchFromGitHub, boto3, amazon-ion, ionhash, pytestCheckHook }:
buildPythonPackage rec {
pname = "pyqldb";
version = "3.2.2";
src = fetchFromGitHub {
owner = "awslabs";
repo = "amazon-qldb-driver-python";
rev = "v${version}";
sha256 = "sha256-TKf43+k428h8T6ye6mJrnK9D4J1xpIu0QacM7lWJF7w=";
};
propagatedBuildInputs = [ boto3 amazon-ion ionhash ];
checkInputs = [ pytestCheckHook ];
preCheck = ''
export AWS_DEFAULT_REGION=us-east-1
'';
pytestFlagsArray = [ "tests/unit" ];
pythonImportsCheck = [ "pyqldb" ];
meta = with lib; {
description = "Python driver for Amazon QLDB";
homepage = "https://github.com/awslabs/amazon-qldb-driver-python";
license = licenses.asl20;
maintainers = [ maintainers.terlar ];
};
}

View File

@ -472,6 +472,8 @@ in {
altair = callPackage ../development/python-modules/altair { };
amazon-ion = callPackage ../development/python-modules/amazon-ion { };
amazon_kclpy = callPackage ../development/python-modules/amazon_kclpy { };
ambee = callPackage ../development/python-modules/ambee { };
@ -4102,6 +4104,8 @@ in {
iocapture = callPackage ../development/python-modules/iocapture { };
ionhash = callPackage ../development/python-modules/ionhash { };
iotawattpy = callPackage ../development/python-modules/iotawattpy { };
iowait = callPackage ../development/python-modules/iowait { };
@ -4310,6 +4314,8 @@ in {
json5 = callPackage ../development/python-modules/json5 { };
jsonconversion = callPackage ../development/python-modules/jsonconversion { };
jsondate = callPackage ../development/python-modules/jsondate { };
jsondiff = callPackage ../development/python-modules/jsondiff { };
@ -7494,6 +7500,8 @@ in {
pypytools = callPackage ../development/python-modules/pypytools { };
pyqldb = callPackage ../development/python-modules/pyqldb { };
pyqrcode = callPackage ../development/python-modules/pyqrcode { };
pyqt-builder = callPackage ../development/python-modules/pyqt-builder { };