diff --git a/pkgs/python-packages/depthcharge-tools/default.nix b/pkgs/python-packages/depthcharge-tools/default.nix index 240960f1e..ea46f5e96 100644 --- a/pkgs/python-packages/depthcharge-tools/default.nix +++ b/pkgs/python-packages/depthcharge-tools/default.nix @@ -3,12 +3,13 @@ fetchFromGitHub, pypaBuildHook, pypaInstallHook, + pythonImportsCheckHook, setuptools, - stdenv + stdenv, + wrapPython, }: stdenv.mkDerivation (finalAttrs: { pname = "depthcharge-tools"; version = "0.6.2"; - format = "setuptools"; src = fetchFromGitHub { owner = "alpernebbi"; @@ -20,16 +21,28 @@ nativeBuildInputs = [ pypaBuildHook pypaInstallHook + wrapPython ]; propagatedBuildInputs = [ setuptools #< needs `pkg_resources` at runtime ]; + nativeCheckInputs = [ + pythonImportsCheckHook + ]; + + postFixup = '' + wrapPythonPrograms + ''; + pythonImportsCheck = [ "depthcharge_tools" ]; + doCheck = true; + strictDeps = true; + meta = with lib; { homepage = "https://github.com/alpernebbi/depthcharge-tools"; description = "Tools to manage the Chrome OS bootloader"; diff --git a/pkgs/python-packages/fastcluster/default.nix b/pkgs/python-packages/fastcluster/default.nix index 3b879c671..d25f36629 100644 --- a/pkgs/python-packages/fastcluster/default.nix +++ b/pkgs/python-packages/fastcluster/default.nix @@ -5,7 +5,8 @@ numpy, pypaBuildHook, pypaInstallHook, - setuptools, + pythonImportsCheckHook, + setuptoolsBuildHook, stdenv, }: stdenv.mkDerivation (finalAttrs: { pname = "fastcluster"; @@ -22,17 +23,20 @@ oldest-supported-numpy pypaBuildHook pypaInstallHook - setuptools + setuptoolsBuildHook ]; - # propagatedBuildInputs = [ - # numpy - # ]; + nativeCheckInputs = [ + pythonImportsCheckHook + ]; pythonImportsCheck = [ "fastcluster" ]; + doCheck = true; + strictDeps = true; + meta = with lib; { homepage = "https://danifold.net/fastcluster.html"; description = "fast hierarchical clustering routines for R and Python"; diff --git a/pkgs/python-packages/feedsearch-crawler/default.nix b/pkgs/python-packages/feedsearch-crawler/default.nix index 94c63cc9c..4f0182e67 100644 --- a/pkgs/python-packages/feedsearch-crawler/default.nix +++ b/pkgs/python-packages/feedsearch-crawler/default.nix @@ -3,6 +3,7 @@ fetchFromGitHub, pypaBuildHook, pypaInstallHook, + pythonImportsCheckHook, stdenv, # nativeBuildInputs python packages poetry-core, @@ -62,10 +63,17 @@ stdenv.mkDerivation { yarl ]; + nativeCheckInputs = [ + pythonImportsCheckHook + ]; + pythonImportsCheck = [ "feedsearch_crawler" ]; + doCheck = true; + strictDeps = true; + meta = with lib; { homepage = "https://feedsearch.dev"; description = "Crawl sites for RSS, Atom, and JSON feeds"; diff --git a/pkgs/python-packages/listparser/default.nix b/pkgs/python-packages/listparser/default.nix index 55f361f44..4d95f2336 100644 --- a/pkgs/python-packages/listparser/default.nix +++ b/pkgs/python-packages/listparser/default.nix @@ -7,6 +7,7 @@ pypaBuildHook, pypaInstallHook, pytestCheckHook, + pythonImportsCheckHook, requests, stdenv, }: @@ -34,6 +35,7 @@ stdenv.mkDerivation (finalAttrs: { nativeCheckInputs = [ pytestCheckHook + pythonImportsCheckHook ]; pythonImportsCheck = [ @@ -41,6 +43,7 @@ stdenv.mkDerivation (finalAttrs: { ]; doCheck = true; + strictDeps = true; passthru.updateScript = nix-update-script { }; diff --git a/pkgs/python-packages/ols/default.nix b/pkgs/python-packages/ols/default.nix index 506618b70..ea2688659 100644 --- a/pkgs/python-packages/ols/default.nix +++ b/pkgs/python-packages/ols/default.nix @@ -1,6 +1,5 @@ { lib, - buildPythonPackage, fetchFromGitea, aiohttp, fastcluster, @@ -9,10 +8,11 @@ numpy, pypaBuildHook, pypaInstallHook, + pythonImportsCheckHook, scipy, - setuptools, + setuptoolsBuildHook, stdenv, -# , wheel + wrapPython, }: stdenv.mkDerivation { pname = "ols"; version = "0.1.0-unstable-2024-06-21"; @@ -49,14 +49,24 @@ nativeBuildInputs = [ pypaBuildHook pypaInstallHook - setuptools - # wheel + setuptoolsBuildHook + wrapPython ]; + nativeCheckInputs = [ + pythonImportsCheckHook + ]; + + postFixup = '' + wrapPythonPrograms + ''; pythonImportsCheck = [ "ols" ]; + doCheck = true; + strictDeps = true; + meta = with lib; { homepage = "https://codeberg.org/tpikonen/ols"; description = "HTTP location service with Mozilla Location Service (MLS) compatible API"; diff --git a/pkgs/python-packages/pa-dlna/default.nix b/pkgs/python-packages/pa-dlna/default.nix index b7b424483..a7a0fda3a 100644 --- a/pkgs/python-packages/pa-dlna/default.nix +++ b/pkgs/python-packages/pa-dlna/default.nix @@ -5,9 +5,11 @@ libpulseaudio, pypaBuildHook, pypaInstallHook, + pythonImportsCheckHook, psutil, pulseaudio, stdenv, + wrapPython, }: stdenv.mkDerivation (finalAttrs: { @@ -32,6 +34,7 @@ stdenv.mkDerivation (finalAttrs: { flit-core pypaBuildHook pypaInstallHook + wrapPython ]; propagatedBuildInputs = [ @@ -42,10 +45,21 @@ stdenv.mkDerivation (finalAttrs: { # ffmpeg flac lame ]; + nativeCheckInputs = [ + pythonImportsCheckHook + ]; + + postFixup = '' + wrapPythonPrograms + ''; + pythonImportsCheck = [ "pa_dlna" ]; + doCheck = true; + strictDeps = true; + meta = with lib; { homepage = "https://pa-dlna.readthedocs.io/en/stable/"; description = "An UPnP control point forwarding PulseAudio streams to DLNA devices"; diff --git a/pkgs/python-packages/pyln-bolt7/default.nix b/pkgs/python-packages/pyln-bolt7/default.nix index 49f00a139..b0d147046 100644 --- a/pkgs/python-packages/pyln-bolt7/default.nix +++ b/pkgs/python-packages/pyln-bolt7/default.nix @@ -1,12 +1,12 @@ # based on: { - buildPythonPackage, clightning, poetry-core, pyln-proto, pypaBuildHook, pypaInstallHook, pytestCheckHook, + setuptoolsBuildHook, stdenv, unzip, }: @@ -33,4 +33,7 @@ stdenv.mkDerivation { pyln-proto ]; nativeCheckInputs = [ pytestCheckHook ]; + + doCheck = true; + strictDeps = true; } diff --git a/pkgs/python-packages/pyln-client/default.nix b/pkgs/python-packages/pyln-client/default.nix index 5d3d44c0e..3b8da51e9 100644 --- a/pkgs/python-packages/pyln-client/default.nix +++ b/pkgs/python-packages/pyln-client/default.nix @@ -30,4 +30,7 @@ stdenv.mkDerivation { ]; nativeCheckInputs = [ pytestCheckHook ]; + + doCheck = true; + strictDeps = true; } diff --git a/pkgs/python-packages/pyln-proto/default.nix b/pkgs/python-packages/pyln-proto/default.nix index cff202822..de112fc3b 100644 --- a/pkgs/python-packages/pyln-proto/default.nix +++ b/pkgs/python-packages/pyln-proto/default.nix @@ -46,4 +46,7 @@ stdenv.mkDerivation { ]; nativeCheckInputs = [ pytestCheckHook ]; + + doCheck = true; + strictDeps = true; }