python311Packages.whispers: add missing deps, unbreak (#354501)
This commit is contained in:
commit
76612b17c0
@ -1,7 +1,8 @@
|
||||
{ lib
|
||||
, callPackage
|
||||
, fetchFromGitHub
|
||||
, semgrep-core
|
||||
, buildPythonApplication
|
||||
, buildPythonPackage
|
||||
, pythonPackages
|
||||
|
||||
, pytestCheckHook
|
||||
@ -15,7 +16,7 @@ let
|
||||
common = import ./common.nix { inherit lib; };
|
||||
semgrepBinPath = lib.makeBinPath [ semgrep-core ];
|
||||
in
|
||||
buildPythonApplication rec {
|
||||
buildPythonPackage rec {
|
||||
pname = "semgrep";
|
||||
inherit (common) version;
|
||||
src = fetchFromGitHub {
|
||||
@ -130,7 +131,7 @@ buildPythonApplication rec {
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
inherit common;
|
||||
inherit common semgrep-core;
|
||||
submodulesSubset = lib.mapAttrs (k: args: fetchFromGitHub args) common.submodules;
|
||||
updateScript = ./update.sh;
|
||||
};
|
@ -13,6 +13,8 @@
|
||||
pytestCheckHook,
|
||||
pythonOlder,
|
||||
pyyaml,
|
||||
wrapt,
|
||||
semgrep,
|
||||
setuptools,
|
||||
}:
|
||||
|
||||
@ -35,6 +37,12 @@ buildPythonPackage rec {
|
||||
--replace-fail '"pytest-runner"' ""
|
||||
'';
|
||||
|
||||
pythonRelaxDeps = [
|
||||
"lxml"
|
||||
"pyyaml"
|
||||
"semgrep"
|
||||
];
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
dependencies = [
|
||||
@ -46,6 +54,8 @@ buildPythonPackage rec {
|
||||
luhn
|
||||
lxml
|
||||
pyyaml
|
||||
wrapt
|
||||
semgrep
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
@ -53,7 +63,16 @@ buildPythonPackage rec {
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
disabledTestPaths = [
|
||||
# pinning tests highly sensitive to semgrep version
|
||||
"tests/unit/plugins/test_semgrep.py"
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
# pinning test highly sensitive to semgrep version
|
||||
substituteInPlace tests/unit/test_main.py \
|
||||
--replace-fail '("--ast", 421),' ""
|
||||
|
||||
# Some tests need the binary available in PATH
|
||||
export PATH=$out/bin:$PATH
|
||||
'';
|
||||
|
@ -11949,8 +11949,8 @@ with pkgs;
|
||||
|
||||
semantic-release = callPackage ../development/tools/semantic-release { };
|
||||
|
||||
semgrep = python3.pkgs.callPackage ../tools/security/semgrep { };
|
||||
semgrep-core = callPackage ../tools/security/semgrep/semgrep-core.nix { };
|
||||
semgrep = python3.pkgs.toPythonApplication python3.pkgs.semgrep;
|
||||
inherit (semgrep.passthru) semgrep-core;
|
||||
|
||||
setroot = callPackage ../tools/X11/setroot { };
|
||||
|
||||
|
@ -14301,6 +14301,10 @@ self: super: with self; {
|
||||
|
||||
semantic-version = callPackage ../development/python-modules/semantic-version { };
|
||||
|
||||
semgrep = callPackage ../development/python-modules/semgrep {
|
||||
semgrep-core = callPackage ../development/python-modules/semgrep/semgrep-core.nix { };
|
||||
};
|
||||
|
||||
semaphore-bot = callPackage ../development/python-modules/semaphore-bot { };
|
||||
|
||||
semver = callPackage ../development/python-modules/semver { };
|
||||
|
Loading…
Reference in New Issue
Block a user