My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nomicon/pkgs/development/python-modules/oscrypto/default.nix

44 lines
870 B

{ lib
, buildPythonPackage
, asn1crypto
, fetchPypi
, openssl
}:
buildPythonPackage rec {
pname = "oscrypto";
version = "1.2.1";
src = fetchPypi {
inherit pname version;
sha256 = "1546si2bdgkqnbvv4mw1hr4mhh6bq39d9z4wxgv1m7fq6miclb3x";
};
testSources = fetchPypi {
inherit version;
pname = "oscrypto_tests";
sha256 = "1ha68dsrbx6mlra44x0n81vscn17pajbl4yg7cqkk7mq1zfmjwks";
};
propagatedBuildInputs = [
asn1crypto
openssl
];
preCheck = ''
tar -xf ${testSources}
mv oscrypto_tests-${version} tests
# remove tests that require network
sed -e '/TLSTests/d' -e '/TrustListTests/d' -i tests/__init__.py
'';
pythonImportsCheck = [ "oscrypto" ];
meta = with lib; {
description = "Encryption library for Python";
homepage = "https://github.com/wbond/oscrypto";
license = licenses.mit;
};
}