biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / pycryptodome / default.nix
blobe9d1254ede328f98426c8b020829d93512ef4743
2   lib,
3   buildPythonPackage,
4   callPackage,
5   fetchFromGitHub,
6   gmp,
7 }:
9 let
10   test-vectors = callPackage ./vectors.nix { };
12 buildPythonPackage rec {
13   pname = "pycryptodome";
14   version = "3.20.0";
15   format = "setuptools";
17   src = fetchFromGitHub {
18     owner = "Legrandin";
19     repo = "pycryptodome";
20     rev = "refs/tags/v${version}";
21     hash = "sha256-RPaBUj/BJCO+10maGDmugeEXxaIrlk2UHIvkbrQVM8c=";
22   };
24   postPatch = ''
25     substituteInPlace lib/Crypto/Math/_IntegerGMP.py \
26       --replace 'load_lib("gmp"' 'load_lib("${gmp}/lib/libgmp.so.10"'
27   '';
29   nativeCheckInputs = [ test-vectors ];
31   pythonImportsCheck = [ "Crypto" ];
33   meta = with lib; {
34     description = "Self-contained cryptographic library";
35     homepage = "https://github.com/Legrandin/pycryptodome";
36     changelog = "https://github.com/Legrandin/pycryptodome/blob/v${version}/Changelog.rst";
37     license = with licenses; [
38       bsd2 # and
39       asl20
40     ];
41     maintainers = with maintainers; [ fab ];
42   };