tangled
alpha
login
or
join now
tjh.dev
/
nixpkgs
0
fork
atom
nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
0
fork
atom
overview
issues
pulls
pipelines
python310Packages.rsa: update and fix tests
Theodore Ni
3 years ago
867c3f3c
feb86eb7
+29
-14
1 changed file
expand all
collapse all
unified
split
pkgs
development
python-modules
rsa
default.nix
+29
-14
pkgs/development/python-modules/rsa/default.nix
reviewed
···
1
1
{ lib
2
2
, buildPythonPackage
3
3
-
, fetchPypi
4
4
-
, unittest2
3
3
+
, fetchFromGitHub
4
4
+
, poetry-core
5
5
, pyasn1
6
6
-
, mock
7
7
-
, isPy3k
6
6
+
, pytestCheckHook
8
7
, pythonOlder
9
8
}:
10
9
11
10
buildPythonPackage rec {
12
11
pname = "rsa";
13
12
version = "4.9";
13
13
+
format = "pyproject";
14
14
15
15
-
src = fetchPypi {
16
16
-
inherit pname version;
17
17
-
sha256 = "sha256-44RkpJxshdfxNRsBJmYUh6fgoUpQ8WdexQ6zTU8g7yE=";
15
15
+
disabled = pythonOlder "3.6";
16
16
+
17
17
+
src = fetchFromGitHub {
18
18
+
owner = "sybrenstuvel";
19
19
+
repo = "python-rsa";
20
20
+
rev = "version-${version}";
21
21
+
hash = "sha256-PwaRe+ICy0UoguXSMSh3PFl5R+YAhJwNdNN9isadlJY=";
18
22
};
19
23
20
20
-
checkInputs = [ unittest2 mock ];
21
21
-
propagatedBuildInputs = [ pyasn1 ];
22
22
-
23
23
-
preConfigure = lib.optionalString (isPy3k && pythonOlder "3.7") ''
24
24
+
preConfigure = lib.optionalString (pythonOlder "3.7") ''
24
25
substituteInPlace setup.py --replace "open('README.md')" "open('README.md',encoding='utf-8')"
25
26
'';
26
27
27
27
-
# No tests in archive
28
28
-
doCheck = false;
28
28
+
nativeBuildInputs = [
29
29
+
poetry-core
30
30
+
];
31
31
+
32
32
+
propagatedBuildInputs = [ pyasn1 ];
33
33
+
34
34
+
preCheck = ''
35
35
+
sed -i '/addopts/d' tox.ini
36
36
+
'';
37
37
+
38
38
+
checkInputs = [
39
39
+
pytestCheckHook
40
40
+
];
41
41
+
42
42
+
disabledTestPaths = [
43
43
+
"tests/test_mypy.py"
44
44
+
];
29
45
30
46
meta = with lib; {
31
47
homepage = "https://stuvel.eu/rsa";
32
48
license = licenses.asl20;
33
49
description = "A pure-Python RSA implementation";
34
50
};
35
35
-
36
51
}