diff --git a/pkgs/by-name/r1/r128gain/package.nix b/pkgs/by-name/r1/r128gain/package.nix index 4c0ba8d99749..f487be2b4cfd 100644 --- a/pkgs/by-name/r1/r128gain/package.nix +++ b/pkgs/by-name/r1/r128gain/package.nix @@ -11,7 +11,7 @@ python3Packages.buildPythonApplication rec { pname = "r128gain"; version = "1.0.7"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "desbma"; @@ -26,12 +26,15 @@ python3Packages.buildPythonApplication rec { }) ]; - propagatedBuildInputs = with python3Packages; [ + build-system = with python3Packages; [ setuptools ]; + + dependencies = with python3Packages; [ crcmod ffmpeg-python mutagen tqdm ]; + nativeCheckInputs = with python3Packages; [ requests sox @@ -41,6 +44,8 @@ python3Packages.buildPythonApplication rec { # sandbox to be disabled. doCheck = false; + pythonImportsCheck = [ "r128gain" ]; + passthru.updateScript = gitUpdater { }; meta = with lib; { diff --git a/pkgs/by-name/ra/raiseorlaunch/package.nix b/pkgs/by-name/ra/raiseorlaunch/package.nix index 80d5dba11cea..f1a8a9d51bab 100644 --- a/pkgs/by-name/ra/raiseorlaunch/package.nix +++ b/pkgs/by-name/ra/raiseorlaunch/package.nix @@ -7,14 +7,15 @@ python3Packages.buildPythonApplication rec { pname = "raiseorlaunch"; version = "2.3.5"; - format = "setuptools"; + pyproject = true; src = fetchPypi { inherit pname version; hash = "sha256-L/hu0mYCAxHkp5me96a6HlEY6QsuJDESpTNhlzVRHWs="; }; - nativeBuildInputs = [ python3Packages.setuptools-scm ]; + build-system = with python3Packages; [ setuptools ]; + pythonPath = with python3Packages; [ i3ipc ]; # no tests diff --git a/pkgs/by-name/rd/rdiff-backup/package.nix b/pkgs/by-name/rd/rdiff-backup/package.nix index 7045656a10c8..facc5b257e8e 100644 --- a/pkgs/by-name/rd/rdiff-backup/package.nix +++ b/pkgs/by-name/rd/rdiff-backup/package.nix @@ -12,22 +12,27 @@ in pypkgs.buildPythonApplication rec { pname = "rdiff-backup"; version = "2.2.6"; - format = "setuptools"; + pyproject = true; src = fetchPypi { inherit pname version; hash = "sha256-0HeDVyZrxlE7t/daRXCymySydgNIu/YHur/DpvCUWM8"; }; - nativeBuildInputs = with pypkgs; [ setuptools-scm ]; + build-system = with pypkgs; [ + setuptools + setuptools-scm + ]; buildInputs = [ librsync ]; - propagatedBuildInputs = with pypkgs; [ pyyaml ]; + dependencies = with pypkgs; [ pyyaml ]; # no tests from pypi doCheck = false; + pythonImportsCheck = [ "rdiff_backup" ]; + meta = with lib; { description = "Backup system trying to combine best a mirror and an incremental backup system"; homepage = "https://rdiff-backup.net"; diff --git a/pkgs/by-name/re/redfishtool/package.nix b/pkgs/by-name/re/redfishtool/package.nix index 51a1c781d4a8..029617a616a9 100644 --- a/pkgs/by-name/re/redfishtool/package.nix +++ b/pkgs/by-name/re/redfishtool/package.nix @@ -10,18 +10,22 @@ let in python3.pkgs.buildPythonApplication { inherit pname version; - format = "setuptools"; + pyproject = true; src = fetchPypi { inherit pname version; hash = "sha256-X/G6osOHCBidKZG/Y2nmHadifDacJhjBIc7WYrUCPn8="; }; + build-system = with python3.pkgs; [ setuptools ]; + propagatedBuildInputs = with python3.pkgs; [ requests python-dateutil ]; + pythonImportsCheck = [ "redfishtoollib" ]; + meta = { description = "Python34 program that implements a command line tool for accessing the Redfish API"; homepage = "https://github.com/DMTF/Redfishtool"; diff --git a/pkgs/by-name/re/regexploit/package.nix b/pkgs/by-name/re/regexploit/package.nix index 62576425b164..8e9ecc549f05 100644 --- a/pkgs/by-name/re/regexploit/package.nix +++ b/pkgs/by-name/re/regexploit/package.nix @@ -7,7 +7,7 @@ python3.pkgs.buildPythonApplication rec { pname = "regexploit"; version = "1.0.0"; - format = "setuptools"; + pyproject = true; disabled = python3.pythonOlder "3.8"; @@ -18,7 +18,11 @@ python3.pkgs.buildPythonApplication rec { sha256 = "0z3fghsyw0ll36in7ihc0qi3gy7mqi6cw1mi8m8c8xb1nlwpfr0y"; }; - propagatedBuildInputs = with python3.pkgs; [ + build-system = with python3.pkgs; [ + setuptools + ]; + + dependencies = with python3.pkgs; [ pyyaml ]; diff --git a/pkgs/by-name/re/replacement/package.nix b/pkgs/by-name/re/replacement/package.nix index 104ad16a2f2f..60443b2d2400 100644 --- a/pkgs/by-name/re/replacement/package.nix +++ b/pkgs/by-name/re/replacement/package.nix @@ -7,7 +7,7 @@ python3Packages.buildPythonApplication rec { pname = "replacement"; version = "0.4.4"; - format = "setuptools"; + pyproject = true; disabled = python3Packages.isPy27; @@ -18,7 +18,11 @@ python3Packages.buildPythonApplication rec { sha256 = "0j4lvn3rx1kqvxcsd8nhc2lgk48jyyl7qffhlkvakhy60f9lymj3"; }; - propagatedBuildInputs = with python3Packages; [ + build-system = with python3Packages; [ + setuptools + ]; + + dependencies = with python3Packages; [ ruamel-yaml ]; diff --git a/pkgs/by-name/rf/rfc-bibtex/package.nix b/pkgs/by-name/rf/rfc-bibtex/package.nix index e594574388bc..3ca11ac923cf 100644 --- a/pkgs/by-name/rf/rfc-bibtex/package.nix +++ b/pkgs/by-name/rf/rfc-bibtex/package.nix @@ -4,11 +4,10 @@ python3, }: -with python3.pkgs; -buildPythonApplication rec { +python3.pkgs.buildPythonApplication rec { pname = "rfc-bibtex"; version = "0.3.2"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "iluxonchik"; @@ -17,7 +16,9 @@ buildPythonApplication rec { hash = "sha256-bPCNQqiG50vWVFA6J2kyxftwsXunHTNBdSkoIRYkb0s="; }; - nativeCheckInputs = [ + build-system = with python3.pkgs; [ setuptools ]; + + nativeCheckInputs = with python3.pkgs; [ pytestCheckHook vcrpy ]; diff --git a/pkgs/by-name/ri/ripe-atlas-tools/package.nix b/pkgs/by-name/ri/ripe-atlas-tools/package.nix index 196b7983e2aa..180750393089 100644 --- a/pkgs/by-name/ri/ripe-atlas-tools/package.nix +++ b/pkgs/by-name/ri/ripe-atlas-tools/package.nix @@ -8,7 +8,7 @@ python3.pkgs.buildPythonApplication rec { pname = "ripe-atlas-tools"; version = "3.1.0"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "RIPE-NCC"; @@ -24,13 +24,17 @@ python3.pkgs.buildPythonApplication rec { echo "include ripe/atlas/tools/user-agent" >> MANIFEST.in ''; - nativeBuildInputs = with python3.pkgs; [ - sphinx-rtd-theme - sphinxHook + nativeBuildInputs = [ installShellFiles ]; - propagatedBuildInputs = with python3.pkgs; [ + build-system = with python3.pkgs; [ + setuptools + sphinx-rtd-theme + sphinxHook + ]; + + dependencies = with python3.pkgs; [ ipy pyopenssl python-dateutil diff --git a/pkgs/by-name/ri/rivalcfg/package.nix b/pkgs/by-name/ri/rivalcfg/package.nix index 669883f0a83b..7618d7e3a65e 100644 --- a/pkgs/by-name/ri/rivalcfg/package.nix +++ b/pkgs/by-name/ri/rivalcfg/package.nix @@ -7,7 +7,7 @@ python3Packages.buildPythonPackage rec { pname = "rivalcfg"; version = "4.15.0"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "flozz"; @@ -16,29 +16,33 @@ python3Packages.buildPythonPackage rec { sha256 = "sha256-UqVogJLv+sNhAxdMjBEvhBQw6LU+QUq1IekvWpeeMqk="; }; - propagatedBuildInputs = with python3Packages; [ + build-system = with python3Packages; [ setuptools ]; + + dependencies = with python3Packages; [ hidapi - setuptools + setuptools # pkg_resources is imported during runtime ]; - checkInputs = [ python3Packages.pytest ]; - checkPhase = "pytest"; + nativeCheckInputs = with python3Packages; [ + pytestCheckHook + ]; # tests are broken doCheck = false; postInstall = '' - set -x mkdir -p $out/lib/udev/rules.d tmpl_udev="$out/lib/udev/rules.d/99-rivalcfg.rules" tmpudev="''${tmpl_udev}.in" finaludev="$tmpl_udev" "$out/bin/rivalcfg" --print-udev > "$tmpudev" substitute "$tmpudev" "$out/lib/udev/rules.d/99-rivalcfg.rules" \ - --replace MODE=\"0666\" "MODE=\"0664\", GROUP=\"input\"" + --replace-fail MODE=\"0666\" "MODE=\"0664\", GROUP=\"input\"" rm "$tmpudev" ''; + pythonImportsCheck = [ "rivalcfg" ]; + meta = with lib; { description = "Utility program that allows you to configure SteelSeries Rival gaming mice"; homepage = "https://github.com/flozz/rivalcfg"; diff --git a/pkgs/by-name/ro/rofi-mpd/package.nix b/pkgs/by-name/ro/rofi-mpd/package.nix index 806b6a2169d4..7fa82ef3b53a 100644 --- a/pkgs/by-name/ro/rofi-mpd/package.nix +++ b/pkgs/by-name/ro/rofi-mpd/package.nix @@ -7,7 +7,7 @@ python3Packages.buildPythonApplication rec { pname = "rofi-mpd"; version = "2.2.1"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "JakeStanger"; @@ -16,7 +16,9 @@ python3Packages.buildPythonApplication rec { sha256 = "0jabyn6gqh8ychn2a06xws3avz0lqdnx3qvqkavfd2xr6sp2q7lg"; }; - propagatedBuildInputs = with python3Packages; [ + build-system = with python3Packages; [ setuptools ]; + + dependencies = with python3Packages; [ mutagen mpd2 toml diff --git a/pkgs/by-name/s3/s3bro/package.nix b/pkgs/by-name/s3/s3bro/package.nix index fb5b8e8237e6..f8d5caff902e 100644 --- a/pkgs/by-name/s3/s3bro/package.nix +++ b/pkgs/by-name/s3/s3bro/package.nix @@ -7,14 +7,16 @@ python3.pkgs.buildPythonApplication rec { pname = "s3bro"; version = "2.8"; - format = "setuptools"; + pyproject = true; src = fetchPypi { inherit pname version; hash = "sha256-+OqcLbXilbY4h/zRAkvRd8taVIOPyiScOAcDyPZ4RUw="; }; - propagatedBuildInputs = with python3.pkgs; [ + build-system = with python3.pkgs; [ setuptools ]; + + dependencies = with python3.pkgs; [ boto3 botocore click @@ -23,7 +25,7 @@ python3.pkgs.buildPythonApplication rec { postPatch = '' substituteInPlace setup.py \ - --replace "use_2to3=True," "" + --replace-fail "use_2to3=True," "" ''; # No tests diff --git a/pkgs/by-name/s4/s4cmd/package.nix b/pkgs/by-name/s4/s4cmd/package.nix index 2c2cf486757f..ef5ff67afc13 100644 --- a/pkgs/by-name/s4/s4cmd/package.nix +++ b/pkgs/by-name/s4/s4cmd/package.nix @@ -7,14 +7,16 @@ python3Packages.buildPythonApplication rec { pname = "s4cmd"; version = "2.1.0"; - format = "setuptools"; + pyproject = true; src = fetchPypi { inherit pname version; sha256 = "0d4mx98i3qhvlmr9x898mjvf827smzx6x5ji6daiwgjdlxc60mj2"; }; - propagatedBuildInputs = with python3Packages; [ + build-system = with python3Packages; [ setuptools ]; + + dependencies = with python3Packages; [ boto3 pytz ]; @@ -34,6 +36,8 @@ python3Packages.buildPythonApplication rec { # Test suite requires an S3 bucket doCheck = false; + pythonImportsCheck = [ "s4cmd" ]; + meta = with lib; { homepage = "https://github.com/bloomreach/s4cmd"; description = "Super S3 command line tool"; diff --git a/pkgs/by-name/sa/safeeyes/package.nix b/pkgs/by-name/sa/safeeyes/package.nix index 5e87488b9fb2..dcce05e55338 100644 --- a/pkgs/by-name/sa/safeeyes/package.nix +++ b/pkgs/by-name/sa/safeeyes/package.nix @@ -14,12 +14,10 @@ wrapGAppsHook3, }: -with python3.pkgs; - -buildPythonApplication rec { +python3.pkgs.buildPythonApplication rec { pname = "safeeyes"; version = "2.2.3"; - format = "setuptools"; + pyproject = true; src = fetchPypi { inherit pname version; @@ -27,7 +25,7 @@ buildPythonApplication rec { }; postPatch = '' - substituteInPlace setup.py --replace "root_dir = sys.prefix" "root_dir = '/'" + substituteInPlace setup.py --replace-fail "root_dir = sys.prefix" "root_dir = '/'" ''; nativeBuildInputs = [ @@ -40,14 +38,15 @@ buildPythonApplication rec { libnotify ]; - propagatedBuildInputs = [ + build-system = with python3.pkgs; [ setuptools ]; + + dependencies = with python3.pkgs; [ babel psutil xlib pygobject3 dbus-python croniter - setuptools packaging ]; @@ -74,6 +73,8 @@ buildPythonApplication rec { doCheck = false; # no tests + pythonImportsCheck = [ "safeeyes" ]; + passthru.tests.version = testers.testVersion { package = safeeyes; }; meta = with lib; { diff --git a/pkgs/by-name/sa/savepagenow/package.nix b/pkgs/by-name/sa/savepagenow/package.nix index 5875b96cce19..4be414d2f8c2 100644 --- a/pkgs/by-name/sa/savepagenow/package.nix +++ b/pkgs/by-name/sa/savepagenow/package.nix @@ -7,7 +7,7 @@ python3Packages.buildPythonApplication rec { pname = "savepagenow"; version = "1.1.1"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "pastpages"; @@ -16,7 +16,9 @@ python3Packages.buildPythonApplication rec { sha256 = "1lz6rc47cds9rb35jdf8n13gr61wdkh5jqzx4skikm1yrqkwjyhm"; }; - propagatedBuildInputs = with python3Packages; [ + build-system = with python3Packages; [ setuptools ]; + + dependencies = with python3Packages; [ click requests ]; @@ -24,6 +26,8 @@ python3Packages.buildPythonApplication rec { # requires network access doCheck = false; + pythonImportsCheck = [ "savepagenow" ]; + meta = with lib; { description = "Simple Python wrapper for archive.org's \"Save Page Now\" capturing service"; homepage = "https://github.com/pastpages/savepagenow"; diff --git a/pkgs/by-name/sc/sca2d/package.nix b/pkgs/by-name/sc/sca2d/package.nix index 4cca153e6f95..f18a765769c2 100644 --- a/pkgs/by-name/sc/sca2d/package.nix +++ b/pkgs/by-name/sc/sca2d/package.nix @@ -28,7 +28,7 @@ in python.pkgs.buildPythonApplication rec { pname = "sca2d"; version = "0.2.2"; - format = "setuptools"; + pyproject = true; src = fetchFromGitLab { owner = "bath_open_instrumentation_group"; @@ -37,7 +37,9 @@ python.pkgs.buildPythonApplication rec { hash = "sha256-p0Bv8jcnjcOLBAXN5A4GspSIEG4G4NPA4o0aEtwe/LU="; }; - propagatedBuildInputs = with python.pkgs; [ + build-system = with python.pkgs; [ setuptools ]; + + dependencies = with python.pkgs; [ lark010 colorama ]; diff --git a/pkgs/by-name/sc/screenkey/package.nix b/pkgs/by-name/sc/screenkey/package.nix index c5b02d2d8cc0..7a6a15c732b5 100644 --- a/pkgs/by-name/sc/screenkey/package.nix +++ b/pkgs/by-name/sc/screenkey/package.nix @@ -13,7 +13,7 @@ python3.pkgs.buildPythonApplication rec { pname = "screenkey"; version = "1.5"; - format = "setuptools"; + pyproject = true; src = fetchFromGitLab { owner = "screenkey"; @@ -33,7 +33,9 @@ python3.pkgs.buildPythonApplication rec { libappindicator-gtk3 ]; - propagatedBuildInputs = with python3.pkgs; [ + build-system = with python3.pkgs; [ setuptools ]; + + dependencies = with python3.pkgs; [ babel pycairo pygobject3 @@ -53,11 +55,13 @@ python3.pkgs.buildPythonApplication rec { # screenkey does not have any tests doCheck = false; + pythonImportsCheck = [ "Screenkey" ]; + # Fix CDLL python calls for non absolute paths of xorg libraries postPatch = '' substituteInPlace Screenkey/xlib.py \ - --replace libX11.so.6 ${lib.getLib xorg.libX11}/lib/libX11.so.6 \ - --replace libXtst.so.6 ${lib.getLib xorg.libXtst}/lib/libXtst.so.6 + --replace-fail libX11.so.6 ${lib.getLib xorg.libX11}/lib/libX11.so.6 \ + --replace-fail libXtst.so.6 ${lib.getLib xorg.libXtst}/lib/libXtst.so.6 ''; meta = with lib; { diff --git a/pkgs/by-name/se/seashells/package.nix b/pkgs/by-name/se/seashells/package.nix index c190a458fbce..d4c6e663166a 100644 --- a/pkgs/by-name/se/seashells/package.nix +++ b/pkgs/by-name/se/seashells/package.nix @@ -7,13 +7,15 @@ python3Packages.buildPythonApplication rec { pname = "seashells"; version = "0.1.2"; - format = "setuptools"; + pyproject = true; src = fetchPypi { inherit pname version; hash = "sha256-RBs28FC7f82DrxRcmvTP9nljVpm7tjrGuvr05l32hDM="; }; + build-system = with python3Packages; [ setuptools ]; + doCheck = false; # there are no tests pythonImportsCheck = [ "seashells" ]; diff --git a/pkgs/by-name/se/semiphemeral/package.nix b/pkgs/by-name/se/semiphemeral/package.nix index 2cc721a2228b..90f419d35432 100644 --- a/pkgs/by-name/se/semiphemeral/package.nix +++ b/pkgs/by-name/se/semiphemeral/package.nix @@ -7,7 +7,7 @@ python3.pkgs.buildPythonApplication rec { pname = "semiphemeral"; version = "0.7"; - format = "setuptools"; + pyproject = true; src = fetchPypi { inherit pname version; @@ -18,7 +18,9 @@ python3.pkgs.buildPythonApplication rec { pythonImportsCheck = [ "semiphemeral" ]; - propagatedBuildInputs = with python3.pkgs; [ + build-system = with python3.pkgs; [ setuptools ]; + + dependencies = with python3.pkgs; [ click sqlalchemy flask diff --git a/pkgs/by-name/se/seventeenlands/package.nix b/pkgs/by-name/se/seventeenlands/package.nix index 649a5280e464..0691a82035ee 100644 --- a/pkgs/by-name/se/seventeenlands/package.nix +++ b/pkgs/by-name/se/seventeenlands/package.nix @@ -6,7 +6,7 @@ python3.pkgs.buildPythonApplication rec { pname = "seventeenlands"; version = "0.1.43"; - format = "setuptools"; + pyproject = true; src = fetchPypi { inherit pname version; @@ -18,7 +18,9 @@ python3.pkgs.buildPythonApplication rec { pythonImportsCheck = [ "seventeenlands" ]; - propagatedBuildInputs = with python3.pkgs; [ + build-system = with python3.pkgs; [ setuptools ]; + + dependencies = with python3.pkgs; [ python-dateutil requests tkinter diff --git a/pkgs/by-name/se/sewer/package.nix b/pkgs/by-name/se/sewer/package.nix index 17049eb5db10..d2a6240f48fe 100644 --- a/pkgs/by-name/se/sewer/package.nix +++ b/pkgs/by-name/se/sewer/package.nix @@ -7,19 +7,23 @@ python3Packages.buildPythonApplication rec { pname = "sewer"; version = "0.8.4"; - format = "setuptools"; + pyproject = true; src = fetchPypi { inherit pname version; sha256 = "sha256-a4VdbZY8pYxrXIaUHJpnLuTB928tJn4UCdnt+m8UBug="; }; - propagatedBuildInputs = with python3Packages; [ + build-system = with python3Packages; [ setuptools ]; + + dependencies = with python3Packages; [ pyopenssl requests tldextract ]; + pythonImportsCheck = [ "sewer" ]; + meta = with lib; { homepage = "https://github.com/komuw/sewer"; description = "ACME client"; diff --git a/pkgs/by-name/sf/sftpman/package.nix b/pkgs/by-name/sf/sftpman/package.nix index 26ea3d4b7e40..db9b5143c296 100644 --- a/pkgs/by-name/sf/sftpman/package.nix +++ b/pkgs/by-name/sf/sftpman/package.nix @@ -7,7 +7,7 @@ python3Packages.buildPythonApplication rec { pname = "sftpman"; version = "1.2.2"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "spantaleev"; @@ -16,10 +16,14 @@ python3Packages.buildPythonApplication rec { hash = "sha256-YxqN4+u0nYUWehbyRhjddIo2sythH3E0fiPSyrUlWhM="; }; + build-system = with python3Packages; [ setuptools ]; + checkPhase = '' $out/bin/sftpman help ''; + pythonImportsCheck = [ "sftpman" ]; + meta = with lib; { homepage = "https://github.com/spantaleev/sftpman"; description = "Application that handles sshfs/sftp file systems mounting"; diff --git a/pkgs/by-name/sh/shot-scraper/package.nix b/pkgs/by-name/sh/shot-scraper/package.nix index 86a921b1042b..5f3ff70cf52f 100644 --- a/pkgs/by-name/sh/shot-scraper/package.nix +++ b/pkgs/by-name/sh/shot-scraper/package.nix @@ -7,7 +7,7 @@ python3.pkgs.buildPythonApplication rec { pname = "shot-scraper"; version = "1.8"; - format = "setuptools"; + pyproject = true; disabled = python3.pkgs.pythonOlder "3.6"; @@ -18,7 +18,9 @@ python3.pkgs.buildPythonApplication rec { hash = "sha256-CSV9HOqVMHI/L+jyMTdaDyc6ACyGIkG/mmcyRza6EjQ="; }; - propagatedBuildInputs = with python3.pkgs; [ + build-system = with python3.pkgs; [ setuptools ]; + + dependencies = with python3.pkgs; [ click click-default-group playwright diff --git a/pkgs/by-name/so/soco-cli/package.nix b/pkgs/by-name/so/soco-cli/package.nix index edf5ffc461fe..434b6a2dd167 100644 --- a/pkgs/by-name/so/soco-cli/package.nix +++ b/pkgs/by-name/so/soco-cli/package.nix @@ -7,7 +7,7 @@ python3.pkgs.buildPythonApplication rec { pname = "soco-cli"; version = "0.4.73"; - format = "setuptools"; + pyproject = true; disabled = python3.pythonOlder "3.6"; @@ -18,7 +18,9 @@ python3.pkgs.buildPythonApplication rec { hash = "sha256-WxBwHjh5tCXclQXqrHrpvZdcQU93RObteAfZyyVvKf0="; }; - propagatedBuildInputs = with python3.pkgs; [ + build-system = with python3.pkgs; [ setuptools ]; + + dependencies = with python3.pkgs; [ fastapi rangehttpserver soco diff --git a/pkgs/by-name/so/sonata/package.nix b/pkgs/by-name/so/sonata/package.nix index 46e2504fae87..0e2f2ca7d74c 100644 --- a/pkgs/by-name/so/sonata/package.nix +++ b/pkgs/by-name/so/sonata/package.nix @@ -25,7 +25,7 @@ in buildPythonApplication rec { pname = "sonata"; version = "1.7.1"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "multani"; @@ -50,13 +50,15 @@ buildPythonApplication rec { gdk-pixbuf ]; + build-system = [ setuptools ]; + # The optional tagpy dependency (for editing metadata) is not yet # included because it's difficult to build. pythonPath = [ dbus-python mpd2 pygobject3 - setuptools + setuptools # pkg_resources is imported during runtime ]; postPatch = '' diff --git a/pkgs/by-name/sq/sqlite-web/package.nix b/pkgs/by-name/sq/sqlite-web/package.nix index 6dea15352a99..b1128260999b 100644 --- a/pkgs/by-name/sq/sqlite-web/package.nix +++ b/pkgs/by-name/sq/sqlite-web/package.nix @@ -7,14 +7,16 @@ python3Packages.buildPythonApplication rec { pname = "sqlite-web"; version = "0.6.4"; - format = "setuptools"; + pyproject = true; src = fetchPypi { inherit pname version; hash = "sha256-5Bdd1C9M3HjvfDKdVvGSQ+/I0Iimvf1MZwPonRiqwqU="; }; - propagatedBuildInputs = with python3Packages; [ + build-system = with python3Packages; [ setuptools ]; + + dependencies = with python3Packages; [ flask peewee pygments @@ -23,6 +25,8 @@ python3Packages.buildPythonApplication rec { # no tests in repository doCheck = false; + pythonImportsCheck = [ "sqlite_web" ]; + meta = with lib; { description = "Web-based SQLite database browser"; mainProgram = "sqlite_web"; diff --git a/pkgs/by-name/sw/swaggerhole/package.nix b/pkgs/by-name/sw/swaggerhole/package.nix index d1311c61fd8f..a6d6868ff1c0 100644 --- a/pkgs/by-name/sw/swaggerhole/package.nix +++ b/pkgs/by-name/sw/swaggerhole/package.nix @@ -7,7 +7,7 @@ python3.pkgs.buildPythonApplication { pname = "swaggerhole"; version = "1.1"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "Liodeus"; @@ -17,7 +17,9 @@ python3.pkgs.buildPythonApplication { hash = "sha256-3HmIpn1A86PXZRL+SqMdr84O16hW1mCUWHKnOVolmx8="; }; - propagatedBuildInputs = with python3.pkgs; [ + build-system = with python3.pkgs; [ setuptools ]; + + dependencies = with python3.pkgs; [ requests whispers ]; diff --git a/pkgs/by-name/sw/swaglyrics/package.nix b/pkgs/by-name/sw/swaglyrics/package.nix index b2e567afc5cf..5c4e6031286b 100644 --- a/pkgs/by-name/sw/swaglyrics/package.nix +++ b/pkgs/by-name/sw/swaglyrics/package.nix @@ -8,7 +8,7 @@ python3.pkgs.buildPythonApplication { pname = "swaglyrics"; version = "unstable-2021-06-17"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "SwagLyrics"; @@ -19,10 +19,12 @@ python3.pkgs.buildPythonApplication { postPatch = '' substituteInPlace setup.py \ - --replace "==" ">=" + --replace-fail "==" ">=" ''; - propagatedBuildInputs = with python3.pkgs; [ + build-system = with python3.pkgs; [ setuptools ]; + + dependencies = with python3.pkgs; [ beautifulsoup4 colorama flask diff --git a/pkgs/by-name/sy/syncrclone/package.nix b/pkgs/by-name/sy/syncrclone/package.nix index d5fd5968f0e9..a23ae28d8e71 100644 --- a/pkgs/by-name/sy/syncrclone/package.nix +++ b/pkgs/by-name/sy/syncrclone/package.nix @@ -7,7 +7,7 @@ python3.pkgs.buildPythonApplication rec { pname = "syncrclone"; version = "unstable-2023-03-23"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "jwink3101"; @@ -16,6 +16,8 @@ python3.pkgs.buildPythonApplication rec { hash = "sha256-v81hPeu5qnMG6Sb95D88jy5x/GO781bf7efCYjbOaxs="; }; + build-system = with python3.pkgs; [ setuptools ]; + pythonImportsCheck = [ "syncrclone" ]; diff --git a/pkgs/by-name/sy/systemd-wait/package.nix b/pkgs/by-name/sy/systemd-wait/package.nix index d5e054ccb14b..a19db9b7acf5 100644 --- a/pkgs/by-name/sy/systemd-wait/package.nix +++ b/pkgs/by-name/sy/systemd-wait/package.nix @@ -7,7 +7,7 @@ python3Packages.buildPythonApplication { pname = "systemd-wait"; version = "0.1+2018-10-05"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "Stebalien"; @@ -16,7 +16,9 @@ python3Packages.buildPythonApplication { sha256 = "1l8rd0wzf3m7fk0g1c8wc0csdisdfac0filhixpgp0ck9ignayq5"; }; - propagatedBuildInputs = with python3Packages; [ + build-system = with python3Packages; [ setuptools ]; + + dependencies = with python3Packages; [ dbus-python pygobject3 ]; diff --git a/pkgs/by-name/ta/tauon/package.nix b/pkgs/by-name/ta/tauon/package.nix index b4c8ac5cbac5..d302aa1650b2 100644 --- a/pkgs/by-name/ta/tauon/package.nix +++ b/pkgs/by-name/ta/tauon/package.nix @@ -33,13 +33,15 @@ let lynxpresence = python3Packages.buildPythonPackage rec { pname = "lynxpresence"; version = "4.4.1"; - format = "setuptools"; + pyproject = true; src = fetchPypi { inherit pname version; hash = "sha256-y/KboyhEGs9RvyKayEIQu2+WaiQNOdsHDl1/pEoqEkQ="; }; + build-system = with python3Packages; [ setuptools ]; + doCheck = false; # tests require internet connection pythonImportsCheck = [ "lynxpresence" ]; }; diff --git a/pkgs/by-name/te/tebreak/package.nix b/pkgs/by-name/te/tebreak/package.nix index 40ad4527916e..1a8107b35310 100644 --- a/pkgs/by-name/te/tebreak/package.nix +++ b/pkgs/by-name/te/tebreak/package.nix @@ -12,7 +12,7 @@ python3.pkgs.buildPythonApplication rec { pname = "tebreak"; version = "1.1"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "adamewing"; @@ -21,8 +21,9 @@ python3.pkgs.buildPythonApplication rec { sha256 = "13mgh775d8hkl340923lfwwm4r5ps70girn8d6wgfxzwzxylz8iz"; }; - nativeBuildInputs = [ python3.pkgs.cython ]; - propagatedBuildInputs = with python3.pkgs; [ + build-system = with python3.pkgs; [ setuptools ]; + + dependencies = with python3.pkgs; [ pysam scipy bx-python @@ -47,6 +48,8 @@ python3.pkgs.buildPythonApplication rec { ${python3.interpreter} checktest.py ''; + pythonImportsCheck = [ "tebreak" ]; + meta = with lib; { description = "Find and characterise transposable element insertions"; mainProgram = "tebreak"; diff --git a/pkgs/by-name/te/terminator/package.nix b/pkgs/by-name/te/terminator/package.nix index 80ca31f6ccc6..22c84eb5d36e 100644 --- a/pkgs/by-name/te/terminator/package.nix +++ b/pkgs/by-name/te/terminator/package.nix @@ -17,7 +17,7 @@ python3.pkgs.buildPythonApplication rec { pname = "terminator"; version = "2.1.5"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "gnome-terminator"; @@ -42,7 +42,9 @@ python3.pkgs.buildPythonApplication rec { vte ]; - propagatedBuildInputs = with python3.pkgs; [ + build-system = with python3.pkgs; [ setuptools ]; + + dependencies = with python3.pkgs; [ configobj dbus-python pygobject3 @@ -56,6 +58,8 @@ python3.pkgs.buildPythonApplication rec { doCheck = false; + pythonImportsCheck = [ "terminatorlib" ]; + dontWrapGApps = true; # HACK: 'wrapPythonPrograms' will add things to the $PATH in the wrapper. This bleeds into the diff --git a/pkgs/by-name/te/termtosvg/package.nix b/pkgs/by-name/te/termtosvg/package.nix index 038168c53a56..5b30ecef9a4e 100644 --- a/pkgs/by-name/te/termtosvg/package.nix +++ b/pkgs/by-name/te/termtosvg/package.nix @@ -7,19 +7,23 @@ python3Packages.buildPythonApplication rec { pname = "termtosvg"; version = "1.1.0"; - format = "setuptools"; + pyproject = true; src = fetchPypi { inherit pname version; sha256 = "1vk5kn8w3zf2ymi76l8cpwmvvavkmh3b9lb18xw3x1vzbmhz2f7d"; }; - propagatedBuildInputs = with python3Packages; [ + build-system = with python3Packages; [ setuptools ]; + + dependencies = with python3Packages; [ lxml pyte wcwidth ]; + pythonImportsCheck = [ "termtosvg" ]; + meta = with lib; { homepage = "https://nbedos.github.io/termtosvg/"; description = "Record terminal sessions as SVG animations"; diff --git a/pkgs/by-name/te/terraform-compliance/package.nix b/pkgs/by-name/te/terraform-compliance/package.nix index 2edb96777f3b..0ab9c03badb4 100644 --- a/pkgs/by-name/te/terraform-compliance/package.nix +++ b/pkgs/by-name/te/terraform-compliance/package.nix @@ -7,7 +7,7 @@ python3.pkgs.buildPythonApplication rec { pname = "terraform-compliance"; version = "1.3.52"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "terraform-compliance"; @@ -16,14 +16,14 @@ python3.pkgs.buildPythonApplication rec { hash = "sha256-M6u1P1UxOrP9bNPjPB0V15DUj+Y/1dFIjf/GCnYoCwc="; }; - postPatch = '' - substituteInPlace setup.py \ - --replace "IPython==7.16.1" "IPython" \ - --replace "diskcache==5.1.0" "diskcache>=5.1.0" \ - --replace "radish-bdd==0.13.1" "radish-bdd" \ - ''; + build-system = with python3.pkgs; [ setuptools ]; - propagatedBuildInputs = with python3.pkgs; [ + pythonRelaxDeps = [ + "radish-bdd" + "IPython" + ]; + + dependencies = with python3.pkgs; [ diskcache emoji filetype diff --git a/pkgs/by-name/th/thonny/package.nix b/pkgs/by-name/th/thonny/package.nix index c99854b9adaa..0a8b0cc8b0d9 100644 --- a/pkgs/by-name/th/thonny/package.nix +++ b/pkgs/by-name/th/thonny/package.nix @@ -8,12 +8,10 @@ desktopToDarwinBundle, }: -with python3.pkgs; - -buildPythonApplication rec { +python3.pkgs.buildPythonApplication rec { pname = "thonny"; version = "4.1.7"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "thonny"; @@ -40,6 +38,8 @@ buildPythonApplication rec { }) ]; + build-system = with python3.pkgs; [ setuptools ]; + dependencies = with python3.pkgs; ( @@ -71,6 +71,8 @@ buildPythonApplication rec { # Tests need a DISPLAY doCheck = false; + pythonImportsCheck = [ "thonny" ]; + meta = { description = "Python IDE for beginners"; longDescription = '' diff --git a/pkgs/by-name/ti/timetagger_cli/package.nix b/pkgs/by-name/ti/timetagger_cli/package.nix index 55cd89448477..a3edce502af7 100644 --- a/pkgs/by-name/ti/timetagger_cli/package.nix +++ b/pkgs/by-name/ti/timetagger_cli/package.nix @@ -7,7 +7,7 @@ python3.pkgs.buildPythonApplication rec { pname = "timetagger_cli"; version = "25.5.1"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "almarklein"; @@ -16,14 +16,19 @@ python3.pkgs.buildPythonApplication rec { hash = "sha256-UklsHcVyCpWDHOxu+oB8RvwY+laEBFnDyjejS/GzgHE="; }; - propagatedBuildInputs = with python3.pkgs; [ + build-system = with python3.pkgs; [ setuptools ]; + + dependencies = with python3.pkgs; [ requests toml + dateparser ]; # Project has no tests doCheck = false; + pythonImportsCheck = [ "timetagger_cli" ]; + meta = with lib; { description = "Track your time from the command-line"; homepage = "https://github.com/almarklein/timetagger_cli"; diff --git a/pkgs/by-name/ti/tinyprog/package.nix b/pkgs/by-name/ti/tinyprog/package.nix index a57d25473b6f..a0d7cf880a40 100644 --- a/pkgs/by-name/ti/tinyprog/package.nix +++ b/pkgs/by-name/ti/tinyprog/package.nix @@ -9,7 +9,7 @@ buildPythonApplication rec { pname = "tinyprog"; # `python setup.py --version` from repo checkout version = "1.0.24.dev114+g${lib.substring 0 7 src.rev}"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "tinyfpga"; @@ -20,19 +20,22 @@ buildPythonApplication rec { sourceRoot = "${src.name}/programmer"; - propagatedBuildInputs = [ + build-system = with python3Packages; [ + setuptools + setuptools-scm + ]; + + dependencies = [ pyserial jsonmerge intelhex tqdm six packaging - setuptools + setuptools # pkg_resources is imported during runtime pyusb ]; - nativeBuildInputs = [ setuptools-scm ]; - meta = with lib; { homepage = "https://github.com/tinyfpga/TinyFPGA-Bootloader/tree/master/programmer"; description = "Programmer for FPGA boards using the TinyFPGA USB Bootloader"; diff --git a/pkgs/by-name/to/tockloader/package.nix b/pkgs/by-name/to/tockloader/package.nix index 5f8f6f710bae..32b6181c6f57 100644 --- a/pkgs/by-name/to/tockloader/package.nix +++ b/pkgs/by-name/to/tockloader/package.nix @@ -7,14 +7,16 @@ python3.pkgs.buildPythonApplication rec { pname = "tockloader"; version = "1.9.0"; - format = "setuptools"; + pyproject = true; src = fetchPypi { inherit pname version; hash = "sha256-7W55jugVtamFUL8N3dD1LFLJP2UDQb74V6o96rd/tEg="; }; - propagatedBuildInputs = with python3.pkgs; [ + build-system = with python3.pkgs; [ setuptools ]; + + dependencies = with python3.pkgs; [ argcomplete colorama crcmod @@ -32,6 +34,8 @@ python3.pkgs.buildPythonApplication rec { runHook postCheck ''; + pythonImportsCheck = [ "tockloader" ]; + meta = { description = "Tool for programming Tock onto hardware boards"; mainProgram = "tockloader"; diff --git a/pkgs/by-name/tr/trash-cli/package.nix b/pkgs/by-name/tr/trash-cli/package.nix index b86a434cb10c..b645d5a3ec78 100644 --- a/pkgs/by-name/tr/trash-cli/package.nix +++ b/pkgs/by-name/tr/trash-cli/package.nix @@ -9,7 +9,7 @@ python3Packages.buildPythonApplication rec { pname = "trash-cli"; version = "0.24.5.26"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "andreafrancia"; @@ -18,14 +18,18 @@ python3Packages.buildPythonApplication rec { hash = "sha256-ltuMnxtG4jTTSZd6ZHWl8wI0oQMMFqW0HAPetZMfGtc="; }; - propagatedBuildInputs = with python3Packages; [ - psutil - six + nativeBuildInputs = [ + installShellFiles ]; - nativeBuildInputs = with python3Packages; [ - installShellFiles - shtab + build-system = with python3Packages; [ + setuptools + shtab # for shell completions + ]; + + dependencies = with python3Packages; [ + psutil + six ]; nativeCheckInputs = with python3Packages; [ @@ -58,6 +62,9 @@ python3Packages.buildPythonApplication rec { runHook postInstallCheck ''; + + pythonImportsCheck = [ "trashcli" ]; + postInstall = '' for bin in trash-empty trash-list trash-restore trash-put trash; do installShellCompletion --cmd "$bin" \ diff --git a/pkgs/by-name/tu/tuir/package.nix b/pkgs/by-name/tu/tuir/package.nix index 7570298cb6c8..638d639a9e38 100644 --- a/pkgs/by-name/tu/tuir/package.nix +++ b/pkgs/by-name/tu/tuir/package.nix @@ -8,7 +8,7 @@ with python3Packages; buildPythonApplication rec { pname = "tuir"; version = "1.31.0"; - format = "setuptools"; + pyproject = true; src = fetchFromGitLab { owner = "Chocimier"; @@ -17,24 +17,9 @@ buildPythonApplication rec { hash = "sha256-VYBtD3Ex6+iIRNvX6jF0b0iPvno41/58xCRydiyssvk="; }; - # Tests try to access network - doCheck = false; + build-system = with python3Packages; [ setuptools ]; - checkPhase = '' - py.test - ''; - - nativeCheckInputs = [ - coverage - coveralls - docopt - mock - pylint - pytest - vcrpy - ]; - - propagatedBuildInputs = [ + dependencies = [ beautifulsoup4 decorator kitchen @@ -43,6 +28,27 @@ buildPythonApplication rec { six ]; + nativeCheckInputs = [ + coverage + coveralls + docopt + mock + pylint + pytestCheckHook + vcrpy + ]; + + __darwinAllowLocalNetworking = true; # for oauth tests + + disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ + # AssertionError: assert ['pbcopy', 'w'] == ['xclip', '-s..., 'clipboard'] + "test_copy_nix" + # AttributeError: Can't get local object 'Terminal.open_browser.open_browser..open_url_silent' + "test_terminal_open_browser_display" + ]; + + pythonImportsCheck = [ "tuir" ]; + meta = with lib; { description = "Browse Reddit from your Terminal (fork of rtv)"; mainProgram = "tuir"; diff --git a/pkgs/by-name/tv/tvnamer/package.nix b/pkgs/by-name/tv/tvnamer/package.nix index 1141a473d643..c5e83e3ab788 100644 --- a/pkgs/by-name/tv/tvnamer/package.nix +++ b/pkgs/by-name/tv/tvnamer/package.nix @@ -34,18 +34,22 @@ in pypkgs.buildPythonApplication rec { pname = "tvnamer"; version = "3.0.4"; - format = "setuptools"; + pyproject = true; src = fetchPypi { inherit pname version; sha256 = "dc2ea8188df6ac56439343630466b874c57756dd0b2538dd8e7905048f425f04"; }; - propagatedBuildInputs = with pypkgs; [ tvdb-api ]; + build-system = with pypkgs; [ setuptools ]; + + dependencies = with pypkgs; [ tvdb-api ]; # no tests from pypi doCheck = false; + pythonImportsCheck = [ "tvnamer" ]; + meta = with lib; { description = "Automatic TV episode file renamer, uses data from thetvdb.com via tvdb_api"; homepage = "https://github.com/dbr/tvnamer"; diff --git a/pkgs/by-name/tx/txt2tags/package.nix b/pkgs/by-name/tx/txt2tags/package.nix index 7f8a028cbd7d..59213b1913ea 100644 --- a/pkgs/by-name/tx/txt2tags/package.nix +++ b/pkgs/by-name/tx/txt2tags/package.nix @@ -8,7 +8,7 @@ python3.pkgs.buildPythonApplication rec { pname = "txt2tags"; version = "3.9"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "txt2tags"; @@ -17,17 +17,21 @@ python3.pkgs.buildPythonApplication rec { hash = "sha256-PwPGJJg79ny13gEb1WmgIVHcXQppI/j5mhIyOZjR19k="; }; + build-system = with python3.pkgs; [ setuptools ]; + postPatch = '' substituteInPlace test/lib.py \ - --replace 'TXT2TAGS = os.path.join(TEST_DIR, "..", "txt2tags.py")' \ - 'TXT2TAGS = "${placeholder "out"}/bin/txt2tags"' \ - --replace "[PYTHON] + TXT2TAGS" "TXT2TAGS" + --replace-fail 'TXT2TAGS = os.path.join(TEST_DIR, "..", "txt2tags.py")' \ + 'TXT2TAGS = "${placeholder "out"}/bin/txt2tags"' \ + --replace-fail "[PYTHON] + TXT2TAGS" "TXT2TAGS" ''; checkPhase = '' ${python3.interpreter} test/run.py ''; + pythonImportsCheck = [ "txt2tags" ]; + meta = { changelog = "https://github.com/txt2tags/txt2tags/blob/${src.rev}/CHANGELOG.md"; description = "Convert between markup languages";