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