Unverified Commit 8ef07bd0 authored by Fabian Affolter's avatar Fabian Affolter Committed by GitHub
Browse files

Merge pull request #283914 from NickCao/yara-python

python311Packages.yara-python: 4.3.1 -> 4.4.0
parents 6228c130 ddb85af9
Loading
Loading
Loading
Loading
+15 −3
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, fetchFromGitHub
, setuptools
, pytestCheckHook
, pythonOlder
, yara
@@ -8,8 +9,8 @@

buildPythonPackage rec {
  pname = "yara-python";
  version = "4.3.1";
  format = "setuptools";
  version = "4.4.0";
  pyproject = true;

  disabled = pythonOlder "3.7";

@@ -17,9 +18,20 @@ buildPythonPackage rec {
    owner = "VirusTotal";
    repo = "yara-python";
    rev = "v${version}";
    hash = "sha256-WjH27pOOBXmbj8ghr42TLTp8eAKiTq4eRTYnim56J/8=";
    hash = "sha256-Fl/0ordXDKC1CBBmPx0fEwZZjqSiMxnwNvQqD98MjRo=";
  };

  # undefined symbol: yr_finalize
  # https://github.com/VirusTotal/yara-python/issues/7
  postPatch = ''
    substituteInPlace setup.py \
      --replace "include_dirs=['yara/libyara/include', 'yara/libyara/', '.']" "libraries = ['yara']"
  '';

  nativeBuildInputs = [
    setuptools
  ];

  buildInputs = [
    yara
  ];