From f3363c312e5390a906e904ca836c70a31f128675 Mon Sep 17 00:00:00 2001 From: Gary Verhaegen Date: Wed, 30 Nov 2022 11:09:47 +0100 Subject: [PATCH] fix blackduck (#15728) --- nix/default.nix | 10 +++--- nix/tools/pipenv/default.nix | 59 ------------------------------------ 2 files changed, 4 insertions(+), 65 deletions(-) delete mode 100644 nix/tools/pipenv/default.nix diff --git a/nix/default.nix b/nix/default.nix index ccb16eecac..8dcc0559e8 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -112,17 +112,15 @@ in rec { chromedriver = pkgs.chromedriver; # Python development - pip3 = pkgs.python38Packages.pip; - python = pkgs.python38Packages.python; + pip3 = pkgs.python37Packages.pip; + python = pkgs.python37Packages.python; python3 = python; + python37 = python; yapf = pkgs.python38Packages.yapf; pex = pkgs.python38Packages.pex; - pipenv = import ./tools/pipenv { - lib = pkgs.lib; - python = python; - }; + pipenv = pkgs.pipenv; sphinx-build = sphinx; sphinx-quickstart = sphinx; diff --git a/nix/tools/pipenv/default.nix b/nix/tools/pipenv/default.nix deleted file mode 100644 index 0a51f32631..0000000000 --- a/nix/tools/pipenv/default.nix +++ /dev/null @@ -1,59 +0,0 @@ -# copied from -# https://raw.githubusercontent.com/NixOS/nixpkgs/1c406512eb6331ca4d75e0d63298c5e0e7009fdd/pkgs/development/tools/pipenv/default.nix -# then modified to disable check phase (line 46) - -{ lib -, python -}: - -with python.pkgs; - -let - - runtimeDeps = [ - certifi - setuptools - pip - virtualenv - virtualenv-clone - ]; - - pythonEnv = python.withPackages(ps: with ps; [ virtualenv ]); - -in buildPythonApplication rec { - pname = "pipenv"; - version = "2018.11.26"; - - src = fetchPypi { - inherit pname version; - sha256 = "0ip8zsrwmhrankrix0shig9g8q2knmr7b63sh7lqa8a5x03fcwx6"; - }; - - LC_ALL = "en_US.UTF-8"; - - postPatch = '' - # pipenv invokes python in a subprocess to create a virtualenv - # it uses sys.executable which will point in our case to a python that - # does not have virtualenv. - substituteInPlace pipenv/core.py \ - --replace "vistir.compat.Path(sys.executable).absolute().as_posix()" "vistir.compat.Path('${pythonEnv.interpreter}').absolute().as_posix()" - ''; - - nativeBuildInputs = [ invoke parver ]; - - propagatedBuildInputs = runtimeDeps; - - doCheck = false; - checkPhase = '' - export HOME=$(mktemp -d) - cp -r --no-preserve=mode ${wheel.src} $HOME/wheel-src - $out/bin/pipenv install $HOME/wheel-src - ''; - - meta = with lib; { - description = "Python Development Workflow for Humans"; - license = licenses.mit; - platforms = platforms.all; - maintainers = with maintainers; [ berdario ]; - }; -}