summary refs log tree commit diff
path: root/pkgs/development/python-modules/black-macchiato
diff options
context:
space:
mode:
authorJoël Perras <joel@nerderati.com>2020-09-02 17:32:07 -0400
committerJon <jonringer@users.noreply.github.com>2020-09-03 12:32:43 -0700
commit653d9258f548faa2b415ae6474b19e62c06b7502 (patch)
treed5f31a5645e445cc4981550e7b1abef763bb965f /pkgs/development/python-modules/black-macchiato
parente80744728fc93dad439c7003d1062fe2e3077fb2 (diff)
downloadnixpkgs-653d9258f548faa2b415ae6474b19e62c06b7502.tar
nixpkgs-653d9258f548faa2b415ae6474b19e62c06b7502.tar.gz
nixpkgs-653d9258f548faa2b415ae6474b19e62c06b7502.tar.bz2
nixpkgs-653d9258f548faa2b415ae6474b19e62c06b7502.tar.lz
nixpkgs-653d9258f548faa2b415ae6474b19e62c06b7502.tar.xz
nixpkgs-653d9258f548faa2b415ae6474b19e62c06b7502.tar.zst
nixpkgs-653d9258f548faa2b415ae6474b19e62c06b7502.zip
black-macchiato: init at 1.3.0
Adds the Python package `black-macchiato`, which allows the usage of
`black` for subsets of an entire file.
Diffstat (limited to 'pkgs/development/python-modules/black-macchiato')
-rw-r--r--pkgs/development/python-modules/black-macchiato/default.nix35
1 files changed, 35 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/black-macchiato/default.nix b/pkgs/development/python-modules/black-macchiato/default.nix
new file mode 100644
index 00000000000..130d07d61ff
--- /dev/null
+++ b/pkgs/development/python-modules/black-macchiato/default.nix
@@ -0,0 +1,35 @@
+{ stdenv,
+  buildPythonPackage,
+  fetchFromGitHub,
+  pythonOlder,
+  pytestCheckHook,
+  black
+}:
+
+buildPythonPackage rec {
+  pname = "black-macchiato";
+  version = "1.3.0";
+
+  disabled = pythonOlder "3.6";
+
+  src = fetchFromGitHub {
+    owner  = "wbolster";
+    repo   = pname;
+    rev    = version;
+    sha256 = "0lc9w50nlbmlzj44krk7kxcia202fhybbnwfh77xixlc7vb4rayl";
+  };
+
+  propagatedBuildInputs = [ black ];
+
+  checkInputs = [ pytestCheckHook black ];
+
+  pythonImportsCheck = [ "black" ];
+
+  meta = with stdenv.lib; {
+    description = "This is a small utility built on top of the black Python code formatter to enable formatting of partial files";
+    homepage    = "https://github.com/wbolster/black-macchiato";
+    license     = licenses.bsd3;
+    maintainers = with maintainers; [ jperras ];
+  };
+
+}