This reverts commit65a333600d. This wasn't tested for correctness with something like fodwatch [0], and should not have been (self-)merged so quickly, especially without further review. It also resulted in the breakage of at least one package [1] (and that's the one we know of and was caught). A few packages that were updated in between this commit and this revert were not reverted back to using `rev`, but other than that, this is a 1:1 revert. [0]: https://codeberg.org/raphaelr/fodwatch [1]: https://github.com/NixOS/nixpkgs/pull/396904 /758551e458
52 lines
1.1 KiB
Nix
52 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
fetchpatch,
|
|
amazon-ion,
|
|
six,
|
|
pytestCheckHook,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "ionhash";
|
|
version = "1.2.1";
|
|
format = "setuptools";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "amzn";
|
|
repo = "ion-hash-python";
|
|
rev = "v${version}";
|
|
hash = "sha256-mXOLKXauWwwIA/LnF4qyZsBiF/QM+rF9MmE2ewmozYo=";
|
|
fetchSubmodules = true;
|
|
};
|
|
|
|
patches = [
|
|
(fetchpatch {
|
|
url = "https://github.com/amzn/ion-hash-python/commit/5cab56d694ecc176e394bb455c2d726ba1514ce0.patch";
|
|
hash = "sha256-P5QByNafgxI//e3m+b0oG00+rVymCsT/J4dOZSk3354=";
|
|
})
|
|
];
|
|
|
|
postPatch = ''
|
|
substituteInPlace setup.py --replace "'pytest-runner'," ""
|
|
'';
|
|
|
|
propagatedBuildInputs = [
|
|
amazon-ion
|
|
six
|
|
];
|
|
|
|
nativeCheckInputs = [ 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 ];
|
|
broken = true; # last successful build 2023-09-28
|
|
};
|
|
}
|