don't use python3 in python's callPackage scope

This commit is contained in:
Jörg Thalheim
2025-04-04 17:30:19 +02:00
parent 51c347bd5f
commit 7ed669a093

View File

@@ -14,11 +14,12 @@
pytest-subprocess, # fake the real subprocess behavior to make your tests more independent. pytest-subprocess, # fake the real subprocess behavior to make your tests more independent.
pytest-timeout, # Add timeouts to your tests pytest-timeout, # Add timeouts to your tests
pytest-xdist, # Run tests in parallel on multiple cores pytest-xdist, # Run tests in parallel on multiple cores
python3, buildPythonApplication,
runCommand, runCommand,
setuptools, setuptools,
webkitgtk_6_0, webkitgtk_6_0,
wrapGAppsHook, wrapGAppsHook,
python,
lib, lib,
stdenv, stdenv,
}: }:
@@ -48,7 +49,7 @@ let
]; ];
# Deps including python packages from the local project # Deps including python packages from the local project
allPythonDeps = [ (python3.pkgs.toPythonModule clan-cli) ] ++ externalPythonDeps; allPythonDeps = [ (python.pkgs.toPythonModule clan-cli) ] ++ externalPythonDeps;
# Runtime binary dependencies required by the application # Runtime binary dependencies required by the application
runtimeDependencies = [ runtimeDependencies = [
@@ -71,9 +72,9 @@ let
testDependencies = runtimeDependencies ++ allPythonDeps ++ externalTestDeps; testDependencies = runtimeDependencies ++ allPythonDeps ++ externalTestDeps;
# Setup Python environment with all dependencies for running tests # Setup Python environment with all dependencies for running tests
pythonWithTestDeps = python3.withPackages (_ps: testDependencies); pythonWithTestDeps = python.withPackages (_ps: testDependencies);
in in
python3.pkgs.buildPythonApplication rec { buildPythonApplication rec {
name = "clan-vm-manager"; name = "clan-vm-manager";
src = source; src = source;
format = "pyproject"; format = "pyproject";