From 3c186416e580f99a7ef213c67c0a055ee274b4fc Mon Sep 17 00:00:00 2001 From: TomaSajt <62384384+TomaSajt@users.noreply.github.com> Date: Fri, 11 Jul 2025 22:17:38 +0200 Subject: [PATCH] pkgs/by-name/{m,n}*: migrate to pyproject = true --- pkgs/by-name/ma/macpm/package.nix | 18 ++++++++++++------ pkgs/by-name/ma/mapproxy/package.nix | 9 +++++++-- pkgs/by-name/ma/mastodon-archive/package.nix | 10 ++++++++-- pkgs/by-name/md/md-tangle/package.nix | 6 +++++- pkgs/by-name/md/mdslides/package.nix | 6 +++++- pkgs/by-name/me/me_cleaner/package.nix | 4 +++- pkgs/by-name/ml/mlarchive2maildir/package.nix | 11 ++++++++--- pkgs/by-name/ml/mloader/package.nix | 11 +++++------ pkgs/by-name/mo/mongoaudit/package.nix | 8 ++++++-- pkgs/by-name/mo/moodle-dl/package.nix | 8 ++++++-- pkgs/by-name/mp/mpfshell/package.nix | 7 +++++-- pkgs/by-name/mu/mutmut/package.nix | 8 ++++++-- pkgs/by-name/mu/mutt-ics/package.nix | 11 +++++++---- pkgs/by-name/my/mymcplus/package.nix | 8 ++++++-- pkgs/by-name/na/nagstamon/package.nix | 2 +- pkgs/by-name/nb/nbstripout/package.nix | 10 ++++++++-- pkgs/by-name/nb/nbutools/package.nix | 6 ++++-- pkgs/by-name/ne/nemo-emblems/package.nix | 9 +++++---- pkgs/by-name/ne/neovim-remote/package.nix | 15 +++++++++------ pkgs/by-name/ni/nix-bisect/package.nix | 8 ++++++-- pkgs/by-name/no/norminette/package.nix | 15 +++++++++++---- pkgs/by-name/no/nototools/package.nix | 13 +++++++------ pkgs/by-name/no/nox/package.nix | 16 ++++++++-------- pkgs/by-name/np/npm-lockfile-fix/package.nix | 10 +++++++--- pkgs/by-name/nt/ntfy/package.nix | 8 ++++++-- pkgs/by-name/nt/ntfy/webpush.nix | 9 ++++++--- pkgs/by-name/nt/ntlmrecon/package.nix | 6 ++++-- pkgs/by-name/nv/nvitop/package.nix | 6 +++++- pkgs/by-name/nv/nvpy/package.nix | 10 +++++++--- pkgs/by-name/nw/nwg-clipman/package.nix | 4 +++- pkgs/by-name/nw/nwg-wrapper/package.nix | 6 ++++-- pkgs/by-name/ny/nyx/package.nix | 12 +++++++----- 32 files changed, 197 insertions(+), 93 deletions(-) diff --git a/pkgs/by-name/ma/macpm/package.nix b/pkgs/by-name/ma/macpm/package.nix index ea9dca568992..ec4d36618bd9 100644 --- a/pkgs/by-name/ma/macpm/package.nix +++ b/pkgs/by-name/ma/macpm/package.nix @@ -8,7 +8,7 @@ python3Packages.buildPythonApplication { pname = "macpm"; version = "0.24-unstable-2024-11-19"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "visualcjy"; @@ -17,6 +17,16 @@ python3Packages.buildPythonApplication { hash = "sha256-jqaPPvYbuL8q6grmBLyZLf8aDmjugYxMOWAh1Ix82jc="; }; + build-system = with python3Packages; [ + setuptools + ]; + + dependencies = with python3Packages; [ + dashing + humanize + psutil + ]; + # has no tests doCheck = false; @@ -25,11 +35,7 @@ python3Packages.buildPythonApplication { ln -rs $out/bin/macpm $out/bin/asitop ''; - dependencies = with python3Packages; [ - dashing - humanize - psutil - ]; + pythonImportsCheck = [ "macpm" ]; meta = { description = "Perf monitoring CLI tool for Apple Silicon; previously named 'asitop'"; diff --git a/pkgs/by-name/ma/mapproxy/package.nix b/pkgs/by-name/ma/mapproxy/package.nix index e6575e811d33..9b01f2851989 100644 --- a/pkgs/by-name/ma/mapproxy/package.nix +++ b/pkgs/by-name/ma/mapproxy/package.nix @@ -8,7 +8,7 @@ python3Packages.buildPythonApplication rec { pname = "mapproxy"; version = "5.0.0"; - format = "setuptools"; + pyproject = true; disabled = python3Packages.pythonOlder "3.8"; src = fetchFromGitHub { @@ -22,6 +22,10 @@ python3Packages.buildPythonApplication rec { substituteInPlace mapproxy/util/ext/serving.py --replace-warn "args = [sys.executable] + sys.argv" "args = sys.argv" ''; + build-system = with python3Packages; [ setuptools ]; + + pythonRemoveDeps = [ "future" ]; + dependencies = with python3Packages; [ boto3 # needed for caches service jsonschema @@ -31,7 +35,6 @@ python3Packages.buildPythonApplication rec { shapely gdal lxml - setuptools werkzeug ]; @@ -40,6 +43,8 @@ python3Packages.buildPythonApplication rec { # https://github.com/mapproxy/mapproxy/blob/master/requirements-tests.txt doCheck = false; + pythonImportsCheck = [ "mapproxy" ]; + meta = { description = "Open source proxy for geospatial data"; homepage = "https://mapproxy.org/"; diff --git a/pkgs/by-name/ma/mastodon-archive/package.nix b/pkgs/by-name/ma/mastodon-archive/package.nix index 7825493545d9..0eb10039b414 100644 --- a/pkgs/by-name/ma/mastodon-archive/package.nix +++ b/pkgs/by-name/ma/mastodon-archive/package.nix @@ -7,7 +7,7 @@ python3.pkgs.buildPythonApplication rec { pname = "mastodon-archive"; version = "1.4.2"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "kensanata"; @@ -16,7 +16,11 @@ python3.pkgs.buildPythonApplication rec { hash = "sha256-b4bYQshz7mwxEfpRYV7ze4C8hz58R9cVp58wHvGFb0A="; }; - propagatedBuildInputs = with python3.pkgs; [ + build-system = with python3.pkgs; [ + setuptools + ]; + + dependencies = with python3.pkgs; [ html2text mastodon-py progress @@ -25,6 +29,8 @@ python3.pkgs.buildPythonApplication rec { # There is no test doCheck = false; + pythonImportsCheck = [ "mastodon_archive" ]; + meta = with lib; { description = "Utility for backing up your Mastodon content"; mainProgram = "mastodon-archive"; diff --git a/pkgs/by-name/md/md-tangle/package.nix b/pkgs/by-name/md/md-tangle/package.nix index b5d5d7650888..9f530492496e 100644 --- a/pkgs/by-name/md/md-tangle/package.nix +++ b/pkgs/by-name/md/md-tangle/package.nix @@ -7,7 +7,7 @@ python3.pkgs.buildPythonPackage rec { pname = "md-tangle"; version = "1.4.4"; - format = "setuptools"; + pyproject = true; # By some strange reason, fetchPypi fails miserably src = fetchFromGitHub { @@ -17,10 +17,14 @@ python3.pkgs.buildPythonPackage rec { hash = "sha256-PkOKSsyY8uwS4mhl0lB+KGeUvXfEc7PUDHZapHMYv4c="; }; + build-system = with python3.pkgs; [ setuptools ]; + # Pure Python application, uses only standard modules and comes without # testing suite doCheck = false; + pythonImportsCheck = [ "md_tangle" ]; + meta = with lib; { homepage = "https://github.com/joakimmj/md-tangle/"; description = "Generates (\"tangles\") source code from Markdown documents"; diff --git a/pkgs/by-name/md/mdslides/package.nix b/pkgs/by-name/md/mdslides/package.nix index 6932e8a4a526..7b97eacd102d 100644 --- a/pkgs/by-name/md/mdslides/package.nix +++ b/pkgs/by-name/md/mdslides/package.nix @@ -7,7 +7,7 @@ python3Packages.buildPythonApplication { pname = "mdslides"; version = "unstable-2022-12-15"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "dadoomer"; @@ -16,8 +16,12 @@ python3Packages.buildPythonApplication { sha256 = "sha256-31ALsy1P/vfI+H6Onmg4TXLeKbVAQ1FlnFs4k6ZOgHQ="; }; + build-system = with python3Packages; [ setuptools ]; + doCheck = false; + pythonImportsCheck = [ "mdslides" ]; + meta = with lib; { longDescription = "Using markdown, write simple but beautiful presentations with math, animations and media, which can be visualized in a web browser or exported to PDF."; homepage = "https://github.com/dadoomer/markdown-slides"; diff --git a/pkgs/by-name/me/me_cleaner/package.nix b/pkgs/by-name/me/me_cleaner/package.nix index 3d5419fd5b56..d0996351fc6f 100644 --- a/pkgs/by-name/me/me_cleaner/package.nix +++ b/pkgs/by-name/me/me_cleaner/package.nix @@ -7,7 +7,7 @@ python3.pkgs.buildPythonPackage rec { pname = "me_cleaner"; version = "1.2"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "corna"; @@ -16,6 +16,8 @@ python3.pkgs.buildPythonPackage rec { sha256 = "1bdj2clm13ir441vn7sv860xsc5gh71ja5lc2wn0gggnff0adxj4"; }; + build-system = with python3.pkgs; [ setuptools ]; + meta = with lib; { inherit (src.meta) homepage; description = "Tool for partial deblobbing of Intel ME/TXE firmware images"; diff --git a/pkgs/by-name/ml/mlarchive2maildir/package.nix b/pkgs/by-name/ml/mlarchive2maildir/package.nix index 73de65a83b06..7089c79fdf68 100644 --- a/pkgs/by-name/ml/mlarchive2maildir/package.nix +++ b/pkgs/by-name/ml/mlarchive2maildir/package.nix @@ -7,16 +7,19 @@ python3.pkgs.buildPythonApplication rec { pname = "mlarchive2maildir"; version = "0.0.9"; - format = "setuptools"; + pyproject = true; src = fetchPypi { inherit pname version; sha256 = "02zjwa7zbcbqj76l0qmg7bbf3fqli60pl2apby3j4zwzcrrryczs"; }; - nativeBuildInputs = with python3.pkgs; [ setuptools-scm ]; + build-system = with python3.pkgs; [ + setuptools + setuptools-scm + ]; - propagatedBuildInputs = with python3.pkgs; [ + dependencies = with python3.pkgs; [ beautifulsoup4 click click-log @@ -24,6 +27,8 @@ python3.pkgs.buildPythonApplication rec { six ]; + pythonImportsCheck = [ "mlarchive2maildir" ]; + meta = with lib; { homepage = "https://github.com/flokli/mlarchive2maildir"; description = "Imports mail from (pipermail) archives into a maildir"; diff --git a/pkgs/by-name/ml/mloader/package.nix b/pkgs/by-name/ml/mloader/package.nix index 6691d11440fa..9e61c8f8134d 100644 --- a/pkgs/by-name/ml/mloader/package.nix +++ b/pkgs/by-name/ml/mloader/package.nix @@ -7,19 +7,18 @@ python3Packages.buildPythonApplication rec { pname = "mloader"; version = "1.1.12"; - format = "setuptools"; + pyproject = true; src = fetchPypi { inherit pname version; hash = "sha256-0o4FvhuFudNSEL6fwBVqxldaNePbbidY9utDqXiLRNc="; }; - postPatch = '' - substituteInPlace setup.py \ - --replace "protobuf~=3.6" "protobuf" - ''; + build-system = with python3Packages; [ setuptools ]; - propagatedBuildInputs = with python3Packages; [ + pythonRelaxDeps = [ "protobuf" ]; + + dependencies = with python3Packages; [ click protobuf requests diff --git a/pkgs/by-name/mo/mongoaudit/package.nix b/pkgs/by-name/mo/mongoaudit/package.nix index 9c043d092ebe..8a9ad93c2fa7 100644 --- a/pkgs/by-name/mo/mongoaudit/package.nix +++ b/pkgs/by-name/mo/mongoaudit/package.nix @@ -7,7 +7,7 @@ python3.pkgs.buildPythonApplication rec { pname = "mongoaudit"; version = "0.1.1"; - format = "setuptools"; + pyproject = true; disabled = python3.pythonOlder "3.8"; @@ -18,7 +18,11 @@ python3.pkgs.buildPythonApplication rec { sha256 = "17k4vw5d3kr961axl49ywid4cf3n7zxvm885c4lv15w7s2al1425"; }; - propagatedBuildInputs = with python3.pkgs; [ + build-system = with python3.pkgs; [ + setuptools + ]; + + dependencies = with python3.pkgs; [ pymongo setuptools urwid diff --git a/pkgs/by-name/mo/moodle-dl/package.nix b/pkgs/by-name/mo/moodle-dl/package.nix index b63b672ac8ca..4356aeaae407 100644 --- a/pkgs/by-name/mo/moodle-dl/package.nix +++ b/pkgs/by-name/mo/moodle-dl/package.nix @@ -8,7 +8,7 @@ python3Packages.buildPythonApplication rec { pname = "moodle-dl"; version = "2.3.13"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "C0D3D3V"; @@ -17,7 +17,9 @@ python3Packages.buildPythonApplication rec { hash = "sha256-6arwc72gu7XyT6HokSEs2TkvE2FG7mIvy4F+/i/0eJg="; }; - propagatedBuildInputs = with python3Packages; [ + build-system = with python3Packages; [ setuptools ]; + + dependencies = with python3Packages; [ aiodns aiofiles aiohttp @@ -35,6 +37,8 @@ python3Packages.buildPythonApplication rec { # upstream has no tests doCheck = false; + pythonImportsCheck = [ "moodle_dl" ]; + passthru.updateScript = gitUpdater { }; meta = with lib; { diff --git a/pkgs/by-name/mp/mpfshell/package.nix b/pkgs/by-name/mp/mpfshell/package.nix index f89827a72c35..41d93206afd8 100644 --- a/pkgs/by-name/mp/mpfshell/package.nix +++ b/pkgs/by-name/mp/mpfshell/package.nix @@ -7,7 +7,7 @@ python3Packages.buildPythonPackage { pname = "mpfshell-unstable"; version = "2020-04-11"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "wendlers"; @@ -16,10 +16,13 @@ python3Packages.buildPythonPackage { sha256 = "0md6ih9vp65dacqy8gki3b2p4v76xb9ijqmxymk4b4f9z684x2m7"; }; - propagatedBuildInputs = with python3Packages; [ + build-system = with python3Packages; [ setuptools ]; + + dependencies = with python3Packages; [ pyserial colorama websocket-client + standard-telnetlib # Python no longer provides telnetlib since python313 ]; doCheck = false; diff --git a/pkgs/by-name/mu/mutmut/package.nix b/pkgs/by-name/mu/mutmut/package.nix index 57a5618bb775..c0c6f9939584 100644 --- a/pkgs/by-name/mu/mutmut/package.nix +++ b/pkgs/by-name/mu/mutmut/package.nix @@ -7,7 +7,7 @@ python3Packages.buildPythonApplication rec { pname = "mutmut"; version = "3.2.0"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { repo = "mutmut"; @@ -24,7 +24,9 @@ python3Packages.buildPythonApplication rec { doCheck = false; - propagatedBuildInputs = with python3Packages; [ + build-system = with python3Packages; [ setuptools ]; + + dependencies = with python3Packages; [ click parso junit-xml @@ -32,6 +34,8 @@ python3Packages.buildPythonApplication rec { textual ]; + pythonImportsCheck = [ "mutmut" ]; + meta = { description = "mutation testing system for Python, with a strong focus on ease of use"; mainProgram = "mutmut"; diff --git a/pkgs/by-name/mu/mutt-ics/package.nix b/pkgs/by-name/mu/mutt-ics/package.nix index 5e9a6d985f57..bf8f91015263 100644 --- a/pkgs/by-name/mu/mutt-ics/package.nix +++ b/pkgs/by-name/mu/mutt-ics/package.nix @@ -4,11 +4,10 @@ fetchPypi, }: -with python3.pkgs; -buildPythonApplication rec { +python3.pkgs.buildPythonApplication rec { pname = "mutt-ics"; version = "0.9.2"; - format = "setuptools"; + pyproject = true; src = fetchPypi { inherit version; @@ -16,7 +15,11 @@ buildPythonApplication rec { sha256 = "d44d4bec4e71c7f14df01b90fdb9563cdc784ece4250abfea5b0b675cfe85a50"; }; - propagatedBuildInputs = [ icalendar ]; + build-system = with python3.pkgs; [ setuptools ]; + + dependencies = with python3.pkgs; [ icalendar ]; + + pythonImportsCheck = [ "mutt_ics" ]; meta = with lib; { homepage = "https://github.com/dmedvinsky/mutt-ics"; diff --git a/pkgs/by-name/my/mymcplus/package.nix b/pkgs/by-name/my/mymcplus/package.nix index 9c69614b3b24..69bf95eae1f2 100644 --- a/pkgs/by-name/my/mymcplus/package.nix +++ b/pkgs/by-name/my/mymcplus/package.nix @@ -8,7 +8,7 @@ python3Packages.buildPythonApplication rec { pname = "mymcplus"; version = "3.0.5"; - format = "setuptools"; + pyproject = true; src = fetchFromSourcehut { owner = "~thestr4ng3r"; @@ -21,11 +21,15 @@ python3Packages.buildPythonApplication rec { wrapGAppsHook3 ]; - propagatedBuildInputs = with python3Packages; [ + build-system = with python3Packages; [ setuptools ]; + + dependencies = with python3Packages; [ pyopengl wxpython ]; + pythonImportsCheck = [ "mymcplus" ]; + meta = with lib; { homepage = "https://git.sr.ht/~thestr4ng3r/mymcplus"; description = "PlayStation 2 memory card manager"; diff --git a/pkgs/by-name/na/nagstamon/package.nix b/pkgs/by-name/na/nagstamon/package.nix index 2145411fee4a..067d23986057 100644 --- a/pkgs/by-name/na/nagstamon/package.nix +++ b/pkgs/by-name/na/nagstamon/package.nix @@ -8,7 +8,7 @@ python3Packages.buildPythonApplication rec { pname = "nagstamon"; version = "3.16.2"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "HenriWahl"; diff --git a/pkgs/by-name/nb/nbstripout/package.nix b/pkgs/by-name/nb/nbstripout/package.nix index 8f957f53e2e2..d378808b4e0c 100644 --- a/pkgs/by-name/nb/nbstripout/package.nix +++ b/pkgs/by-name/nb/nbstripout/package.nix @@ -10,7 +10,7 @@ python3.pkgs.buildPythonApplication rec { version = "0.8.1"; - format = "setuptools"; + pyproject = true; pname = "nbstripout"; src = fetchPypi { @@ -25,7 +25,11 @@ python3.pkgs.buildPythonApplication rec { hash = "sha256-OSJLrWkYQIhcdyofS3Bo39ppsU6K3A4546UKB8Q1GGg="; }; - propagatedBuildInputs = with python3.pkgs; [ + build-system = with python3.pkgs; [ + setuptools + ]; + + dependencies = with python3.pkgs; [ nbformat ]; @@ -53,6 +57,8 @@ python3.pkgs.buildPythonApplication rec { substituteInPlace tests/test_end_to_end.py --replace "tests/e2e_notebooks" "$TMPDIR/e2e_notebooks" ''; + pythonImportsCheck = [ "nbstripout" ]; + meta = { description = "Strip output from Jupyter and IPython notebooks"; homepage = "https://github.com/kynan/nbstripout"; diff --git a/pkgs/by-name/nb/nbutools/package.nix b/pkgs/by-name/nb/nbutools/package.nix index 83993b160ea4..a8113651b66c 100644 --- a/pkgs/by-name/nb/nbutools/package.nix +++ b/pkgs/by-name/nb/nbutools/package.nix @@ -7,7 +7,7 @@ python3.pkgs.buildPythonApplication { pname = "nbutools"; version = "unstable-2023-06-06"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "airbus-seclab"; @@ -16,7 +16,9 @@ python3.pkgs.buildPythonApplication { hash = "sha256-YOiFlTIDpeTFOHPU37v0pYf8s3HdaE/4pnd9qrsFtSI="; }; - propagatedBuildInputs = with python3.pkgs; [ + build-system = with python3.pkgs; [ setuptools ]; + + dependencies = with python3.pkgs; [ aiodns aiohttp beautifulsoup4 diff --git a/pkgs/by-name/ne/nemo-emblems/package.nix b/pkgs/by-name/ne/nemo-emblems/package.nix index 08d8886022d2..ece3a9f62f1b 100644 --- a/pkgs/by-name/ne/nemo-emblems/package.nix +++ b/pkgs/by-name/ne/nemo-emblems/package.nix @@ -8,6 +8,7 @@ python3.pkgs.buildPythonApplication rec { pname = "nemo-emblems"; version = "6.4.0"; + pyproject = true; # nixpkgs-update: no auto update src = fetchFromGitHub { @@ -17,18 +18,18 @@ python3.pkgs.buildPythonApplication rec { hash = "sha256-39hWA4SNuEeaPA6D5mWMHjJDs4hYK7/ZdPkTyskvm5Y="; }; - format = "setuptools"; - sourceRoot = "${src.name}/nemo-emblems"; postPatch = '' substituteInPlace setup.py \ - --replace "/usr/share" "share" + --replace-fail "/usr/share" "share" substituteInPlace nemo-extension/nemo-emblems.py \ - --replace "/usr/share/locale" "${cinnamon-translations}/share/locale" + --replace-fail "/usr/share/locale" "${cinnamon-translations}/share/locale" ''; + build-system = with python3.pkgs; [ setuptools ]; + meta = with lib; { homepage = "https://github.com/linuxmint/nemo-extensions/tree/master/nemo-emblems"; description = "Change a folder or file emblem in Nemo"; diff --git a/pkgs/by-name/ne/neovim-remote/package.nix b/pkgs/by-name/ne/neovim-remote/package.nix index 29737cc3cdc7..ac9a703a8086 100644 --- a/pkgs/by-name/ne/neovim-remote/package.nix +++ b/pkgs/by-name/ne/neovim-remote/package.nix @@ -1,16 +1,16 @@ { lib, + stdenv, fetchFromGitHub, python3, neovim, fetchpatch, }: -with python3.pkgs; -buildPythonApplication rec { +python3.pkgs.buildPythonApplication rec { pname = "neovim-remote"; version = "2.5.1"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "mhinz"; @@ -27,15 +27,16 @@ buildPythonApplication rec { }) ]; - propagatedBuildInputs = [ + build-system = with python3.pkgs; [ setuptools ]; + + dependencies = with python3.pkgs; [ pynvim psutil - setuptools ]; nativeCheckInputs = [ neovim - pytestCheckHook + python3.pkgs.pytestCheckHook ]; doCheck = !stdenv.hostPlatform.isDarwin; @@ -44,6 +45,8 @@ buildPythonApplication rec { export HOME="$(mktemp -d)" ''; + pythonImportsCheck = [ "nvr" ]; + meta = with lib; { description = "Tool that helps controlling nvim processes from a terminal"; homepage = "https://github.com/mhinz/neovim-remote/"; diff --git a/pkgs/by-name/ni/nix-bisect/package.nix b/pkgs/by-name/ni/nix-bisect/package.nix index 421b2e035a9f..1e4873227e62 100644 --- a/pkgs/by-name/ni/nix-bisect/package.nix +++ b/pkgs/by-name/ni/nix-bisect/package.nix @@ -10,7 +10,7 @@ let in python3.pkgs.buildPythonApplication { inherit pname version; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "timokau"; @@ -19,7 +19,9 @@ python3.pkgs.buildPythonApplication { hash = "sha256-zyeE1jYo/9NEG8fB4gQBAR01siP4tyLvjjHN1yUS4Ug="; }; - propagatedBuildInputs = with python3.pkgs; [ + build-system = with python3.pkgs; [ setuptools ]; + + dependencies = with python3.pkgs; [ appdirs numpy pexpect @@ -27,6 +29,8 @@ python3.pkgs.buildPythonApplication { doCheck = false; + pythonImportsCheck = [ "nix_bisect" ]; + meta = with lib; { description = "Bisect nix builds"; homepage = "https://github.com/timokau/nix-bisect"; diff --git a/pkgs/by-name/no/norminette/package.nix b/pkgs/by-name/no/norminette/package.nix index 87c6998f1ca7..a7a639f0eacf 100644 --- a/pkgs/by-name/no/norminette/package.nix +++ b/pkgs/by-name/no/norminette/package.nix @@ -7,7 +7,7 @@ python3Packages.buildPythonApplication rec { pname = "norminette"; version = "3.3.58"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "42School"; @@ -16,13 +16,20 @@ python3Packages.buildPythonApplication rec { hash = "sha256-6hBBbfW2PQFb8rcDihvtWK0df7WcvOk0il1E82GOxaU="; }; + build-system = with python3Packages; [ + poetry-core + ]; + + pythonRemoveDeps = [ + # Can be removed once https://github.com/42school/norminette/issues/565 is addressed + "argparse" + ]; + nativeCheckInputs = with python3Packages; [ pytestCheckHook ]; - preCheck = '' - export PYTHONPATH=norminette:$PYTHONPATH - ''; + pythonImportsCheck = [ "norminette" ]; meta = with lib; { description = "Open source norminette to apply 42's norme to C files"; diff --git a/pkgs/by-name/no/nototools/package.nix b/pkgs/by-name/no/nototools/package.nix index 8ec68eecefdb..c2676f413011 100644 --- a/pkgs/by-name/no/nototools/package.nix +++ b/pkgs/by-name/no/nototools/package.nix @@ -8,7 +8,7 @@ python3Packages.buildPythonApplication rec { pname = "nototools"; version = "0.2.20"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "googlefonts"; @@ -17,11 +17,10 @@ python3Packages.buildPythonApplication rec { sha256 = "sha256-id4UhyWOFHrtmBZHhnaY2jHDIK0s7rcGBpg4QsBTLKs="; }; - postPatch = '' - sed -i 's/use_scm_version=.*,/version="${version}",/' setup.py - ''; - - build-system = with python3Packages; [ setuptools-scm ]; + build-system = with python3Packages; [ + setuptools + setuptools-scm + ]; pythonRemoveDeps = [ # https://github.com/notofonts/nototools/pull/901 @@ -72,6 +71,8 @@ python3Packages.buildPythonApplication rec { cp -r third_party $out ''; + pythonImportsCheck = [ "nototools" ]; + meta = with lib; { description = "Noto fonts support tools and scripts plus web site generation"; homepage = "https://github.com/googlefonts/nototools"; diff --git a/pkgs/by-name/no/nox/package.nix b/pkgs/by-name/no/nox/package.nix index e1db0d13a542..80d608fd122d 100644 --- a/pkgs/by-name/no/nox/package.nix +++ b/pkgs/by-name/no/nox/package.nix @@ -2,14 +2,12 @@ lib, python3Packages, fetchurl, - git, }: python3Packages.buildPythonApplication rec { pname = "nox"; version = "0.0.6"; - format = "setuptools"; - namePrefix = ""; + pyproject = true; src = fetchurl { url = "mirror://pypi/n/nix-nox/nix-nox-${version}.tar.gz"; @@ -18,19 +16,21 @@ python3Packages.buildPythonApplication rec { patches = [ ./nox-review-wip.patch ]; - buildInputs = [ - python3Packages.pbr - git + build-system = with python3Packages; [ + setuptools + pbr ]; - propagatedBuildInputs = with python3Packages; [ + dependencies = with python3Packages; [ dogpile-cache click requests characteristic - setuptools + setuptools # pkg_resources is imported during runtime ]; + pythonImportsCheck = [ "nox" ]; + meta = { homepage = "https://github.com/madjar/nox"; description = "Tools to make nix nicer to use"; diff --git a/pkgs/by-name/np/npm-lockfile-fix/package.nix b/pkgs/by-name/np/npm-lockfile-fix/package.nix index ece36548399e..e12c88d607c8 100644 --- a/pkgs/by-name/np/npm-lockfile-fix/package.nix +++ b/pkgs/by-name/np/npm-lockfile-fix/package.nix @@ -8,7 +8,7 @@ python3.pkgs.buildPythonApplication rec { pname = "npm-lockfile-fix"; version = "0.1.1"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "jeslie0"; @@ -17,8 +17,12 @@ python3.pkgs.buildPythonApplication rec { hash = "sha256-P93OowrVkkOfX5XKsRsg0c4dZLVn2ZOonJazPmHdD7g="; }; - propagatedBuildInputs = [ - python3.pkgs.requests + build-system = with python3.pkgs; [ + setuptools + ]; + + dependencies = with python3.pkgs; [ + requests ]; doCheck = false; # no tests diff --git a/pkgs/by-name/nt/ntfy/package.nix b/pkgs/by-name/nt/ntfy/package.nix index 2cfbace33ecf..5d2d50e9ae06 100644 --- a/pkgs/by-name/nt/ntfy/package.nix +++ b/pkgs/by-name/nt/ntfy/package.nix @@ -27,7 +27,7 @@ python.pkgs.buildPythonApplication rec { pname = "ntfy"; version = "2.7.0"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "dschep"; @@ -73,9 +73,11 @@ python.pkgs.buildPythonApplication rec { postPatch = '' # We disable the Darwin specific things because it relies on pyobjc, which we don't have. substituteInPlace setup.py \ - --replace "':sys_platform == \"darwin\"'" "'darwin'" + --replace-fail "':sys_platform == \"darwin\"'" "'darwin'" ''; + build-system = with python.pkgs; [ setuptools ]; + dependencies = with python.pkgs; ( @@ -123,6 +125,8 @@ python.pkgs.buildPythonApplication rec { export HOME=$(mktemp -d) ''; + pythonImportsCheck = [ "ntfy" ]; + meta = with lib; { description = "Utility for sending notifications, on demand and when commands finish"; homepage = "https://ntfy.readthedocs.io/en/latest/"; diff --git a/pkgs/by-name/nt/ntfy/webpush.nix b/pkgs/by-name/nt/ntfy/webpush.nix index 0669562b1d42..b7674de5791d 100644 --- a/pkgs/by-name/nt/ntfy/webpush.nix +++ b/pkgs/by-name/nt/ntfy/webpush.nix @@ -2,6 +2,7 @@ lib, buildPythonPackage, fetchFromGitHub, + setuptools, pywebpush, py-vapid, }: @@ -9,7 +10,7 @@ buildPythonPackage rec { pname = "ntfy-webpush"; version = "0.1.3"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "dschep"; @@ -21,10 +22,12 @@ buildPythonPackage rec { postPatch = '' # break dependency loop substituteInPlace setup.py \ - --replace "'ntfy', " "" + --replace-fail "'ntfy', " "" ''; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ pywebpush py-vapid ]; diff --git a/pkgs/by-name/nt/ntlmrecon/package.nix b/pkgs/by-name/nt/ntlmrecon/package.nix index 94f47b691f32..ed11fac64873 100644 --- a/pkgs/by-name/nt/ntlmrecon/package.nix +++ b/pkgs/by-name/nt/ntlmrecon/package.nix @@ -7,7 +7,7 @@ python3.pkgs.buildPythonApplication rec { pname = "ntlmrecon"; version = "0.4"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "pwnfoo"; @@ -16,7 +16,9 @@ python3.pkgs.buildPythonApplication rec { sha256 = "0rrx49li2l9xlcax84qxjf60nbzp3fgq77c36yqmsp0pc9i89ah6"; }; - propagatedBuildInputs = with python3.pkgs; [ + build-system = with python3.pkgs; [ setuptools ]; + + dependencies = with python3.pkgs; [ colorama iptools requests diff --git a/pkgs/by-name/nv/nvitop/package.nix b/pkgs/by-name/nv/nvitop/package.nix index eb4d98ad8b08..1f92222f31e7 100644 --- a/pkgs/by-name/nv/nvitop/package.nix +++ b/pkgs/by-name/nv/nvitop/package.nix @@ -8,7 +8,7 @@ python3Packages.buildPythonApplication rec { pname = "nvitop"; version = "1.5.1"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "XuehaiPan"; @@ -17,6 +17,8 @@ python3Packages.buildPythonApplication rec { hash = "sha256-FQbY9j6eJtupBiYTSCEJHAAlpDltb6U5hgWet42AKho="; }; + build-system = with python3Packages; [ setuptools ]; + pythonRelaxDeps = [ "nvidia-ml-py" ]; dependencies = with python3Packages; [ @@ -30,6 +32,8 @@ python3Packages.buildPythonApplication rec { ]; versionCheckProgramArg = "--version"; + pythonImportsCheck = [ "nvitop" ]; + meta = { description = "Interactive NVIDIA-GPU process viewer, the one-stop solution for GPU process management"; homepage = "https://github.com/XuehaiPan/nvitop"; diff --git a/pkgs/by-name/nv/nvpy/package.nix b/pkgs/by-name/nv/nvpy/package.nix index 2a8c539328da..d17d640701a7 100644 --- a/pkgs/by-name/nv/nvpy/package.nix +++ b/pkgs/by-name/nv/nvpy/package.nix @@ -8,9 +8,9 @@ let pythonPackages = python3Packages; in pythonPackages.buildPythonApplication rec { - version = "2.3.1"; - format = "setuptools"; pname = "nvpy"; + version = "2.3.1"; + pyproject = true; src = fetchFromGitHub { owner = "cpbotha"; @@ -19,7 +19,9 @@ pythonPackages.buildPythonApplication rec { sha256 = "sha256-guNdLu/bCk89o5M3gQU7J0W4h7eZdLHM0FG5IAPLE7c="; }; - propagatedBuildInputs = with pythonPackages; [ + build-system = with pythonPackages; [ setuptools ]; + + dependencies = with pythonPackages; [ markdown docutils simplenote @@ -37,6 +39,8 @@ pythonPackages.buildPythonApplication rec { install -m644 README.rst "$out/share/doc/nvpy/README" ''; + pythonImportsCheck = [ "nvpy" ]; + meta = with pkgs.lib; { description = "Simplenote-syncing note-taking tool inspired by Notational Velocity"; homepage = "https://github.com/cpbotha/nvpy"; diff --git a/pkgs/by-name/nw/nwg-clipman/package.nix b/pkgs/by-name/nw/nwg-clipman/package.nix index 0d8a4ccf7ca0..03d3b5bcab7b 100644 --- a/pkgs/by-name/nw/nwg-clipman/package.nix +++ b/pkgs/by-name/nw/nwg-clipman/package.nix @@ -14,7 +14,7 @@ python3Packages.buildPythonPackage rec { pname = "nwg-clipman"; version = "0.2.6"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "nwg-piotr"; @@ -55,6 +55,8 @@ python3Packages.buildPythonPackage rec { strictDeps = true; + pythonImportsCheck = [ "nwg_clipman" ]; + passthru.updateScript = nix-update-script { }; meta = { diff --git a/pkgs/by-name/nw/nwg-wrapper/package.nix b/pkgs/by-name/nw/nwg-wrapper/package.nix index 8a7bfa40ed5c..8ea443fc3f67 100644 --- a/pkgs/by-name/nw/nwg-wrapper/package.nix +++ b/pkgs/by-name/nw/nwg-wrapper/package.nix @@ -12,7 +12,7 @@ python3Packages.buildPythonPackage rec { pname = "nwg-wrapper"; version = "0.1.3"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "nwg-piotr"; @@ -31,7 +31,9 @@ python3Packages.buildPythonPackage rec { gtk-layer-shell ]; - propagatedBuildInputs = with python3Packages; [ + build-system = with python3Packages; [ setuptools ]; + + dependencies = with python3Packages; [ i3ipc pygobject3 ]; diff --git a/pkgs/by-name/ny/nyx/package.nix b/pkgs/by-name/ny/nyx/package.nix index 093869d0ede0..cfc82671f18f 100644 --- a/pkgs/by-name/ny/nyx/package.nix +++ b/pkgs/by-name/ny/nyx/package.nix @@ -4,23 +4,25 @@ fetchPypi, }: -with python3Packages; - -buildPythonApplication rec { +python3Packages.buildPythonApplication rec { pname = "nyx"; version = "2.1.0"; - format = "setuptools"; + pyproject = true; src = fetchPypi { inherit pname version; sha256 = "02rrlllz2ci6i6cs3iddyfns7ang9a54jrlygd2jw1f9s6418ll8"; }; - propagatedBuildInputs = [ stem ]; + build-system = with python3Packages; [ setuptools ]; + + dependencies = with python3Packages; [ stem ]; # ./run_tests.py returns `TypeError: testFailure() takes exactly 1 argument` doCheck = false; + pythonImportsCheck = [ "nyx" ]; + meta = with lib; { description = "Command-line monitor for Tor"; mainProgram = "nyx";