Unverified Commit 76612b17 authored by Theodore Ni's avatar Theodore Ni Committed by GitHub
Browse files

python311Packages.whispers: add missing deps, unbreak (#354501)

parents b756d6e4 acb3dd99
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
{ 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;
  };
+19 −0
Original line number Diff line number Diff line
@@ -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
  '';
Loading