2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
fetchpatch,
|
|
|
|
amazon-ion,
|
|
|
|
six,
|
|
|
|
pytestCheckHook,
|
|
|
|
}:
|
2022-04-03 18:54:34 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ionhash";
|
|
|
|
version = "1.2.1";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2022-04-03 18:54:34 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "amzn";
|
|
|
|
repo = "ion-hash-python";
|
|
|
|
rev = "v${version}";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-mXOLKXauWwwIA/LnF4qyZsBiF/QM+rF9MmE2ewmozYo=";
|
2022-04-03 18:54:34 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/amzn/ion-hash-python/commit/5cab56d694ecc176e394bb455c2d726ba1514ce0.patch";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-P5QByNafgxI//e3m+b0oG00+rVymCsT/J4dOZSk3354=";
|
2022-04-03 18:54:34 +00:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py --replace "'pytest-runner'," ""
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
amazon-ion
|
|
|
|
six
|
|
|
|
];
|
2022-04-03 18:54:34 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2022-04-03 18:54:34 +00:00
|
|
|
|
|
|
|
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 ];
|
2024-06-05 15:53:02 +00:00
|
|
|
broken = true; # last successful build 2023-09-28
|
2022-04-03 18:54:34 +00:00
|
|
|
};
|
|
|
|
}
|