Files
nixpkgs/pkgs/development/python-modules/py-ecc/default.nix
Winter a19cd4ffb1 Revert "treewide: replace rev with tag"
This reverts commit 65a333600d.

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
2025-04-08 02:57:25 -04:00

59 lines
1.3 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
cached-property,
eth-typing,
eth-utils,
pytestCheckHook,
pythonAtLeast,
pythonOlder,
setuptools,
}:
buildPythonPackage rec {
pname = "py-ecc";
version = "7.0.0";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "ethereum";
repo = "py_ecc";
rev = "v${version}";
hash = "sha256-DKe+bI1GEzXg4Y4n5OA1/hWYz9L3X1AvaOFPEnCaAfs=";
};
nativeBuildInputs = [ setuptools ];
propagatedBuildInputs = [
cached-property
eth-typing
eth-utils
];
nativeCheckInputs = [ pytestCheckHook ];
disabledTests = lib.optionals (pythonAtLeast "3.12") [
# https://github.com/ethereum/py_ecc/issues/133
"test_FQ2_object"
"test_pairing_bilinearity_on_G1"
"test_pairing_bilinearity_on_G2"
"test_pairing_composit_check"
"test_pairing_is_non_degenerate"
"test_pairing_negative_G1"
"test_pairing_negative_G2"
"test_pairing_output_order"
];
pythonImportsCheck = [ "py_ecc" ];
meta = with lib; {
changelog = "https://github.com/ethereum/py_ecc/blob/${src.rev}/CHANGELOG.rst";
description = "ECC pairing and bn_128 and bls12_381 curve operations";
homepage = "https://github.com/ethereum/py_ecc";
license = licenses.mit;
maintainers = [ ];
};
}