Merge pull request #175002 from SuperSandro2000/pycryptodome
This commit is contained in:
commit
525ba38f95
@ -1,28 +1,43 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, pycryptodome-test-vectors
|
||||
, callPackage
|
||||
, fetchFromGitHub
|
||||
, cffi
|
||||
, gmp
|
||||
}:
|
||||
|
||||
let
|
||||
test-vectors = callPackage ./vectors.nix { };
|
||||
in
|
||||
buildPythonPackage rec {
|
||||
pname = "pycryptodome";
|
||||
version = "3.14.1";
|
||||
format = "setuptools";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-4E5Ap/jBZpGVU2o3l53YfaLDLb3HPW/jXwB3sMF8gDs=";
|
||||
src = fetchFromGitHub {
|
||||
owner = "Legrandin";
|
||||
repo = "pycryptodome";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-0GjpKNyALe2Q1R3dEjeAEn6E8hxYDic/vbN1YkVaUfs=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace lib/Crypto/Math/_IntegerGMP.py \
|
||||
--replace 'load_lib("gmp"' 'load_lib("${gmp}/lib/libgmp.so.10"'
|
||||
'';
|
||||
|
||||
checkInputs = [
|
||||
test-vectors
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"Crypto"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python Cryptography Toolkit";
|
||||
homepage = "https://www.pycryptodome.org/";
|
||||
description = "Self-contained cryptographic library";
|
||||
homepage = "https://github.com/Legrandin/pycryptodome";
|
||||
license = with licenses; [ bsd2 /* and */ asl20 ];
|
||||
maintainers = with maintainers; [ fab ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
@ -1,27 +1,13 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, pycryptodome-test-vectors
|
||||
}:
|
||||
{ pycryptodome }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
(pycryptodome.overrideAttrs (oldAttrs: rec {
|
||||
pname = "pycryptodomex";
|
||||
version = "3.14.1";
|
||||
format = "setuptools";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-LOdu0Agf1qyMdO3HW50U7KIGQXOveYQ8JPpiVzJjwfI=";
|
||||
};
|
||||
postPatch = ''
|
||||
touch .separate_namespace
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [
|
||||
"Cryptodome"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A self-contained cryptographic library for Python";
|
||||
homepage = "https://www.pycryptodome.org";
|
||||
license = with licenses; [ bsd2 /* and */ asl20 ];
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
}
|
||||
}))
|
||||
|
@ -108,6 +108,7 @@ mapAliases ({
|
||||
pur = throw "pur has been renamed to pkgs.pur"; # added 2021-11-08
|
||||
pyGtkGlade = throw "Glade support for pygtk has been removed"; # added 2022-01-15
|
||||
pycallgraph = throw "pycallgraph has been removed, it was using setuptools 2to3 translation feature, which has been removed in setuptools 58"; # added 2022-01-18
|
||||
pycryptodome-test-vectors = throw "pycryptodome-test-vectors has been removed because it is an internal package to pycryptodome"; # added 2022-05-28
|
||||
pylibgen = throw "pylibgen is unmaintained upstreamed, and removed from nixpkgs"; # added 2020-06-20
|
||||
pymssql = throw "pymssql has been abandoned upstream."; # added 2020-05-04
|
||||
pyreadability = readability-lxml; # added 2022-05-24
|
||||
|
@ -7109,8 +7109,6 @@ in {
|
||||
|
||||
pycryptodome = callPackage ../development/python-modules/pycryptodome { };
|
||||
|
||||
pycryptodome-test-vectors = callPackage ../development/python-modules/pycryptodome-test-vectors { };
|
||||
|
||||
pycryptodomex = callPackage ../development/python-modules/pycryptodomex { };
|
||||
|
||||
pyct = callPackage ../development/python-modules/pyct { };
|
||||
|
Loading…
Reference in New Issue
Block a user