evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / paranoid-crypto / default.nix
blob206fd2acf1c3495622700c8f7223a62128c0b155
2   lib,
3   absl-py,
4   buildPythonPackage,
5   cryptography,
6   fetchFromGitHub,
7   fpylll,
8   gmpy,
9   protobuf,
10   pybind11,
11   pytestCheckHook,
12   pythonOlder,
13   scipy,
14   sympy,
17 buildPythonPackage rec {
18   pname = "paranoid-crypto";
19   version = "unstable-20220819";
20   format = "setuptools";
22   disabled = pythonOlder "3.9";
24   src = fetchFromGitHub {
25     owner = "google";
26     repo = "paranoid_crypto";
27     # https://github.com/google/paranoid_crypto/issues/11
28     rev = "8abccc1619748b93979d1c26234b90d26e88a12e";
29     hash = "sha256-4yF7WAFAGGhvWTV/y5dGVA/+9r1dqrXU/0/6Edgw3ow=";
30   };
32   nativeBuildInputs = [
33     protobuf
34     pybind11
35   ];
37   propagatedBuildInputs = [
38     absl-py
39     cryptography
40     gmpy
41     scipy
42     sympy
43     protobuf
44   ];
46   nativeCheckInputs = [
47     fpylll
48     pytestCheckHook
49   ];
51   postPatch = ''
52     substituteInPlace requirements.txt \
53       --replace "protobuf==3.20.*" "protobuf"
54   '';
56   disabledTestPaths = [
57     # Import issue
58     "paranoid_crypto/lib/randomness_tests/"
59   ];
61   pythonImportsCheck = [ "paranoid_crypto" ];
63   meta = with lib; {
64     description = "Library contains checks for well known weaknesses on cryptographic artifacts";
65     homepage = "https://github.com/google/paranoid_crypto";
66     license = with licenses; [ asl20 ];
67     maintainers = with maintainers; [ fab ];
68   };