fix blackduck (#15728)

This commit is contained in:
Gary Verhaegen 2022-11-30 11:09:47 +01:00 committed by GitHub
parent 4a554ac28e
commit f3363c312e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 65 deletions

View File

@ -112,17 +112,15 @@ in rec {
chromedriver = pkgs.chromedriver; chromedriver = pkgs.chromedriver;
# Python development # Python development
pip3 = pkgs.python38Packages.pip; pip3 = pkgs.python37Packages.pip;
python = pkgs.python38Packages.python; python = pkgs.python37Packages.python;
python3 = python; python3 = python;
python37 = python;
yapf = pkgs.python38Packages.yapf; yapf = pkgs.python38Packages.yapf;
pex = pkgs.python38Packages.pex; pex = pkgs.python38Packages.pex;
pipenv = import ./tools/pipenv { pipenv = pkgs.pipenv;
lib = pkgs.lib;
python = python;
};
sphinx-build = sphinx; sphinx-build = sphinx;
sphinx-quickstart = sphinx; sphinx-quickstart = sphinx;

View File

@ -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 ];
};
}