From 19423fca6e4e6e14b59f223e54c4052bda962e70 Mon Sep 17 00:00:00 2001 From: Bernardo Meurer Date: Thu, 4 Mar 2021 17:23:13 -0800 Subject: [PATCH] pyupgrade: init at 2.10.0 --- .../python-modules/pyupgrade/default.nix | 31 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ pkgs/top-level/python-packages.nix | 2 ++ 3 files changed, 35 insertions(+) create mode 100644 pkgs/development/python-modules/pyupgrade/default.nix diff --git a/pkgs/development/python-modules/pyupgrade/default.nix b/pkgs/development/python-modules/pyupgrade/default.nix new file mode 100644 index 000000000000..95aa57491ca8 --- /dev/null +++ b/pkgs/development/python-modules/pyupgrade/default.nix @@ -0,0 +1,31 @@ +{ buildPythonPackage +, fetchFromGitHub +, isPy27 +, lib +, pytestCheckHook +, tokenize-rt +}: + +buildPythonPackage rec { + pname = "pyupgrade"; + version = "2.10.0"; + disabled = isPy27; + + src = fetchFromGitHub { + owner = "asottile"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-XYeqyyfwtS7dHLxeVvmcifW6UCOlnSMxqF1vxezBjT8="; + }; + + checkInputs = [ pytestCheckHook ]; + + propagatedBuildInputs = [ tokenize-rt ]; + + meta = with lib; { + description = "A tool to automatically upgrade syntax for newer versions of the language"; + homepage = "https://github.com/asottile/pyupgrade"; + license = licenses.mit; + maintainers = with maintainers; [ lovesegfault ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f9e9f1faa663..12587815ee67 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -29430,6 +29430,8 @@ in pyload = callPackage ../applications/networking/pyload {}; + pyupgrade = with python3Packages; toPythonApplication pyupgrade; + pwntools = with python3Packages; toPythonApplication pwntools; uae = callPackage ../misc/emulators/uae { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 867169c38644..8bf948210daf 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6638,6 +6638,8 @@ in { pyupdate = callPackage ../development/python-modules/pyupdate { }; + pyupgrade = callPackage ../development/python-modules/pyupgrade { }; + pyusb = callPackage ../development/python-modules/pyusb { libusb1 = pkgs.libusb1; }; pyutil = callPackage ../development/python-modules/pyutil { };