From 85a0954aa8c56734216d5401e44340ce22bb5c2e Mon Sep 17 00:00:00 2001 From: TomaSajt <62384384+TomaSajt@users.noreply.github.com> Date: Wed, 9 Jul 2025 18:10:51 +0200 Subject: [PATCH] pkgs/by-name/{i,j,k,l}*: migrate to format = "pyproject" --- pkgs/by-name/i3/i3a/package.nix | 11 +++++-- pkgs/by-name/i3/i3minator/package.nix | 11 +++++-- pkgs/by-name/ib/ibus-theme-tools/package.nix | 8 +++-- pkgs/by-name/im/imdshift/package.nix | 8 +++-- pkgs/by-name/im/imgp/package.nix | 6 ++-- pkgs/by-name/in/inkcut/package.nix | 9 +++--- pkgs/by-name/in/inql/package.nix | 11 ++++--- pkgs/by-name/in/invoice2data/package.nix | 9 +++--- pkgs/by-name/io/iotop/package.nix | 6 +++- pkgs/by-name/ip/ipgrep/package.nix | 14 +++++---- pkgs/by-name/is/isolyzer/package.nix | 9 ++++-- pkgs/by-name/is/isrcsubmit/package.nix | 8 ++++- pkgs/by-name/je/jelly/package.nix | 6 ++-- pkgs/by-name/jn/jnitrace/package.nix | 10 +++++-- pkgs/by-name/jo/joystickwake/package.nix | 8 +++-- pkgs/by-name/ka/kanjidraw/package.nix | 11 ++++--- pkgs/by-name/ka/kas/package.nix | 10 +++++-- pkgs/by-name/ka/kazam/package.nix | 13 +++++++-- pkgs/by-name/kb/kb/package.nix | 12 ++++++-- .../ke/kernel-hardening-checker/package.nix | 6 +++- pkgs/by-name/ke/keymapviz/package.nix | 8 +++-- pkgs/by-name/kh/khard/package.nix | 9 +++--- pkgs/by-name/ko/konsave/package.nix | 16 +++++----- pkgs/by-name/kr/krakenx/package.nix | 8 +++-- pkgs/by-name/la/labelImg/package.nix | 12 ++++++-- pkgs/by-name/le/legendary-heroic/package.nix | 10 ++++--- pkgs/by-name/le/legit/package.nix | 16 +++++++--- pkgs/by-name/le/lerpn/package.nix | 8 +++-- pkgs/by-name/le/lesscpy/package.nix | 12 ++++---- pkgs/by-name/le/lesspass-cli/package.nix | 29 +++++++++++-------- pkgs/by-name/li/lieer/package.nix | 9 ++++-- pkgs/by-name/li/lil-pwny/package.nix | 4 ++- pkgs/by-name/ln/lndmanage/package.nix | 17 +++++++---- .../by-name/lo/log4shell-detector/package.nix | 8 +++-- pkgs/by-name/lo/loxodo/package.nix | 8 +++-- pkgs/by-name/lx/lxd-image-server/package.nix | 10 +++++-- 36 files changed, 257 insertions(+), 113 deletions(-) diff --git a/pkgs/by-name/i3/i3a/package.nix b/pkgs/by-name/i3/i3a/package.nix index 0ad7b8608219..525b990f0e8f 100644 --- a/pkgs/by-name/i3/i3a/package.nix +++ b/pkgs/by-name/i3/i3a/package.nix @@ -7,19 +7,24 @@ python3Packages.buildPythonApplication rec { pname = "i3a"; version = "2.1.1"; - format = "setuptools"; + format = "pyproject"; src = fetchPypi { inherit pname version; hash = "sha256-b1bB7Gto4aL1rbQXIelBVhutjIvZY+K+Y66BGN7OcCs="; }; - nativeBuildInputs = [ python3Packages.setuptools-scm ]; + build-system = [ + python3Packages.setuptools + python3Packages.setuptools-scm + ]; - propagatedBuildInputs = [ python3Packages.i3ipc ]; + dependencies = [ python3Packages.i3ipc ]; doCheck = false; + pythonImportsCheck = [ "i3a" ]; + meta = with lib; { changelog = "https://git.goral.net.pl/i3a.git/log/"; description = "Set of scripts used for automation of i3 and sway window manager layouts"; diff --git a/pkgs/by-name/i3/i3minator/package.nix b/pkgs/by-name/i3/i3minator/package.nix index 2d90a8c5d361..77b664cbf005 100644 --- a/pkgs/by-name/i3/i3minator/package.nix +++ b/pkgs/by-name/i3/i3minator/package.nix @@ -8,7 +8,7 @@ python3Packages.buildPythonApplication rec { pname = "i3minator"; version = "0.0.4"; - format = "setuptools"; + format = "pyproject"; src = fetchFromGitHub { owner = "carlesso"; @@ -19,7 +19,12 @@ python3Packages.buildPythonApplication rec { LC_ALL = "en_US.UTF-8"; buildInputs = [ glibcLocales ]; - propagatedBuildInputs = [ + + build-system = [ + python3Packages.setuptools + ]; + + dependencies = [ python3Packages.pyyaml python3Packages.i3-py ]; @@ -27,6 +32,8 @@ python3Packages.buildPythonApplication rec { # No tests doCheck = false; + pythonImportsCheck = [ "i3minator" ]; + meta = with lib; { description = "i3 project manager similar to tmuxinator"; mainProgram = "i3minator"; diff --git a/pkgs/by-name/ib/ibus-theme-tools/package.nix b/pkgs/by-name/ib/ibus-theme-tools/package.nix index cf2f06ab9c78..10ad9ee61834 100644 --- a/pkgs/by-name/ib/ibus-theme-tools/package.nix +++ b/pkgs/by-name/ib/ibus-theme-tools/package.nix @@ -8,7 +8,7 @@ python3Packages.buildPythonApplication rec { pname = "ibus-theme-tools"; version = "4.2.0"; - format = "setuptools"; + format = "pyproject"; src = fetchFromGitHub { owner = "openSUSE"; @@ -19,7 +19,11 @@ python3Packages.buildPythonApplication rec { buildInputs = [ gettext ]; - propagatedBuildInputs = with python3Packages; [ + build-system = with python3Packages; [ + setuptools + ]; + + dependencies = with python3Packages; [ tinycss2 pygobject3 ]; diff --git a/pkgs/by-name/im/imdshift/package.nix b/pkgs/by-name/im/imdshift/package.nix index 457e6294f3ef..5f4caa4c309d 100644 --- a/pkgs/by-name/im/imdshift/package.nix +++ b/pkgs/by-name/im/imdshift/package.nix @@ -7,7 +7,7 @@ python3.pkgs.buildPythonApplication rec { pname = "imdshift"; version = "1.0.0"; - format = "setuptools"; + format = "pyproject"; src = fetchFromGitHub { owner = "ayushpriya10"; @@ -16,7 +16,11 @@ python3.pkgs.buildPythonApplication rec { hash = "sha256-Uoa0uNOhCkT622Yy8GEg8jz9k5zmtXwGmvdb3MVTLX8="; }; - propagatedBuildInputs = with python3.pkgs; [ + build-system = with python3.pkgs; [ + setuptools + ]; + + dependencies = with python3.pkgs; [ boto3 click prettytable diff --git a/pkgs/by-name/im/imgp/package.nix b/pkgs/by-name/im/imgp/package.nix index 57d32eab2230..19dd6a232615 100644 --- a/pkgs/by-name/im/imgp/package.nix +++ b/pkgs/by-name/im/imgp/package.nix @@ -7,7 +7,7 @@ python3Packages.buildPythonApplication rec { pname = "imgp"; version = "2.9"; - format = "setuptools"; + format = "pyproject"; disabled = python3Packages.pythonOlder "3.8"; src = fetchFromGitHub { @@ -17,7 +17,9 @@ python3Packages.buildPythonApplication rec { hash = "sha256-yQ2BzOBn6Bl9ieZkREKsj1zLnoPcf0hZhZ90Za5kiKA="; }; - propagatedBuildInputs = [ python3Packages.pillow ]; + build-system = [ python3Packages.setuptools ]; + + dependencies = [ python3Packages.pillow ]; installFlags = [ "DESTDIR=$(out)" diff --git a/pkgs/by-name/in/inkcut/package.nix b/pkgs/by-name/in/inkcut/package.nix index 6c4dee376f72..4510cbe1ee42 100644 --- a/pkgs/by-name/in/inkcut/package.nix +++ b/pkgs/by-name/in/inkcut/package.nix @@ -10,7 +10,7 @@ python3.pkgs.buildPythonApplication rec { pname = "inkcut"; version = "2.1.6"; - format = "setuptools"; + format = "pyproject"; src = fetchFromGitHub { owner = "inkcut"; @@ -21,12 +21,14 @@ python3.pkgs.buildPythonApplication rec { postPatch = '' substituteInPlace inkcut/device/transports/printer/plugin.py \ - --replace ", 'lpr', " ", '${cups}/bin/lpr', " + --replace-fail ", 'lpr', " ", '${cups}/bin/lpr', " ''; nativeBuildInputs = [ qt5.wrapQtAppsHook ]; - propagatedBuildInputs = with python3.pkgs; [ + build-system = with python3.pkgs; [ setuptools ]; + + dependencies = with python3.pkgs; [ enamlx twisted lxml @@ -36,7 +38,6 @@ python3.pkgs.buildPythonApplication rec { pycups qtconsole pyqt5 - setuptools ]; # QtApplication.instance() does not work during tests? diff --git a/pkgs/by-name/in/inql/package.nix b/pkgs/by-name/in/inql/package.nix index 4d4013dfbad5..292c38996b8f 100644 --- a/pkgs/by-name/in/inql/package.nix +++ b/pkgs/by-name/in/inql/package.nix @@ -7,8 +7,7 @@ python3.pkgs.buildPythonApplication rec { pname = "inql"; version = "4.0.6"; - format = "setuptools"; - + format = "pyproject"; src = fetchFromGitHub { owner = "doyensec"; repo = "inql"; @@ -19,10 +18,14 @@ python3.pkgs.buildPythonApplication rec { postPatch = '' # To set the version a full git checkout would be needed substituteInPlace setup.py \ - --replace "version=version()," "version='${version}'," + --replace-fail "version=version()," "version='${version}'," ''; - propagatedBuildInputs = with python3.pkgs; [ + build-system = with python3.pkgs; [ + setuptools + ]; + + dependencies = with python3.pkgs; [ stickytape ]; diff --git a/pkgs/by-name/in/invoice2data/package.nix b/pkgs/by-name/in/invoice2data/package.nix index 5463d0abb1d7..cd86694a7fa1 100644 --- a/pkgs/by-name/in/invoice2data/package.nix +++ b/pkgs/by-name/in/invoice2data/package.nix @@ -12,7 +12,7 @@ python3.pkgs.buildPythonApplication rec { pname = "invoice2data"; version = "0.4.4"; - format = "setuptools"; + format = "pyproject"; src = fetchFromGitHub { owner = "invoice-x"; @@ -30,16 +30,17 @@ python3.pkgs.buildPythonApplication rec { }) ]; - nativeBuildInputs = with python3.pkgs; [ + build-system = with python3.pkgs; [ + setuptools setuptools-git ]; - propagatedBuildInputs = with python3.pkgs; [ + dependencies = with python3.pkgs; [ dateparser pdfminer-six pillow pyyaml - setuptools + setuptools # pkg_resources is imported during runtime ]; makeWrapperArgs = [ diff --git a/pkgs/by-name/io/iotop/package.nix b/pkgs/by-name/io/iotop/package.nix index d147f6df7f3a..e7bc757e1131 100644 --- a/pkgs/by-name/io/iotop/package.nix +++ b/pkgs/by-name/io/iotop/package.nix @@ -8,7 +8,7 @@ python3Packages.buildPythonApplication rec { pname = "iotop"; version = "0.6"; - format = "setuptools"; + format = "pyproject"; src = fetchurl { url = "http://guichaz.free.fr/iotop/files/iotop-${version}.tar.bz2"; @@ -22,8 +22,12 @@ python3Packages.buildPythonApplication rec { }) ]; + build-system = [ python3Packages.setuptools ]; + doCheck = false; + pythonImportsCheck = [ "iotop" ]; + meta = with lib; { description = "Tool to find out the processes doing the most IO"; homepage = "http://guichaz.free.fr/iotop"; diff --git a/pkgs/by-name/ip/ipgrep/package.nix b/pkgs/by-name/ip/ipgrep/package.nix index ede71394e81c..048f9de40d72 100644 --- a/pkgs/by-name/ip/ipgrep/package.nix +++ b/pkgs/by-name/ip/ipgrep/package.nix @@ -5,11 +5,9 @@ }: python3Packages.buildPythonApplication rec { - version = "1.0.1"; - format = "setuptools"; pname = "ipgrep"; - - disabled = python3Packages.isPy27; + version = "1.0.1"; + format = "pyproject"; src = fetchFromGitHub { owner = "jedisct1"; @@ -21,10 +19,14 @@ python3Packages.buildPythonApplication rec { patchPhase = '' mkdir -p ipgrep substituteInPlace setup.py \ - --replace "'scripts': []" "'scripts': { 'ipgrep.py' }" + --replace-fail "'scripts': []" "'scripts': { 'ipgrep.py' }" ''; - propagatedBuildInputs = with python3Packages; [ + build-system = with python3Packages; [ + setuptools + ]; + + dependencies = with python3Packages; [ pycares urllib3 requests diff --git a/pkgs/by-name/is/isolyzer/package.nix b/pkgs/by-name/is/isolyzer/package.nix index e5413bd2dc80..e9f956c09e3b 100644 --- a/pkgs/by-name/is/isolyzer/package.nix +++ b/pkgs/by-name/is/isolyzer/package.nix @@ -7,7 +7,7 @@ python3.pkgs.buildPythonApplication rec { pname = "isolyzer"; version = "1.4.0"; - format = "setuptools"; + format = "pyproject"; src = fetchFromGitHub { owner = "KBNLresearch"; @@ -16,11 +16,16 @@ python3.pkgs.buildPythonApplication rec { sha256 = "sha256-NqkjnEwpaoyguG5GLscKS9UQGtF9N4jUL5JhrMtKCFE="; }; - propagatedBuildInputs = with python3.pkgs; [ + build-system = with python3.pkgs; [ setuptools + ]; + + dependencies = with python3.pkgs; [ six ]; + pythonImportsCheck = [ "isolyzer" ]; + meta = with lib; { homepage = "https://github.com/KBNLresearch/isolyzer"; description = "Verify size of ISO 9660 image against Volume Descriptor fields"; diff --git a/pkgs/by-name/is/isrcsubmit/package.nix b/pkgs/by-name/is/isrcsubmit/package.nix index 1d3edf20e4e3..7baee361c3c8 100644 --- a/pkgs/by-name/is/isrcsubmit/package.nix +++ b/pkgs/by-name/is/isrcsubmit/package.nix @@ -9,7 +9,7 @@ python3Packages.buildPythonApplication { pname = "isrcsubmit"; version = "2.1.0-unstable-2023-08-10"; - format = "setuptools"; + format = "pyproject"; src = fetchFromGitHub { owner = "JonnyJD"; @@ -25,6 +25,10 @@ python3Packages.buildPythonApplication { substituteInPlace isrcsubmit.py --replace-fail "main(argv):" "main(argv=sys.argv):" ''; + build-system = with python3Packages; [ + setuptools + ]; + dependencies = with python3Packages; [ @@ -35,6 +39,8 @@ python3Packages.buildPythonApplication { keyring ]; + pythonImportsCheck = [ "isrcsubmit" ]; + passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; }; diff --git a/pkgs/by-name/je/jelly/package.nix b/pkgs/by-name/je/jelly/package.nix index 0f71bbb3d5b0..7d0c111a9be0 100644 --- a/pkgs/by-name/je/jelly/package.nix +++ b/pkgs/by-name/je/jelly/package.nix @@ -7,7 +7,7 @@ python3Packages.buildPythonApplication { pname = "jelly"; version = "0.1.31"; - format = "setuptools"; + format = "pyproject"; src = fetchFromGitHub { owner = "DennisMitchell"; @@ -16,7 +16,9 @@ python3Packages.buildPythonApplication { sha256 = "1rpclqagvigp5qhvgnjavvy463f1drshnc1mfxm6z7ygzs0l0yz6"; }; - propagatedBuildInputs = [ python3Packages.sympy ]; + build-system = [ python3Packages.setuptools ]; + + dependencies = [ python3Packages.sympy ]; # checks are disabled because jelly has no tests, and the default is to run # the output binary with no arguments, which exits with status 1 and causes diff --git a/pkgs/by-name/jn/jnitrace/package.nix b/pkgs/by-name/jn/jnitrace/package.nix index b6ad48bbda79..5fd297c72485 100644 --- a/pkgs/by-name/jn/jnitrace/package.nix +++ b/pkgs/by-name/jn/jnitrace/package.nix @@ -7,20 +7,26 @@ python3Packages.buildPythonApplication rec { pname = "jnitrace"; version = "3.3.1"; - format = "setuptools"; + format = "pyproject"; src = fetchPypi { inherit pname version; hash = "sha256-b8azmlYbNEFSUN3MjqpUqNlBTKT0JTLpCVBkk9Rx7+0="; }; + build-system = with python3Packages; [ + setuptools + ]; + dependencies = with python3Packages; [ frida-python colorama hexdump - setuptools + setuptools # pkg_resources is imported during runtime ]; + pythonImportsCheck = [ "jnitrace" ]; + meta = { description = "Frida based tool that traces usage of the JNI API in Android apps"; homepage = "https://github.com/chame1eon/jnitrace"; diff --git a/pkgs/by-name/jo/joystickwake/package.nix b/pkgs/by-name/jo/joystickwake/package.nix index 16aa51877aee..470902310baa 100644 --- a/pkgs/by-name/jo/joystickwake/package.nix +++ b/pkgs/by-name/jo/joystickwake/package.nix @@ -6,7 +6,7 @@ python3.pkgs.buildPythonApplication rec { pname = "joystickwake"; version = "0.4.2"; - format = "setuptools"; + format = "pyproject"; src = fetchFromGitHub { owner = "foresto"; @@ -15,7 +15,11 @@ python3.pkgs.buildPythonApplication rec { sha256 = "sha256-vSvIpbcDIbRyitVjx3wNSxt5vTIZ9/NPWokOJt0p6oQ="; }; - propagatedBuildInputs = with python3.pkgs; [ + build-system = with python3.pkgs; [ + setuptools + ]; + + dependencies = with python3.pkgs; [ dbus-next pyudev xlib diff --git a/pkgs/by-name/ka/kanjidraw/package.nix b/pkgs/by-name/ka/kanjidraw/package.nix index 584506e6a19e..367e043e468e 100644 --- a/pkgs/by-name/ka/kanjidraw/package.nix +++ b/pkgs/by-name/ka/kanjidraw/package.nix @@ -2,13 +2,12 @@ lib, fetchFromGitHub, python3, - bash, }: python3.pkgs.buildPythonApplication rec { pname = "kanjidraw"; version = "0.2.3"; - format = "setuptools"; + format = "pyproject"; src = fetchFromGitHub { owner = "obfusk"; @@ -17,16 +16,20 @@ python3.pkgs.buildPythonApplication rec { sha256 = "03ag8vkbf85qww857ii8hcnn8bh5qa7rsmhka0v9vfxk272ifbyq"; }; - propagatedBuildInputs = with python3.pkgs; [ tkinter ]; + build-system = with python3.pkgs; [ setuptools ]; + + dependencies = with python3.pkgs; [ tkinter ]; postPatch = '' - substituteInPlace Makefile --replace /bin/bash ${bash}/bin/bash + substituteInPlace Makefile --replace-fail /bin/bash bash ''; checkPhase = '' make test ''; + pythonImportsCheck = [ "kanjidraw" ]; + meta = with lib; { description = "Handwritten kanji recognition"; mainProgram = "kanjidraw"; diff --git a/pkgs/by-name/ka/kas/package.nix b/pkgs/by-name/ka/kas/package.nix index 8deec4a0ff8b..cd05d888958f 100644 --- a/pkgs/by-name/ka/kas/package.nix +++ b/pkgs/by-name/ka/kas/package.nix @@ -9,7 +9,7 @@ python3.pkgs.buildPythonApplication rec { pname = "kas"; version = "4.7"; - format = "setuptools"; + format = "pyproject"; src = fetchFromGitHub { owner = "siemens"; @@ -20,8 +20,12 @@ python3.pkgs.buildPythonApplication rec { patches = [ ./pass-terminfo-env.patch ]; - propagatedBuildInputs = with python3.pkgs; [ + build-system = with python3.pkgs; [ setuptools + ]; + + dependencies = with python3.pkgs; [ + setuptools # pkg_resources is imported during runtime kconfiglib jsonschema distro @@ -36,6 +40,8 @@ python3.pkgs.buildPythonApplication rec { command = "kas --version"; }; + pythonImportsCheck = [ "kas" ]; + meta = with lib; { homepage = "https://github.com/siemens/kas"; description = "Setup tool for bitbake based projects"; diff --git a/pkgs/by-name/ka/kazam/package.nix b/pkgs/by-name/ka/kazam/package.nix index 194c39890cfa..4936d8305a91 100644 --- a/pkgs/by-name/ka/kazam/package.nix +++ b/pkgs/by-name/ka/kazam/package.nix @@ -19,7 +19,7 @@ python3Packages.buildPythonApplication { pname = "kazam"; version = "unstable-2021-06-22"; - format = "setuptools"; + format = "pyproject"; src = fetchFromGitHub { owner = "niknah"; @@ -30,10 +30,10 @@ python3Packages.buildPythonApplication { nativeBuildInputs = [ gobject-introspection - python3Packages.distutils-extra intltool wrapGAppsHook3 ]; + buildInputs = [ gst_all_1.gstreamer gst_all_1.gst-plugins-base @@ -45,7 +45,12 @@ python3Packages.buildPythonApplication { libgudev ]; - propagatedBuildInputs = with python3Packages; [ + build-system = with python3Packages; [ + setuptools + distutils-extra + ]; + + dependencies = with python3Packages; [ pygobject3 pyxdg pycairo @@ -64,6 +69,8 @@ python3Packages.buildPythonApplication { # no tests doCheck = false; + pythonImportsCheck = [ "kazam" ]; + meta = with lib; { description = "Screencasting program created with design in mind"; homepage = "https://github.com/niknah/kazam"; diff --git a/pkgs/by-name/kb/kb/package.nix b/pkgs/by-name/kb/kb/package.nix index 58c502af23a2..c5689c5c536a 100644 --- a/pkgs/by-name/kb/kb/package.nix +++ b/pkgs/by-name/kb/kb/package.nix @@ -7,7 +7,7 @@ python3.pkgs.buildPythonApplication rec { pname = "kb"; version = "0.1.7"; - format = "setuptools"; + format = "pyproject"; src = fetchFromGitHub { owner = "gnebbia"; @@ -20,12 +20,16 @@ python3.pkgs.buildPythonApplication rec { # `attr` module is not available. And `attrs` defines another `attr` package # that shadows it. substituteInPlace setup.py \ - --replace \ + --replace-fail \ "install_requires=[\"colored\",\"toml\",\"attr\",\"attrs\",\"gitpython\"]," \ "install_requires=[\"colored\",\"toml\",\"attrs\",\"gitpython\"]," ''; - propagatedBuildInputs = with python3.pkgs; [ + build-system = with python3.pkgs; [ + setuptools + ]; + + dependencies = with python3.pkgs; [ colored toml attrs @@ -37,6 +41,8 @@ python3.pkgs.buildPythonApplication rec { pytestCheckHook ]; + pythonImportsCheck = [ "kb" ]; + meta = { description = "Minimalist command line knowledge base manager"; longDescription = '' diff --git a/pkgs/by-name/ke/kernel-hardening-checker/package.nix b/pkgs/by-name/ke/kernel-hardening-checker/package.nix index 51dde18e0d1e..3a740ab73db7 100644 --- a/pkgs/by-name/ke/kernel-hardening-checker/package.nix +++ b/pkgs/by-name/ke/kernel-hardening-checker/package.nix @@ -7,7 +7,7 @@ python3Packages.buildPythonApplication rec { pname = "kernel-hardening-checker"; version = "0.6.10"; - format = "setuptools"; + format = "pyproject"; src = fetchFromGitHub { owner = "a13xp0p0v"; @@ -16,6 +16,10 @@ python3Packages.buildPythonApplication rec { hash = "sha256-gxDaOb14jFezxe/qHZF3e52o7obVL0WMIKxwIj3j5QY="; }; + build-system = with python3Packages; [ setuptools ]; + + pythonImportsCheck = [ "kernel_hardening_checker" ]; + meta = with lib; { description = "Tool for checking the security hardening options of the Linux kernel"; homepage = "https://github.com/a13xp0p0v/kernel-hardening-checker"; diff --git a/pkgs/by-name/ke/keymapviz/package.nix b/pkgs/by-name/ke/keymapviz/package.nix index 4bd76dc78669..e0403aaf1e55 100644 --- a/pkgs/by-name/ke/keymapviz/package.nix +++ b/pkgs/by-name/ke/keymapviz/package.nix @@ -7,7 +7,7 @@ python3.pkgs.buildPythonApplication rec { pname = "keymapviz"; version = "1.14.1"; - format = "setuptools"; + format = "pyproject"; src = fetchFromGitHub { owner = "yskoht"; @@ -16,7 +16,11 @@ python3.pkgs.buildPythonApplication rec { sha256 = "sha256-eCvwgco22uPEDDsT8FfTRon1xCGy5p1PBp0pDfNprMs="; }; - propagatedBuildInputs = with python3.pkgs; [ regex ]; + build-system = with python3.pkgs; [ setuptools ]; + + dependencies = with python3.pkgs; [ regex ]; + + pythonImportsCheck = [ "keymapviz" ]; meta = with lib; { description = "Qmk keymap.c visualizer"; diff --git a/pkgs/by-name/kh/khard/package.nix b/pkgs/by-name/kh/khard/package.nix index c726711b668a..3853b99e1a04 100644 --- a/pkgs/by-name/kh/khard/package.nix +++ b/pkgs/by-name/kh/khard/package.nix @@ -7,16 +7,17 @@ }: python3.pkgs.buildPythonApplication rec { - version = "0.19.1"; - format = "setuptools"; pname = "khard"; + version = "0.19.1"; + format = "pyproject"; src = fetchPypi { inherit pname version; hash = "sha256-WfMKDaPD2j6wT02+GO5HY5E7aF2Z7IQY/VdKiMSRxJA="; }; - nativeBuildInputs = with python3.pkgs; [ + build-system = with python3.pkgs; [ + setuptools setuptools-scm sphinxHook sphinx-autoapi @@ -25,7 +26,7 @@ python3.pkgs.buildPythonApplication rec { sphinxBuilders = [ "man" ]; - propagatedBuildInputs = with python3.pkgs; [ + dependencies = with python3.pkgs; [ atomicwrites configobj ruamel-yaml diff --git a/pkgs/by-name/ko/konsave/package.nix b/pkgs/by-name/ko/konsave/package.nix index 9b6116b132de..065d61af530f 100644 --- a/pkgs/by-name/ko/konsave/package.nix +++ b/pkgs/by-name/ko/konsave/package.nix @@ -7,7 +7,7 @@ python3Packages.buildPythonApplication rec { pname = "konsave"; version = "2.2.0"; - format = "setuptools"; + format = "pyproject"; src = fetchPypi { inherit version; @@ -15,15 +15,17 @@ python3Packages.buildPythonApplication rec { hash = "sha256-tWarqT2jFgCuSsa2NwMHRaR3/wj0khiRHidvRNMwM8M="; }; - nativeBuildInputs = with python3Packages; [ setuptools-scm ]; - propagatedBuildInputs = with python3Packages; [ - pyyaml + build-system = with python3Packages; [ setuptools + setuptools-scm ]; - preCheck = '' - export HOME=$(mktemp -d) - ''; + dependencies = with python3Packages; [ + pyyaml + setuptools # pkg_resources is imported during runtime + ]; + + pythonImportsCheck = [ "konsave" ]; meta = with lib; { description = "Save Linux Customization"; diff --git a/pkgs/by-name/kr/krakenx/package.nix b/pkgs/by-name/kr/krakenx/package.nix index 509e1242d96c..a72ba9e4ac97 100644 --- a/pkgs/by-name/kr/krakenx/package.nix +++ b/pkgs/by-name/kr/krakenx/package.nix @@ -7,17 +7,21 @@ python3Packages.buildPythonApplication rec { pname = "krakenx"; version = "0.0.3"; - format = "setuptools"; + format = "pyproject"; src = fetchPypi { inherit pname version; sha256 = "1khw1rxra5hn7hwp16i6kgj89znq8vjsyly3r2dxx2z2bddil000"; }; - propagatedBuildInputs = lib.singleton python3Packages.pyusb; + build-system = [ python3Packages.setuptools ]; + + dependencies = [ python3Packages.pyusb ]; doCheck = false; # there are no tests + pythonImportsCheck = [ "krakenx" ]; + meta = with lib; { description = "Python script to control NZXT cooler Kraken X52/X62/X72"; homepage = "https://github.com/KsenijaS/krakenx"; diff --git a/pkgs/by-name/la/labelImg/package.nix b/pkgs/by-name/la/labelImg/package.nix index 2f9ed526065b..89522a492092 100644 --- a/pkgs/by-name/la/labelImg/package.nix +++ b/pkgs/by-name/la/labelImg/package.nix @@ -8,7 +8,7 @@ python3Packages.buildPythonApplication rec { pname = "labelImg"; version = "1.8.6"; - format = "setuptools"; + format = "pyproject"; src = fetchFromGitHub { owner = "HumanSignal"; @@ -17,8 +17,7 @@ python3Packages.buildPythonApplication rec { hash = "sha256-RJxCtiDOePajlrjy9cpKETSKsWlH/Dlu1iFMj2aO4XU="; }; - nativeBuildInputs = with python3Packages; [ - pyqt5 + nativeBuildInputs = [ qt5.wrapQtAppsHook ]; @@ -31,6 +30,11 @@ python3Packages.buildPythonApplication rec { }) ]; + build-system = with python3Packages; [ + setuptools + pyqt5 + ]; + dependencies = with python3Packages; [ distutils pyqt5 @@ -51,6 +55,8 @@ python3Packages.buildPythonApplication rec { makeWrapperArgs+=("''${qtWrapperArgs[@]}") ''; + pythonImportsCheck = [ "labelImg" ]; + meta = { description = "Graphical image annotation tool and label object bounding boxes in images"; mainProgram = "labelImg"; diff --git a/pkgs/by-name/le/legendary-heroic/package.nix b/pkgs/by-name/le/legendary-heroic/package.nix index de0de33ef06b..e917395009f0 100644 --- a/pkgs/by-name/le/legendary-heroic/package.nix +++ b/pkgs/by-name/le/legendary-heroic/package.nix @@ -10,7 +10,7 @@ in python3Packages.buildPythonApplication { pname = "legendary-heroic"; inherit version; - format = "setuptools"; + format = "pyproject"; src = fetchFromGitHub { owner = "Heroic-Games-Launcher"; @@ -19,13 +19,15 @@ python3Packages.buildPythonApplication { sha256 = "sha256-mOys7lOPrrzBUBMIM/JvKygFQ/qIGD68BDNigk5BCIo="; }; - propagatedBuildInputs = with python3Packages; [ + build-system = with python3Packages; [ + setuptools + ]; + + dependencies = with python3Packages; [ requests filelock ]; - disabled = python3Packages.pythonOlder "3.8"; - pythonImportsCheck = [ "legendary" ]; meta = with lib; { diff --git a/pkgs/by-name/le/legit/package.nix b/pkgs/by-name/le/legit/package.nix index 4873da60e4e9..f124496236d8 100644 --- a/pkgs/by-name/le/legit/package.nix +++ b/pkgs/by-name/le/legit/package.nix @@ -2,19 +2,24 @@ lib, python3Packages, fetchPypi, + writableTmpDirAsHomeHook, }: python3Packages.buildPythonApplication rec { pname = "legit"; version = "1.2.0.post0"; - format = "setuptools"; + format = "pyproject"; src = fetchPypi { inherit pname version; hash = "sha256-lJOWtoApqK9AWrIMkBkCNB72vVXH/sbatxFB1j1AaxE="; }; - propagatedBuildInputs = with python3Packages; [ + build-system = with python3Packages; [ + setuptools + ]; + + dependencies = with python3Packages; [ click clint crayons @@ -22,8 +27,11 @@ python3Packages.buildPythonApplication rec { six ]; - # no tests - doCheck = false; + nativeCheckInputs = [ + writableTmpDirAsHomeHook + ]; + + pythonImportsCheck = [ "legit" ]; meta = with lib; { homepage = "https://github.com/frostming/legit"; diff --git a/pkgs/by-name/le/lerpn/package.nix b/pkgs/by-name/le/lerpn/package.nix index 33f08c1315a7..d21c44e8c965 100644 --- a/pkgs/by-name/le/lerpn/package.nix +++ b/pkgs/by-name/le/lerpn/package.nix @@ -7,7 +7,7 @@ python3.pkgs.buildPythonApplication { pname = "lerpn"; version = "unstable-2023-06-09"; - format = "setuptools"; + format = "pyproject"; src = fetchFromGitea { domain = "gitea.alexisvl.rocks"; @@ -17,15 +17,19 @@ python3.pkgs.buildPythonApplication { hash = "sha256-4xqBHcOWHAvQtXS9CJWTGTdE4SGHxjghZY+/KPUgX70="; }; + build-system = with python3.pkgs; [ setuptools ]; + checkPhase = '' runHook preCheck patchShebangs test - substituteInPlace test --replace "#raise TestFailedException()" "sys.exit(1)" + substituteInPlace test --replace-fail "#raise TestFailedException()" "sys.exit(1)" ./test runHook postCheck ''; + pythonImportsCheck = [ "LerpnApp" ]; + meta = with lib; { homepage = "https://gitea.alexisvl.rocks/alexisvl/lerpn"; description = "Curses RPN calculator written in straight Python"; diff --git a/pkgs/by-name/le/lesscpy/package.nix b/pkgs/by-name/le/lesscpy/package.nix index a60f1074af1b..d2df8f483c69 100644 --- a/pkgs/by-name/le/lesscpy/package.nix +++ b/pkgs/by-name/le/lesscpy/package.nix @@ -7,21 +7,23 @@ python3Packages.buildPythonApplication rec { pname = "lesscpy"; version = "0.15.1"; - format = "setuptools"; + format = "pyproject"; src = fetchPypi { inherit pname version; hash = "sha256-EEXRepj2iGRsp1jf8lTm6cA3RWSOBRoIGwOVw7d8gkw="; }; - checkInputs = with python3Packages; [ pytestCheckHook ]; - pythonImportsCheck = [ "lesscpy" ]; - propagatedBuildInputs = with python3Packages; [ + build-system = with python3Packages; [ setuptools ]; + + dependencies = with python3Packages; [ ply six ]; - doCheck = false; # Really weird test failures (`nix-build-python2.css not found`) + nativeCheckInputs = with python3Packages; [ pytestCheckHook ]; + + pythonImportsCheck = [ "lesscpy" ]; meta = with lib; { description = "Python LESS Compiler"; diff --git a/pkgs/by-name/le/lesspass-cli/package.nix b/pkgs/by-name/le/lesspass-cli/package.nix index 4c24e825dbe3..ae3092ba608b 100644 --- a/pkgs/by-name/le/lesspass-cli/package.nix +++ b/pkgs/by-name/le/lesspass-cli/package.nix @@ -7,7 +7,8 @@ let inherit (python3.pkgs) buildPythonApplication - pytest + setuptools + pytestCheckHook mock pexpect ; @@ -16,7 +17,7 @@ in buildPythonApplication rec { pname = "lesspass-cli"; version = "9.1.9"; - format = "setuptools"; + format = "pyproject"; src = fetchFromGitHub { owner = repo; @@ -24,26 +25,30 @@ buildPythonApplication rec { rev = version; sha256 = "126zk248s9r72qk9b8j27yvb8gglw49kazwz0sd69b5kkxvhz2dh"; }; + sourceRoot = "${src.name}/cli"; - # some tests are designed to run against code in the source directory - adapt to run against - # *installed* code - postPatch = '' - for f in tests/test_functional.py tests/test_interaction.py ; do - substituteInPlace $f --replace "lesspass/core.py" "-m lesspass.core" - done - ''; + build-system = [ + setuptools + ]; nativeCheckInputs = [ - pytest + pytestCheckHook mock pexpect ]; - checkPhase = '' + + preCheck = '' mv lesspass lesspass.hidden # ensure we're testing against *installed* package - pytest tests + + # some tests are designed to run against code in the source directory - adapt to run against + # *installed* code + substituteInPlace tests/test_functional.py tests/test_interaction.py \ + --replace-fail "lesspass/core.py" "-m lesspass.core" ''; + pythonImportsCheck = [ "lesspass" ]; + meta = with lib; { description = "Stateless password manager"; mainProgram = "lesspass"; diff --git a/pkgs/by-name/li/lieer/package.nix b/pkgs/by-name/li/lieer/package.nix index 9e114def8285..d0689c031c14 100644 --- a/pkgs/by-name/li/lieer/package.nix +++ b/pkgs/by-name/li/lieer/package.nix @@ -8,7 +8,7 @@ python3Packages.buildPythonApplication rec { pname = "lieer"; version = "1.6"; - format = "setuptools"; + format = "pyproject"; passthru.updateScript = nix-update-script { }; @@ -19,12 +19,15 @@ python3Packages.buildPythonApplication rec { sha256 = "sha256-U3+Y634oGmvIrvcbSKrrJ8PzLRsMoN0Fd/+d9WE1Q7U="; }; - propagatedBuildInputs = with python3Packages; [ + build-system = with python3Packages; [ + setuptools + ]; + + dependencies = with python3Packages; [ notmuch2 google-api-python-client google-auth-oauthlib tqdm - setuptools ]; # no tests diff --git a/pkgs/by-name/li/lil-pwny/package.nix b/pkgs/by-name/li/lil-pwny/package.nix index d4d7ef083153..0749f69e08ec 100644 --- a/pkgs/by-name/li/lil-pwny/package.nix +++ b/pkgs/by-name/li/lil-pwny/package.nix @@ -7,7 +7,7 @@ python3.pkgs.buildPythonApplication rec { pname = "lil-pwny"; version = "2.0.0"; - format = "setuptools"; + format = "pyproject"; src = fetchFromGitHub { owner = "PaperMtn"; @@ -16,6 +16,8 @@ python3.pkgs.buildPythonApplication rec { hash = "sha256-EE6+PQTmvAv5EvxI9QR/dQcPby13BBk66KSc7XDNAZA="; }; + build-system = with python3.pkgs; [ setuptools ]; + # Project has no test doCheck = false; diff --git a/pkgs/by-name/ln/lndmanage/package.nix b/pkgs/by-name/ln/lndmanage/package.nix index c19ae58d9a0d..63a94ae318f8 100644 --- a/pkgs/by-name/ln/lndmanage/package.nix +++ b/pkgs/by-name/ln/lndmanage/package.nix @@ -7,7 +7,7 @@ python3Packages.buildPythonApplication rec { pname = "lndmanage"; version = "0.16.0"; - format = "setuptools"; + format = "pyproject"; src = fetchFromGitHub { owner = "bitromortac"; @@ -16,7 +16,11 @@ python3Packages.buildPythonApplication rec { hash = "sha256-VUeGnk/DtNAyEYFESV6kXIRbKqUv4IcMnU3fo0NB4uQ="; }; - propagatedBuildInputs = with python3Packages; [ + build-system = with python3Packages; [ + setuptools + ]; + + dependencies = with python3Packages; [ cycler decorator googleapis-common-protos @@ -33,12 +37,13 @@ python3Packages.buildPythonApplication rec { ]; preBuild = '' - substituteInPlace setup.py --replace '==' '>=' + substituteInPlace setup.py --replace-fail '==' '>=' ''; - preCheck = '' - export HOME=$(mktemp -d) - ''; + # requires lnregtest + doCheck = false; + + pythonImportsCheck = [ "lndmanage" ]; meta = with lib; { description = "Channel management tool for lightning network daemon (LND) operators"; diff --git a/pkgs/by-name/lo/log4shell-detector/package.nix b/pkgs/by-name/lo/log4shell-detector/package.nix index 4115d59d1586..7ae04268092d 100644 --- a/pkgs/by-name/lo/log4shell-detector/package.nix +++ b/pkgs/by-name/lo/log4shell-detector/package.nix @@ -7,7 +7,7 @@ python3.pkgs.buildPythonApplication { pname = "log4shell-detector"; version = "unstable-2021-12-16"; - format = "setuptools"; + format = "pyproject"; src = fetchFromGitHub { owner = "Neo23x0"; @@ -16,7 +16,11 @@ python3.pkgs.buildPythonApplication { sha256 = "sha256-N81x9hq473LfM+bQIQLWizCAsVc/pzyB84PV7/N5jk4="; }; - propagatedBuildInputs = with python3.pkgs; [ + build-system = with python3.pkgs; [ + setuptools + ]; + + dependencies = with python3.pkgs; [ zstandard ]; diff --git a/pkgs/by-name/lo/loxodo/package.nix b/pkgs/by-name/lo/loxodo/package.nix index c8a1ed6943f1..a85a686bdc5d 100644 --- a/pkgs/by-name/lo/loxodo/package.nix +++ b/pkgs/by-name/lo/loxodo/package.nix @@ -7,7 +7,7 @@ python3.pkgs.buildPythonApplication { pname = "loxodo"; version = "unstable-2021-02-08"; - format = "setuptools"; + format = "pyproject"; src = fetchFromGitHub { owner = "sommer"; @@ -18,7 +18,11 @@ python3.pkgs.buildPythonApplication { patches = [ ./wxpython.patch ]; - propagatedBuildInputs = with python3.pkgs; [ + build-system = with python3.pkgs; [ + setuptools + ]; + + dependencies = with python3.pkgs; [ six wxpython ]; diff --git a/pkgs/by-name/lx/lxd-image-server/package.nix b/pkgs/by-name/lx/lxd-image-server/package.nix index b1d68f477418..f89cde401e78 100644 --- a/pkgs/by-name/lx/lxd-image-server/package.nix +++ b/pkgs/by-name/lx/lxd-image-server/package.nix @@ -10,7 +10,7 @@ python3.pkgs.buildPythonApplication rec { pname = "lxd-image-server"; version = "0.0.4"; - format = "setuptools"; + format = "pyproject"; src = fetchFromGitHub { owner = "Avature"; @@ -24,8 +24,12 @@ python3.pkgs.buildPythonApplication rec { ./run.patch ]; - propagatedBuildInputs = with python3.pkgs; [ + build-system = with python3.pkgs; [ setuptools + ]; + + dependencies = with python3.pkgs; [ + setuptools # pkg_resources is imported during runtime attrs click inotify @@ -45,6 +49,8 @@ python3.pkgs.buildPythonApplication rec { doCheck = false; + pythonImportsCheck = [ "lxd_image_server" ]; + passthru.tests.lxd-image-server = nixosTests.lxd-image-server; meta = with lib; {