Skip to content

Commit ee013f1

Browse files
committed
python3Packages.xformers: pass custom stdenv to buildPythonApplication with an override
Passing `stdenv` directly to `buildPythonPackage` or `buildPythonApplication` is deprecated with `oldestSupportedRelease = 2511`.
1 parent 5f4c3b6 commit ee013f1

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

pkgs/development/python-modules/xformers/default.nix

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ let
3535
# version 0.0.32.post2 was confirmed to break CUDA.
3636
# Remove this note once the latest published revision "just works".
3737
version = "0.0.30";
38+
effectiveStdenv = if cudaSupport then cudaPackages.backendStdenv else stdenv;
3839
in
39-
buildPythonPackage {
40+
buildPythonPackage.override { stdenv = effectiveStdenv; } {
4041
pname = "xformers";
4142
inherit version;
4243
pyproject = true;
@@ -66,8 +67,6 @@ buildPythonPackage {
6667
TORCH_CUDA_ARCH_LIST = "${lib.concatStringsSep ";" torch.cudaCapabilities}";
6768
};
6869

69-
stdenv = if cudaSupport then cudaPackages.backendStdenv else stdenv;
70-
7170
buildInputs =
7271
lib.optional stdenv.hostPlatform.isDarwin openmp
7372
++ lib.optionals cudaSupport (

0 commit comments

Comments
 (0)