Commit b7f314ae authored by Robert Schütz's avatar Robert Schütz
Browse files

python3Packages.ecdsa: modernize

parent da764037
Loading
Loading
Loading
Loading
+30 −11
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchPypi,
  pkgs,
  fetchFromGitHub,
  gitUpdater,
  hypothesis,
  openssl,
  pytestCheckHook,
  setuptools,
  six,
}:

buildPythonPackage rec {
  pname = "ecdsa";
  version = "0.19.1";
  format = "setuptools";
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-R4y6e2JVWGb8s7s/6YXgbey9to71VxPE5auYxX1QjmE=";
  src = fetchFromGitHub {
    owner = "tlsfuzzer";
    repo = "python-ecdsa";
    tag = "python-ecdsa-${version}";
    hash = "sha256-PjOjHQziQ9ohXH82Ocaowj/AtsXHMHDhatFPQNccyC8=";
  };

  propagatedBuildInputs = [ six ];
  # Only needed for tests
  nativeCheckInputs = [ pkgs.openssl ];
  build-system = [ setuptools ];

  meta = with lib; {
  dependencies = [ six ];

  pythonImportsCheck = [ "ecdsa" ];

  nativeCheckInputs = [
    hypothesis
    openssl # Only needed for tests
    pytestCheckHook
  ];

  passthru.updateScript = gitUpdater {
    rev-prefix = "python-ecdsa-";
  };

  meta = {
    changelog = "https://github.com/tlsfuzzer/python-ecdsa/blob/${src.tag}/NEWS";
    description = "ECDSA cryptographic signature library";
    homepage = "https://github.com/warner/python-ecdsa";
    license = licenses.mit;
    license = lib.licenses.mit;
    knownVulnerabilities = [
      # "I don't want people to use this library in production environments.
      # It's a teaching tool, it's a testing tool, it's absolutely not an