lib/test/container-test-driver: Fix extraPythonPackages support
Fix `extraPythonPackages` support in the container test driver. It triggered the following warning from `nixpkgs`: ``` python3Packages = throw "do not use python3Packages when building Python packages, specify each used package as a separate argument"; # do not remove ``` The following `callPackage` usage triggered the `throw`: ``` hostPackages.python3.pkgs.callPackage ``` The change to a regular `callPackage` i`nvocation fixes this issue. Added a container test with a popular package to ensure compatibility in the future. Closes: #5459
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
testDriver = hostPkgs.python3.pkgs.callPackage ./package.nix {
|
||||
testDriver = hostPkgs.callPackage ./package.nix {
|
||||
inherit (config) extraPythonPackages;
|
||||
inherit (hostPkgs.pkgs) util-linux systemd nix;
|
||||
};
|
||||
|
||||
@@ -2,28 +2,24 @@
|
||||
extraPythonPackages ? (_ps: [ ]),
|
||||
python3Packages,
|
||||
python3,
|
||||
buildPythonApplication,
|
||||
setuptools,
|
||||
util-linux,
|
||||
systemd,
|
||||
nix,
|
||||
colorama,
|
||||
junit-xml,
|
||||
mkShell,
|
||||
}:
|
||||
let
|
||||
package = buildPythonApplication {
|
||||
package = python3Packages.buildPythonApplication {
|
||||
pname = "test-driver";
|
||||
version = "0.0.1";
|
||||
propagatedBuildInputs = [
|
||||
util-linux
|
||||
systemd
|
||||
colorama
|
||||
junit-xml
|
||||
python3Packages.colorama
|
||||
python3Packages.junit-xml
|
||||
nix
|
||||
]
|
||||
++ extraPythonPackages python3Packages;
|
||||
nativeBuildInputs = [ setuptools ];
|
||||
nativeBuildInputs = [ python3Packages.setuptools ];
|
||||
format = "pyproject";
|
||||
src = ./.;
|
||||
passthru.devShell = mkShell {
|
||||
|
||||
Reference in New Issue
Block a user