nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, stdenv
3, asn1crypto
4, buildPythonPackage
5, fetchFromGitHub
6, openssl
7, pytestCheckHook
8, pythonOlder
9}:
10
11buildPythonPackage rec {
12 pname = "oscrypto";
13 version = "1.3.0";
14 format = "setuptools";
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchFromGitHub {
19 owner = "wbond";
20 repo = pname;
21 rev = version;
22 hash = "sha256-CmDypmlc/kb6ONCUggjT1Iqd29xNSLRaGh5Hz36dvOw=";
23 };
24
25 propagatedBuildInputs = [
26 asn1crypto
27 openssl
28 ];
29
30 checkInputs = [
31 pytestCheckHook
32 ];
33
34 pythonImportsCheck = [
35 "oscrypto"
36 ];
37
38 doCheck = !stdenv.isDarwin;
39
40 disabledTests = [
41 # Tests require network access
42 "TLSTests"
43 "TrustListTests"
44 ];
45
46 meta = with lib; {
47 description = "Encryption library for Python";
48 homepage = "https://github.com/wbond/oscrypto";
49 license = licenses.mit;
50 maintainers = with maintainers; [ ];
51 };
52}