tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
pipenv: remove wheel install test, enable unit tests
Theodore Ni
2 years ago
0ceee835
ce3d6fe5
+34
-13
1 changed file
expand all
collapse all
unified
split
pkgs
development
tools
pipenv
default.nix
+34
-13
pkgs/development/tools/pipenv/default.nix
···
1
1
{ lib
2
2
, stdenv
3
3
, python3
4
4
-
, fetchPypi
4
4
+
, fetchFromGitHub
5
5
, installShellFiles
6
6
}:
7
7
···
25
25
in buildPythonApplication rec {
26
26
pname = "pipenv";
27
27
version = "2023.2.4";
28
28
+
format = "pyproject";
28
29
29
29
-
src = fetchPypi {
30
30
-
inherit pname version;
31
31
-
sha256 = "sha256-GKPrpRnjbVnw1af5xCvSaFIeS5t7PRvWrc8TFWkyMnU=";
30
30
+
src = fetchFromGitHub {
31
31
+
owner = "pypa";
32
32
+
repo = "pipenv";
33
33
+
rev = "refs/tags/v${version}";
34
34
+
hash = "sha256-jZOBu4mWyu8U6CGqtYgfcCCDSa0pGqoZEFnXl5IO+JY=";
32
35
};
33
36
34
34
-
LC_ALL = "en_US.UTF-8";
37
37
+
env.LC_ALL = "en_US.UTF-8";
35
38
36
36
-
nativeBuildInputs = [ installShellFiles ];
39
39
+
nativeBuildInputs = [
40
40
+
installShellFiles
41
41
+
setuptools
42
42
+
wheel
43
43
+
];
37
44
38
45
postPatch = ''
39
46
# pipenv invokes python in a subprocess to create a virtualenv
···
46
53
47
54
propagatedBuildInputs = runtimeDeps python3.pkgs;
48
55
56
56
+
preCheck = ''
57
57
+
export HOME="$TMPDIR"
58
58
+
'';
59
59
+
60
60
+
nativeCheckInputs = [
61
61
+
mock
62
62
+
pytestCheckHook
63
63
+
pytest-xdist
64
64
+
pytz
65
65
+
requests
66
66
+
];
67
67
+
68
68
+
disabledTests = [
69
69
+
"test_convert_deps_to_pip"
70
70
+
"test_download_file"
71
71
+
];
72
72
+
73
73
+
disabledTestPaths = [
74
74
+
"tests/integration"
75
75
+
];
76
76
+
49
77
postInstall = ''
50
78
installShellCompletion --cmd pipenv \
51
79
--bash <(_PIPENV_COMPLETE=bash_source $out/bin/pipenv) \
52
80
--zsh <(_PIPENV_COMPLETE=zsh_source $out/bin/pipenv) \
53
81
--fish <(_PIPENV_COMPLETE=fish_source $out/bin/pipenv)
54
54
-
'';
55
55
-
56
56
-
doCheck = true;
57
57
-
checkPhase = ''
58
58
-
export HOME=$(mktemp -d)
59
59
-
cp -r --no-preserve=mode ${wheel.src} $HOME/wheel-src
60
60
-
$out/bin/pipenv install $HOME/wheel-src
61
82
'';
62
83
63
84
meta = with lib; {