pipenv: remove wheel install test, enable unit tests

+34 -13
+34 -13
pkgs/development/tools/pipenv/default.nix
··· 1 1 { lib 2 2 , stdenv 3 3 , python3 4 - , fetchPypi 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 + format = "pyproject"; 28 29 29 - src = fetchPypi { 30 - inherit pname version; 31 - sha256 = "sha256-GKPrpRnjbVnw1af5xCvSaFIeS5t7PRvWrc8TFWkyMnU="; 30 + src = fetchFromGitHub { 31 + owner = "pypa"; 32 + repo = "pipenv"; 33 + rev = "refs/tags/v${version}"; 34 + hash = "sha256-jZOBu4mWyu8U6CGqtYgfcCCDSa0pGqoZEFnXl5IO+JY="; 32 35 }; 33 36 34 - LC_ALL = "en_US.UTF-8"; 37 + env.LC_ALL = "en_US.UTF-8"; 35 38 36 - nativeBuildInputs = [ installShellFiles ]; 39 + nativeBuildInputs = [ 40 + installShellFiles 41 + setuptools 42 + wheel 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 + 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 + 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 - ''; 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 82 ''; 62 83 63 84 meta = with lib; {