From 7910f748bfba559dc1e85ede7a907d00eb5cd67c Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Tue, 27 Aug 2024 17:29:53 +0200 Subject: [PATCH 1/3] nbqa: 1.8.7 -> 1.9.0 Diff: https://github.com/nbQA-dev/nbQA/compare/refs/tags/1.8.7...1.9.0 Changelog: https://nbqa.readthedocs.io/en/latest/history.html --- pkgs/tools/misc/nbqa/default.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/nbqa/default.nix b/pkgs/tools/misc/nbqa/default.nix index 91a501e80319b..0165a21841964 100644 --- a/pkgs/tools/misc/nbqa/default.nix +++ b/pkgs/tools/misc/nbqa/default.nix @@ -4,17 +4,19 @@ , lib , python3 , ruff +, testers +, nbqa }: python3.pkgs.buildPythonApplication rec { pname = "nbqa"; - version = "1.8.7"; + version = "1.9.0"; pyproject = true; src = fetchFromGitHub { owner = "nbQA-dev"; repo = "nbQA"; rev = "refs/tags/${version}"; - hash = "sha256-zn+e/svaxeJU9P1sIaRrVuKW0+FM0GLKZTUx3PfuThk="; + hash = "sha256-9s+q2unh+jezU0Er7ZH0tvgntmPFts9OmsgAMeQXRrY="; }; build-system = with python3.pkgs; [ @@ -90,6 +92,12 @@ python3.pkgs.buildPythonApplication rec { "tests/test_include_exclude.py" ]; + passthru = { + tests.version = testers.testVersion { + package = nbqa; + }; + }; + meta = { homepage = "https://github.com/nbQA-dev/nbQA"; changelog = "https://nbqa.readthedocs.io/en/latest/history.html"; From 576e710170ee4adf57c4f1d1bc58efd9d4e2d3e7 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Tue, 27 Aug 2024 17:33:23 +0200 Subject: [PATCH 2/3] nbqa: move to pkgs/by-name --- .../misc/nbqa/default.nix => by-name/nb/nbqa/package.nix} | 0 pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 2 deletions(-) rename pkgs/{tools/misc/nbqa/default.nix => by-name/nb/nbqa/package.nix} (100%) diff --git a/pkgs/tools/misc/nbqa/default.nix b/pkgs/by-name/nb/nbqa/package.nix similarity index 100% rename from pkgs/tools/misc/nbqa/default.nix rename to pkgs/by-name/nb/nbqa/package.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 30550514880d5..fefb385440fbf 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10656,8 +10656,6 @@ with pkgs; nb = callPackage ../tools/misc/nb { }; - nbqa = callPackage ../tools/misc/nbqa { }; - kb = callPackage ../tools/misc/kb { }; notable = callPackage ../applications/misc/notable { }; From 7b92e73b2fafec3c81c983207f152e68aa1e7872 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Tue, 27 Aug 2024 17:34:25 +0200 Subject: [PATCH 3/3] nbqa: format with nixfmt --- pkgs/by-name/nb/nbqa/package.nix | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/pkgs/by-name/nb/nbqa/package.nix b/pkgs/by-name/nb/nbqa/package.nix index 0165a21841964..f4b1a8fdf527e 100644 --- a/pkgs/by-name/nb/nbqa/package.nix +++ b/pkgs/by-name/nb/nbqa/package.nix @@ -1,11 +1,16 @@ -{ black -, blacken-docs -, fetchFromGitHub -, lib -, python3 -, ruff -, testers -, nbqa +{ + lib, + python3, + fetchFromGitHub, + + # optional-dependencies + black, + blacken-docs, + ruff, + + # passthru + testers, + nbqa, }: python3.pkgs.buildPythonApplication rec { pname = "nbqa"; @@ -35,7 +40,8 @@ python3.pkgs.buildPythonApplication rec { ruff = [ ruff ]; }; - dependencies = with python3.pkgs; + dependencies = + with python3.pkgs; [ autopep8 ipython