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
38 lines
806 B
Nix
38 lines
806 B
Nix
{
|
|
extraPythonPackages ? (_ps: [ ]),
|
|
python3Packages,
|
|
python3,
|
|
util-linux,
|
|
systemd,
|
|
nix,
|
|
mkShell,
|
|
}:
|
|
let
|
|
package = python3Packages.buildPythonApplication {
|
|
pname = "test-driver";
|
|
version = "0.0.1";
|
|
propagatedBuildInputs = [
|
|
util-linux
|
|
systemd
|
|
python3Packages.colorama
|
|
python3Packages.junit-xml
|
|
nix
|
|
]
|
|
++ extraPythonPackages python3Packages;
|
|
nativeBuildInputs = [ python3Packages.setuptools ];
|
|
format = "pyproject";
|
|
src = ./.;
|
|
passthru.devShell = mkShell {
|
|
packages = [
|
|
(python3.withPackages (_ps: package.propagatedBuildInputs))
|
|
package.propagatedBuildInputs
|
|
python3.pkgs.pytest
|
|
];
|
|
shellHook = ''
|
|
export PYTHONPATH="$(realpath .):$PYTHONPATH"
|
|
'';
|
|
};
|
|
};
|
|
in
|
|
package
|