summary refs log tree commit diff
path: root/pkgs/development/python-modules/pyupgrade/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/pyupgrade/default.nix')
-rw-r--r--pkgs/development/python-modules/pyupgrade/default.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/pyupgrade/default.nix b/pkgs/development/python-modules/pyupgrade/default.nix
new file mode 100644
index 00000000000..95aa57491ca
--- /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 ];
+  };
+}