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