1{ stdenv
2, buildPythonPackage
3, fetchPypi
4, pyasn1
5, pytest
6}:
7
8buildPythonPackage rec {
9 pname = "pyasn1-modules";
10 version = "0.2.7";
11
12 src = fetchPypi {
13 inherit pname version;
14 sha256 = "0c35a52e00b672f832e5846826f1fb7507907f7d52fba6faa9e3c4cbe874fe4b";
15 };
16
17 propagatedBuildInputs = [ pyasn1 ];
18
19 checkInputs = [
20 pytest
21 ];
22
23 # running tests through setup.py fails only for python2 for some reason:
24 # AttributeError: 'module' object has no attribute 'suitetests'
25 checkPhase = ''
26 py.test
27 '';
28
29 meta = with stdenv.lib; {
30 description = "A collection of ASN.1-based protocols modules";
31 homepage = https://pypi.python.org/pypi/pyasn1-modules;
32 license = licenses.bsd3;
33 platforms = platforms.unix; # same as pyasn1
34 };
35}