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

Merge pull request #281457 from dotlambda/ioccheck-fix

ioccheck: fix build
parents a9fbf331 ec6f854b
Loading
Loading
Loading
Loading
+15 −13
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ let
          owner = "carpedm20";
          repo = "emoji";
          rev = "v${version}";
          sha256 = "sha256-vKQ51RP7uy57vP3dOnHZRSp/Wz+YDzeLUR8JnIELE/I=";
          hash = "sha256-vKQ51RP7uy57vP3dOnHZRSp/Wz+YDzeLUR8JnIELE/I=";
        };
      };

@@ -26,29 +26,35 @@ let
          owner = "tweepy";
          repo = "tweepy";
          rev = "v${version}";
          sha256 = "0k4bdlwjna6f1k19jki4xqgckrinkkw8b9wihzymr1l04rwd05nw";
          hash = "sha256-3BbQeCaAhlz9h5GnhficNubJHu4kTpnCDM4oKzlti0w=";
        };
        doCheck = false;
      };
    };
  };
in
with py.pkgs;

buildPythonApplication rec {
in py.pkgs.buildPythonApplication rec {
  pname = "ioccheck";
  version = "unstable-2021-09-29";
  format = "pyproject";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "ranguli";
    repo = pname;
    repo = "ioccheck";
    rev = "db02d921e2519b77523a200ca2d78417802463db";
    hash = "sha256-qf5tHIpbj/BfrzUST+EzohKh1hUg09KwF+vT0tj1+FE=";
  };

  nativeBuildInputs = with py.pkgs; [
    poetry-core
    pythonRelaxDepsHook
  ];

  pythonRelaxDeps = [
    "backoff"
    "pyfiglet"
    "tabulate"
    "termcolor"
    "vt-py"
  ];

  propagatedBuildInputs = with py.pkgs; [
@@ -73,11 +79,7 @@ buildPythonApplication rec {
  postPatch = ''
    # Can be removed with the next release
    substituteInPlace pyproject.toml \
      --replace '"hurry.filesize" = "^0.9"' "" \
      --replace 'vt-py = ">=0.6.1,<0.8.0"' 'vt-py = ">=0.6.1"' \
      --replace 'backoff = "^1.10.0"' 'backoff = ">=1.10.0"' \
      --replace 'termcolor = "^1.1.0"' 'termcolor = "*"' \
      --replace 'tabulate = "^0.8.9"' 'tabulate = "*"'
      --replace '"hurry.filesize" = "^0.9"' ""
  '';

  pythonImportsCheck = [